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

Re: [Xen-devel] [PATCH v4 15/17] x86/VPMU: NMI-based VPMU support

On 02/04/2014 06:48 AM, Jan Beulich wrote:
On 21.01.14 at 20:09, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> wrote:
Add support for using NMIs as PMU interrupts.

Most of processing is still performed by vpmu_do_interrupt(). However, since
certain operations are not NMI-safe we defer them to a softint that
will schedule:
* For PV guests that would be send_guest_vcpu_virq() and
Makes no sense - why would hvm_get_segment_register() be of any
relevance to PV guests?

Poorly written explanation. What I meant here is that if we are in privileged profiling mode and the interrupted guest is an HVM one then we'll need to get CS for that guest, not for the guest doing profiling (i.e. dom0). I'll rewrite this.

And then I'm still missing a reasonable level of analysis that the
previously non-NMI-only interrupt handler is now safe to use in NMI

How about this?

With send_guest_vcpu_virq() and hvm_get_segment_register() for PV(H) and vlapic accesses for HVM moved to sofint, the only routines/macros that vpmu_do_interrupt() calls in NMI mode are:
* memcpy()
* querying domain type (is_XX_domain())
* guest_cpu_user_regs()
* XLAT_cpu_user_regs()
* raise_softirq()
* vcpu_vpmu()
* vpmu_ops->arch_vpmu_save()
* vpmu_ops->do_interrupt() (in the future for PVH support)

The latter two can only access PMU MSRs.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.