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>
This commit is contained in:
parent
d196e34336
commit
adb1ff4675
1 changed files with 4 additions and 1 deletions
|
@ -1061,7 +1061,10 @@ static long kvm_dev_ioctl(struct file *filp,
|
||||||
r = -EINVAL;
|
r = -EINVAL;
|
||||||
if (arg)
|
if (arg)
|
||||||
goto out;
|
goto out;
|
||||||
r = 2 * PAGE_SIZE;
|
r = PAGE_SIZE; /* struct kvm_run */
|
||||||
|
#ifdef CONFIG_X86
|
||||||
|
r += PAGE_SIZE; /* pio data page */
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return kvm_arch_dev_ioctl(filp, ioctl, arg);
|
return kvm_arch_dev_ioctl(filp, ioctl, arg);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue