summaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorNadav Amit <namit@cs.technion.ac.il>2014-11-02 11:54:45 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2014-11-07 15:44:04 +0100
commit82b32774c2d00c0a12ab182c67e32e0b5e5e580a (patch)
tree4952f26cbee010060c1b447216cc60961b9edee5 /arch/x86/include
parent7305eb5d8cf147ce4178e723c95de15e2f001429 (diff)
downloadlinux-82b32774c2d00c0a12ab182c67e32e0b5e5e580a.tar.gz
linux-82b32774c2d00c0a12ab182c67e32e0b5e5e580a.tar.bz2
linux-82b32774c2d00c0a12ab182c67e32e0b5e5e580a.zip
KVM: x86: Breakpoints do not consider CS.base
x86 debug registers hold a linear address. Therefore, breakpoints detection should consider CS.base, and check whether instruction linear address equals (CS.base + RIP). This patch introduces a function to evaluate RIP linear address and uses it for breakpoints detection. Signed-off-by: Nadav Amit <namit@cs.technion.ac.il> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/kvm_host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 3ac807646911..904535fe825e 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -1067,6 +1067,7 @@ void kvm_arch_mmu_notifier_invalidate_page(struct kvm *kvm,
void kvm_define_shared_msr(unsigned index, u32 msr);
int kvm_set_shared_msr(unsigned index, u64 val, u64 mask);
+unsigned long kvm_get_linear_rip(struct kvm_vcpu *vcpu);
bool kvm_is_linear_rip(struct kvm_vcpu *vcpu, unsigned long linear_rip);
void kvm_arch_async_page_not_present(struct kvm_vcpu *vcpu,