[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 11:41 AM, Jan Beulich wrote:
On 04.02.14 at 17:31, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> wrote:
On 02/04/2014 06:48 AM, Jan Beulich wrote:
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
context.
How about this?
Looks okay, except ...

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.
... that this additionally needs to exclude things like
{rd,wr}msr_safe() (i.e. stuff raising exceptions that normally
get recovered from).


I'll add that. And probably a comment in vendor-specific code to remind people that these routines need to be NMI-safe.


-boris

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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