Message ID | 20230925173448.3518223-1-mizhang@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, 25 Sep 2023 17:34:45 +0000, Mingwei Zhang wrote: > When we do stress test on KVM vPMU using Intel vtune, we find the following > warning kernel message in the guest VM: > > [ 1437.487320] Uhhuh. NMI received for unknown reason 20 on CPU 3. > [ 1437.487330] Dazed and confused, but trying to continue > > The Problem > =========== > > [...] Applied to kvm-x86 pmu, with the order swapped and a bit of changelog massaging. Thanks! [1/2] KVM: x86: Mask LVTPC when handling a PMI https://github.com/kvm-x86/linux/commit/a16eb25b09c0 [2/2] KVM: x86/pmu: Synthesize at most one PMI per VM-exit https://github.com/kvm-x86/linux/commit/73554b29bd70 -- https://github.com/kvm-x86/linux/tree/next
diff --git a/x86/pmu.c b/x86/pmu.c index 0def2869..667e6233 100644 --- a/x86/pmu.c +++ b/x86/pmu.c @@ -68,6 +68,7 @@ volatile uint64_t irq_received; static void cnt_overflow(isr_regs_t *regs) { »......irq_received++; +»......apic_write(APIC_LVTPC, apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED); »......apic_write(APIC_EOI, 0); }