Re: [PATCH V3] perf & kvm: Enhance perf to collect KVM guest os statistics from host side

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/15/2010 12:44 PM, oerg Roedel wrote:

So, we'd need something like the following:

    if (exit == NMI)
        __get_cpu_var(nmi_vcpu) = vcpu;

    stgi();

    if (exit == NMI) {
        while (!nmi_handled())
            cpu_relax();
        __get_cpu_var(nmi_vcpu) = NULL;
    }
Hmm, looks a bit complicated to me. The NMI should happen shortly after
the stgi instruction. Interrupts are still disabled so we stay on this
cpu. Can't we just set and erase the cpu_var at vcpu_load/vcpu_put time?


That means an NMI that happens outside guest code (for example, in the mmu, or during the exit itself) would be counted as if in guest code.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux