All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Carsten Otte <cotte@de.ibm.com>
Cc: EHRHARDT@de.ibm.com, hollisb@us.ibm.com, arnd@arndb.de,
	kvm-devel@lists.sourceforge.net, heiko.carstens@de.ibm.com,
	jeroney@us.ibm.com, Avi Kivity <avi@qumranet.com>,
	virtualization@lists.linux-foundation.org,
	borntraeger@de.ibm.com, schwidefsky@de.ibm.com,
	rvdheij@gmail.com, os@de.ibm.com, jblunck@suse.de, "Zhang,
	 Xiantao" <xiantao.zhang@intel.com>
Subject: Re: [RFC/PATCH 12/15] kvm-s390: API documentation
Date: Thu, 20 Mar 2008 10:22:00 -0700	[thread overview]
Message-ID: <20080320102200.3718e573.randy.dunlap@oracle.com> (raw)
In-Reply-To: <1206030320.6690.63.camel@cotte.boeblingen.de.ibm.com>

On Thu, 20 Mar 2008 17:25:20 +0100 Carsten Otte wrote:

> 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>
> ---
>  Documentation/s390/kvm.txt |  125 +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 125 insertions(+)
> 
> Index: kvm/Documentation/s390/kvm.txt
> ===================================================================
> --- /dev/null
> +++ kvm/Documentation/s390/kvm.txt
> @@ -0,0 +1,125 @@
> +*** BIG FAT WARNING ***
> +The kvm module is currently in EXPERIMENTAL state for s390. This means, that

This means that  [no comma]

> +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-visibe effect other than a small

                                             user-visible

> +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 does'nt have to be filled

                                     doesn't

> +   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 does'nt work proper yet. The user will receive an empty

                        doesn't work properly

> +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 interrupt. The following interrupts are not considered

                         interrupts.

> +to be useful as floating interrupt, and a call to inject them will result in

                            interrupts,

> +-EINVAL error code: program interrupts, and interprocessor signals. Valid

no comma

> +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:

no comma

> +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
> +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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  parent reply	other threads:[~2008-03-20 17:22 UTC|newest]

