aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/kvm/kvm_main.c2
-rw-r--r--drivers/kvm/svm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 5b42731beba4..6ad1b04f3099 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -413,7 +413,7 @@ static void free_pio_guest_pages(struct kvm_vcpu *vcpu)
413{ 413{
414 int i; 414 int i;
415 415
416 for (i = 0; i < 2; ++i) 416 for (i = 0; i < ARRAY_SIZE(vcpu->pio.guest_pages); ++i)
417 if (vcpu->pio.guest_pages[i]) { 417 if (vcpu->pio.guest_pages[i]) {
418 __free_page(vcpu->pio.guest_pages[i]); 418 __free_page(vcpu->pio.guest_pages[i]);
419 vcpu->pio.guest_pages[i] = NULL; 419 vcpu->pio.guest_pages[i] = NULL;
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 9a840e08b207..c18f0b2d3d3e 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -241,7 +241,7 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu)
241 printk(KERN_DEBUG "%s: NOP\n", __FUNCTION__); 241 printk(KERN_DEBUG "%s: NOP\n", __FUNCTION__);
242 return; 242 return;
243 } 243 }
244 if (svm->next_rip - svm->vmcb->save.rip > 15) { 244 if (svm->next_rip - svm->vmcb->save.rip > MAX_INST_SIZE) {
245 printk(KERN_ERR "%s: ip 0x%llx next 0x%llx\n", 245 printk(KERN_ERR "%s: ip 0x%llx next 0x%llx\n",
246 __FUNCTION__, 246 __FUNCTION__,
247 svm->vmcb->save.rip, 247 svm->vmcb->save.rip,