[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 co...@de.ibm.com --- --- arch/s390/include/asm/kvm_host.h |2 ++ virt/kvm/kvm_main.c |5 + 2 files changed, 7 insertions(+) --- a/arch

[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 co...@de.ibm.com --- 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 co...@de.ibm.com

[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 co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

[patch 12/12] From: Carsten Otte co...@de.ibm.com

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 co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c === --- linux-2.5-cecsim.orig/arch/s390/kvm

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(vcpu

[patch 2/4] [PATCH] kvm-s390: handle SIGP sense running intercepts.

2011-11-17 Thread Carsten Otte
From: Cornelia Huck cornelia.h...@de.ibm.com SIGP sense running may cause an intercept on higher level virtualization, so handle it by checking the CPUSTAT_RUNNING flag. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Carsten Otte co...@de.ibm.com --- arch/s390/include/asm

[patch 4/4] [PATCH] kvm: announce SYNC_MMU

2011-11-17 Thread Carsten Otte
-off-by: Christian Borntraeger borntrae...@de.ibm.com Signed-off-by: Carsten Otte co...@de.ibm.com --- arch/s390/kvm/kvm-s390.c |1 + 1 file changed, 1 insertion(+) --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -127,6 +127,7 @@ int kvm_dev_ioctl_check_extension(long e

[patch 0/4] kvm-s390 patches

2011-11-17 Thread Carsten Otte
Hi Avi, these patches are bugfixes for kvm on s390. Could you please apply them? thanks, 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 1/4] [PATCH] kvm-s390: Fix RUNNING flag misinterpretation.

2011-11-17 Thread Carsten Otte
...@kernel.org Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Carsten Otte co...@de.ibm.com --- arch/s390/include/asm/kvm_host.h |2 +- arch/s390/kvm/diag.c |2 +- arch/s390/kvm/intercept.c|3 ++- arch/s390/kvm/interrupt.c|1 + arch

[patch 3/4] [PATCH] kvm: Fix tprot locking

2011-11-17 Thread Carsten Otte
separate the address translation from walking the vmas. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Signed-off-by: Carsten Otte co...@de.ibm.com --- arch/s390/kvm/priv.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff -urpN linux-2.6/arch/s390/kvm/priv.c linux

[patch 1/2] [PATCH] kvm: nowait retry for asynchronous page faults

2011-11-17 Thread Carsten Otte
From: Martin Schwidefsky schwidef...@de.ibm.com Add FAULT_FLAG_RETRY_NOWAIT to the fault flags if the host is processing a guest fault. In case of a fault retry exit sie64a() with the gmap_fault indication set. This makes it possible to handle asynchronous page faults without the need for mm

[patch 0/2] kvm-s390: asnychronous page faults

2011-11-17 Thread Carsten Otte
Hi Avi, these patches implement asynchronous page faults for kvm on s390. Sorry for being slower on sending patches than you're reviewing, I guess these will answer your question on __gmap_fault ;-). I think we should push both of these via Martin, his patch alone would break kvm on s390, mine

[patch 2/2] [PATCH] kvm-s390: pseudo page fault support

2011-11-17 Thread Carsten Otte
From: Carsten Otte co...@de.ibm.com This patch adds support for pseudo page faults. The corresponding interface is implemented according to the documentation in CP programming services. Diagnose 258 allows to register compare and check masks for pseudo page faults, and the guest can cancel

Re: [patch 2/2] [PATCH] kvm-s390: pseudo page fault support

2011-11-17 Thread Carsten Otte
On 17.11.2011 14:18, Avi Kivity wrote: + copy_from_guest(vcpu,pfault_token, vcpu-arch.pfault_token, + 8); Missing error check? Good catch, will fix. + init = kzalloc(sizeof(*init), GFP_ATOMIC); + if (!init) + return; + + done =

Re: [patch 2/2] [PATCH] kvm-s390: pseudo page fault support

2011-11-17 Thread Carsten Otte
On 17.11.2011 15:18, Avi Kivity wrote: Backports to distros, even if you happened to name my favourite, do not override upstream considerations. as soon as we find time doesn't inspire confidence either. If async_pf.c is better, let's do that (btw async_pf.c did not find itself in generic code

Re: RFC: s390: extension capability for new address space layout

2011-09-20 Thread Carsten Otte
On 20.09.2011 14:11, Avi Kivity wrote: ACK, with Alex's changes. Why are kvm changes not going in through the kvm tree? Or at least kvm@ review? It slipped through as I've put it into our CVS to test against Martin's changes. Sorry about that, we'll make sure it won't happen again. so long,

[PATCH] kvm-s390: userspace access to guest storage keys

2011-05-06 Thread Carsten Otte
From: Carsten Otte co...@de.ibm.com This patch gives userspace access to the guest visible storage keys. Three operations are supported: KVM_S390_KEYOP_SSKE for setting storage keys, similar to the set storage key extended (SSKE) instruction. KVM_S390_KEYOP_ISKE for reading storage key content

Re: [ANNOUNCE] Native Linux KVM tool

2011-04-01 Thread Carsten Otte
On 31.03.2011 23:47, Alexander Graf wrote: Did you take a look at kuli? Right. If you want to take kuli as a start, and GPL is acceptable for you ;-). If kuli seems right, I suggest to go ahead and make an upstream git repository for it. I'd be happy to keep contributing the s390 parts to

Re: [PATCH 0/7] Consolidate vcpu ioctl locking

2010-05-21 Thread Carsten Otte
On 15.05.2010 10:26, Alexander Graf wrote: On S390, I'm also still sceptical if the implementation we have really works. A device injects an S390_INTERRUPT with its address and on the next vcpu_run, an according interrupt is issued. But what happens if two devices trigger an S390_INTERRUPT

Re: [PATCH 0/7] Consolidate vcpu ioctl locking

2010-05-21 Thread Carsten Otte
On 15.05.2010 10:26, Alexander Graf wrote: On S390, I'm also still sceptical if the implementation we have really works. A device injects an S390_INTERRUPT with its address and on the next vcpu_run, an according interrupt is issued. But what happens if two devices trigger an S390_INTERRUPT

Re: [PATCH] KVM: s390: Fix possible memory leak of in kvm_arch_vcpu_create()

2010-03-09 Thread Carsten Otte
Wei Yongjun wrote: This patch fixed possible memory leak in kvm_arch_vcpu_create() under s390, which would happen when kvm_arch_vcpu_create() fails. Good catch, thanks! Acked-by: Carsten Otte co...@de.ibm.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body

Fix prefix register checking in arch/s390/kvm/sigp.c

2009-11-30 Thread Carsten Otte
very low into user address space. This patch should go into 2.6.32, it prevents running smp guests with qemu. Signed-off-by: Carsten Otte co...@de.ibm.com Reported-by: Alexander Graf ag...@suse.de --- sigp.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: kvm/arch/s390/kvm

Re: [PATCH 0/9] S390x KVM support

2009-10-22 Thread Carsten Otte
Avi Kivity wrote: @@ -116,6 +117,11 @@ __u64 cr8; __u64 apic_base; +#ifdef CONFIG_S390 +/* the processor status word for s390 */ +__u64 psw_mask; /* psw upper half */ +__u64 psw_addr; /* psw lower half */ +#endif Doesn't this break backward compatibility by changing the

Re: [PATCH 0/9] S390x KVM support

2009-10-22 Thread Carsten Otte
Avi Kivity wrote: gdb is hardly performance critical. Is that the only reason for the change? Right, gdb is not performance critical. gdb is the reason for moving it out of the union, performance is the reason for having it in kvm_run at all. There's only more reason to it: with a little

Re: [PATCH 0/9] S390x KVM support

2009-10-22 Thread Carsten Otte
Avi Kivity wrote: Right, but why? x86 qemu doesn't care about either pc or eflags (with in-kernel irqchip, which s390 essentially is). For different reasons. Most prominent for setting the condition code, which is a sideband result of most instructions that indicates whether or not the

Re: [PATCH 0/9] S390x KVM support

2009-10-22 Thread Carsten Otte
Avi Kivity wrote: On x86 we avoid emulating instructions in userspace. Instead the kernel requests userspace to do something (triggered by the instruction), and the kernel does anything which might be implied by the instruction (like copying the result into a register, or updating pc). An

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_int.list)

Re: [PATCH 3/3] kvm common: verify that cpu slot is available when creating new vcpu

2009-02-09 Thread Carsten Otte
Am Sun, 8 Feb 2009 04:26:16 -0200 schrieb Marcelo Tosatti mtosa...@redhat.com: Its confusing that there is the exact same check below, with kvm-lock held, and that both are needed since assignment happens under the lock. Can you also make it straightforward while fixing the bug please.

[PATCH 1/3] kvm-s390: fix registering memory regions while vcpus do exist

2009-02-05 Thread Carsten Otte
. This way we can ensure a consistent update of the memory for the entire smp configuration. Signed-off-by: Carsten Otte co...@de.ibm.com --- arch/s390/kvm/kvm-s390.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) Index: kvm/arch/s390/kvm/kvm-s390.c

[PATCH 2/3] kvm-s390: verify that memory slot is present for vm in kvm_run

2009-02-05 Thread Carsten Otte
This check verifies that the guest we're trying to run in KVM_RUN has some memory assigned to it. It enters an endless exception loop if this is not the case. Reported-by: Mijo Safradin m...@linux.vnet.ibm.com Signed-off-by: Carsten Otte co...@de.ibm.com --- arch/s390/kvm/kvm-s390.c |6

[PATCH 3/3] kvm common: verify that cpu slot is available when creating new vcpu

2009-02-05 Thread Carsten Otte
KVM common code should'nt try to create the same virtual cpu twice. In case of s390, it crashes badly in kvm_arch_vcpu_create. Reported-by: Mijo Safradin m...@linux.vnet.ibm.com Signed-off-by: Carsten Otte co...@de.ibm.com --- virt/kvm/kvm_main.c |3 +++ 1 file changed, 3 insertions

Re: [PATCH 3/3] kvm common: verify that cpu slot is available when creating new vcpu

2009-02-05 Thread Carsten Otte
Am Thu, 5 Feb 2009 17:05:01 +0100 schrieb Carsten Otte co...@de.ibm.com: KVM common code should'nt try to create the same virtual cpu twice. In case of s390, it crashes badly in kvm_arch_vcpu_create. This patch is broken, will refresh it. Please do _NOT_ apply (!) -- To unsubscribe from

Re: [PATCH 3/3 v2] kvm common: verify that cpu slot is available when creating new vcpu

2009-02-05 Thread Carsten Otte
KVM common code should'nt try to create the same virtual cpu twice. In case of s390, it crashes badly in kvm_arch_vcpu_create. Reported-by: Mijo Safradin m...@linux.vnet.ibm.com Signed-off-by: Carsten Otte co...@de.ibm.com --- virt/kvm/kvm_main.c |3 +++ 1 file changed, 3 insertions

Re: [PATCH 1/3] kvm-s390: Fix printk on SIGP set arch

2009-01-22 Thread Carsten Otte
Am Thu, 22 Jan 2009 12:17:07 +0100 schrieb heica...@linux.vnet.ibm.com: Why don't you just remove the printk? IMHO it's rather pointless. It is'nt: It infoms the user why his guest is going to crash even though it has performed an operation that is perfectly legal according to the spec. -- To

Re: [PATCH 1/3] kvm-s390: Fix printk on SIGP set arch

2009-01-22 Thread Carsten Otte
Am Thu, 22 Jan 2009 13:58:57 +0200 schrieb Avi Kivity a...@redhat.com: Right, either inject an exception to the guest (if appropriate for the arch), or return -ESOMETHING from ioctl(KVM_RUN). Yea that's what we do. We let userland handle the intercept, and there we let the guest die gracefully

[PATCH 0/4] kvm-s390 patches for 2.6.27

2008-06-27 Thread Carsten Otte
Hi Avi, now that we're moving closer to the merge window, please look at the following patches. I'd love to see them in 2.6.27. There is no need to hurry any of these into 2.6.26 because our console patches are waiting for the merge window in Rustys queue too, which makes .26 unusable with kuli.

[PATCH 3/4] kvm-s390: Set guest storage limit and offset to sane values

2008-06-27 Thread Carsten Otte
-off-by: Christian Borntraeger [EMAIL PROTECTED] Signed-off-by: Carsten Otte [EMAIL PROTECTED] --- arch/s390/kvm/kvm-s390.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) Index: kvm/arch/s390/kvm/kvm-s390.c

<    1   2