[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 22/28] x86/hvm: avic: ensure SVM AVIC supports xAPIC operation only
- To: dmukhin@xxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
- Date: Mon, 9 Nov 2026 14:07:19 +0000
- 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=arcselector10001; 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=Ge5LluQn6Pgo3xDEJjLrpqHmBt/nmKHzFMO9QBaIf5s=; b=rY4+9J+ZvadG2YlgDOj6/yN24X6UB2Q8SUVFEnpsHo0R9aFH+VLSLYm6lk3fyTj/7FC86EzzV0s92sYp0kyjrC+gOxW7cgt6v6Lnv41XT7KGqPVjG70GHsWk1VWSvGOhC35ayDH7sKV3CSprK3MdEyZpWVsyYpDep47XuYIaPoDq8QjHmcn7f9OqCXQE8uA1M37zhNvN0abSNgPQpCRa9xWsXPdiO2z7KjvwBapMXUl8n2l7+5uUPMPhe6LGBvS+vpae4L6wLMhSa0nblAnlA5KEiwNbjEf2NA8edbpdvEyVFbNwv6q4uLXwfaUo1xwybvBqAVFv7RDheN8y9BDiBw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NjM4imooFNUHTc7hAbVppf9LFz3KlmGT4n8EzFQIhm1rVFaAQoxihTntLOkhiYW1hxapG9IDyZQpFsn18NHIUDESsd0jJ27qJwxwoG47HHGX3wuDhxF1NJGggMhiPWrXP6eW39f72J3GM+cxhd/kgfMJWNREJCGSSCWKN6gqaDgQK3U/DDgPYhxkCOQsQb/7YVeLKy6e+zyAXG8SAyxwYPGzlSQFKiUQLh6f8NnDN1su7u3IwMjzeczDnguEVfJd0N+BQi7fu2td6aLWf1zksJBWY4YgI06rfQ2+UEuFAacytlp6KK3u+d3IsuNgQW5xAW1VRMu/8JUq2cB9VQmuYg==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: andrew.cooper3@xxxxxxxxxx, jason.andryuk@xxxxxxx, jbeulich@xxxxxxxx, roger@xxxxxxxxxxxxxx, teddy.astie@xxxxxxxxxx, dmukhin@xxxxxxx
- Delivery-date: Mon, 09 Nov 2026 14:07:36 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 11/5/26 1:33 AM, dmukhin@xxxxxxxx wrote:
From: Denis Mukhin <dmukhin@xxxxxxxx>
xAVIC does not support x2APIC operation (yet).
Until x2APIC mode is supported, don't advertise x2APIC to HVM
guests when SVM AVIC is enabled.
Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx>
---
xen/arch/x86/cpu-policy.c | 3 ++-
xen/arch/x86/hvm/svm/svm.c | 12 ++++++++++++
xen/arch/x86/hvm/vmx/vmx.c | 4 ++++
xen/arch/x86/include/asm/hvm/hvm.h | 15 ++++++++++++++-
4 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/cpu-policy.c b/xen/arch/x86/cpu-policy.c
index 48a3185eed8d..ca9b1a523570 100644
--- a/xen/arch/x86/cpu-policy.c
+++ b/xen/arch/x86/cpu-policy.c
@@ -764,7 +764,8 @@ static void __init calculate_hvm_max_policy(void)
* (x2)APIC isn't enabled.
*/
__set_bit(X86_FEATURE_APIC, fs);
- __set_bit(X86_FEATURE_X2APIC, fs);
+ if ( hvm_x2apic_supported() )
+ __set_bit(X86_FEATURE_X2APIC, fs);
Perhaps this is moot given Andrew's comment, but on my host the X2APIC feature
bit is already enabled by inheriting from the host policy so this doesn't have
the desired effect and X2APIC is still exposed to the guest.
Ross
|