Re: question about arch/s390/kvm/interrupt.c

2009-07-13 Thread Carsten Otte
> (copying some s390 people) > > On 07/10/2009 02:47 PM, Julia Lawall wrote: > > In a recent version of linux-next, the function kvm_s390_handle_wait > > contains the following code: > > > > add_wait_queue(&vcpu->arch.local_int.wq,&wait); > > while (list_empty(&vcpu->arch.local_i

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

2011-12-01 Thread Carsten Otte
milar way. Signed-off-by: Carsten Otte --- --- 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 @@ -249,6 +2

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

2011-12-01 Thread Carsten Otte
he 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. Signed-off-by: Carsten Otte --- --- arch/s3

[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 pu

[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 --- 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 --- --- 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 --- 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 +25,9 @@ #define

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

2011-12-01 Thread Carsten Otte
e and then continue to run the virtual cpu. Signed-off-by: Carsten Otte --- 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.c @@ -

[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 --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4 insertions

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

2011-12-01 Thread Carsten Otte
This patch exports the SIE hardware control block to userspace via the mapping of the vcpu file descriptor. Signed-off-by: Carsten Otte --- --- arch/s390/include/asm/kvm_host.h |2 ++ virt/kvm/kvm_main.c |5 + 2 files changed, 7 insertions(+) --- a/arch/s390/include

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

2011-12-01 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 --- Index: linux-2.5-cecsim/arch/s390/include/asm/kvm_host.h

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

2011-12-01 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 --- Index: linux-2.5

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

2011-12-01 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 --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

[patch 12/12] From: Carsten Otte

2011-12-01 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 --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c === --- linux-2.5-cecsim.orig/arch/s390/kvm/kvm-s390.c

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

2011-12-01 Thread Carsten Otte
On 01.12.2011 14:26, Avi Kivity wrote: 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. else if (vmf->pgoff == KVM_COALESCED_MMIO_PAGE_OFFSET) page = virt_to_page(v

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 I

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

2011-12-08 Thread Carsten Otte
he 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. Signed-off-by: Carsten Otte --- --- Doc

[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 KVM_V

[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 --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4 insertions

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

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

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

2011-12-08 Thread Carsten Otte
. Signed-off-by: Carsten Otte --- --- 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/pgtable.c

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

2011-12-08 Thread Carsten Otte
e and then continue to run the virtual cpu. Signed-off-by: Carsten Otte --- --- 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 --- 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 --- --- Documentation/virtual/kvm/api.txt |7 ++- arch/ia64

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

[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 --- Index: linux-2.5

[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 --- --- 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 @@ -884,7 +884,7

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 t

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 paramete

[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 Mar

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

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

[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 --- 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 --- --- 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 --- Index: linux-2.5

[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

[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 --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4 insertions(+) --- a

[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 --- --- Documentation/virtual/kvm/api.txt |7 ++- arch/ia64/kvm

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

2011-12-09 Thread Carsten Otte
e and then continue to run the virtual cpu. Signed-off-by: Carsten Otte --- --- 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
he 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. Signed-off-by: Carsten Otte --- --- Doc

[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 --- 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 --- 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 --- --- 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/pgtable.c

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. KVM_ENABLE_CAP(

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 f

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

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

[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 --- --- arch/s390/kvm

[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

[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 --- 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 --- 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
he 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. Signed-off-by: Carsten Otte --- --- Doc

[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 --- 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 --- --- Documentation/virtual/kvm/api.txt |7 ++- arch/ia64/kvm

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

2011-12-09 Thread Carsten Otte
. Signed-off-by: Carsten Otte --- --- 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/pgtable.c

[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 --- --- 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 --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4 insertions(+) --- a

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

2011-12-09 Thread Carsten Otte
e and then continue to run the virtual cpu. Signed-off-by: Carsten Otte --- --- 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)

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 bod

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 if

[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 --- --- Documentation/virtual/kvm/api.txt |7 ++- arch/ia64/kvm

[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 --- --- arch/s390/kvm

[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 --- --- arch/s390/include/asm/kvm_host.h |5 +++-- 1 file changed, 3 insertions(+), 2

[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 --- --- arch/s390/kvm/kvm-s390.c | 30 -- 1

[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

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

2011-12-10 Thread Carsten Otte
he 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. Signed-off-by: Carsten Otte --- --- Doc

[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 --- --- 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 @@ -889,7 +889,7

[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 --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4 insertions(+) --- a

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

2011-12-10 Thread Carsten Otte
. Signed-off-by: Carsten Otte --- --- 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/pgtable.c

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

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

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

2011-12-10 Thread Carsten Otte
e and then continue to run the virtual cpu. Signed-off-by: Carsten Otte --- --- 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 --- --- arch/s390/kvm/kvm-s390.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a

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 a

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 Sy

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 http://vger.kernel.org/majordomo

[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 => KVM_VM_S390_UCONT

[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 --- --- arch/s390/kvm

[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 --- --- 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 @@ -885,7 +885,7

[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 --- --- arch/s390/include/asm/kvm_host.h |5 +++-- 1 file changed, 3 insertions(+), 2

[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 --- --- arch/s390/kvm/kvm-s390.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a

[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

[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 --- --- arch/s390/kvm/kvm-s390.c | 30 -- 1

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

2011-12-14 Thread Carsten Otte
. Signed-off-by: Carsten Otte --- --- 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/pgtable.c

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

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

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

2011-12-14 Thread Carsten Otte
he 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. Signed-off-by: Carsten Otte --- --- Doc

[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 --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4 insertions

[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 --- Documentation/virtual/kvm/api.txt |7 ++- arch/ia64/kvm/kvm-ia64.c |5 - arch

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

2011-12-14 Thread Carsten Otte
dress space and then continue to run the virtual cpu. Signed-off-by: Carsten Otte --- --- 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-15 Thread Carsten Otte
rface From: Carsten Otte 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 architecture principl

[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 --- Index: linux-2.5

[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 --- 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
dress space and then continue to run the virtual cpu. Signed-off-by: Carsten Otte --- --- 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
he 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. Signed-off-by: Carsten Otte --- --- Doc

[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 --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4 insertions

[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

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

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

  1   2   >