From: Ross Lagerwall <ross.lagerwall@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: "Ross Lagerwall" <ross.lagerwall@citrix.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger@xenproject.org>,
"Jason Andryuk" <jason.andryuk@amd.com>,
"Teddy Astie" <teddy.astie@vates.tech>
Subject: [PATCH 2/5] x86/svm: Remove ioio_info_t type
Date: Mon, 28 Sep 2026 15:02:45 +0100 [thread overview]
Message-ID: <20260928140248.1543013-3-ross.lagerwall@citrix.com> (raw)
In-Reply-To: <20260928140248.1543013-1-ross.lagerwall@citrix.com>
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@citrix.com>
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
---
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
next prev parent reply other threads:[~2026-09-28 14:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 14:02 [PATCH 0/5] x86/svm: Cleanup types Ross Lagerwall
2026-09-28 14:02 ` [PATCH 1/5] x86/svm: Cleanup vintr_t type Ross Lagerwall
2026-09-28 23:58 ` Jason Andryuk
2026-09-29 16:05 ` Jan Beulich
2026-09-30 8:57 ` Ross Lagerwall
2026-09-28 14:02 ` Ross Lagerwall [this message]
2026-09-28 23:58 ` [PATCH 2/5] x86/svm: Remove ioio_info_t type Jason Andryuk
2026-09-29 17:15 ` Andrew Cooper
2026-09-28 14:02 ` [PATCH 3/5] x86/svm: Cleanup virt_ext_t type Ross Lagerwall
2026-09-28 23:59 ` Jason Andryuk
2026-09-30 6:34 ` Jan Beulich
2026-09-28 14:02 ` [PATCH 4/5] x86/svm: Use C99 types in VMCB struct Ross Lagerwall
2026-09-29 0:00 ` Jason Andryuk
2026-09-30 6:35 ` Jan Beulich
2026-09-28 14:02 ` [PATCH 5/5] x86/svm: Cleanup ns_hostflags type Ross Lagerwall
2026-09-29 0:02 ` Jason Andryuk
2026-09-30 6:37 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260928140248.1543013-3-ross.lagerwall@citrix.com \
--to=ross.lagerwall@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jason.andryuk@amd.com \
--cc=jbeulich@suse.com \
--cc=roger@xenproject.org \
--cc=teddy.astie@vates.tech \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.