Re: [PATCH 3/6] kvm-s390: make sigp restart return busy when stop pending

2012-02-06 Thread Carsten Otte
Am 06.02.2012 10:59, schrieb Christian Borntraeger: +static int __sigp_restart(struct kvm_vcpu *vcpu, u16 cpu_addr) +{ + int rc = 0; + struct kvm_s390_float_interrupt *fi =vcpu-kvm-arch.float_int; + + spin_lock(fi-lock); + if (fi-local_int[cpu_addr]-action_bits

Re: [patch 00/11] Ucontrol patchset respin without storage keys

2012-01-05 Thread Carsten Otte
On 05.01.2012 14:47, Marcelo Tosatti wrote: Where is the userspace part? The ucontrol patchset is intended to be used with a machine simulator called cecsim. It can emulate an entire mainframe including nested virtualisation and is used for development and test of N+1 generation firmware on N

[patch 05/11] [PATCH] kvm-s390-ucontrol: disable in-kernel handling of SIE intercepts

2012-01-04 Thread Carsten Otte
This patch disables in-kernel handling of SIE intercepts for user controlled virtual machines. All intercepts are passed to userspace via KVM_EXIT_SIE exit reason just like SIE intercepts that cannot be handled in-kernel for regular KVM guests. Signed-off-by: Carsten Otte co...@de.ibm.com

[patch 06/11] [PATCH] kvm-s390-ucontrol: disable in-kernel irq stack

2012-01-04 Thread Carsten Otte
This patch disables the in-kernel interrupt stack for KVM virtual machines that are controlled by user. Userspace has to take care of handling interrupts on its own. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

[patch 03/11] [PATCH] kvm-s390-ucontrol: export page faults to user

2012-01-04 Thread Carsten Otte
space and then continue to run the virtual cpu. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 14 ++ arch/s390/kvm/kvm-s390.c | 32 +++- arch/s390/kvm/kvm-s390.h |1 + include/linux/kvm.h

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

2012-01-04 Thread Carsten Otte
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. Signed-off-by: Carsten Otte co...@de.ibm.com

[patch 10/11] [PATCH] kvm-s390-ucontrol: announce capability for user controlled vms

2012-01-04 Thread Carsten Otte
This patch announces a new capability KVM_CAP_S390_UCONTROL that indicates that kvm can now support virtual machines that are controlled by userspace. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4

[patch 04/11] [PATCH] kvm-s390-ucontrol: export SIE control block to user

2012-01-04 Thread Carsten Otte
This patch exports the s390 SIE hardware control block to userspace via the mapping of the vcpu file descriptor. In order to do so, a new arch callback named kvm_arch_vcpu_fault is introduced for all architectures. It allows to map architecture specific pages. Signed-off-by: Carsten Otte co

[patch 02/11] [PATCH] kvm-s390-ucontrol: per vcpu address spaces

2012-01-04 Thread Carsten Otte
way. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 38 arch/s390/kvm/kvm-s390.c | 50 +- include/linux/kvm.h | 10 +++ 3 files changed, 97 insertions(+), 1

[patch 11/11] [PATCH] kvm-s390: Fix return code for unknown ioctl numbers

2012-01-04 Thread Carsten Otte
This patch fixes the return code of kvm_arch_vcpu_ioctl in case of an unkown ioctl number. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c

[patch 01/11] [PATCH] kvm-s390: add parameter for KVM_CREATE_VM

2012-01-04 Thread Carsten Otte
valid modifier bit for now is KVM_VM_S390_UCONTROL. This requires CAP_SYS_ADMIN privileges and creates a user controlled virtual machine on s390 architectures. Signed-off-by: Carsten Otte co...@de.ibm.com --- Documentation/virtual/kvm/api.txt |7 ++- arch/ia64/kvm/kvm-ia64.c

[patch 00/11] Ucontrol patchset respin without storage keys

2012-01-04 Thread Carsten Otte
Hi Avi, after some more discussion about how to do storage keys proper, I could not come up with a sane and safe way of doing SSKE without either over or underindicating the change bit in corner cases (leads to corrupted guest memory or host kernel panic). The storage key operations are

[patch 08/11] [PATCH] kvm-s390-ucontrol: disable sca

2012-01-04 Thread Carsten Otte
This patch makes sure user controlled virtual machines do not use a system control area (sca). This is needed in order to create virtual machines with more cpus than the size of the sca [64]. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

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

2012-01-04 Thread Carsten Otte
Avi wrote: 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? I've read your comment again, and understood it this time. Trouble is that the kernel cannot

Re: [patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-15 Thread Carsten Otte
From: Carsten Otte co...@de.ibm.com This patch introduces an interface to access the guest visible storage keys. It supports three operations that model the behavior that SSKE/ISKE/RRBE instructions would have if they were issued by the guest. These instructions are all documented in the z

[patch 00/12] Ucontrol patchset V6

2011-12-14 Thread Carsten Otte
Hi Avi, Hi Marcelo, I've integrated all review feedback: - locking is fixed on the storage key path - symbols have been renamed all over the place: CONFIG_KVM_UCONTROL = CONFIG_KVM_S390_UCONTROL KVM_CAP_UCONTROL = KVM_CAP_S390_UCONTROL KVM_VM_UCONTROL =

[patch 05/12] [PATCH] kvm-s390-ucontrol: disable in-kernel handling of SIE intercepts

2011-12-14 Thread Carsten Otte
This patch disables in-kernel handling of SIE intercepts for user controlled virtual machines. All intercepts are passed to userspace via KVM_EXIT_SIE exit reason just like SIE intercepts that cannot be handled in-kernel for regular KVM guests. Signed-off-by: Carsten Otte co...@de.ibm.com

[patch 12/12] [PATCH] kvm-s390: Fix return code for unknown ioctl numbers

2011-12-14 Thread Carsten Otte
This patch fixes the return code of kvm_arch_vcpu_ioctl in case of an unkown ioctl number. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c

[patch 09/12] [PATCH] kvm-s390: fix assumption for KVM_MAX_VCPUS

2011-12-14 Thread Carsten Otte
This patch fixes definition of the idle_mask and the local_int array in kvm_s390_float_interrupt. Previous definition had 64 cpus max hardcoded instead of using KVM_MAX_VCPUS. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/include/asm/kvm_host.h |5 +++-- 1 file changed, 3

[patch 06/12] [PATCH] kvm-s390-ucontrol: disable in-kernel irq stack

2011-12-14 Thread Carsten Otte
This patch disables the in-kernel interrupt stack for KVM virtual machines that are controlled by user. Userspace has to take care of handling interrupts on its own. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |3 ++- 1 file changed, 2 insertions(+), 1

[patch 04/12] [PATCH] kvm-s390-ucontrol: export SIE control block to user

2011-12-14 Thread Carsten Otte
This patch exports the s390 SIE hardware control block to userspace via the mapping of the vcpu file descriptor. In order to do so, a new arch callback named kvm_arch_vcpu_fault is introduced for all architectures. It allows to map architecture specific pages. Signed-off-by: Carsten Otte co

[patch 08/12] [PATCH] kvm-s390-ucontrol: disable sca

2011-12-14 Thread Carsten Otte
This patch makes sure user controlled virtual machines do not use a system control area (sca). This is needed in order to create virtual machines with more cpus than the size of the sca [64]. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c | 30

[patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-14 Thread Carsten Otte
. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 38 + arch/s390/include/asm/kvm_host.h |4 + arch/s390/include/asm/pgtable.h |1 arch/s390/kvm/kvm-s390.c | 110 -- arch/s390/mm

[patch 02/12] [PATCH] kvm-s390-ucontrol: per vcpu address spaces

2011-12-14 Thread Carsten Otte
way. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 38 arch/s390/kvm/kvm-s390.c | 50 +- include/linux/kvm.h | 10 +++ 3 files changed, 97 insertions(+), 1

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

2011-12-14 Thread Carsten Otte
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. Signed-off-by: Carsten Otte co...@de.ibm.com

[patch 11/12] [PATCH] kvm-s390-ucontrol: announce capability for user controlled vms

2011-12-14 Thread Carsten Otte
This patch announces a new capability KVM_CAP_S390_UCONTROL that indicates that kvm can now support virtual machines that are controlled by userspace. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4

[patch 01/12] [PATCH] kvm-s390: add parameter for KVM_CREATE_VM

2011-12-14 Thread Carsten Otte
valid modifier bit for now is KVM_VM_S390_UCONTROL. This requires CAP_SYS_ADMIN privileges and creates a user controlled virtual machine on s390 architectures. Signed-off-by: Carsten Otte co...@de.ibm.com --- Documentation/virtual/kvm/api.txt |7 ++- arch/ia64/kvm/kvm-ia64.c

[patch 03/12] [PATCH] kvm-s390-ucontrol: export page faults to user

2011-12-14 Thread Carsten Otte
space and then continue to run the virtual cpu. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 14 ++ arch/s390/kvm/kvm-s390.c | 32 +++- arch/s390/kvm/kvm-s390.h |1 + include/linux/kvm.h

Re: [patch 01/12] [PATCH] kvm-s390: add parameter for KVM_CREATE_VM

2011-12-12 Thread Carsten Otte
On 12.12.2011 10:13, Avi Kivity wrote: Old kernels don't expose KVM_VM_REGULAR, so if people follow the recommendations, their userspace won't build. Normal guests must be 0. We can pretend we planned this all along by making the argument a flags mask, and claiming bit 0 for UCONTROL. That's

Re: [patch 00/12] Ucontrol patchset V5

2011-12-12 Thread Carsten Otte
On 12.12.2011 10:15, Avi Kivity wrote: Please add links to the documentation of the SIE thingie. The format of the SIE control block is documented here: http://www.vm.ibm.com/pubs/cpdacb/SIEBK.HTML The native behavior of SSKE, ISKE and RRBE is documented in the Principles of Operation: for

Re: [patch 04/12] [PATCH] kvm-s390-ucontrol: export SIE control block to user

2011-12-12 Thread Carsten Otte
On 12.12.2011 10:17, Avi Kivity wrote: I've reconsidered and now want the s390 back. Sorry about that. git-filter-branch can make the sedding painless. So pain involved, I can operate sed s/old/new/g just fine ;-). Will change it for the next version. -- To unsubscribe from this list: send

Re: [patch 00/12] Ucontrol patchset V5

2011-12-12 Thread Carsten Otte
On 12.12.2011 10:49, Avi Kivity wrote: Do you have it in a tablet form factor? Never trust a machine you can lift :-). -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [patch 04/12] [PATCH] kvm-s390-ucontrol: export SIE control block to user

2011-12-10 Thread Carsten Otte
On 09.12.2011 17:06, Alexander Graf wrote: Same as this. It's an s390 specific hack, so it should be identified as such. Naming is fine either way with me. Sasha Levin and Avi seemed to prefer not to have _S390 in it. -- To unsubscribe from this list: send the line unsubscribe kvm in the body

Re: [patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-10 Thread Carsten Otte
On 09.12.2011 14:46, heica...@linux.vnet.ibm.com wrote: On Fri, Dec 09, 2011 at 01:49:35PM +0100, Carsten Otte wrote: This patch introduces an interface to access the guest visible storage keys. It supports three operations that model the behavior that SSKE/ISKE/RRBE instructions would have

[patch 00/12] Ucontrol patchset V5

2011-12-10 Thread Carsten Otte
Hi Avi, Hi Marcelo, this iteration of the patchset has two changes: - Handling of null PTEs is fixed (thanks Heiko) - Typo in comment is fixed (thanks Joachim) so long, Carsten -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org

[patch 01/12] [PATCH] kvm-s390: add parameter for KVM_CREATE_VM

2011-12-10 Thread Carsten Otte
are KVM_VM_REGULAR (defined to 0 for backward compatibility to old KVM_CREATE_VM) and KVM_VM_UCONTROL for s390 only. Note that the user controlled virtual machines require CAP_SYS_ADMIN privileges. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt |7

[patch 05/12] [PATCH] kvm-s390-ucontrol: disable in-kernel handling of SIE intercepts

2011-12-10 Thread Carsten Otte
This patch disables in-kernel handling of SIE intercepts for user controlled virtual machines. All intercepts are passed to userspace via KVM_EXIT_SIE exit reason just like SIE intercepts that cannot be handled in-kernel for regular KVM guests. Signed-off-by: Carsten Otte co...@de.ibm.com

[patch 09/12] [PATCH] kvm-s390: fix assumption for KVM_MAX_VCPUS

2011-12-10 Thread Carsten Otte
This patch fixes definition of the idle_mask and the local_int array in kvm_s390_float_interrupt. Previous definition had 64 cpus max hardcoded instead of using KVM_MAX_VCPUS. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/include/asm/kvm_host.h |5 +++-- 1 file changed, 3

[patch 08/12] [PATCH] kvm-s390-ucontrol: disable sca

2011-12-10 Thread Carsten Otte
This patch makes sure user controlled virtual machines do not use a system control area (sca). This is needed in order to create virtual machines with more cpus than the size of the sca [64]. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c | 30

[patch 04/12] [PATCH] kvm-s390-ucontrol: export SIE control block to user

2011-12-10 Thread Carsten Otte
This patch exports the s390 SIE hardware control block to userspace via the mapping of the vcpu file descriptor. In order to do so, a new arch callback named kvm_arch_vcpu_fault is introduced for all architectures. It allows to map architecture specific pages. Signed-off-by: Carsten Otte co

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

2011-12-10 Thread Carsten Otte
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. Signed-off-by: Carsten Otte co...@de.ibm.com

[patch 12/12] [PATCH] kvm-s390: Fix return code for unknown ioctl numbers

2011-12-10 Thread Carsten Otte
This patch fixes the return code of kvm_arch_vcpu_ioctl in case of an unkown ioctl number. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c

[patch 11/12] [PATCH] kvm-s390-ucontrol: announce capability for user controlled vms

2011-12-10 Thread Carsten Otte
This patch announces a new capability KVM_CAP_UCONTROL that indicates that kvm can now support virtual machines that are controlled by userspace. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4

[patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-10 Thread Carsten Otte
. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 38 + arch/s390/include/asm/kvm_host.h |4 + arch/s390/include/asm/pgtable.h |1 arch/s390/kvm/kvm-s390.c | 108 -- arch/s390/mm

[patch 02/12] [PATCH] kvm-s390-ucontrol: per vcpu address spaces

2011-12-10 Thread Carsten Otte
way. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 38 arch/s390/kvm/kvm-s390.c | 50 +- include/linux/kvm.h | 10 +++ 3 files changed, 97 insertions(+), 1

[patch 03/12] [PATCH] kvm-s390-ucontrol: export page faults to user

2011-12-10 Thread Carsten Otte
and then continue to run the virtual cpu. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 14 ++ arch/s390/kvm/kvm-s390.c | 32 +++- arch/s390/kvm/kvm-s390.h |1 + include/linux/kvm.h

[patch 06/12] [PATCH] kvm-s390-ucontrol: disable in-kernel irq stack

2011-12-10 Thread Carsten Otte
This patch disables the in-kernel interrupt stack for KVM virtual machines that are controlled by user. Userspace has to take care of handling interrupts on its own. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |3 ++- 1 file changed, 2 insertions(+), 1

[patch 00/12] Ucontrol patches V3

2011-12-09 Thread Carsten Otte
Hi Avi, Hi Marcelo, this round includes feedback from Sasha Levin: KVM_VM_S390_UCONTROL renamed to KVM_VM_UCONTROL KVM_CAP_S390_UCONTROL renamed to KVM_CAP_UCONTROL and a bugfix for a possible host change bit underindication (race) in SSKE that was reported by Joachim off-list. @Heiko: since

[patch 02/12] [PATCH] kvm-s390-ucontrol: per vcpu address spaces

2011-12-09 Thread Carsten Otte
way. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 38 arch/s390/kvm/kvm-s390.c | 50 +- include/linux/kvm.h | 10 +++ 3 files changed, 97 insertions(+), 1

[patch 08/12] [PATCH] kvm-s390-ucontrol: disable sca

2011-12-09 Thread Carsten Otte
This patch makes sure user controlled virtual machines do not use a system control area (sca). This is needed in order to create virtual machines with more cpus than the size of the sca [64]. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

[patch 12/12] [PATCH] kvm-s390: Fix return code for unknown ioctl numbers

2011-12-09 Thread Carsten Otte
This patch fixes the return code of kvm_arch_vcpu_ioctl in case of an unkown ioctl number. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

[patch 05/12] [PATCH] kvm-s390-ucontrol: disable in-kernel handling of SIE intercepts

2011-12-09 Thread Carsten Otte
This patch disables in-kernel handling of SIE intercepts for user controlled virtual machines. All intercepts are passed to userspace via KVM_EXIT_SIE exit reason just like SIE intercepts that cannot be handled in-kernel for regular KVM guests. Signed-off-by: Carsten Otte co...@de.ibm.com

[patch 04/12] [PATCH] kvm-s390-ucontrol: export SIE control block to user

2011-12-09 Thread Carsten Otte
This patch exports the s390 SIE hardware control block to userspace via the mapping of the vcpu file descriptor. In order to do so, a new arch callback named kvm_arch_vcpu_fault is introduced for all architectures. It allows to map architecture specific pages. Signed-off-by: Carsten Otte co

[patch 11/12] [PATCH] kvm-s390-ucontrol: announce capability for user controlled vms

2011-12-09 Thread Carsten Otte
This patch announces a new capability KVM_CAP_UCONTROL that indicates that kvm can now support virtual machines that are controlled by userspace. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4

[patch 01/12] [PATCH] kvm-s390: add parameter for KVM_CREATE_VM

2011-12-09 Thread Carsten Otte
are KVM_VM_REGULAR (defined to 0 for backward compatibility to old KVM_CREATE_VM) and KVM_VM_UCONTROL for s390 only. Note that the user controlled virtual machines require CAP_SYS_ADMIN privileges. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt |7

[patch 03/12] [PATCH] kvm-s390-ucontrol: export page faults to user

2011-12-09 Thread Carsten Otte
and then continue to run the virtual cpu. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 14 ++ arch/s390/kvm/kvm-s390.c | 32 +++- arch/s390/kvm/kvm-s390.h |1 + include/linux/kvm.h

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

2011-12-09 Thread Carsten Otte
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. Signed-off-by: Carsten Otte co...@de.ibm.com

[patch 09/12] [PATCH] kvm-s390: fix assumption for KVM_MAX_VCPUS

2011-12-09 Thread Carsten Otte
This patch fixes definition of the idle_mask and the local_int array in kvm_s390_float_interrupt. Previous definition had 64 cpus max hardcoded instead of using KVM_MAX_VCPUS. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/include/asm/kvm_host.h

[patch 06/12] [PATCH] kvm-s390-ucontrol: disable in-kernel irq stack

2011-12-09 Thread Carsten Otte
This patch disables the in-kernel interrupt stack for KVM virtual machines that are controlled by user. Userspace has to take care of handling interrupts on its own. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

[patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-09 Thread Carsten Otte
. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 38 + arch/s390/include/asm/kvm_host.h |4 + arch/s390/include/asm/pgtable.h |1 arch/s390/kvm/kvm-s390.c | 106 -- arch/s390/mm

Re: [patch 01/12] [PATCH] kvm-s390: add parameter for KVM_CREATE_VM

2011-12-09 Thread Carsten Otte
On 09.12.2011 12:32, Alexander Graf wrote: +KVM_CAP_UCONTROL KVM_S390_CAP_UCONTROL I'm happy either way. It seemed to me that the discussion between Avi and Sasha for V2 of the patch series on this naming has concluded to KVM_CAP_UCONTROL/KVM_VM_UCONTROL without _S390 in it.

Re: [patch 04/12] [PATCH] kvm-s390-ucontrol: export SIE control block to user

2011-12-09 Thread Carsten Otte
On 09.12.2011 12:37, Alexander Graf wrote: +#define KVM_S390_SIE_PAGE_OFFSET 1 Can we please make these a global number space? I don't want to have any user space code accidently call this mmap while it's trying to find out if it can map the PIO page. We already have a global number space

[patch 02/12] [PATCH] kvm-s390-ucontrol: per vcpu address spaces

2011-12-09 Thread Carsten Otte
way. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 38 arch/s390/kvm/kvm-s390.c | 50 +- include/linux/kvm.h | 10 +++ 3 files changed, 97 insertions(+), 1

[patch 05/12] [PATCH] kvm-s390-ucontrol: disable in-kernel handling of SIE intercepts

2011-12-09 Thread Carsten Otte
This patch disables in-kernel handling of SIE intercepts for user controlled virtual machines. All intercepts are passed to userspace via KVM_EXIT_SIE exit reason just like SIE intercepts that cannot be handled in-kernel for regular KVM guests. Signed-off-by: Carsten Otte co...@de.ibm.com

[patch 04/12] [PATCH] kvm-s390-ucontrol: export SIE control block to user

2011-12-09 Thread Carsten Otte
This patch exports the s390 SIE hardware control block to userspace via the mapping of the vcpu file descriptor. In order to do so, a new arch callback named kvm_arch_vcpu_fault is introduced for all architectures. It allows to map architecture specific pages. Signed-off-by: Carsten Otte co

[patch 09/12] [PATCH] kvm-s390: fix assumption for KVM_MAX_VCPUS

2011-12-09 Thread Carsten Otte
This patch fixes definition of the idle_mask and the local_int array in kvm_s390_float_interrupt. Previous definition had 64 cpus max hardcoded instead of using KVM_MAX_VCPUS. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/include/asm/kvm_host.h

[patch 06/12] [PATCH] kvm-s390-ucontrol: disable in-kernel irq stack

2011-12-09 Thread Carsten Otte
This patch disables the in-kernel interrupt stack for KVM virtual machines that are controlled by user. Userspace has to take care of handling interrupts on its own. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

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

2011-12-09 Thread Carsten Otte
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. Signed-off-by: Carsten Otte co...@de.ibm.com

[patch 08/12] [PATCH] kvm-s390-ucontrol: disable sca

2011-12-09 Thread Carsten Otte
This patch makes sure user controlled virtual machines do not use a system control area (sca). This is needed in order to create virtual machines with more cpus than the size of the sca [64]. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

[patch 01/12] [PATCH] kvm-s390: add parameter for KVM_CREATE_VM

2011-12-09 Thread Carsten Otte
are KVM_VM_REGULAR (defined to 0 for backward compatibility to old KVM_CREATE_VM) and KVM_VM_UCONTROL for s390 only. Note that the user controlled virtual machines require CAP_SYS_ADMIN privileges. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt |7

[patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-09 Thread Carsten Otte
. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 38 + arch/s390/include/asm/kvm_host.h |4 + arch/s390/include/asm/pgtable.h |1 arch/s390/kvm/kvm-s390.c | 110 -- arch/s390/mm

[patch 00/12] Ucontrol patchset V4

2011-12-09 Thread Carsten Otte
Hi Avi, Hi Marcelo, this version includes review feedback from Heiko. so long, Carsten -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch 12/12] [PATCH] kvm-s390: Fix return code for unknown ioctl numbers

2011-12-09 Thread Carsten Otte
This patch fixes the return code of kvm_arch_vcpu_ioctl in case of an unkown ioctl number. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

[patch 11/12] [PATCH] kvm-s390-ucontrol: announce capability for user controlled vms

2011-12-09 Thread Carsten Otte
This patch announces a new capability KVM_CAP_UCONTROL that indicates that kvm can now support virtual machines that are controlled by userspace. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4

[patch 03/12] [PATCH] kvm-s390-ucontrol: export page faults to user

2011-12-09 Thread Carsten Otte
and then continue to run the virtual cpu. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 14 ++ arch/s390/kvm/kvm-s390.c | 32 +++- arch/s390/kvm/kvm-s390.h |1 + include/linux/kvm.h

Re: [patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-09 Thread Carsten Otte
On 09.12.2011 13:52, Joachim von Buttlar wrote: Shouldn't it be: page_set_storage_key(pte_val(*ptep), skey | _PAGE_CHANGED, 1); +/* avoid race clobbering changed bit */ +pte_val(*ptep)

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

2011-12-08 Thread Carsten Otte
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. Signed-off-by: Carsten Otte co...@de.ibm.com

[patch 00/12] Ucontrol patchset V2

2011-12-08 Thread Carsten Otte
Hi Avi, Hi Marcelo, I think I've integrated all feedback from last round. The race between KVM_S390_ENABLE_UCONTROL and creation of vcpus has been resolved by adding a parameter to KVM_CREATE_VM. The default KVM_VM_REGULAR (==0) is backward compatible to KVM_CREATE_VM without parameters, and

[patch 11/12] [PATCH] kvm-s390-ucontrol: announce capability for user controlled vms

2011-12-08 Thread Carsten Otte
This patch announces a new capability KVM_CAP_S390_UCONTROL that indicates that kvm can now support virtual machines that are controlled by userspace. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4

[patch 02/12] [PATCH] kvm-s390-ucontrol: per vcpu address spaces

2011-12-08 Thread Carsten Otte
way. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 38 arch/s390/kvm/kvm-s390.c | 50 +- include/linux/kvm.h | 10 +++ 3 files changed, 97 insertions(+), 1

[patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-08 Thread Carsten Otte
. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 38 ++ arch/s390/include/asm/kvm_host.h |4 + arch/s390/include/asm/pgtable.h |1 arch/s390/kvm/kvm-s390.c | 103 -- arch/s390/mm

[patch 03/12] [PATCH] kvm-s390-ucontrol: export page faults to user

2011-12-08 Thread Carsten Otte
and then continue to run the virtual cpu. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt | 14 ++ arch/s390/kvm/kvm-s390.c | 32 +++- arch/s390/kvm/kvm-s390.h |1 + include/linux/kvm.h

[patch 08/12] [PATCH] kvm-s390-ucontrol: disable sca

2011-12-08 Thread Carsten Otte
This patch makes sure user controlled virtual machines do not use a system control area (sca). This is needed in order to create virtual machines with more cpus than the size of the sca [64]. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

[patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines

2011-12-08 Thread Carsten Otte
are KVM_VM_REGULAR (defined to 0 for backward compatibility to old KVM_CREATE_VM) and KVM_VM_S390_UCONTROL for s390 only. Note that the user controlled virtual machines require CAP_SYS_ADMIN privileges. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- Documentation/virtual/kvm/api.txt |7

[patch 09/12] [PATCH] kvm-s390: fix assumption for KVM_MAX_VCPUS

2011-12-08 Thread Carsten Otte
This patch fixes definition of the idle_mask and the local_int array in kvm_s390_float_interrupt. Previous definition had 64 cpus max hardcoded instead of using KVM_MAX_VCPUS. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/include/asm/kvm_host.h

[patch 06/12] [PATCH] kvm-s390-ucontrol: disable in-kernel irq stack

2011-12-08 Thread Carsten Otte
This patch disables the in-kernel interrupt stack for KVM virtual machines that are controlled by user. Userspace has to take care of handling interrupts on its own. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

[patch 04/12] [PATCH] kvm-s390-ucontrol: export SIE control block to user

2011-12-08 Thread Carsten Otte
This patch exports the s390 SIE hardware control block to userspace via the mapping of the vcpu file descriptor. In order to do so, a new arch callback named kvm_arch_vcpu_fault is introduced for all architectures. It allows to map architecture specific pages. Signed-off-by: Carsten Otte co

[patch 05/12] [PATCH] kvm-s390-ucontrol: disable in-kernel handling of SIE intercepts

2011-12-08 Thread Carsten Otte
This patch disables in-kernel handling of SIE intercepts for user controlled virtual machines. All intercepts are passed to userspace via KVM_EXIT_SIE exit reason just like SIE intercepts that cannot be handled in-kernel for regular KVM guests. Signed-off-by: Carsten Otte co...@de.ibm.com

[patch 12/12] [PATCH] kvm-s390: Fix return code for unknown ioctl numbers

2011-12-08 Thread Carsten Otte
This patch fixes the return code of kvm_arch_vcpu_ioctl in case of an unkown ioctl number. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c

Re: [patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines

2011-12-08 Thread Carsten Otte
On 08.12.2011 10:25, Sasha Levin wrote: Why is it s390 specific? why isn't it KVM_VM_UCONTROL which is currently only implemented on s390? Good point. Maybe the subject line for the patch should be fixed along with that ;-) -- To unsubscribe from this list: send the line unsubscribe kvm in

Re: [patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines

2011-12-08 Thread Carsten Otte
On 08.12.2011 11:18, Alexander Graf wrote: If you really have to do this, please 1) make it s390 only. I don't even want to have to see this uglyness in other archs It pretty much is. The only interference is a) checking the machine type in arch_init_vm now that I've introduced that

Re: [patch 00/12] User controlled virtual machines

2011-12-02 Thread Carsten Otte
On 01.12.2011 14:33, Avi Kivity wrote: Okay, I read the code and I even think I understood a little bit of it. In general the patches look okay, I had only minor comments. But please do document all the new interfaces. Since when do we have api documentation? Tssj, kvm has grown up since last

[patch 02/12] [PATCH] kvm-s390-ucontrol: per vcpu address spaces

2011-12-01 Thread Carsten Otte
way. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c | 50 ++- include/linux/kvm.h |7 ++ 2 files changed, 56 insertions(+), 1 deletion(-) --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c

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

2011-12-01 Thread Carsten Otte
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. Signed-off-by: Carsten Otte co...@de.ibm.com

[patch 00/12] User controlled virtual machines

2011-12-01 Thread Carsten Otte
Hi Avi, Hi Marcelo, this patch series introduces an interface to allow a privileged userspace program to control a KVM virtual machine. The interface is intended for use by a machine simulator called CECSIM that can simulate an entire mainframe machine with nested virtualization and I/O for the

[patch 06/12] [PATCH] kvm-s390-ucontrol: disable in-kernel irq stack

2011-12-01 Thread Carsten Otte
This patch disables the in-kernel interrupt stack for KVM virtual machines that are controlled by user. Userspace has to take care of handling interrupts on its own. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

[patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines

2011-12-01 Thread Carsten Otte
machine must not have any memory slots installed, and no virtual cpus defined. Note that the user controlled virtual machines require CAP_SYS_ADMIN privileges. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/Kconfig|9 + arch/s390/kvm/kvm-s390.c | 30

[patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-01 Thread Carsten Otte
. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/include/asm/kvm_host.h === --- linux-2.5-cecsim.orig/arch/s390/include/asm/kvm_host.h +++ linux-2.5-cecsim/arch/s390/include/asm/kvm_host.h @@ -25,6

[patch 03/12] [PATCH] kvm-s390-ucontrol: export page faults to user

2011-12-01 Thread Carsten Otte
and then continue to run the virtual cpu. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c === --- linux-2.5-cecsim.orig/arch/s390/kvm/kvm-s390.c +++ linux-2.5-cecsim/arch/s390/kvm/kvm-s390

[patch 11/12] [PATCH] kvm-s390-ucontrol: announce capability for user controlled vms

2011-12-01 Thread Carsten Otte
This patch announces a new capability KVM_CAP_S390_UCONTROL that indicates that kvm can now support virtual machines that are controlled by userspace. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4

  1   2   >