summaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2008-01-24 15:13:08 +0200
committerAvi Kivity <avi@qumranet.com>2008-04-27 11:53:17 +0300
commitadb1ff46754a87f3f6c9e7ee0a92f9a8a183bb38 (patch)
tree033c1e021019242d9a47594993cbfaecd62ab540 /virt
parentd196e343361c229496adeda42335856da9d057de (diff)
downloadlinux-3.10-adb1ff46754a87f3f6c9e7ee0a92f9a8a183bb38.tar.gz
linux-3.10-adb1ff46754a87f3f6c9e7ee0a92f9a8a183bb38.tar.bz2
linux-3.10-adb1ff46754a87f3f6c9e7ee0a92f9a8a183bb38.zip
KVM: Limit vcpu mmap size to one page on non-x86
The second page is only needed on archs that support pio. Noted by Carsten Otte. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 121e65cccc5..7972e3aa2ca 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1061,7 +1061,10 @@ static long kvm_dev_ioctl(struct file *filp,
r = -EINVAL;
if (arg)
goto out;
- r = 2 * PAGE_SIZE;
+ r = PAGE_SIZE; /* struct kvm_run */
+#ifdef CONFIG_X86
+ r += PAGE_SIZE; /* pio data page */
+#endif
break;
default:
return kvm_arch_dev_ioctl(filp, ioctl, arg);