On 12/01/2011 02:57 PM, Carsten Otte wrote:
> This patch exports the SIE hardware control block to userspace
> via the mapping of the vcpu file descriptor.
>
> Signed-off-by: Carsten Otte <[email protected]>
> ---
> ---
> arch/s390/include/asm/kvm_host.h | 2 ++
> virt/kvm/kvm_main.c | 5 +++++
> 2 files changed, 7 insertions(+)
>
> --- a/arch/s390/include/asm/kvm_host.h
> +++ b/arch/s390/include/asm/kvm_host.h
> @@ -24,6 +24,8 @@
> /* memory slots that does not exposed to userspace */
> #define KVM_PRIVATE_MEM_SLOTS 4
>
> +#define KVM_SIE_PAGE_OFFSET 1
> +
How does userspace get to know what this value is?
Coalesced mmio does this with the return value of
KVM_CAP_COALESCED_MMIO. You can hardcode it, but in a user visible
header please.
> struct sca_entry {
> atomic_t scn;
> __u32 reserved;
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -1656,6 +1656,11 @@ static int kvm_vcpu_fault(struct vm_area
> else if (vmf->pgoff == KVM_COALESCED_MMIO_PAGE_OFFSET)
> page = virt_to_page(vcpu->kvm->coalesced_mmio_ring);
> #endif
> +#if defined(CONFIG_S390) && defined(CONFIG_KVM_UCONTROL)
> + else if ((vmf->pgoff == KVM_SIE_PAGE_OFFSET)
> + && (!(vcpu->kvm->arch.gmap)))
> + page = virt_to_page(vcpu->arch.sie_block);
> +#endif
kvm_arch_vcpu_fault()
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html