ia64/xen-unstable

changeset 9382:e995d090bba9

SVM patch to fix problem with instruction decode.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Mar 22 10:35:35 2006 +0100 (2006-03-22)
parents fbc3a2657fef
children b4769816a409
files xen/arch/x86/hvm/svm/svm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/svm/svm.c	Tue Mar 21 22:57:47 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Wed Mar 22 10:35:35 2006 +0100
     1.3 @@ -1243,20 +1243,19 @@ static void svm_io_instruction(struct vc
     1.4                  "svm_io_instruction: port 0x%lx real %d, eip=%lx:%lx, "
     1.5                  "exit_qualification = %lx",
     1.6                  (unsigned long) port, real, cs, eip, (unsigned long)info.bytes);
     1.7 -
     1.8 -    /* 
     1.9 -     * On SVM, the RIP of the intruction following the IN/OUT is saved in
    1.10 -     * ExitInfo2
    1.11 -     */
    1.12 -    vmcb->rip = vmcb->exitinfo2;
    1.13 -
    1.14      /* string instruction */
    1.15      if (info.fields.str)
    1.16      { 
    1.17          unsigned long addr, count = 1;
    1.18          int sign = regs->eflags & EF_DF ? -1 : 1;
    1.19  
    1.20 +        /* Need the original rip, here. */
    1.21          addr = svm_get_io_address(vmcb, regs, dir, real);
    1.22 +        /* 
    1.23 +         * On SVM, the RIP of the intruction following the IN/OUT is saved in
    1.24 +         * ExitInfo2
    1.25 +         */
    1.26 +        vmcb->rip = vmcb->exitinfo2;
    1.27  
    1.28          /* "rep" prefix */
    1.29          if (info.fields.rep) 
    1.30 @@ -1295,6 +1294,12 @@ static void svm_io_instruction(struct vc
    1.31      } 
    1.32      else 
    1.33      {
    1.34 +        /* 
    1.35 +         * On SVM, the RIP of the intruction following the IN/OUT is saved in
    1.36 +         * ExitInfo2
    1.37 +         */
    1.38 +        vmcb->rip = vmcb->exitinfo2;
    1.39 +
    1.40          if (port == 0xe9 && dir == IOREQ_WRITE && size == 1) 
    1.41              hvm_print_line(v, regs->eax); /* guest debug output */
    1.42