[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v9 17/20] x86/VPMU: Add privileged PMU mode
>>> On 08.08.14 at 18:55, <boris.ostrovsky@xxxxxxxxxx> wrote: > @@ -192,32 +199,65 @@ int vpmu_do_interrupt(struct cpu_user_regs *regs) > vpmu->arch_vpmu_ops->arch_vpmu_save(sampling); > vpmu_reset(vpmu, VPMU_CONTEXT_SAVE | VPMU_CONTEXT_LOADED); > > - /* Store appropriate registers in xenpmu_data */ > - if ( is_pv_32bit_domain(sampled->domain) ) > + if ( !is_hvm_domain(sampled->domain) ) I agree with using "sampled" here. > { > - /* > - * 32-bit dom0 cannot process Xen's addresses (which are 64 bit) > - * and therefore we treat it the same way as a non-priviledged > - * PV 32-bit domain. > - */ > - struct compat_cpu_user_regs *cmp; > - > - gregs = guest_cpu_user_regs(); > - > - cmp = (void *)&vpmu->xenpmu_data->pmu.r.regs; > - XLAT_cpu_user_regs(cmp, gregs); > + /* Store appropriate registers in xenpmu_data */ > + if ( is_pv_32bit_domain(sampled->domain) ) But why is this not "sampling"? The layout of the data you present should depend on the consumer of the data > + { > + /* > + * 32-bit dom0 cannot process Xen's addresses (which are 64 > bit) > + * and therefore we treat it the same way as a > non-priviledged non-privileged > + * PV 32-bit domain. > + */ > + struct compat_cpu_user_regs *cmp; > + > + gregs = guest_cpu_user_regs(); > + > + cmp = (void *)&vpmu->xenpmu_data->pmu.r.regs; > + XLAT_cpu_user_regs(cmp, gregs); > + > + /* Adjust RPL for kernel mode */ > + if ((cmp->cs & 3) == 1) > + cmp->cs &= ~3; > + } Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |