Re: [patch 07/11] [PATCH] kvm-s390-ucontrol: interface to inject faults on a vcpu page table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04.01.2012 15:52, Avi Kivity wrote:
On 01/04/2012 11:25 AM, Carsten Otte wrote:
This patch allows the user to fault in pages on a virtual cpus
address space for user controlled virtual machines. Typically this
is superfluous because userspace can just create a mapping and
let the kernel's page fault logic take are of it. There is one
exception: SIE won't start if the lowcore is not present. Normally
the kernel takes care of this [handle_validity() in
arch/s390/kvm/intercept.c] but since the kernel does not handle
intercepts for user controlled virtual machines, userspace needs to
be able to handle this condition.

There is an alternative, if you can recognize this condition exactly
from the hardware fault, you can fault the lowcore yourself and retry.
This eliminates a user interface.  Is this workable?
The situation is very easy to detect, SIE won't start and it'll tell
us in the intercept info (processed in userspace in case of ucontrol) that the lowcore is not mapped in. Now userspace can a) create a
mapping of a guest to user space for the vcpu using KVM_S390_UCAS_MAP
which will create an invalid segment table entry (pmd), and b) touch the
page to make the pte for it valid in user space, but it cannot create a
segment table entry (pmd) on the guest table that points to the page
table that is shared between both spaces.
It is an optimization that KVM_S390_UCAS_MAP does'nt create a whole
page table right away. If we did that, we'd run out of memory pretty
fast once our regression runs simulate a couple of mainframes in
parallel with some terabytes of simulated memory each.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux