|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 2/5] x86/svm: Remove ioio_info_t type
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |