# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 822c39808e624f1a3facfe5f5e629e203b0a1320
# Parent 022f29d4d2b8f240ef7aaf5c0b6d352fcb0d2023
[HVM] Initialise full regs structure for PIO requests.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
xen/arch/x86/hvm/io.c | 5 ++---
xen/arch/x86/hvm/platform.c | 1 -
xen/arch/x86/hvm/svm/svm.c | 1 +
xen/arch/x86/hvm/vmx/vmx.c | 1 +
4 files changed, 4 insertions(+), 4 deletions(-)
diff -r 022f29d4d2b8 -r 822c39808e62 xen/arch/x86/hvm/io.c
--- a/xen/arch/x86/hvm/io.c Wed Aug 02 09:38:08 2006 +0100
+++ b/xen/arch/x86/hvm/io.c Wed Aug 02 09:52:03 2006 +0100
@@ -695,12 +695,11 @@ void hvm_io_assist(struct vcpu *v)
if ( p->type == IOREQ_TYPE_PIO )
hvm_pio_assist(regs, p, io_opp);
- else {
+ else
hvm_mmio_assist(regs, p, io_opp);
- hvm_load_cpu_guest_regs(v, regs);
- }
/* Copy register changes back into current guest state. */
+ hvm_load_cpu_guest_regs(v, regs);
memcpy(guest_cpu_user_regs(), regs, HVM_CONTEXT_STACK_BYTES);
}
/* else an interrupt send event raced us */
diff -r 022f29d4d2b8 -r 822c39808e62 xen/arch/x86/hvm/platform.c
--- a/xen/arch/x86/hvm/platform.c Wed Aug 02 09:38:08 2006 +0100
+++ b/xen/arch/x86/hvm/platform.c Wed Aug 02 09:52:03 2006 +0100
@@ -827,7 +827,6 @@ void handle_mmio(unsigned long va, unsig
/* Copy current guest state into io instruction state structure. */
memcpy(regs, guest_cpu_user_regs(), HVM_CONTEXT_STACK_BYTES);
-
hvm_store_cpu_guest_regs(v, regs, NULL);
if ((inst_len = hvm_instruction_length(v)) <= 0) {
diff -r 022f29d4d2b8 -r 822c39808e62 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c Wed Aug 02 09:38:08 2006 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c Wed Aug 02 09:52:03 2006 +0100
@@ -1416,6 +1416,7 @@ static void svm_io_instruction(struct vc
/* Copy current guest state into io instruction state structure. */
memcpy(regs, guest_cpu_user_regs(), HVM_CONTEXT_STACK_BYTES);
+ hvm_store_cpu_guest_regs(v, regs, NULL);
info.bytes = vmcb->exitinfo1;
diff -r 022f29d4d2b8 -r 822c39808e62 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c Wed Aug 02 09:38:08 2006 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c Wed Aug 02 09:52:03 2006 +0100
@@ -1107,6 +1107,7 @@ static void vmx_io_instruction(unsigned
/* Copy current guest state into io instruction state structure. */
memcpy(regs, guest_cpu_user_regs(), HVM_CONTEXT_STACK_BYTES);
+ hvm_store_cpu_guest_regs(current, regs, NULL);
__vmread(GUEST_RIP, &eip);
__vmread(GUEST_CS_SELECTOR, &cs);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|