diff options
author | Avi Kivity <avi@qumranet.com> | 2008-01-24 08:13:08 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-04-27 04:53:17 -0400 |
commit | adb1ff46754a87f3f6c9e7ee0a92f9a8a183bb38 (patch) | |
tree | 033c1e021019242d9a47594993cbfaecd62ab540 /virt/kvm/kvm_main.c | |
parent | d196e343361c229496adeda42335856da9d057de (diff) |
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/kvm/kvm_main.c')
-rw-r--r-- | virt/kvm/kvm_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 121e65cccc58..7972e3aa2cae 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, | |||
1061 | r = -EINVAL; | 1061 | r = -EINVAL; |
1062 | if (arg) | 1062 | if (arg) |
1063 | goto out; | 1063 | goto out; |
1064 | r = 2 * PAGE_SIZE; | 1064 | r = PAGE_SIZE; /* struct kvm_run */ |
1065 | #ifdef CONFIG_X86 | ||
1066 | r += PAGE_SIZE; /* pio data page */ | ||
1067 | #endif | ||
1065 | break; | 1068 | break; |
1066 | default: | 1069 | default: |
1067 | return kvm_arch_dev_ioctl(filp, ioctl, arg); | 1070 | return kvm_arch_dev_ioctl(filp, ioctl, arg); |