[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v15 17/21] x86/VPMU: Handle PMU interrupts for PV guests
>>> On 17.11.14 at 00:07, <boris.ostrovsky@xxxxxxxxxx> wrote: > + if ( (vpmu_mode & XENPMU_MODE_SELF) ) > + cur_regs = guest_cpu_user_regs(); > + else if ( !guest_mode(regs) && > is_hardware_domain(sampling->domain) ) > + { > + cur_regs = regs; > + domid = DOMID_XEN; > + } > + else > + cur_regs = guest_cpu_user_regs(); Of course it would be nice to do this with a single if/else pair. > + else > + { > + struct segment_register seg; > + > + hvm_get_segment_register(sampled, x86_seg_cs, &seg); > + r->cs = seg.sel; > + hvm_get_segment_register(sampled, x86_seg_ss, &seg); > + r->ss = seg.sel; > + if ( seg.attr.fields.dpl != 0 ) > + *flags |= PMU_SAMPLE_USER; Is that how hardware treats it (CPL != 0 meaning user, rather than CPL == 3)? Maybe you should surface CPL instead of a boolean flag? Anyway, with or without the adjustments (unless you go a 3rd way) Acked-by: Jan Beulich <jbeulich@xxxxxxxx> Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |