diff options
author | Jacob Shin <jacob.shin@amd.com> | 2012-10-15 15:04:51 +0200 |
---|---|---|
committer | Jacob Shin <jacob.shin@amd.com> | 2012-10-15 15:04:51 +0200 |
commit | be522c694af0f39dcd22f01d3c9417ce38f97a99 (patch) | |
tree | 8f82726b8c15395f9a7ea392d2cee1b44ff5b81d /xen/include/asm-x86/xenoprof.h | |
parent | cabea9d59f1783167a79fa7a550ced04b3506f3c (diff) | |
download | xen-be522c694af0f39dcd22f01d3c9417ce38f97a99.tar.gz xen-be522c694af0f39dcd22f01d3c9417ce38f97a99.tar.bz2 xen-be522c694af0f39dcd22f01d3c9417ce38f97a99.zip |
x86/xenoprof: fix kernel/user mode detection for HVM
While trying oprofile under Xen, I noticed that HVM passive domain's
kernel addresses were showing up as user application. It turns out
under HVM get_cpu_user_regs()->cs contains 0x0000beef.
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Don't cast away const-ness. Use SS instead of CS to determine ring.
Special-case real and protected mode.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Jan Beulich <jbeulich@suse.com>
Diffstat (limited to 'xen/include/asm-x86/xenoprof.h')
-rw-r--r-- | xen/include/asm-x86/xenoprof.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/include/asm-x86/xenoprof.h b/xen/include/asm-x86/xenoprof.h index a71f020f32..114c48de71 100644 --- a/xen/include/asm-x86/xenoprof.h +++ b/xen/include/asm-x86/xenoprof.h @@ -51,7 +51,7 @@ struct cpu_user_regs; void ibs_init(void); extern u32 ibs_caps; -int xenoprofile_get_mode(const struct vcpu *, const struct cpu_user_regs *); +int xenoprofile_get_mode(struct vcpu *, const struct cpu_user_regs *); static inline int xenoprof_backtrace_supported(void) { |