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

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


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 27 Sep 2022 16:32:43 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=GKpgd/uqhjgVwltKXRhN4PVYUyUCgwjzL12ncQ4bOBM=; b=oCBRolu9M0hM9J33JUPx2XYX/SOseBnLLZ48frA39Vx37fW8ljs/6vg5u59kSucY20McVgVVzo2ujbanYnaM1ENQ6KQjRGL+xNtICXJQP7Cod9qfYtukzMrWxEVlbuEXrDBbCisjuaM3z8FyrF73vYztcHcCMXxz1aTE37ggCGbLkvIRorW2tiVLFwIub21ljzMpoYm1lIygF/4oqHJc/PWfcT7Fz66h9oWm+CDboPrZq4e7BlxuAApqLRmj01GM+NR8/CfEKe37E1+hWGHraaN7D2IdKYjxvgtLTTZRIo6vaK6BFgZm2n5OzNrSVQxi+Bh8iPynJTu9SgkDdCVqtA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UB7f4pj5zLjAgS9XA+tCaMAjjU3cweKIPY6XOcZ460AzeKZqm3Q7YnQXujS14yDrnu9gDEMhfnu8Ocu0DyKBT6/2/EMlcZoiGrQKg/MKeOnOd07PUOFa6d5Qudp4PA0BnatJ7XLCEkPqqSx28h2hWkd0mBaPnlOsWcJ+AfRb9BNfgMRbXQpEXvxFAH1aMOn+euEBNZCFy2/ZMQRs/c5YJCnHJlcN6wMeOkPcvGvSMo+QyM6uFBrMV1MbF2Lh7/sKbSS31q4s3bboUwQD6R6CdtnkV/a+WIbS2FamdmQSBX40GNZjmvwjC5UVOZEhlP5Gh+3T8RXnfoPESb7GLHN4cw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.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:32:58 +0000
  • Ironport-data: A9a23:m7v54aPehYnR3zXvrXNrnJbmzE6nJRDYMBhcApeMyHXZr8wC29aueOYaDEMozobXot+C/f1qyJFR2vrPfGl0f9FEt/cnDBAuimzt+Blf5wePG8oER9RPa26gCeC51s+c5RdU1JNi065oR9lYFiwQjs2IxpquHEgFqQJi+nOGfyl1tj5zHOJES0VuyLHMNDxr1ce9QonkXygeq4ME6s8qqChY9izYIipGHUnfYyjak+fmkCAZbFNUMvn+FHMYuveo4k49sFUug1uNfcH7yykbmuROLDBZJTtXJG9nMs8ksKRQxql+bI+HnPsfoHthDCO47XuyAUzSHmN0NpKdJghIjqe5s4xFq/0kHLXt3GCzb/RZy/+F8H0pDi9xMf7FNhpQ//YIiUg6vwnvqIjcbZsjoxP57MEpT4G0/YLwbxzAYMgQqV+N9RuqR+iVHtHw64I6jDmoaYo3jNQHjY5v96IjJgNZqMBkFgi5X/24UjfHU1nUse7Qncr6+nrqUspw9hGHHZBF68FzwP8dluGD5rnQqfj/O6GAEh6DxKAFcdirmo2sMSiFphcHHdRwRV77Zy0n47UzwwGRqTVnh9meBnPGaay63y4/9ODqb6b3ENInf+17hw1QAXHI7pI5vxo9RiqG/fiVGZI0VmgbOYI5vr0+iRo90Hl939dRGDjO3EamfP6P4LIulEZqbsarnq5Uj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kPo6i6VEwpaGQvCt8MzMXs/0bMKU6ddNnZdviYkfpz2kxnQ/EBZd0yjHpNhADGsa5/6w2Hfv6bUV9l7FuzAnV24t1f4L1FcGloV7F3m9f6ZSt67TkFNtTKk1j60VmodG81rAAMHG69ZUGZIqEDF44LOpC3TEJuwUUtBz4BpzSagnYyEzSnVz0roLz+7U0f3aFWVl5Xx5XunzUAzZyLSg/SD83qXGjOwxc35KLpFrHzZR0V67bgpl2a5vF3Vgn4uUjRz3KbT4U4DVm48EbojOo7oQ9kQeZbm7c48tBymaFSesUJ25b6CZNjJqcOwkPmMoB37My3+h4Q5dp8XQ/zfdy8tQrRmgvKrujwuY0SI8t5koR+pi6Zm9XvMKrlnEQemYeZlAkP+2jb+hwoRKB7XzRcFGeJjXUftAjQhc3oEQfUPU8UqyGIdWYqCYuzSW/Mqpb5pQd2XGCENGMwlIDa/pbvO80baFrXaKQv2VKKLGgzAG1I3nwZzUNuL9J245qBhNXnlc976mYfAgh7yXV5PFnrFnk+Neah766rXGiQwXCVqEEmNzMrU4bJZWDr5KeAtbP0UBZaf6XjG3rBVmkPER1nU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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>

> ---
> 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?

> 
> --- 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.

Thanks, Roger.



 


Rackspace

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