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

Re: [PATCH 3/3] x86: Use CpuidUserDis if an AMD HVM guest toggles CPUID faulting


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 9 May 2023 16:41:49 +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=KlMsGqj00J+Fvd5BspK73zAJsW0hxZEdfb+xg962teA=; b=lLOvKYeuVoPgJZLyS5+0Jj8BjIarqiyB3ynDnqpk4eV/aoMX9t0c/F9KyhJLqA+ydk3a0NiYb7Kyp7kQVgoNjwHrfhADAW8xSCCMM2PzYFa/swzLv3J0GinzFDRLVEKbdsA7y4i/oWz3e0HICMalOctnLGcMQJeWQdYyQJVteTVEOnjtzmIw1w17xQzqguVaO6uFTcBCAql6Klmhbv+PEjvZmW/zGH47F+OJu42aIKn8IIGKQM+0LkXR37ao4arRWzuy2KR5NHIIF/bQY8f/ea/BYRgHLqS3qbwtA/3UtsI0qEe53FK4sPCtIYLV+HoaUCTh02M8CmD9aC4m1vGM7g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KVarJC5A4tZcks8d7RXFqdYItQjc9VjaNXOkJsJu2Qyqlq/Oipuck5XZWoRaN9swapJUu8Bmfg2AJyUpGfCBBVlW9V6OOqaZVr5aCgCg4X+KQtqLqQLGrgyS8pUv53WqpEqToW8ufItgHmBpjmDnNaBh7bfNGSiyZR2tV8B5/PcXBH+KV5gC0QthYneB891SXm9/fc/lGJIJLxL49Sv1sXKAFwBEnzj0AKlgqJx6LD8DggxTNamQwwlcHDQeZtVIVAnCTW9/n7aENA+0wg3WsSZEyo7zSRprSjqlxbX0MVlsF6ElpNXxlcNSixNWjt13Cu/PKN0CG4Ffat8AXbBQhA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 09 May 2023 14:42:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 09.05.2023 12:05, Andrew Cooper wrote:
> On 08/05/2023 2:18 pm, Jan Beulich wrote:
>> On 05.05.2023 19:57, Alejandro Vallejo wrote:
>>> This is in order to aid guests of AMD hardware that we have exposed
>>> CPUID faulting to. If they try to modify the Intel MSR that enables
>>> the feature, trigger levelling so AMD's version of it (CpuidUserDis)
>>> is used instead.
>>>
>>> Signed-off-by: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
>>> ---
>>>  xen/arch/x86/msr.c | 9 ++++++++-
>>>  1 file changed, 8 insertions(+), 1 deletion(-)
>> Don't you also need to update cpu-policy.c:calculate_host_policy()
>> for the guest to actually know it can use the functionality? Which
>> in turn would appear to require some form of adjustment to
>> lib/x86/policy.c:x86_cpu_policies_are_compatible().
> 
> I asked Alejandro to do it like this.
> 
> Advertising this to guests requires plumbing another MSR into the
> infrastructure which isn't quite set up properly let, and is in flux
> from my work.
> 
> For now, this just lets Xen enforce the policy over PV guests, which is
> an improvement in and of itself.

But as per the title this patch is about HVM guests (aiui the PV aspect
is taken care of already without the patch here). In any event - if the
omissions are intentional (for the time being), then I think that wants
mentioning in the description.

Jan



 


Rackspace

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