1. 17 4月, 2013 1 次提交
    • Y
      KVM: VMX: Enable acknowledge interupt on vmexit · a547c6db
      Yang Zhang 提交于
      The "acknowledge interrupt on exit" feature controls processor behavior
      for external interrupt acknowledgement. When this control is set, the
      processor acknowledges the interrupt controller to acquire the
      interrupt vector on VM exit.
      
      After enabling this feature, an interrupt which arrived when target cpu is
      running in vmx non-root mode will be handled by vmx handler instead of handler
      in idt. Currently, vmx handler only fakes an interrupt stack and jump to idt
      table to let real handler to handle it. Further, we will recognize the interrupt
      and only delivery the interrupt which not belong to current vcpu through idt table.
      The interrupt which belonged to current vcpu will be handled inside vmx handler.
      This will reduce the interrupt handle cost of KVM.
      
      Also, interrupt enable logic is changed if this feature is turnning on:
      Before this patch, hypervior call local_irq_enable() to enable it directly.
      Now IF bit is set on interrupt stack frame, and will be enabled on a return from
      interrupt handler if exterrupt interrupt exists. If no external interrupt, still
      call local_irq_enable() to enable it.
      
      Refer to Intel SDM volum 3, chapter 33.2.
      Signed-off-by: NYang Zhang <yang.z.zhang@Intel.com>
      Reviewed-by: NGleb Natapov <gleb@redhat.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      a547c6db
  2. 16 4月, 2013 7 次提交
  3. 14 4月, 2013 8 次提交
  4. 11 4月, 2013 1 次提交
    • K
      KVM: x86 emulator: Fix segment loading in VM86 · f8da94e9
      Kevin Wolf 提交于
      This fixes a regression introduced in commit 03ebebeb ("KVM: x86
      emulator: Leave segment limit and attributs alone in real mode").
      
      The mentioned commit changed the segment descriptors for both real mode
      and VM86 to only update the segment base instead of creating a
      completely new descriptor with limit 0xffff so that unreal mode keeps
      working across a segment register reload.
      
      This leads to an invalid segment descriptor in the eyes of VMX, which
      seems to be okay for real mode because KVM will fix it up before the
      next VM entry or emulate the state, but it doesn't do this if the guest
      is in VM86, so we end up with:
      
        KVM: entry failed, hardware error 0x80000021
      
      Fix this by effectively reverting commit 03ebebeb for VM86 and leaving
      it only in place for real mode, which is where it's really needed.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      f8da94e9
  5. 08 4月, 2013 6 次提交
  6. 07 4月, 2013 5 次提交
  7. 02 4月, 2013 12 次提交