aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/hvm/vcpu.h
diff options
context:
space:
mode:
authorChristoph Egger <Christoph.Egger@amd.com>2011-10-25 16:48:17 +0100
committerChristoph Egger <Christoph.Egger@amd.com>2011-10-25 16:48:17 +0100
commitac97fa6a21ccd395cca43890bbd0bf32e3255ebb (patch)
treed44577ae12097d61bf9849821a5ced7ec79d56d6 /xen/include/asm-x86/hvm/vcpu.h
parent56d1d85a0c580aa20ca7d4b15f19ace899bb5b36 (diff)
downloadxen-ac97fa6a21ccd395cca43890bbd0bf32e3255ebb.tar.gz
xen-ac97fa6a21ccd395cca43890bbd0bf32e3255ebb.tar.bz2
xen-ac97fa6a21ccd395cca43890bbd0bf32e3255ebb.zip
hvm: Clean up I/O emulation
Move HVM io fields into a structure. On MMIO instruction failure print out some more bytes. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/asm-x86/hvm/vcpu.h')
-rw-r--r--xen/include/asm-x86/hvm/vcpu.h46
1 files changed, 25 insertions, 21 deletions
diff --git a/xen/include/asm-x86/hvm/vcpu.h b/xen/include/asm-x86/hvm/vcpu.h
index d899c9a713..537da96f5e 100644
--- a/xen/include/asm-x86/hvm/vcpu.h
+++ b/xen/include/asm-x86/hvm/vcpu.h
@@ -44,6 +44,30 @@ struct hvm_vcpu_asid {
uint32_t asid;
};
+struct hvm_vcpu_io {
+ /* I/O request in flight to device model. */
+ enum hvm_io_state io_state;
+ unsigned long io_data;
+ int io_size;
+
+ /*
+ * HVM emulation:
+ * Virtual address @mmio_gva maps to MMIO physical frame @mmio_gpfn.
+ * The latter is known to be an MMIO frame (not RAM).
+ * This translation is only valid if @mmio_gva is non-zero.
+ */
+ unsigned long mmio_gva;
+ unsigned long mmio_gpfn;
+
+ /* We may read up to m128 as a number of device-model transactions. */
+ paddr_t mmio_large_read_pa;
+ uint8_t mmio_large_read[16];
+ unsigned int mmio_large_read_bytes;
+ /* We may write up to m128 as a number of device-model transactions. */
+ paddr_t mmio_large_write_pa;
+ unsigned int mmio_large_write_bytes;
+};
+
#define VMCX_EADDR (~0ULL)
struct nestedvcpu {
@@ -135,31 +159,11 @@ struct hvm_vcpu {
/* Which cache mode is this VCPU in (CR0:CD/NW)? */
u8 cache_mode;
- /* I/O request in flight to device model. */
- enum hvm_io_state io_state;
- unsigned long io_data;
- int io_size;
-
- /*
- * HVM emulation:
- * Virtual address @mmio_gva maps to MMIO physical frame @mmio_gpfn.
- * The latter is known to be an MMIO frame (not RAM).
- * This translation is only valid if @mmio_gva is non-zero.
- */
- unsigned long mmio_gva;
- unsigned long mmio_gpfn;
+ struct hvm_vcpu_io hvm_io;
/* Callback into x86_emulate when emulating FPU/MMX/XMM instructions. */
void (*fpu_exception_callback)(void *, struct cpu_user_regs *);
void *fpu_exception_callback_arg;
- /* We may read up to m128 as a number of device-model transactions. */
- paddr_t mmio_large_read_pa;
- uint8_t mmio_large_read[16];
- unsigned int mmio_large_read_bytes;
- /* We may write up to m128 as a number of device-model transactions. */
- paddr_t mmio_large_write_pa;
- unsigned int mmio_large_write_bytes;
-
/* Pending hw/sw interrupt */
int inject_trap; /* -1 for nothing to inject */
int inject_error_code;