[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 01/11] libx86: introduce helper to fetch cpuid leaf


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 25 Jan 2022 16:03:16 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bFMJfLtsgAcoesICBqMP+HjYvME6QiTK/0iCNxlvy88=; b=WB+qM6phO/e5n4qjCW1Q+OuEJVY7n0gCxecBXnB7qj1RYOusUX4hINKwWZdslMIPSPwGdIZWNvmotyvYFXoDVsVGUMbVa5wXDVdf+i0PTUYFtzNoP4IVG2ho/dZHoap7egMH6mAU9DCjzp0z8uVL+7nW/61he7iGFu2kDK2fhHJRelrS2Vs0oP/T0vW59FWpA/Xb9Sksr4qDJWjAHQaL77ATnFEUzCHT5Ph7kxCxsynIYbY1Tb1uKYampJZzm1gnNNuD+2na5/e7D+EWNbiYZqSY0Si0u6Mjcih0YL4kielaawMbSsI1lBMRrqAyl+tr5d7i9m1AijPzsdBG8OyiZQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kcGpPX59oGZqaR1NQIdFDb2/3uRPlKudJOvlBMEbyLKkJKWgYKyEeYC/pAl2XvUNRaM3JzJW4KHpiot8B8qFRn+2vLJXDwrluKtfc0BM2l2GgrOKCZS+v5Zj1VzalMBuEeZ18IhJJs5gb5Hs3rSTVg2ohChGiTOmYW2I9+TLlhAlED74FgjjMJESqfeHVjmT4czl8FQv/MCzHEOrc6fPOoV8zoLG1kzWO4zVbNwsjrGV7yeJ7YXZIp9f6GQXlLux/glKPw8ighIXB8vYNc7j54y7zWMylx5TkTqJZr9doYGnAF2jv0i0Vu4Q2yjNJ2UxuMwzbkpp2MpNrTFm4dn8Ng==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 25 Jan 2022 15:03:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 25.01.2022 15:49, Roger Pau Monne wrote:
> Introduce a helper based on the current Xen guest_cpuid code in order
> to fetch a cpuid leaf from a policy. The newly introduced function in
> cpuid.c should not be directly called and instead the provided
> x86_cpuid_get_leaf macro should be used that will properly deal with
> const and non-const inputs.
> 
> Also add a test to check that the introduced helper doesn't go over
> the bounds of the policy.
> 
> Note the code in x86_cpuid_copy_from_buffer is not switched to use the
> new function because of the boundary checks against the max fields of
> the policy, which might not be properly set at the point where
> x86_cpuid_copy_from_buffer get called, for example when filling an
> empty policy from scratch.
> 
> Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> ---
> Changes since v6:
>  - Add more tests.
>  - Drop Jan R-b.

Please feel free to reinstate.

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.