summaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/apic.c
diff options
context:
space:
mode:
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>2015-08-10 16:34:36 -0400
committerDavid Vrabel <david.vrabel@citrix.com>2015-08-20 12:25:25 +0100
commit6b08cd6328c58a2ae190c5ee03a2ffcab5ef828e (patch)
tree90fd9fee020e844c50f2b0c9bd40b8ccffdfe14b /arch/x86/xen/apic.c
parente27b72df01109c689062caeba1defa013b759e0e (diff)
downloadtalos-op-linux-6b08cd6328c58a2ae190c5ee03a2ffcab5ef828e.tar.gz
talos-op-linux-6b08cd6328c58a2ae190c5ee03a2ffcab5ef828e.zip
xen/PMU: Intercept PMU-related MSR and APIC accesses
Provide interfaces for recognizing accesses to PMU-related MSRs and LVTPC APIC and process these accesses in Xen PMU code. (The interrupt handler performs XENPMU_flush right away in the beginning since no PMU emulation is available. It will be added with a later patch). Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Reviewed-by: David Vrabel <david.vrabel@citrix.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'arch/x86/xen/apic.c')
-rw-r--r--arch/x86/xen/apic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/xen/apic.c b/arch/x86/xen/apic.c
index d03ebfa89b9f..acda713ab5be 100644
--- a/arch/x86/xen/apic.c
+++ b/arch/x86/xen/apic.c
@@ -7,6 +7,7 @@
#include <xen/xen.h>
#include <xen/interface/physdev.h>
#include "xen-ops.h"
+#include "pmu.h"
#include "smp.h"
static unsigned int xen_io_apic_read(unsigned apic, unsigned reg)
@@ -72,8 +73,10 @@ static u32 xen_apic_read(u32 reg)
static void xen_apic_write(u32 reg, u32 val)
{
- if (reg == APIC_LVTPC)
+ if (reg == APIC_LVTPC) {
+ (void)pmu_apic_update(reg);
return;
+ }
/* Warn to see if there's any stray references */
WARN(1,"register: %x, value: %x\n", reg, val);
OpenPOWER on IntegriCloud