[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN][PATCH v3] x86: make Viridian support optional
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
- Date: Thu, 18 Sep 2025 18:15:16 +0300
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=A9IKaySqEZNszjYaZA+LnvfR+srgpuX3xSpmqyX04M0=; b=MkIbJwZjMMBxCTPddb5uQ+nhiQ1G7XekKfQ17yqqIFew8zI6Gnn83oq95cz+RRbprhiRcz/GrJH1SILnUNd1qpq1NXUJ0QiT+63EdKvcARdsXzTPqutfXt71F4wP4ikmMk7XrT2jCLXgLhN9FTdMIFJooDAWQBOaNiyQDwBM8HfRyePo5fC6VKvJ61Cb39pASTSNQ5Tv5a1+wESjXWlGLGztBp3RnisF1uhg81gL+r5tuQ4yc3BAgcuqpCD6WCfoAucL9sJfQhEzVxXKBr8BE2GqwVxfA+V2ewr6T95Wlv1rZIy82uq3YIuMPmYWBWTv9Hi2bM0YCcJX0gBvQzZsAg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NnxeLItOndXax13X+mAN83c9IWa0sjSTKmV37GYCpJjePwsUg8P+Z8j4MTFz8shfksuSxDLLF95UKntm/odtu6jK8EnQjDkp8/0sQiNY8zRO/fDi4QfQaDdGnyBiufDpuZsd++tUPZUiDJsmfNSYVSEw9dX7IUUsLfXmGDECc4GVdP1viI+7S/IvdU+q71ovS99CUlPSM6wKi1grHINN9AYKsy6h9FW4Cy2OIERxz12N9Ypq2GxGkMgwoPtd/O/IaIFnPK8Nwzi4nKaIFTegipXkTSb3F/YbCT05ka89IUdhA1tmN0+eaKfeTfy9hsTvfZL/Fp2BLlnCHGeOkozLuQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
- Cc: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
- Delivery-date: Thu, 18 Sep 2025 15:15:27 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi All,
On 16.09.25 16:41, Grygorii Strashko wrote:
From: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx>
Add config option HVM_VIRIDIAN that covers viridian code within HVM.
Calls to viridian functions guarded by is_viridian_domain() and related macros.
Having this option may be beneficial by reducing code footprint for systems
that are not using Hyper-V.
[grygorii_strashko@xxxxxxxx: fixed NULL pointer deref in
viridian_save_domain_ctxt()]
Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx>
Signed-off-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
---
changes in v3:
- fixed NULL pointer deref in viridian_save_domain_ctxt() reported for v2,
which caused v2 revert by commit 1fffcf10cd71 ("Revert "x86: make Viridian
support optional"")
v2:
https://patchwork.kernel.org/project/xen-devel/patch/20250321092633.3982645-1-Sergiy_Kibrik@xxxxxxxx/
xen/arch/x86/hvm/Kconfig | 10 ++++++++++
xen/arch/x86/hvm/Makefile | 2 +-
xen/arch/x86/hvm/hvm.c | 27 ++++++++++++++++++---------
xen/arch/x86/hvm/viridian/viridian.c | 8 ++++----
xen/arch/x86/hvm/vlapic.c | 11 +++++++----
xen/arch/x86/include/asm/hvm/domain.h | 2 ++
xen/arch/x86/include/asm/hvm/hvm.h | 3 ++-
xen/arch/x86/include/asm/hvm/vcpu.h | 2 ++
8 files changed, 46 insertions(+), 19 deletions(-)
diff --git a/xen/arch/x86/hvm/Kconfig b/xen/arch/x86/hvm/Kconfig
index 5cb9f2904255..cf2726ef6bc3 100644
--- a/xen/arch/x86/hvm/Kconfig
+++ b/xen/arch/x86/hvm/Kconfig
@@ -62,6 +62,16 @@ config ALTP2M
If unsure, stay with defaults.
+config HVM_VIRIDIAN
+ bool "Hyper-V enlightenments for guests" if EXPERT
+ default y
+ help
+ Support optimizations for Hyper-V guests such as faster hypercalls,
+ efficient timer and interrupt handling, and enhanced paravirtualized
+ I/O. This is to improve performance and compatibility of Windows VMs.
+
+ If unsure, say Y.
+
Actually there is a question for x86 Experts -
Does it make sense to have HVM_VIRIDIAN enabled without enabled
AMD_SVM/INTEL_VMX Virtualization extensions?
--
Best regards,
-grygorii
|