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

Re: [PATCH 02/13] libx86: introduce helper to fetch cpuid leaf


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 20 Jun 2023 13:53:53 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; 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=Wcnxm2UA4PTZoJHwXgvyEwJ37MxC7qs4DMoAl6fX3ac=; b=QN5JZCnC/TvDAw+XhnBD1OGhL2oIdU/EKpPSQn2vKtrj06sFabxMcnJdEvjXxCUqlJjuwzSY9sUhNA43U5SvERqE5v1T+j+Jlu/RUSOp31KvDCKsCjWPXTHuRRM3g9cl332UpWEa0nahYLvPj05XjTIegx4QVrd4rrWNpassNYutP9fWMhsLjPr4NDLqKjPzJoTSGjNZJ/94twgBcugMcEQ/Vc05u7yK+4oRt7KSRYsdTQpjmZCuA/W+BdlVHHbEBIvzTg9tgSFXWui/i7kvdm4HyJwMfHNVYfCxjOcNl1fE6QiWW7GHpQJcrz6XwIgaNIh5CLGRr+4+pQjQu8rAGA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Apu0RCuUiaTB6oMwO0q279+v7GjRHj8Ja0W9/4kHxFa5IyWQ86mgpZrRAR3Rnc4hZ+EOl+jGSoec8RotJMBFal5xHwkG+WDfUSTp1ute0h+cl9UJFfPAc3Pa6rwesiugi+j6qUxSIGNJAZLR4ugMMbWW3+K23xMqJQARAk8XkpY1oRYBdppiAu97dx/3/pKIe9HvtOxkCMDlEYbahQCh4WTaO9wF8wHqRP5KQalxZwAL0BNkyKmpXPKc03B7xFDHYOzrt3K/fWHy6VHxSETHglX1c4jxwl1CjzVaJ09xdo1D+1NcwN9B/aR74kCBPwXmdBlTQa1HpMtrywY0AfzaYg==
  • 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, 20 Jun 2023 11:54:06 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16.06.2023 15:10, 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.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> ---
> Changes since v6:
>  - Add more tests.
>  - Drop Jan R-b.

Feel free to re-instate.

Jan



 


Rackspace

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