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:04 PM, oerg Roedel wrote:
On Mon, Apr 15, 2030 at 04:57:38PM +0800, Zhang, Yanmin wrote:

I checked svm.c and it seems svm.c doesn't trigger a NMI to host if the NMI
happens in guest os. In addition, svm_complete_interrupts is called after
interrupt is enabled.
Yes. The NMI is held pending by the hardware until the STGI instruction
is executed.
And for nested svm the svm_complete_interrupts function needs to be
executed after the nested exit handling. Therefore it is done late on
svm.

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;
   }

and no code sharing betweem vmx and svm.

--
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