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

Re: [Xen-devel] [PATCH v4 11/17] x86/VPMU: Add support for PMU register handling on PV guests

On 02/04/2014 06:14 AM, Jan Beulich wrote:
On 21.01.14 at 20:08, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> wrote:
--- a/xen/arch/x86/hvm/vpmu.c
+++ b/xen/arch/x86/hvm/vpmu.c
@@ -400,6 +400,14 @@ long do_xenpmu_op(int op, 
XEN_GUEST_HANDLE_PARAM(xen_pmu_params_t) arg)
              return -EFAULT;
          pvpmu_finish(current->domain, &pmu_params);
+    case XENPMU_lvtpc_set:
+        if ( copy_from_guest(&pmu_params, arg, 1) )
+            return -EFAULT;
+        vpmu_lvtpc_update((uint32_t)pmu_params.d.val);
Once again, please don't ignore (parts of) hypercall input values.

I can actually pass this value in the shared area where I already have a uint32_t for LVTPC. It will also save us from doing the copy.


Xen-devel mailing list



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