Thread overview: 111+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1206028710.6690.21.camel@cotte.boeblingen.de.ibm.com>
2008-03-20 16:24 ` [RFC/PATCH 01/15] preparation: provide hook to enable pgstes in user pagetable Carsten Otte
2008-03-20 16:24   ` Carsten Otte, Martin Schwidefsky
2008-03-20 17:28   ` Jeremy Fitzhardinge
2008-03-20 17:28   ` Jeremy Fitzhardinge
2008-03-20 17:28     ` Jeremy Fitzhardinge
2008-03-20 19:13     ` Dave Hansen
2008-03-20 19:13       ` Dave Hansen
2008-03-20 20:35       ` Carsten Otte
2008-03-20 20:35         ` [kvm-devel] " Carsten Otte
2008-03-21 18:29         ` Dave Hansen
2008-03-21 18:29           ` Dave Hansen
2008-03-21 19:03           ` Carsten Otte
2008-03-21 19:03             ` Carsten Otte
2008-03-22 17:57           ` Heiko Carstens
2008-03-22 17:57           ` Heiko Carstens
2008-03-22 17:57             ` [kvm-devel] " Heiko Carstens
2008-03-23 10:15             ` Avi Kivity
2008-03-23 10:15               ` [kvm-devel] " Avi Kivity
2008-03-23 18:23               ` Martin Schwidefsky
2008-03-23 18:23                 ` Martin Schwidefsky
2008-03-24  6:57                 ` Avi Kivity
2008-03-24  6:57                 ` Avi Kivity
2008-03-24  6:57                   ` [kvm-devel] " Avi Kivity
2008-03-25  6:08                   ` Carsten Otte
2008-03-25  6:08                   ` Carsten Otte
2008-03-25  6:08                     ` [kvm-devel] " Carsten Otte
2008-03-25  6:12                     ` Avi Kivity
2008-03-25  6:12                       ` [kvm-devel] " Avi Kivity
2008-03-25  6:12                     ` Avi Kivity
2008-03-23 10:15             ` Avi Kivity
2008-03-25 15:37           ` Carsten Otte
2008-03-25 15:37           ` Carsten Otte
2008-03-25 15:37             ` [kvm-devel] " Carsten Otte
2008-03-20 20:35       ` Carsten Otte
2008-03-20 19:13     ` Dave Hansen
2008-03-20 16:24 ` Carsten Otte
2008-03-20 16:24 ` [RFC/PATCH 02/15] preparation: host memory management changes for s390 kvm Carsten Otte
2008-03-20 16:24 ` Carsten Otte
2008-03-20 16:24   ` Carsten Otte, Heiko Carstens, Christian Borntraeger
2008-03-20 16:24 ` [RFC/PATCH 03/15] preparation: address of the 64bit extint parm in lowcore Carsten Otte
2008-03-20 16:24 ` Carsten Otte
2008-03-20 16:24 ` [RFC/PATCH 04/15] preparation: split sysinfo defintions for kvm use Carsten Otte
2008-03-20 16:24 ` Carsten Otte
2008-03-20 16:24 ` [RFC/PATCH 05/15] kvm-s390: s390 arch backend for the kvm kernel module Carsten Otte
2008-03-20 16:43   ` [RFC/PATCH 05/15] KVM_MAX_VCPUS Hollis Blanchard
2008-03-20 16:43   ` Hollis Blanchard
2008-03-20 16:48     ` Carsten Otte
2008-03-21 10:41       ` [kvm-devel] " Avi Kivity
2008-03-21 11:13         ` Carsten Otte
2008-03-21 11:13         ` [kvm-devel] " Carsten Otte
2008-03-20 16:48     ` Carsten Otte
2008-03-20 16:24 ` [RFC/PATCH 05/15] kvm-s390: s390 arch backend for the kvm kernel module Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 06/15] kvm-s390: sie intercept handling Carsten Otte
2008-03-21 10:53   ` [kvm-devel] " Avi Kivity
2008-03-21 11:26     ` Carsten Otte
2008-03-21 11:26     ` [kvm-devel] " Carsten Otte
2008-03-20 16:25 ` Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 07/15] kvm-s390: interrupt subsystem, cpu timer, waitpsw Carsten Otte
2008-03-20 16:25 ` Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 08/15] kvm-s390: intercepts for privileged instructions Carsten Otte
2008-03-20 16:25 ` Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 09/15] kvm-s390: interprocessor communication via sigp Carsten Otte
2008-03-20 16:25 ` Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 10/15] kvm-s390: intercepts for diagnose instructions Carsten Otte
2008-03-20 16:25 ` Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 11/15] kvm-s390: add kvm to kconfig on s390 Carsten Otte
2008-03-20 16:25 ` Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 12/15] kvm-s390: API documentation Carsten Otte
2008-03-20 17:22   ` Randy Dunlap
2008-03-20 17:22   ` Randy Dunlap [this message]
2008-03-21 10:33     ` [kvm-devel] " Carsten Otte
2008-03-20 16:25 ` Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 13/15] kvm-s390: update maintainers Carsten Otte
2008-03-20 16:25 ` Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 14/15] guest: detect when running on kvm Carsten Otte
2008-03-20 17:16   ` Randy Dunlap
2008-03-20 17:16   ` Randy Dunlap
2008-03-20 17:27     ` Carsten Otte
2008-03-20 17:27     ` Carsten Otte
2008-03-20 17:53   ` Christoph Hellwig
2008-03-20 20:37     ` Carsten Otte
2008-03-20 19:41       ` Christoph Hellwig
2008-03-20 20:59         ` Carsten Otte
2008-03-20 21:22           ` [kvm-devel] " Heiko Carstens
2008-03-20 21:22           ` Heiko Carstens
2008-03-21 11:12             ` Carsten Otte
2008-03-21 14:06               ` [kvm-devel] " Heiko Carstens
2008-03-21 14:06               ` Heiko Carstens
2008-03-21 14:33                 ` [kvm-devel] " Carsten Otte
2008-03-21 14:33                 ` Carsten Otte
2008-03-22 17:25                   ` [kvm-devel] " Heiko Carstens
2008-03-22 17:25                   ` Heiko Carstens
2008-03-21 11:12             ` [kvm-devel] " Carsten Otte
2008-03-20 20:59         ` Carsten Otte
2008-03-20 19:41       ` Christoph Hellwig
2008-03-20 20:37     ` Carsten Otte
2008-03-20 17:53   ` Christoph Hellwig
2008-03-20 16:25 ` Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 15/15] guest: virtio device support, and kvm hypercalls Carsten Otte
2008-03-21  0:24   ` Rusty Russell
2008-03-21  7:12     ` Carsten Otte
2008-03-21  7:12     ` [kvm-devel] " Carsten Otte
2008-03-21  8:15     ` Christian Borntraeger
2008-03-21  8:15     ` Christian Borntraeger
2008-03-21 23:30       ` Rusty Russell
2008-03-21 23:30       ` Rusty Russell
2008-03-22  7:36         ` Carsten Otte
2008-03-22  7:36         ` Carsten Otte
2008-03-21  0:24   ` Rusty Russell
2008-03-21 10:44   ` Avi Kivity
2008-03-20 16:25 ` Carsten Otte

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=20080320102200.3718e573.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=EHRHARDT@de.ibm.com \
    --cc=arnd@arndb.de \
    --cc=avi@qumranet.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cotte@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hollisb@us.ibm.com \
    --cc=jblunck@suse.de \
    --cc=jeroney@us.ibm.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=os@de.ibm.com \
    --cc=rvdheij@gmail.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xiantao.zhang@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.