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

Re: [PATCH v2] x86/PVH: restore VMX APIC assist for Dom0


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 27 Sep 2022 16:38:28 +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=65M9lXvXBp2v5RsA2yy8iL3oNSjyXqFGYBQhf5j/OBo=; b=aiBO7NUxlkBfX2i2tVQsPoljL8bmKcMk8M8tp+9FeCTDxVXBCffMLQo5VU6XGckMKznOu8Bi3KR4R2s2+0KVznG7sUygIyqp03MqjZ2mPsdA9PLwv0+FF6uqV9sP8kQ2FboDHO579KzBN1b9INk7he1RQgYaAUAC5tLkmEfKes7IbXU5ig1cI8arIIKS2kVTKSQHP138oe9fUvSQtaQzybSBl9FCyfqjSo8OPEW+vWqx+ANMjd7Zd5/FwJXqCnF4E49otOeKg/whycxOG7K6pYdn+uhzXY2unJ2PkW99Dp6dY52V22/+iH3iZUFB04MslEHfVwsCXlIp75DLKGQgbw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Za0r6dVn29wcvWU3JDso1EyZ4RaSwhvIEPEhkX/aGs7XX0nM3Ai/ALUZwVC9uaEo8hZ2oDt8aGeL3ZfjsOwq1dFKxah4xEmRBNjU3MeYlmYG78zRddJ/DG3RfXG++nlJHJiaqn574XcpuMvzI/kmHQ+IIpnm7NPCMRfRzLV5ob55kEABPD33kLTyaTNAjmsUsTn5FrCGys3ZaJu382o6jE5n82XljzNcRA0ge0wozzTdzgGxQjzfvY/xf0kKPPqLoFlLylOI++kjr0Cu7C7D0+oUzdzUb4aIb0ZcLwDpkbLu4sAD9Ta0w2tYsgMTMdX97YSForrshOvcO7dko7Caqg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jane Malalane <jane.malalane@xxxxxxxxxx>
  • Delivery-date: Tue, 27 Sep 2022 14:38:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 27.09.2022 16:32, Roger Pau Monné wrote:
> On Mon, Sep 26, 2022 at 11:58:34AM +0200, Jan Beulich wrote:
>> I don't expect it was intended to default PVH Dom0 to "no assist" mode.
>> Introduce command line (sub-)options allowing to suppress enabling of
>> the assists, paralleling the guest config settings for DomU, but restore
>> the defaulting to "enabled".
>>
>> Fixes: 2ce11ce249a3 ("x86/HVM: allow per-domain usage of hardware 
>> virtualized APIC")
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks.

>> ---
>> v2: Guard the setting of XEN_X86_ASSISTED_X{,2}APIC by assists actually
>>     being available.
>> ---
>> Besides the issue caused here (the manifestation of which appears to
>> correlate with the other fallout Andrew is trying to deal with) I'm
>> observing further warnings, but I guess these have been there for some
>> time (perhaps forever): When parsing AML and encountering the objects
>> describing the CPUs, Linux would find entries with the original APIC
>> IDs. If those don't match the ones we assign in pvh_setup_acpi_madt(),
>> the kernel will wrongly consider the entries to describe further CPUs,
>> which it therefore would deem hot-pluggable. This again results in
>> warnings, this time "NR_CPUS/possible_cpus limit of ... reached".
> 
> Hm, I'm handling this differently on FreeBSD AFAICT, by using a Xen
> specific driver for the Processor objects when running as dom0, which
> replaces the usage of the native driver.  The only function of that
> driver being the uploading of the performance states in the Processor
> object to Xen.
> 
> I think we ought to do something similar in Linux and just use the
> Processor objects in order to upload the performance related data to
> Xen, but ignore anything else.
> 
> What happens on PV when the number of vCPU available for dom0 is
> smaller than the number of physical CPUs?  Does it also consider the
> unmatched Processor AML objects to be hotpluggable CPUs?

I have to admit that I don't recall for sure, and I'd rather not write
something I'm not sure of.

>> --- a/docs/misc/xen-command-line.pandoc
>> +++ b/docs/misc/xen-command-line.pandoc
>> @@ -767,7 +767,8 @@ Specify the bit width of the DMA heap.
>>  
>>  ### dom0
>>      = List of [ pv | pvh, shadow=<bool>, verbose=<bool>,
>> -                cpuid-faulting=<bool>, msr-relaxed=<bool> ]
>> +                cpuid-faulting=<bool>, msr-relaxed=<bool>,
>> +                assisted-xapic=<bool>, assisted-x2apic=<bool> ]
>>  
>>      Applicability: x86
>>  
>> @@ -828,6 +829,10 @@ Controls for how dom0 is constructed on
>>  
>>      If using this option is necessary to fix an issue, please report a bug.
>>  
>> +*   The `assisted-xapic` and `assisted-x2apic` options, defaulting to true,
>> +    allow disabling of the respective hardware assists.  These are 
>> applicable
>> +    to PVH Dom0 only, and their effect is limited to VT-x.
> 
> Explicitly mentioning VT-x here is likely to become stale if AMD is
> also updated to support the options.  I might suggest to leave it out,
> albeit I won insist if you have a strong opinion about it.

At this point the statement expresses reality. Imo the half sentence
wants dropping when AMD gains respective functionality.

Jan



 


Rackspace

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