Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit adb1ff46 authored by Avi Kivity's avatar Avi Kivity
Browse files

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: default avatarAvi Kivity <avi@qumranet.com>
parent d196e343
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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);