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

Re: [XEN][PATCH v8] x86: make Viridian support optional


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>
  • From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Date: Thu, 20 Nov 2025 12:42:03 +0200
  • 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=inbO6NBfMbBH+ZAwmnx+90g/Pwa6NY7Yn+qjllpju+Y=; b=Y+i5S7lkfPmN+cUebtzKzqBTFpCHqki4Xx1sAQ2yYyy6acqA6eX5LQ8/qDWunTCG4Gr34boh/XPg3NIcgSHX6O5sa/Qc/jEsyiQEwF1ez5Vqrul2Qp8kN7sNdgDgAObDyvcjUJ/yUqwccc4VNxufHvCJJ23yxFfusczYVCjOrZe2N1/4tdN2mvgdo5llJ4vn67C79Uj9++N8bNIJSXTddDvtesdzXXwM0rUP6/p10zWQSijacWnCVtcIy7s4nvpDHPYc/HV8C77M7Jx9UNpqH9LLo6RV3a0EyBn4OtJP8EVN9DON7nZp7ooCtxNOHJtgPIBRkpGq0fi2Ey6tnOsAtg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=W+sAEh60w3VNgKlZVwv3dLZO6gv5mqsnaTg/2HaK35qzRl3feBzPJAOZGN8cfDuS0twAOCAANsYJM+deCoD85qFGFstfaWKQuQKiNxkUE8ex+vjLugbwTDeD8MkeQozhzfz4egbkoSXAMhu5/oyEEdUbgo9P9/y1kTed8QosMysCA9kXQj4H+Tk85Vy0d5BoOyv8hRTmtoYArWTpUc1qBZY3dB3WwbqOJx8/bd603brfg9IxfQxVWYm98FWRoqVrPbbSeEJZWRy3QwoezaX20fa9gcry98u7ripIVqipNlue51ubWBHNE5npFADTri6elm5ClmzT9gZ7D0xKWB2J0Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 20 Nov 2025 10:42:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Jan,

On 20.11.25 10:50, Jan Beulich wrote:
(adding v8 tag to subject)

On 19.11.2025 20:32, Grygorii Strashko wrote:
From: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx>

Add config option 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(); stub viridian_vcpu/domain_init/deinit()]
Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx>
Signed-off-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>

As before - this R-b likely would need dropping, ...

---
changes in v8:
- drop checks from viridian_load_vcpu/domain_ctxt()
- drop check "value != 0" in HVM_PARAM_VIRIDIAN handler, laways return
   -ENODEV for VIRIDIAN=n

... when more than just cosmetic changes are made. Jason, please can you
indicate whether it's fine to retain?

Sorry, I'll be more careful with tags.


--- a/xen/arch/x86/hvm/Makefile
+++ b/xen/arch/x86/hvm/Makefile
@@ -1,6 +1,6 @@
  obj-$(CONFIG_AMD_SVM) += svm/
  obj-$(CONFIG_INTEL_VMX) += vmx/
-obj-y += viridian/
+obj-$(CONFIG_VIRIDIAN) += viridian/

When committing, I'll likely take the liberty to also move the altered line
up, to restore proper alphabetical sorting here.

--- a/xen/arch/x86/include/asm/hvm/viridian.h
+++ b/xen/arch/x86/include/asm/hvm/viridian.h
@@ -86,11 +86,26 @@ viridian_hypercall(struct cpu_user_regs *regs);
  void viridian_time_domain_freeze(const struct domain *d);
  void viridian_time_domain_thaw(const struct domain *d);
+#if defined(CONFIG_VIRIDIAN)

Similarly I'm likely going to take the liberty and change this to #ifdef,
just like you have it elsewhere.

I'm ok with mentioned adjustments.


Preferably with the adjustments:
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Thank you.

--
Best regards,
-grygorii




 


Rackspace

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