]> xenbits.xensource.com Git - xen.git/commitdiff
x86: provide Dom0 access to PPIN via XENPF_resource_op
authorJan Beulich <jbeulich@suse.com>
Wed, 18 Dec 2019 13:49:59 +0000 (14:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 18 Dec 2019 13:49:59 +0000 (14:49 +0100)
It was requested that we provide a way independent of the MCE reporting
interface that Dom0 software could use to get hold of the values for
particular CPUs.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/platform_hypercall.c

index b19f6ec4eda1ba1253a0238c9bab1cf8ca3fbcc6..80efb84328951430b07ff74185f4312bc6f74ed5 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/mtrr.h>
 #include <asm/io_apic.h>
 #include <asm/setup.h>
+#include "cpu/mcheck/mce.h"
 #include "cpu/mtrr/mtrr.h"
 #include <xsm/xsm.h>
 
@@ -94,6 +95,9 @@ void check_resource_access(struct resource_access *ra)
         switch ( entry->u.cmd )
         {
         case XEN_RESOURCE_OP_MSR_READ:
+            if ( ppin_msr && entry->idx == ppin_msr )
+                break;
+            /* fall through */
         case XEN_RESOURCE_OP_MSR_WRITE:
             if ( entry->idx >> 32 )
                 ret = -EINVAL;