KVM: kvm_pdptr_read() may sleep
authorAvi Kivity <avi@redhat.com>
Tue, 4 May 2010 10:00:55 +0000 (13:00 +0300)
committerAvi Kivity <avi@redhat.com>
Sun, 1 Aug 2010 07:35:27 +0000 (10:35 +0300)
Annotate it thusly.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/kvm_cache_regs.h

index cff851cf5322f59db69fc2b69d3ea306480e96d6..d2a98f8f9af5df5d057030049a9e2021af7d54c7 100644 (file)
@@ -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);