ia64/xen-unstable

changeset 10903:822c39808e62

[HVM] Initialise full regs structure for PIO requests.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Aug 02 09:52:03 2006 +0100 (2006-08-02)
parents 022f29d4d2b8
children acccec7e213a
files xen/arch/x86/hvm/io.c xen/arch/x86/hvm/platform.c xen/arch/x86/hvm/svm/svm.c xen/arch/x86/hvm/vmx/vmx.c
line diff
     1.1 --- a/xen/arch/x86/hvm/io.c	Wed Aug 02 09:38:08 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/io.c	Wed Aug 02 09:52:03 2006 +0100
     1.3 @@ -695,12 +695,11 @@ void hvm_io_assist(struct vcpu *v)
     1.4  
     1.5              if ( p->type == IOREQ_TYPE_PIO )
     1.6                  hvm_pio_assist(regs, p, io_opp);
     1.7 -            else {
     1.8 +            else
     1.9                  hvm_mmio_assist(regs, p, io_opp);
    1.10 -                hvm_load_cpu_guest_regs(v, regs);
    1.11 -            }
    1.12  
    1.13              /* Copy register changes back into current guest state. */
    1.14 +            hvm_load_cpu_guest_regs(v, regs);
    1.15              memcpy(guest_cpu_user_regs(), regs, HVM_CONTEXT_STACK_BYTES);
    1.16          }
    1.17          /* else an interrupt send event raced us */
     2.1 --- a/xen/arch/x86/hvm/platform.c	Wed Aug 02 09:38:08 2006 +0100
     2.2 +++ b/xen/arch/x86/hvm/platform.c	Wed Aug 02 09:52:03 2006 +0100
     2.3 @@ -827,7 +827,6 @@ void handle_mmio(unsigned long va, unsig
     2.4  
     2.5      /* Copy current guest state into io instruction state structure. */
     2.6      memcpy(regs, guest_cpu_user_regs(), HVM_CONTEXT_STACK_BYTES);
     2.7 -
     2.8      hvm_store_cpu_guest_regs(v, regs, NULL);
     2.9  
    2.10      if ((inst_len = hvm_instruction_length(v)) <= 0) {
     3.1 --- a/xen/arch/x86/hvm/svm/svm.c	Wed Aug 02 09:38:08 2006 +0100
     3.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Wed Aug 02 09:52:03 2006 +0100
     3.3 @@ -1416,6 +1416,7 @@ static void svm_io_instruction(struct vc
     3.4  
     3.5      /* Copy current guest state into io instruction state structure. */
     3.6      memcpy(regs, guest_cpu_user_regs(), HVM_CONTEXT_STACK_BYTES);
     3.7 +    hvm_store_cpu_guest_regs(v, regs, NULL);
     3.8  
     3.9      info.bytes = vmcb->exitinfo1;
    3.10  
     4.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Wed Aug 02 09:38:08 2006 +0100
     4.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Wed Aug 02 09:52:03 2006 +0100
     4.3 @@ -1107,6 +1107,7 @@ static void vmx_io_instruction(unsigned 
     4.4  
     4.5      /* Copy current guest state into io instruction state structure. */
     4.6      memcpy(regs, guest_cpu_user_regs(), HVM_CONTEXT_STACK_BYTES);
     4.7 +    hvm_store_cpu_guest_regs(current, regs, NULL);
     4.8  
     4.9      __vmread(GUEST_RIP, &eip);
    4.10      __vmread(GUEST_CS_SELECTOR, &cs);