aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/asm-offsets.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2013-09-05 23:11:18 -0400
committerAlexander Graf <agraf@suse.de>2013-10-17 08:44:59 -0400
commit14941789f2a13cd89e2dd567c4f708e571ab714e (patch)
tree71149df5b0ab4e2790c368d7addf90fb920b0caa /arch/powerpc/kernel/asm-offsets.c
parent3b7834743f9492e3509930feb4ca47135905e640 (diff)
KVM: PPC: Book3S HV: Save/restore SIAR and SDAR along with other PMU registers
Currently we are not saving and restoring the SIAR and SDAR registers in the PMU (performance monitor unit) on guest entry and exit. The result is that performance monitoring tools in the guest could get false information about where a program was executing and what data it was accessing at the time of a performance monitor interrupt. This fixes it by saving and restoring these registers along with the other PMU registers on guest entry/exit. This also provides a way for userspace to access these values for a vcpu via the one_reg interface. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kernel/asm-offsets.c')
-rw-r--r--arch/powerpc/kernel/asm-offsets.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index d8958be5f31a..19e699d747b7 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -508,6 +508,8 @@ int main(void)
508 DEFINE(VCPU_PRODDED, offsetof(struct kvm_vcpu, arch.prodded)); 508 DEFINE(VCPU_PRODDED, offsetof(struct kvm_vcpu, arch.prodded));
509 DEFINE(VCPU_MMCR, offsetof(struct kvm_vcpu, arch.mmcr)); 509 DEFINE(VCPU_MMCR, offsetof(struct kvm_vcpu, arch.mmcr));
510 DEFINE(VCPU_PMC, offsetof(struct kvm_vcpu, arch.pmc)); 510 DEFINE(VCPU_PMC, offsetof(struct kvm_vcpu, arch.pmc));
511 DEFINE(VCPU_SIAR, offsetof(struct kvm_vcpu, arch.siar));
512 DEFINE(VCPU_SDAR, offsetof(struct kvm_vcpu, arch.sdar));
511 DEFINE(VCPU_SLB, offsetof(struct kvm_vcpu, arch.slb)); 513 DEFINE(VCPU_SLB, offsetof(struct kvm_vcpu, arch.slb));
512 DEFINE(VCPU_SLB_MAX, offsetof(struct kvm_vcpu, arch.slb_max)); 514 DEFINE(VCPU_SLB_MAX, offsetof(struct kvm_vcpu, arch.slb_max));
513 DEFINE(VCPU_SLB_NR, offsetof(struct kvm_vcpu, arch.slb_nr)); 515 DEFINE(VCPU_SLB_NR, offsetof(struct kvm_vcpu, arch.slb_nr));