Skip to contentSkip to conversation

KVM: kvm_pdptr_read() may sleep

PATCH New Avi Kivity 1 participant 1 message May 4, 2010

Subsystems (3)
lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

PATCH 1/1 KVM: kvm_pdptr_read() may sleep

Annotate it thusly.

---
 arch/x86/kvm/kvm_cache_regs.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kvm/kvm_cache_regs.h +2 -0
index cff851c..d2a98f8 100644
@@ -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);
Signature · 1 line
1.7.0.4