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

Re: [PATCH v9 2/2] x86/xen: Allow per-domain usage of hardware virtualized APIC


  • To: Jane Malalane <jane.malalane@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 6 Apr 2022 15:44:44 +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=heBKlj06CTYVGHNsPSMUURzlVSPp71oReOj5mYLKT1s=; b=Ae+uqry6Jiz8vLHDpKR1g6QfM/EAkNXhe7taimV+MNcAZodywOXgOfJkkVclXj2YXpMJTIe22ObJRPpSfH/7JlNrNrvnYIokdlJLE6Ia/yDTxADIHLr4ML0DjHAU8ZRh2KsLQErzofXsUva/l2cEELZlqVc2oEaqK4Feq5QgK3qGHw/Eh5WNmf0Y83v6dwx877VLHWWJCpXcCXZDZmMOoO5AIaqfXBoeHo9cbb4b/nuEK1mHpl+klG4tNMk2ySwewhm90X3nc5MtdUjwOKeUVYqSSmCzAV8eZtrXxAxpP3mopql7aFMZOpXsIfJ2YQd6Cszx3VAxWnbp2w+NA3v4Ew==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OkNmUGHNjYX74gs/hM94nfUoKIce2VCDgqMYDi7heq/cjsmJO1W8TMmePu6cS6yrp+0wNtQTT956VLLsDhN6AMrF4wx6rEuyUT4Jiq/KcnrGawLmGSodHYOQ6njXvk6IXuHLba8gl7IKguF4MfLS2lLZxcePG4gS4qnSbVluKoBTGeGcIMvbI9MQvKbL/8amUqvL8589n/mb864+kAuRXf8fpOAbYAn67MZ4xIE8cH58wXfELG+DHaGM1onFLY1eyLtF3f4Di77HAWsgLikPmODhULHwCnlUY6qgyv/RS5joO2FhlkpuQdKHsHryFg9GGFcTsx5p2plMFJc521P1cA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 06 Apr 2022 13:45:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.04.2022 12:47, Jane Malalane wrote:
> Introduce a new per-domain creation x86 specific flag to
> select whether hardware assisted virtualization should be used for
> x{2}APIC.
> 
> A per-domain option is added to xl in order to select the usage of
> x{2}APIC hardware assisted virtualization, as well as a global
> configuration option.
> 
> Having all APIC interaction exit to Xen for emulation is slow and can
> induce much overhead. Hardware can speed up x{2}APIC by decoding the
> APIC access and providing a VM exit with a more specific exit reason
> than a regular EPT fault or by altogether avoiding a VM exit.
> 
> On the other hand, being able to disable x{2}APIC hardware assisted
> virtualization can be useful for testing and debugging purposes.
> 
> Note:
> 
> - vmx_install_vlapic_mapping doesn't require modifications regardless
> of whether the guest has "Virtualize APIC accesses" enabled or not,
> i.e., setting the APIC_ACCESS_ADDR VMCS field is fine so long as
> virtualize_apic_accesses is supported by the CPU.
> 
> - Both per-domain and global assisted_x{2}apic options are not part of
> the migration stream, unless explicitly set in the configuration file,
> so it is safe to migrate a guest that doesn't have assisted_x{2}apic
> set in its config file between hosts that have different support for
> hardware assisted x{2}APIC virtualization.

While I can agree this is the case as far as your changes are concerned,
it reads as if this was a broader statement. Since hypervisor CPUID leaf
contents can change across such a migration (which is pre-existing
behavior), I'm not convinced the statement is generally applicable.

> Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Jane Malalane <jane.malalane@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> # hypervisor

Jan




 


Rackspace

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