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

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



On 01/13/2014 09:12 AM, Jan Beulich wrote:
On 06.01.14 at 20:24, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> wrote:
@@ -866,7 +867,6 @@ void pv_cpuid(struct cpu_user_regs *regs)
          break;
case 0x00000005: /* MONITOR/MWAIT */
-    case 0x0000000a: /* Architectural Performance Monitor Features */
      case 0x0000000b: /* Extended Topology Enumeration */
      case 0x8000000a: /* SVM revision and features */
      case 0x8000001b: /* Instruction Based Sampling */
@@ -875,7 +875,9 @@ void pv_cpuid(struct cpu_user_regs *regs)
      unsupported:
          a = b = c = d = 0;
          break;
-
+    case 0x0000000a: /* Architectural Performance Monitor Features (Intel) */
+        vpmu_do_cpuid(0xa, &a, &b, &c, &d);
+        break;
      default:
Rather than removing a blank line here, you ought to insert a
second one so that there's one before _and_ after the added
code block.

Furthermore the need to pass 0xa as the first argument suggests
that you're not in line with the intentions of vpmu_do_cpuid():
Either you drop the first parameter from the function, or you get
your code in line with the existing caller.

Not sure I understand the problem. We fill a, b, c and d with HW values for dom0 and then call vpmu_do_cpuid() to adjust them if needed. And whether or not this is needed is based on the first argument.

(There is a bug in this routine in that it looks like I am not calling vpmu_do_cpuid() for non-dom0 PV guest but that's a different issue).

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