1. 06 Jun, 2008 2 commits
    • Avi Kivity's avatar
      KVM: x86 emulator: fix hypercall return value on AMD · 33e3885d
      Avi Kivity authored
      The hypercall instructions on Intel and AMD are different.  KVM allows the
      guest to choose one or the other (the default is Intel), and if the guest
      chooses incorrectly, KVM will patch it at runtime to select the correct
      instruction.  This allows live migration between Intel and AMD machines.
      
      This patching occurs in the x86 emulator.  The current code also executes
      the hypercall.  Unfortunately, the tail end of the x86 emulator code also
      executes, overwriting the return value of the hypercall with the original
      contents of rax (which happens to be the hypercall number).
      
      Fix not by executing the hypercall in the emulator context; instead let the
      guest reissue the patched instruction and execute the hypercall via the
      normal path.
      Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
      33e3885d
    • Jes Sorensen's avatar
      KVM: ia64: fix zero extending for mmio ld1/2/4 emulation in KVM · f20d2752
      Jes Sorensen authored
      Only copy in the data actually requested by the instruction emulation
      and zero pad the destination register first. This avoids the problem
      where emulated mmio access got garbled data from ld2.acq instructions
      in the vga console driver.
      Signed-off-by: default avatarJes Sorensen <jes@sgi.com>
      Acked-by: default avatarXiantao Zhang <xiantao.zhang@intel.com>
      Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
      f20d2752
  2. 05 Jun, 2008 38 commits