Skip to content

Commit

Permalink
KVM: Limit vcpu mmap size to one page on non-x86
Browse files Browse the repository at this point in the history
The second page is only needed on archs that support pio.

Noted by Carsten Otte.

Signed-off-by: Avi Kivity <[email protected]>
  • Loading branch information
avikivity committed Apr 27, 2008
1 parent d196e34 commit adb1ff4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit adb1ff4

Please sign in to comment.