aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86
diff options
context:
space:
mode:
authorAndrew Cooper <andrew.cooper3@citrix.com>2013-09-16 12:22:20 +0200
committerJan Beulich <jbeulich@suse.com>2013-09-16 12:22:20 +0200
commit42c5b1214071d363a52c6356dfe2ed820f500849 (patch)
tree448f02feb3bc20cbc825ccefc4fda5ac0a407660 /xen/include/asm-x86
parent593470233ff38385df9dcf5690cc58c7a4fb290d (diff)
downloadxen-42c5b1214071d363a52c6356dfe2ed820f500849.tar.gz
xen-42c5b1214071d363a52c6356dfe2ed820f500849.tar.bz2
xen-42c5b1214071d363a52c6356dfe2ed820f500849.zip
hvm/vpmu: Prevent dump handlers from incorrectly mutating state
Discovered by Coverity, CID 1055181 core2_vpmu_dump() was incorrectly setting VPMU_CONTEXT_LOADED when it was intending to check for it. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> This would have been avoided if the dump function declared all its pointers "const" - doing this now (also in SVM). Also fixing some indentation issues at once. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Diffstat (limited to 'xen/include/asm-x86')
-rw-r--r--xen/include/asm-x86/hvm/vpmu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/include/asm-x86/hvm/vpmu.h b/xen/include/asm-x86/hvm/vpmu.h
index 03b9462317..40f63fba58 100644
--- a/xen/include/asm-x86/hvm/vpmu.h
+++ b/xen/include/asm-x86/hvm/vpmu.h
@@ -54,7 +54,7 @@ struct arch_vpmu_ops {
void (*arch_vpmu_destroy)(struct vcpu *v);
int (*arch_vpmu_save)(struct vcpu *v);
void (*arch_vpmu_load)(struct vcpu *v);
- void (*arch_vpmu_dump)(struct vcpu *v);
+ void (*arch_vpmu_dump)(const struct vcpu *);
};
int vmx_vpmu_initialise(struct vcpu *, unsigned int flags);