From: Randy Dunlap <randy.dunlap@oracle.com>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
Carsten Otte <cotte@de.ibm.com>
Subject: Re: [PATCH 13/45] KVM: s390: API documentation
Date: Thu, 17 Apr 2008 08:11:06 -0700 [thread overview]
Message-ID: <20080417081106.aab87b1a.randy.dunlap@oracle.com> (raw)
In-Reply-To: <1208423450-29415-14-git-send-email-avi@qumranet.com>
On Thu, 17 Apr 2008 12:10:18 +0300 Avi Kivity wrote:
> From: Carsten Otte <cotte@de.ibm.com>
>
> This patch adds Documentation/s390/kvm.txt, which describes specifics of kvm's
> user interface that are unique to s390 architecture.
>
> Signed-off-by: Carsten Otte <cotte@de.ibm.com>
> Signed-off-by: Avi Kivity <avi@qumranet.com>
> ---
> Documentation/s390/kvm.txt | 125 ++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 125 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/s390/kvm.txt
>
> diff --git a/Documentation/s390/kvm.txt b/Documentation/s390/kvm.txt
> new file mode 100644
> index 0000000..6f5ceb0
> --- /dev/null
> +++ b/Documentation/s390/kvm.txt
> @@ -0,0 +1,125 @@
> +*** BIG FAT WARNING ***
> +The kvm module is currently in EXPERIMENTAL state for s390. This means that
> +the interface to the module is not yet considered to remain stable. Thus, be
> +prepared that we keep breaking your userspace application and guest
> +compatibility over and over again until we feel happy with the result. Make sure
> +your guest kernel, your host kernel, and your userspace launcher are in a
> +consistent state.
> +
> +This Documentation describes the unique ioctl calls to /dev/kvm, the resulting
> +kvm-vm file descriptors, and the kvm-vcpu file descriptors that differ from x86.
> +
> +1. ioctl calls to /dev/kvm
> +KVM does support the following ioctls on s390 that are common with other
> +architectures and do behave the same:
> +KVM_GET_API_VERSION
> +KVM_CREATE_VM (*) see note
> +KVM_CHECK_EXTENSION
> +KVM_GET_VCPU_MMAP_SIZE
> +
> +Notes:
> +* KVM_CREATE_VM may fail on s390, if the calling process has multiple
> +threads and has not called KVM_S390_ENABLE_SIE before.
> +
> +In addition, on s390 the following architecture specific ioctls are supported:
> +ioctl: KVM_S390_ENABLE_SIE
> +args: none
> +see also: include/linux/kvm.h
> +This call causes the kernel to switch on PGSTE in the user page table. This
> +operation is needed in order to run a virtual machine, and it requires the
> +calling process to be single-threaded. Note that the first call to KVM_CREATE_VM
> +will implicitly try to switch on PGSTE if the user process has not called
> +KVM_S390_ENABLE_SIE before. User processes that want to launch multiple threads
> +before creating a virtual machine have to call KVM_S390_ENABLE_SIE, or will
> +observe an error calling KVM_CREATE_VM. Switching on PGSTE is a one-time
> +operation, is not reversible, and will persist over the entire lifetime of
> +the calling process. It does not have any user-visible effect other than a small
> +performance penalty.
> +
> +2. ioctl calls to the kvm-vm file descriptor
> +KVM does support the following ioctls on s390 that are common with other
> +architectures and do behave the same:
> +KVM_CREATE_VCPU
> +KVM_SET_USER_MEMORY_REGION (*) see note
> +KVM_GET_DIRTY_LOG (**) see note
> +
> +Notes:
> +* kvm does only allow exactly one memory slot on s390, which has to start
> + at guest absolute address zero and at a user address that is aligned on any
> + page boundary. This hardware "limitation" allows us to have a few unique
> + optimizations. The memory slot doesn't have to be filled
> + with memory actually, it may contain sparse holes. That said, with different
> + user memory layout this does still allow a large flexibility when
> + doing the guest memory setup.
> +** KVM_GET_DIRTY_LOG doesn't work properly yet. The user will receive an empty
> +log. This ioctl call is only needed for guest migration, and we intend to
> +implement this one in the future.
> +
> +In addition, on s390 the following architecture specific ioctls for the kvm-vm
> +file descriptor are supported:
> +ioctl: KVM_S390_INTERRUPT
> +args: struct kvm_s390_interrupt *
> +see also: include/linux/kvm.h
> +This ioctl is used to submit a floating interrupt for a virtual machine.
> +Floating interrupts may be delivered to any virtual cpu in the configuration.
> +Only some interrupt types defined in include/linux/kvm.h make sense when
> +submitted as floating interrupts. The following interrupts are not considered
> +to be useful as floating interrupts, and a call to inject them will result in
> +-EINVAL error code: program interrupts and interprocessor signals. Valid
> +floating interrupts are:
> +KVM_S390_INT_VIRTIO
> +KVM_S390_INT_SERVICE
> +
> +3. ioctl calls to the kvm-vcpu file descriptor
> +KVM does support the following ioctls on s390 that are common with other
> +architectures and do behave the same:
> +KVM_RUN
> +KVM_GET_REGS
> +KVM_SET_REGS
> +KVM_GET_SREGS
> +KVM_SET_SREGS
> +KVM_GET_FPU
> +KVM_SET_FPU
> +
> +In addition, on s390 the following architecture specific ioctls for the
> +kvm-vcpu file descriptor are supported:
> +ioctl: KVM_S390_INTERRUPT
> +args: struct kvm_s390_interrupt *
> +see also: include/linux/kvm.h
> +This ioctl is used to submit an interrupt for a specific virtual cpu.
> +Only some interrupt types defined in include/linux/kvm.h make sense when
> +submitted for a specific cpu. The following interrupts are not considered
> +to be useful, and a call to inject them will result in -EINVAL error code:
> +service processor calls and virtio interrupts. Valid interrupt types are:
> +KVM_S390_PROGRAM_INT
> +KVM_S390_SIGP_STOP
> +KVM_S390_RESTART
> +KVM_S390_SIGP_SET_PREFIX
> +KVM_S390_INT_EMERGENCY
> +
> +ioctl: KVM_S390_STORE_STATUS
> +args: unsigned long
> +see also: include/linux/kvm.h
> +This ioctl stores the state of the cpu at the guest real address given as
> +argument, unless one of the following values defined in include/linux/kvm.h
> +is given as arguement:
> +KVM_S390_STORE_STATUS_NOADDR - the CPU stores its status to the save area in
~~~
> +absolute lowcore as defined by the principles of operation
> +KVM_S390_STORE_STATUS_PREFIXED - the CPU stores its status to the save area in
~~~
Please use "CPU" consistently throughout the file (i.e., not "cpu").
> +its prefix page just like the dump tool that comes with zipl. This is useful
> +to create a system dump for use with lkcdutils or crash.
> +
> +ioctl: KVM_S390_SET_INITIAL_PSW
> +args: struct kvm_s390_psw *
> +see also: include/linux/kvm.h
> +This ioctl can be used to set the processor status word (psw) of a stopped cpu
> +prior to running it with KVM_RUN. Note that this call is not required to modify
> +the psw during sie intercepts that fall back to userspace because struct kvm_run
> +does contain the psw, and this value is evaluated during reentry of KVM_RUN
> +after the intercept exit was recognized.
> +
> +ioctl: KVM_S390_INITIAL_RESET
> +args: none
> +see also: include/linux/kvm.h
> +This ioctl can be used to perform an initial cpu reset as defined by the
> +principles of operation. The target cpu has to be in stopped state.
> --
---
~Randy
next prev parent reply other threads:[~2008-04-17 15:11 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-17 9:10 [PATCH 00/45] KVM updates for the 2.6.26 merge window (part III) Avi Kivity
2008-04-17 9:10 ` [PATCH 01/45] s390: fixup for kvm Avi Kivity
2008-04-17 9:10 ` [PATCH 02/45] s390: KVM preparation: provide hook to enable pgstes in user pagetable Avi Kivity
2008-04-17 9:10 ` [PATCH 03/45] s390: KVM preparation: host memory management changes for s390 kvm Avi Kivity
2008-04-17 9:10 ` [PATCH 04/45] s390: KVM preparation: address of the 64bit extint parm in lowcore Avi Kivity
2008-04-17 9:10 ` [PATCH 05/45] s390: KVM preparation: split sysinfo defintions for kvm use Avi Kivity
2008-04-17 9:10 ` [PATCH 06/45] KVM: s390: arch backend for the kvm kernel module Avi Kivity
2008-04-17 9:10 ` [PATCH 07/45] KVM: s390: sie intercept handling Avi Kivity
2008-04-17 9:10 ` [PATCH 08/45] KVM: s390: interrupt subsystem, cpu timer, waitpsw Avi Kivity
2008-04-17 9:10 ` [PATCH 09/45] KVM: s390: intercepts for privileged instructions Avi Kivity
2008-04-17 9:10 ` [PATCH 10/45] KVM: s390: interprocessor communication via sigp Avi Kivity
2008-04-17 9:10 ` [PATCH 11/45] KVM: s390: intercepts for diagnose instructions Avi Kivity
2008-04-17 9:10 ` [PATCH 12/45] KVM: s390: add kvm to kconfig on s390 Avi Kivity
2008-04-17 9:10 ` [PATCH 13/45] KVM: s390: API documentation Avi Kivity
2008-04-17 15:11 ` Randy Dunlap [this message]
2008-04-17 15:42 ` Carsten Otte
2008-04-17 9:10 ` [PATCH 14/45] KVM: s390: update maintainers Avi Kivity
2008-04-17 9:10 ` [PATCH 15/45] s390: KVM guest: detect when running on kvm Avi Kivity
2008-04-17 9:10 ` [PATCH 16/45] s390: KVM guest: virtio device support, and kvm hypercalls Avi Kivity
2008-04-17 9:10 ` [PATCH 17/45] KVM: VMX: Enable MSR Bitmap feature Avi Kivity
2008-04-17 9:10 ` [PATCH 18/45] KVM: MMU: unify slots_lock usage Avi Kivity
2008-04-17 9:10 ` [PATCH 19/45] KVM: MMU: allow the vm to shrink the kvm mmu shadow caches Avi Kivity
2008-04-17 9:10 ` [PATCH 20/45] KVM: Free apic access page on vm destruction Avi Kivity
2008-04-17 9:10 ` [PATCH 21/45] KVM: function declaration parameter name cleanup Avi Kivity
2008-04-17 9:10 ` [PATCH 22/45] KVM: add vm refcounting Avi Kivity
2008-04-17 9:10 ` [PATCH 23/45] KVM: MMU: Only mark_page_accessed() if the page was accessed by the guest Avi Kivity
2008-04-17 9:10 ` [PATCH 24/45] KVM: MMU: prepopulate guest pages after write-protecting Avi Kivity
2008-04-17 9:10 ` [PATCH 25/45] KVM: s390: Fix incorrect return value Avi Kivity
2008-04-17 9:10 ` [PATCH 26/45] KVM: s390: rename stfl to kvm_stfl Avi Kivity
2008-04-17 9:10 ` [PATCH 27/45] KVM: s390: Improve pgste accesses Avi Kivity
2008-04-17 9:10 ` [PATCH 28/45] ia64: Add API for allocating Dynamic TR resource Avi Kivity
2008-04-17 9:10 ` [PATCH 29/45] ia64: Implement smp_call_function_mask for ia64 Avi Kivity
2008-04-17 9:10 ` [PATCH 30/45] KVM: ia64: Prepare some structure and routines for kvm use Avi Kivity
2008-04-17 9:10 ` [PATCH 31/45] KVM: ia64: Add header files for kvm/ia64 Avi Kivity
2008-04-17 9:10 ` [PATCH 32/45] KVM: ia64: Add kvm arch-specific core code " Avi Kivity
2008-04-17 9:10 ` [PATCH 33/45] KVM: ia64: Add header files " Avi Kivity
2008-04-17 9:10 ` [PATCH 34/45] KVM: ia64: VMM module interfaces Avi Kivity
2008-04-17 9:10 ` [PATCH 35/45] KVM: ia64: Add TLB virtulization support Avi Kivity
2008-04-17 9:10 ` [PATCH 36/45] KVM: ia64: Add interruption vector table for vmm Avi Kivity
2008-04-17 9:10 ` [PATCH 37/45] KVM: ia64: Add mmio decoder for kvm/ia64 Avi Kivity
2008-04-17 9:10 ` [PATCH 38/45] KVM: ia64: Add trampoline for guest/host mode switch Avi Kivity
2008-04-17 9:10 ` [PATCH 39/45] KVM: ia64: Add processor virtulization support Avi Kivity
2008-04-17 9:10 ` [PATCH 40/45] KVM: ia64: Add optimization for some virtulization faults Avi Kivity
2008-04-17 9:10 ` [PATCH 41/45] KVM: ia64: Generate offset values for assembly code use Avi Kivity
2008-04-17 9:10 ` [PATCH 42/45] KVM: ia64: Add guest interruption injection support Avi Kivity
2008-04-17 9:10 ` [PATCH 43/45] KVM: ia64: Add kvm sal/pal virtulization support Avi Kivity
2008-04-17 9:10 ` [PATCH 44/45] KVM: ia64: Enable kvm build for ia64 Avi Kivity
2008-04-17 9:10 ` [PATCH 45/45] KVM: ia64: Add a guide about how to create kvm guests on ia64 Avi Kivity
2008-04-17 15:15 ` Randy Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080417081106.aab87b1a.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=avi@qumranet.com \
--cc=cotte@de.ibm.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox