1. 17 2月, 2020 3 次提交
  2. 13 2月, 2020 7 次提交
  3. 12 2月, 2020 4 次提交
    • O
      KVM: x86: Deliver exception payload on KVM_GET_VCPU_EVENTS · a06230b6
      Oliver Upton 提交于
      KVM allows the deferral of exception payloads when a vCPU is in guest
      mode to allow the L1 hypervisor to intercept certain events (#PF, #DB)
      before register state has been modified. However, this behavior is
      incompatible with the KVM_{GET,SET}_VCPU_EVENTS ABI, as userspace
      expects register state to have been immediately modified. Userspace may
      opt-in for the payload deferral behavior with the
      KVM_CAP_EXCEPTION_PAYLOAD per-VM capability. As such,
      kvm_multiple_exception() will immediately manipulate guest registers if
      the capability hasn't been requested.
      
      Since the deferral is only necessary if a userspace ioctl were to be
      serviced at the same as a payload bearing exception is recognized, this
      behavior can be relaxed. Instead, opportunistically defer the payload
      from kvm_multiple_exception() and deliver the payload before completing
      a KVM_GET_VCPU_EVENTS ioctl.
      Signed-off-by: NOliver Upton <oupton@google.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      a06230b6
    • O
      KVM: nVMX: Handle pending #DB when injecting INIT VM-exit · 684c0422
      Oliver Upton 提交于
      SDM 27.3.4 states that the 'pending debug exceptions' VMCS field will
      be populated if a VM-exit caused by an INIT signal takes priority over a
      debug-trap. Emulate this behavior when synthesizing an INIT signal
      VM-exit into L1.
      
      Fixes: 4b9852f4 ("KVM: x86: Fix INIT signal handling in various CPU states")
      Signed-off-by: NOliver Upton <oupton@google.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      684c0422
    • O
      KVM: x86: Mask off reserved bit from #DB exception payload · 307f1cfa
      Oliver Upton 提交于
      KVM defines the #DB payload as compatible with the 'pending debug
      exceptions' field under VMX, not DR6. Mask off bit 12 when applying the
      payload to DR6, as it is reserved on DR6 but not the 'pending debug
      exceptions' field.
      
      Fixes: f10c729f ("kvm: vmx: Defer setting of DR6 until #DB delivery")
      Signed-off-by: NOliver Upton <oupton@google.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      307f1cfa
    • P
      KVM: x86: do not reset microcode version on INIT or RESET · bab0c318
      Paolo Bonzini 提交于
      Do not initialize the microcode version at RESET or INIT, only on vCPU
      creation.   Microcode updates are not lost during INIT, and exact
      behavior across a warm RESET is not specified by the architecture.
      
      Since we do not support a microcode update directly from the hypervisor,
      but only as a result of userspace setting the microcode version MSR,
      it's simpler for userspace if we do nothing in KVM and let userspace
      emulate behavior for RESET as it sees fit.
      
      Userspace can tie the fix to the availability of MSR_IA32_UCODE_REV in
      the list of emulated MSRs.
      Reported-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      bab0c318
  4. 11 2月, 2020 5 次提交
  5. 08 2月, 2020 2 次提交
  6. 07 2月, 2020 1 次提交
    • T
      x86/apic: Mask IOAPIC entries when disabling the local APIC · 0f378d73
      Tony W Wang-oc 提交于
      When a system suspends, the local APIC is disabled in the suspend sequence,
      but the IOAPIC is left in the current state. This means unmasked interrupt
      lines stay unmasked. This is usually the case for IOAPIC pin 9 to which the
      ACPI interrupt is connected.
      
      That means that in suspended state the IOAPIC can respond to an external
      interrupt, e.g. the wakeup via keyboard/RTC/ACPI, but the interrupt message
      cannot be handled by the disabled local APIC. As a consequence the Remote
      IRR bit is set, but the local APIC does not send an EOI to acknowledge
      it. This causes the affected interrupt line to become stale and the stale
      Remote IRR bit will cause a hang when __synchronize_hardirq() is invoked
      for that interrupt line.
      
      To prevent this, mask all IOAPIC entries before disabling the local
      APIC. The resume code already has the unmask operation inside.
      
      [ tglx: Massaged changelog ]
      Signed-off-by: NTony W Wang-oc <TonyWWang-oc@zhaoxin.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Link: https://lore.kernel.org/r/1579076539-7267-1-git-send-email-TonyWWang-oc@zhaoxin.com
      0f378d73
  7. 05 2月, 2020 18 次提交