diff options
author | Avi Kivity <avi@redhat.com> | 2010-05-04 14:00:55 +0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-01 11:35:27 +0400 |
commit | 08acfa187117046f8b5044b4a4cdc910f3ceeeb5 (patch) | |
tree | 7a5eb2d66135827c99cb47446cd7580334de5d14 /arch/x86/kvm/kvm_cache_regs.h | |
parent | 914ebccd2d8fa439e01fe93b5229534b9e179a69 (diff) | |
download | linux-08acfa187117046f8b5044b4a4cdc910f3ceeeb5.tar.xz |
KVM: kvm_pdptr_read() may sleep
Annotate it thusly.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/kvm_cache_regs.h')
-rw-r--r-- | arch/x86/kvm/kvm_cache_regs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/kvm_cache_regs.h b/arch/x86/kvm/kvm_cache_regs.h index cff851cf5322..d2a98f8f9af5 100644 --- a/arch/x86/kvm/kvm_cache_regs.h +++ b/arch/x86/kvm/kvm_cache_regs.h @@ -36,6 +36,8 @@ static inline void kvm_rip_write(struct kvm_vcpu *vcpu, unsigned long val) static inline u64 kvm_pdptr_read(struct kvm_vcpu *vcpu, int index) { + might_sleep(); /* on svm */ + if (!test_bit(VCPU_EXREG_PDPTR, (unsigned long *)&vcpu->arch.regs_avail)) kvm_x86_ops->cache_reg(vcpu, VCPU_EXREG_PDPTR); |