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

[PATCH 2/5] x86/svm: Remove ioio_info_t type


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
  • Date: Mon, 28 Sep 2026 15:02:45 +0100
  • 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=zGmO/Q7mAEXd+CCzlAR6aW3KhpJR2R6xc8PbgASbyAA=; b=eRqrfWYl6bEdY33BJi+V29bSIuqn87OpXPzzV3n6/wL5nCREiIIpFaWdaY904ISW9Wi46lRTKzCjq/xultQQJyeeS4WcZyq1yCBn/xII/od6jr2SHXzP1O0edA1MNj0NxoLudgbWWg6Z/SdSb/72CVOXDQjANT4T62dpv9KVvjTP80dDeBN4BOva2j5tIg+227bg4XJCdDqmm0e3pdngZH+kHXMDrY08g80tepVbS4X6lR9CL87RAtiBcZp/a++gRpJqX44arWxc39Na5XVP1zOo+npWkwSJgu2TgQd2JpT2tTPLBfdjyCN+p29XI5OMYqynw1+Vyru5iGKiOvhYVA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WRNYHLpYdqyWrTtWC/zJef3KyuQIcNv50Hw9Fztnr6xx/Fj/suWxXjEEua6Orj7r3G+au3CzzD4csNNmraioS6hSNCNiEiI9tmNm7/FU+9+SPu0Pqyahk5fEfRCwE0YDkimLDLOjRvpjGvUX8zwx14ICZa9wmGHRs+gN0mkOEgwuzwTIT1tkXn8ac1hNqUYgpOcxCFQj+6uADyRgRXDc1S9MYrJ6npV93zNuDgj+TesASbbJTwRV1lPmxWIOWCWQthmOveVv2OutYvD7EAPt4ATOnymzVdxe/195q23IMa9hW1dYKIkCg3xMPdO/zCsswHKyQ2zSkXM4+6aO1gj04g==
  • 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: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>
  • Delivery-date: Mon, 28 Sep 2026 14:03:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This type duplicates what is already in the VMCB struct. Remove it and
have the only user access the VMCB directly.

No functional change intended.

Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
---
 xen/arch/x86/hvm/svm/nestedsvm.c | 10 ++++------
 xen/arch/x86/hvm/svm/vmcb.h      | 17 -----------------
 2 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index 65556136852b..13a2144fdba4 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -823,18 +823,16 @@ nsvm_vmcb_guest_intercepts_msr(unsigned long *msr_bitmap,
 }
 
 static int
-nsvm_vmcb_guest_intercepts_ioio(paddr_t iopm_pa, uint64_t exitinfo1)
+nsvm_vmcb_guest_intercepts_ioio(paddr_t iopm_pa, struct vmcb_struct *vmcb)
 {
     unsigned long gfn = iopm_pa >> PAGE_SHIFT;
     unsigned long *io_bitmap;
-    ioio_info_t ioinfo;
     uint16_t port;
     unsigned int size;
     bool intercepted;
 
-    ioinfo.bytes = exitinfo1;
-    port = ioinfo.fields.port;
-    size = ioinfo.fields.sz32 ? 4 : ioinfo.fields.sz16 ? 2 : 1;
+    port = vmcb->ei.io.port;
+    size = vmcb->ei.io.bytes;
 
     switch ( port )
     {
@@ -945,7 +943,7 @@ nsvm_vmcb_guest_intercepts_exitcode(struct vcpu *v,
             break;
         ns_vmcb = nv->nv_vvmcx;
         vmexits = nsvm_vmcb_guest_intercepts_ioio(ns_vmcb->_iopm_base_pa,
-            ns_vmcb->exitinfo1);
+            ns_vmcb);
         if ( vmexits == NESTEDHVM_VMEXIT_HOST )
             return 0;
         break;
diff --git a/xen/arch/x86/hvm/svm/vmcb.h b/xen/arch/x86/hvm/svm/vmcb.h
index 869d965ba398..2fc10caec136 100644
--- a/xen/arch/x86/hvm/svm/vmcb.h
+++ b/xen/arch/x86/hvm/svm/vmcb.h
@@ -351,23 +351,6 @@ typedef union
     uint64_t raw;
 } vintr_t;
 
-typedef union
-{
-    u64 bytes;
-    struct
-    {
-        u64 type: 1;
-        u64 rsv0: 1;
-        u64 str:  1;
-        u64 rep:  1;
-        u64 sz8:  1;
-        u64 sz16: 1;
-        u64 sz32: 1;
-        u64 rsv1: 9;
-        u64 port: 16;
-    } fields;
-} ioio_info_t;
-
 typedef union
 {
     u64 bytes;
-- 
2.55.0




 


Rackspace

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