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

Re: [Xen-devel] [PATCH v11 for-xen-4.5 16/20] x86/VPMU: Handle PMU interrupts for PV guests



On Tue, Sep 23, 2014 at 02:57:45PM -0400, Boris Ostrovsky wrote:
> On 09/23/2014 02:31 PM, Konrad Rzeszutek Wilk wrote:
> >>  int vpmu_do_interrupt(struct cpu_user_regs *regs)
> >>  {

.. snip ..

> >>+            cur_regs = guest_cpu_user_regs();
> >>+
> >>+            cmp = (void *)&vpmu->xenpmu_data->pmu.r.regs;
> >.. what we read from here. Did I miss a patch?
> >
> >>+            cmp->eip = cur_regs->rip;
> >>+            cmp->esp = cur_regs->rsp;
> >>+            cmp->cs = cur_regs->cs;
> >>+            if ( (cmp->cs & 3) == 1 )
> >>+                cmp->cs &= ~3;
> >>+        }
> >>+        else
> >>+        {
> >>+            struct xen_pmu_regs *r = &vpmu->xenpmu_data->pmu.r.regs;
> >Ditto here.
> >
> >Perhaps a comment stating _who_ (or _what_) is responsible for populating
> >the 'pmu.r.regs' structure?
> 
> There are different registers --- PMU MSRs and GPRs. Comment "PV guest will
> be reading PMU MSRs from xenpmu_data" was in reference to guest accessing
> MSRs that are cached in pmu.c(ontext) as opposed to doing rd/wrmsr and
> trapping to hypervisor.. That's why we do arch_vpmu_save(): to save PMU MSRs
> into the shared page.
> 
> pmu.r(egisters) are sampled VCPU's GPRs and are filled in this routine.
> 
> Does this answer your question?

<blushes> Yes thank you. And I need more coffee.

_______________________________________________
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®.