Re: [kvm-devel] [PATCH 13/45] KVM: s390: API documentation

2008-04-17 Thread Carsten Otte
Randy Dunlap wrote: > Please use "CPU" consistently throughout the file (i.e., not "cpu"). Thanks, will fix that with a patch that'll go on top. - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss t

Re: [kvm-devel] [PATCH] Handle vma regions with no backing page (v2)

2008-04-30 Thread Carsten Otte
Avi Kivity wrote: > Hollis/Xiantao/Carsten, can you confirm that this approach works for > you? Carsten, I believe you don't have mmio, but at least this > shouldn't interfere. Should work fine on s390 afaics. - This SF.net

Re: [kvm-devel] s390 kvm_virtio.c build error

2008-05-05 Thread Carsten Otte
[EMAIL PROTECTED] wrote: > I've added Heiko's patch to my patchqueue. But since this is > drivers/s390/kvm this should go in over the kvm.git. See patch below. Acked-by: Carsten Otte <[EMAIL PROTECTED]> -

Re: [kvm-devel] [RFC][PATCH 1/2] KVM: In-kernel PIT model

2008-01-21 Thread Carsten Otte
Jan Kiszka wrote: > The PIT may not be limited to x86 platforms. So I would propose to make > the setup more generic and flexible. And I would move the code out of > arch/x86, just the speaker support should remain there. It should also not be common among all archs. On s390 we have CPU timer, whi

Re: [kvm-devel] [PATCH] kvm memslot read-locking with mmu_lock

2008-01-23 Thread Carsten Otte
Andrea Arcangeli wrote: > On Tue, Jan 22, 2008 at 04:38:49PM +0200, Avi Kivity wrote: >> Andrea Arcangeli wrote: This is arch independent code, I'm surprised mmu_lock is visible here? >>> The mmu_lock is arch independent as far as I can tell. Pretty much >>> like the mm->page_table_l

Re: [kvm-devel] [PATCH 1 of 2] Define and use CONFIG_KVM_HAS_PIO so that we don't need pio_data in kvm_arch_vcpu

2008-01-24 Thread Carsten Otte
Avi Kivity wrote: > Too much Kconfig for this. Since I want to do some Kconfig changes > anyway, I'll do this another way. I think you overlooked something here. Actually this should change too if we don't have pio: -...case KVM_GET_VCPU_MMAP_SIZE: -...-...r = -EINVAL; -...-.

Re: [kvm-devel] swapping with MMU Notifiers V2

2008-01-29 Thread Carsten Otte
Andrea Arcangeli wrote: > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h > index ea4764b..9349160 100644 > --- a/include/linux/kvm_host.h > +++ b/include/linux/kvm_host.h > @@ -15,6 +15,7 @@ > #include > #include > #include > +#include > #include > > #include > @@ -118

Re: [kvm-devel] swapping with MMU Notifiers V2

2008-01-29 Thread Carsten Otte
Andrea Arcangeli wrote: > Didn't realize s390 doesn't need those at all. Do you think > mmu_notifier.h should also go in asm/mmu_notifier? We can always move > them there later after merging with some compat code if needed. No I think mmu_notifier.h is fine in include/linux. I just think kvm shoul

Re: [kvm-devel] swapping with MMU Notifiers V2

2008-01-29 Thread Carsten Otte
Avi Kivity wrote: > Every arch except s390 needs it. An ugly #ifndef > CONFIG_KVM_HARDWARE_TLB_SYNC is preferred to duplicating the code. Yea I guess you've got a point there. The struct should be in struct kvm, but the call to initialize/destroy it should go out to arch_init. -

Re: [kvm-devel] swapping with MMU Notifiers V2

2008-01-29 Thread Carsten Otte
Andrea Arcangeli wrote: > Well I already moved that bit to x86, at least that had a good reason > for being moved there, it's really invisible code to s390. The memslot > are all but invisible to s390 instead, and so the locking rules of the > memslots should be common as long as memslots remains a

Re: [kvm-devel] swapping with MMU Notifiers V2

2008-01-29 Thread Carsten Otte
Avi Kivity wrote: > Every arch except s390 needs it. An ugly #ifndef > CONFIG_KVM_HARDWARE_TLB_SYNC is preferred to duplicating the code. BTW, from reading AMDs spec I don't expect NPT to need this vehicle for swapping either. They can just let core-vm page out guest pages and will receive a pr

Re: [kvm-devel] swapping with MMU Notifiers V2

2008-01-30 Thread Carsten Otte
Joerg Roedel wrote: > Since NPT uses the host page table format it is in theory possible to > add the pagetable to the Linux MM rmap. In this case it would not be > necessary to use MMU notifiers. But I think this would complicate the > NPT support code significantly. I was hoping for a "nearest ne

Re: [kvm-devel] swapping with MMU Notifiers V2

2008-01-30 Thread Carsten Otte
Andrea Arcangeli wrote: > By your conclusion I suppose you thought NPT maps guest physical to > host virtual. If it was the case the cpu would to walk three layer of > pagetables (each layer is an arrow): guest virtual -> guest physical > -> host virtual -> host physical. Instead it's just guest vi

Re: [kvm-devel] swapping with MMU Notifiers V2

2008-01-30 Thread Carsten Otte
Andrea Arcangeli wrote: > Oh I see! So when linux pte is cleared, the NPT equivalent is > implicitly and atomically cleared too. That really requires _identical_ > semantics and formats for both pagetables. Bingo. We have that on s390, and it seems workable on npt too. > That problem is quite easi

Re: [kvm-devel] swapping with MMU Notifiers V2

2008-01-30 Thread Carsten Otte
Avi Kivity wrote: > Carsten Otte wrote: >> We have similar restrictions than you're naming here. Our guest may >> start at a (userspace-) page boundary, and has a fixed 1:1 mapping to >> userspace for a given length. We do that by just having one memory >> sl

Re: [kvm-devel] [PATCH 3 of 3] [POWERPC] Implement an ioctl that creates a vcpu of a particular type

2008-02-05 Thread Carsten Otte
Carsten Otte wrote: > We do. For now, kvm_create_vcpu does create a cpu from a template. > However our hardware control block allows to enable/disable various > features. I would imagine that future userspace may want something > different than the stock default values, and

Re: [kvm-devel] [PATCH 3 of 3] [POWERPC] Implement an ioctl that creates a vcpu of a particular type

2008-02-05 Thread Carsten Otte
Christian Ehrhardt wrote: > This should work for other architectures too. While we need to specify > cpu cores here others might specify something completely different with > the same interface. > So kvm_vcpu_create_type might be misleading while something like > kvm_vcpu_create_info might be mo

[kvm-devel] [RFC/PATCH 01/15] preparation: provide hook to enable pgstes in user pagetable

2008-03-20 Thread Carsten Otte
_PGSTE. This patch has a small common code hit, namely making dup_mm non-static. Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[EMAIL PROTECTED]> --- arch/s390/Kconfig |4 ++ arch/s390/kernel/setup.c |4 ++ arch

[kvm-devel] [RFC/PATCH 02/15] preparation: host memory management changes for s390 kvm

2008-03-20 Thread Carsten Otte
ference bits for s390 in the host mapping. These mapping must be checked before page_test_and_clear_young resets the reference bit. Signed-off-by: Heiko Carstens <[EMAIL PROTECTED]> Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Acked-by: Martin Schwidefsky <[EMAIL PROTECT

[kvm-devel] [RFC/PATCH 00/15] kvm on big iron

2008-03-20 Thread Carsten Otte
This patch series introduces a backend for kvm to run on IBM System z machines that uses the mainframe's sie virtualization capability. This work runs 64bit guests on z800/z890/z900/z990/z9/z10 class machines with a 64bit linux host. Userspace will follow once we're done brushing it over. The patc

[kvm-devel] [RFC/PATCH 05/15] kvm-s390: s390 arch backend for the kvm kernel module

2008-03-20 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> From: Heiko Carstens <[EMAIL PROTECTED]> This patch contains the port of Qumranet's kvm kernel module to IBM zSeries (aka s390x, mainframe) architecture. It uses the mainframe's vi

[kvm-devel] [RFC/PATCH 04/15] preparation: split sysinfo defintions for kvm use

2008-03-20 Thread Carsten Otte
cation, this patch splits the common definitions from sysinfo.c into a separate header file include/asm-s390/sysinfo.h for KVM use. Acked-by: Martin Schwidefsky <[EMAIL PROTECTED]> Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[EMAIL PROTECTE

[kvm-devel] [RFC/PATCH 03/15] preparation: address of the 64bit extint parm in lowcore

2008-03-20 Thread Carsten Otte
igned-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[EMAIL PROTECTED]> --- include/asm-s390/lowcore.h | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) Index: kvm/in

[kvm-devel] [RFC/PATCH 07/15] kvm-s390: interrupt subsystem, cpu timer, waitpsw

2008-03-20 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> This patch contains the s390 interrupt subsystem (similar to in kernel apic) including timer interrupts (similar to in-kernel-pit) and enabled wait (similar to in kernel hlt). In order to achieve that, this patch also introduces intercept handli

[kvm-devel] [RFC/PATCH 09/15] kvm-s390: interprocessor communication via sigp

2008-03-20 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This patch introduces in-kernel handling of _some_ sigp interprocessor signals (similar to ipi). kvm_s390_handle_sigp() decodes the sigp instruction and calls individual handlers depending on t

[kvm-devel] [RFC/PATCH 10/15] kvm-s390: intercepts for diagnose instructions

2008-03-20 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This patch introduces interpretation of some diagnose instruction intercepts. Diagnose is our classic architected way of doing a hypercall. This patch features the following diagnose codes: - vm

[kvm-devel] [RFC/PATCH 11/15] kvm-s390: add kvm to kconfig on s390

2008-03-20 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This patch adds the virtualization submenu and the kvm option to the kernel config. It also defines HAVE_KVM for 64bit kernels. Acked-by: Martin Schwidefsky <[EMAIL PROTECTED]> Signed

[kvm-devel] [RFC/PATCH 12/15] kvm-s390: API documentation

2008-03-20 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> --- Documentation/s3

[kvm-devel] [RFC/PATCH 13/15] kvm-s390: update maintainers

2008-03-20 Thread Carsten Otte
From: Christian Borntraeger <[EMAIL PROTECTED]> This patch adds an entry for kvm on s390 to the MAINTAINERS file :-). We intend to push all patches regarding this via Avi's kvm.git. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte

[kvm-devel] [RFC/PATCH 14/15] guest: detect when running on kvm

2008-03-20 Thread Carsten Otte
From: Christian Borntraeger <[EMAIL PROTECTED]> From: Carsten Otte <[EMAIL PROTECTED]> This patch adds functionality to detect if the kernel runs under the KVM hypervisor. A macro MACHINE_IS_KVM is exported for device drivers. This allows drivers to skip device detection if the syst

[kvm-devel] [RFC/PATCH 15/15] guest: virtio device support, and kvm hypercalls

2008-03-20 Thread Carsten Otte
for the parameters. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Acked-by: Martin Schwidefsky <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[EMAIL PROTECTED]> --- drivers/s390/Makefile |2 drivers/s390/kvm/Makefile |9 + drivers/s

[kvm-devel] [RFC/PATCH 08/15] kvm-s390: intercepts for privileged instructions

2008-03-20 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This patch introduces in-kernel handling of some intercepts for privileged instructions: handle_set_prefix()sets the prefix register of the local cpu handle_store_prefix() stores the co

[kvm-devel] [RFC/PATCH 06/15] kvm-s390: sie intercept handling

2008-03-20 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This path introduces handling of sie intercepts in three flavors: Intercepts are either handled completely in-kernel by kvm_handle_sie_intercept(), or passed to userspace with corresponding da

Re: [kvm-devel] [RFC/PATCH 05/15] KVM_MAX_VCPUS

2008-03-20 Thread Carsten Otte
Hollis Blanchard wrote: > On Thu, 2008-03-20 at 17:24 +0100, Carsten Otte wrote: >> Index: kvm/include/linux/kvm_host.h >> === >> --- kvm.orig/include/linux/kvm_host.h >> +++ kvm/include/linux/kv

Re: [kvm-devel] [RFC/PATCH 14/15] guest: detect when running on kvm

2008-03-20 Thread Carsten Otte
Randy Dunlap wrote: >> Index: kvm/arch/s390/kernel/early.c >> === >> --- kvm.orig/arch/s390/kernel/early.c >> +++ kvm/arch/s390/kernel/early.c >> @@ -143,6 +143,10 @@ static noinline __init void detect_machi >> /* Running on a P/3

Re: [kvm-devel] [RFC/PATCH 01/15] preparation: provide hook to enable pgstes in user pagetable

2008-03-20 Thread Carsten Otte
Dave Hansen wrote: > Well, and more fundamentally: do we really want dup_mm() able to be > called from other code? > > Maybe we need a bit more detailed justification why fork() itself isn't > good enough. It looks to me like they basically need an arch-specific > argument to fork, telling the ne

Re: [kvm-devel] [RFC/PATCH 14/15] guest: detect when running on kvm

2008-03-20 Thread Carsten Otte
Christoph Hellwig wrote: > On Thu, Mar 20, 2008 at 05:25:26PM +0100, Carsten Otte wrote: >> @@ -143,6 +143,10 @@ static noinline __init void detect_machi >> /* Running on a P/390 ? */ >> if (cpuinfo->cpu_id.machine == 0x7490) >> machine_flags

Re: [kvm-devel] [RFC/PATCH 14/15] guest: detect when running on kvm

2008-03-20 Thread Carsten Otte
Christoph Hellwig wrote: > On Thu, Mar 20, 2008 at 09:37:19PM +0100, Carsten Otte wrote: >> Christoph Hellwig wrote: >>> On Thu, Mar 20, 2008 at 05:25:26PM +0100, Carsten Otte wrote: >>>> @@ -143,6 +143,10 @@ static noinline __init void detect_machi >>>>

Re: [kvm-devel] [RFC/PATCH 15/15] guest: virtio device support, and kvm hypercalls

2008-03-21 Thread Carsten Otte
Rusty Russell wrote: >> +static int __init kvm_devices_init(void) >> +{ >> +if (!MACHINE_IS_KVM) >> +return -ENODEV; >> + >> +if (device_register(&kvm_root) != 0) >> +panic("Could not register kvm root"); >> + >> +if (add_shared_memory((max_pfn) << PAGE_SHIFT, PA

Re: [kvm-devel] [RFC/PATCH 14/15] guest: detect when running on kvm

2008-03-21 Thread Carsten Otte
[EMAIL PROTECTED] wrote: > Since when do we have symbolic names for the bits? > It was always on my todo list to do a cleanup and replace the numbers > we use everywhere with names. Especially since we have clashes from time > to time... but that didn't hurt enough yet, obviously. > But now that yo

Re: [kvm-devel] [RFC/PATCH 05/15] KVM_MAX_VCPUS

2008-03-21 Thread Carsten Otte
Avi Kivity wrote: > Carsten Otte wrote: >> Hollis Blanchard wrote: >> >>> On Thu, 2008-03-20 at 17:24 +0100, Carsten Otte wrote: >>> >>>> Index: kvm/include/linux/kvm_host.h >>>> =

Re: [kvm-devel] [RFC/PATCH 06/15] kvm-s390: sie intercept handling

2008-03-21 Thread Carsten Otte
Avi Kivity wrote: > Carsten Otte wrote: >> >> /* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */ >> struct kvm_run { >> @@ -138,6 +139,14 @@ struct kvm_run { >> __u32 is_write; >> __u32 pad; >> } t

Re: [kvm-devel] [RFC/PATCH 12/15] kvm-s390: API documentation

2008-03-21 Thread Carsten Otte
Randy Dunlap wrote: > This means that [no comma] Being a native speaker is cheating ;-). I've integrated your feedback, for the next round of sending out these patches. Thank you :-). - This SF.net email is sponsored by: Mi

Re: [kvm-devel] [RFC/PATCH 00/15] kvm on big iron

2008-03-21 Thread Carsten Otte
Avi Kivity wrote: > Carsten Otte wrote: >> This patch series introduces a backend for kvm to run on IBM System z >> machines that uses the mainframe's sie virtualization capability. This >> work runs 64bit guests on z800/z890/z900/z990/z9/z10 class machines with >&g

Re: [kvm-devel] [RFC/PATCH 14/15] guest: detect when running on kvm

2008-03-21 Thread Carsten Otte
Am Freitag, den 21.03.2008, 15:06 +0100 schrieb Heiko Carstens: > Just introduce something like MACHINE_FLAG_KVM. The rest can be converted > later. Unless you're bored and feel like fiddling around with assembly code :) I've done that patch this morning already, see below. I agree with HCH that we

Re: [kvm-devel] [RFC/PATCH 01/15] preparation: provide hook to enable pgstes in user pagetable

2008-03-21 Thread Carsten Otte
Dave Hansen wrote: > On Thu, 2008-03-20 at 21:35 +0100, Carsten Otte wrote: >> Dave Hansen wrote: >>> Well, and more fundamentally: do we really want dup_mm() able to be >>> called from other code? >>> >>> Maybe we need a bit more detailed justification

Re: [kvm-devel] [RFC/PATCH 15/15] guest: virtio device support, and kvm hypercalls

2008-03-22 Thread Carsten Otte
Rusty Russell wrote: > On Friday 21 March 2008 19:15:47 Christian Borntraeger wrote: >> Am Freitag, 21. März 2008 schrieb Rusty Russell: >>> Hmm, panic on device_register fail, but -ENOMEM on add_shared_memory >>> fail? My theory was that since this is boot time, panic() is the right >>> thing. >>

[kvm-devel] [RFC/PATCH 03/15 v2] preparation: address of the 64bit extint parm in lowcore

2008-03-22 Thread Carsten Otte
igned-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[EMAIL PROTECTED]> --- include/asm-s390/lowcore.h | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) Index: kvm/in

[kvm-devel] [RFC/PATCH 02/15 v2] preparation: host memory management changes for s390 kvm

2008-03-22 Thread Carsten Otte
ference bits for s390 in the host mapping. These mapping must be checked before page_test_and_clear_young resets the reference bit. Signed-off-by: Heiko Carstens <[EMAIL PROTECTED]> Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Acked-by: Martin Schwidefsky <[EMAIL PROTECT

[kvm-devel] [RFC/PATCH 04/15 v2] preparation: split sysinfo defintions for kvm use

2008-03-22 Thread Carsten Otte
cation, this patch splits the common definitions from sysinfo.c into a separate header file include/asm-s390/sysinfo.h for KVM use. Acked-by: Martin Schwidefsky <[EMAIL PROTECTED]> Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[EMAIL PROTECTE

[kvm-devel] [RFC/PATCH 01/15 v2] preparation: provide hook to enable pgstes in user pagetable

2008-03-22 Thread Carsten Otte
EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[EMAIL PROTECTED]> --- arch/s390/Kconfig |4 +++ arch/s390/kernel/setup.c |4 +++ arch/s390/mm/pgtable.c | 53 ++--- include/asm-s390/mmu.h |1 incl

[kvm-devel] [RFC/PATCH 07/15 v2] kvm-s390: interrupt subsystem, cpu timer, waitpsw

2008-03-22 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> This patch contains the s390 interrupt subsystem (similar to in kernel apic) including timer interrupts (similar to in-kernel-pit) and enabled wait (similar to in kernel hlt). In order to achieve that, this patch also introduces intercept handli

[kvm-devel] [RFC/PATCH 06/15 v2] kvm-s390: sie intercept handling

2008-03-22 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This path introduces handling of sie intercepts in three flavors: Intercepts are either handled completely in-kernel by kvm_handle_sie_intercept(), or passed to userspace with corresponding da

[kvm-devel] [RFC/PATCH 08/15 v2] kvm-s390: intercepts for privileged instructions

2008-03-22 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This patch introduces in-kernel handling of some intercepts for privileged instructions: handle_set_prefix()sets the prefix register of the local cpu handle_store_prefix() stores the co

[kvm-devel] [RFC/PATCH 09/15 v2] kvm-s390: interprocessor communication via sigp

2008-03-22 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This patch introduces in-kernel handling of _some_ sigp interprocessor signals (similar to ipi). kvm_s390_handle_sigp() decodes the sigp instruction and calls individual handlers depending on t

[kvm-devel] [RFC/PATCH 05/15 v2] kvm-s390: s390 arch backend for the kvm kernel module

2008-03-22 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> From: Heiko Carstens <[EMAIL PROTECTED]> This patch contains the port of Qumranet's kvm kernel module to IBM zSeries (aka s390x, mainframe) architecture. It uses the mainframe's vi

[kvm-devel] [RFC/PATCH 10/15 v2] kvm-s390: intercepts for diagnose instructions

2008-03-22 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This patch introduces interpretation of some diagnose instruction intercepts. Diagnose is our classic architected way of doing a hypercall. This patch features the following diagnose codes: - vm

[kvm-devel] [RFC/PATCH 13/15 v2] kvm-s390: update maintainers

2008-03-22 Thread Carsten Otte
From: Christian Borntraeger <[EMAIL PROTECTED]> This patch adds an entry for kvm on s390 to the MAINTAINERS file :-). We intend to push all patches regarding this via Avi's kvm.git. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte

[kvm-devel] [RFC/PATCH 12/15 v2] kvm-s390: API documentation

2008-03-22 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> --- Documentation/s3

[kvm-devel] [RFC/PATCH 11/15 v2] kvm-s390: add kvm to kconfig on s390

2008-03-22 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This patch adds the virtualization submenu and the kvm option to the kernel config. It also defines HAVE_KVM for 64bit kernels. Acked-by: Martin Schwidefsky <[EMAIL PROTECTED]> Signed

[kvm-devel] [RFC/PATCH 14/15 v2] guest: detect when running on kvm

2008-03-22 Thread Carsten Otte
From: Christian Borntraeger <[EMAIL PROTECTED]> From: Carsten Otte <[EMAIL PROTECTED]> This patch adds functionality to detect if the kernel runs under the KVM hypervisor. A macro MACHINE_IS_KVM is exported for device drivers. This allows drivers to skip device detection if the syst

[kvm-devel] [RFC/PATCH 15/15 v2] guest: virtio device support, and kvm hypercalls

2008-03-22 Thread Carsten Otte
for the parameters. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Acked-by: Martin Schwidefsky <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[EMAIL PROTECTED]> --- drivers/s390/Makefile |2 drivers/s390/kvm/Makefile |9 + drivers/s

[kvm-devel] [RFC/PATCH 00/15 v2] kvm on big iron

2008-03-22 Thread Carsten Otte
This patch series introduces a backend for kvm to run on IBM System z machines (aka s390x) that uses the mainframe's sie virtualization capability. Many thanks for the review feedback we have received so far, I do greatly appreciate it! The first submission didn't draw much attention of elder vm m

Re: [kvm-devel] [RFC/PATCH 01/15] preparation: provide hook to enable pgstes in user pagetable

2008-03-24 Thread Carsten Otte
Avi Kivity wrote: > Well, dup_mm() can't work (and now that I think about it, for more > reasons -- what if the process has threads?). We lock out multithreaded users already, -EINVAL. - This SF.net email is sponsored by: Mi

Re: [kvm-devel] [RFC/PATCH 01/15] preparation: provide hook to enable pgstes in user pagetable

2008-03-25 Thread Carsten Otte
Am Freitag, den 21.03.2008, 11:29 -0700 schrieb Dave Hansen: > What you've done with dup_mm() is probably the brute-force way that I > would have done it had I just been trying to make a proof of concept or > something. I'm worried that there are a bunch of corner cases that > haven't been conside

[kvm-devel] [RFC/PATCH 01/15 v3] preparation: provide hook to enable pgstes in user pagetable

2008-03-25 Thread Carsten Otte
From: Martin Schwidefsky <[EMAIL PROTECTED]> From: Carsten Otte <[EMAIL PROTECTED]> The SIE instruction on s390 uses the 2nd half of the page table page to virtualize the storage keys of a guest. This patch offers the s390_enable_sie function, which reorganizes the page tables

[kvm-devel] [RFC/PATCH 00/15 v3] kvm on big iron

2008-03-25 Thread Carsten Otte
Many thanks for the review feedback we have received so far, and many thanks to Andrew for reviewing our common code memory management changes. I do greatly appreciate that :-). All important parts have been reviewed, all review feedback has been integrated in the code. Therefore we would like to

[kvm-devel] [RFC/PATCH 02/15 v3] preparation: host memory management changes for s390 kvm

2008-03-25 Thread Carsten Otte
ference bits for s390 in the host mapping. These mapping must be checked before page_test_and_clear_young resets the reference bit. Signed-off-by: Heiko Carstens <[EMAIL PROTECTED]> Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Acked-by: Martin Schwidefsky <[EMAIL PROTECT

[kvm-devel] [RFC/PATCH 03/15 v3] preparation: address of the 64bit extint parm in lowcore

2008-03-25 Thread Carsten Otte
igned-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[EMAIL PROTECTED]> --- include/asm-s390/lowcore.h | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) Index: kvm/in

[kvm-devel] [RFC/PATCH 04/15 v3] preparation: split sysinfo defintions for kvm use

2008-03-25 Thread Carsten Otte
cation, this patch splits the common definitions from sysinfo.c into a separate header file include/asm-s390/sysinfo.h for KVM use. Acked-by: Martin Schwidefsky <[EMAIL PROTECTED]> Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[EMAIL PROTECTE

[kvm-devel] [RFC/PATCH 05/15 v3] kvm-s390: s390 arch backend for the kvm kernel module

2008-03-25 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> From: Heiko Carstens <[EMAIL PROTECTED]> This patch contains the port of Qumranet's kvm kernel module to IBM zSeries (aka s390x, mainframe) architecture. It uses the mainframe's vi

[kvm-devel] [RFC/PATCH 07/15 v3] kvm-s390: interrupt subsystem, cpu timer, waitpsw

2008-03-25 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> This patch contains the s390 interrupt subsystem (similar to in kernel apic) including timer interrupts (similar to in-kernel-pit) and enabled wait (similar to in kernel hlt). In order to achieve that, this patch also introduces intercept handli

[kvm-devel] [RFC/PATCH 08/15 v3] kvm-s390: intercepts for privileged instructions

2008-03-25 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This patch introduces in-kernel handling of some intercepts for privileged instructions: handle_set_prefix()sets the prefix register of the local cpu handle_store_prefix() stores the co

[kvm-devel] [RFC/PATCH 12/15 v3] kvm-s390: API documentation

2008-03-25 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> --- Documentation/s3

[kvm-devel] [RFC/PATCH 09/15 v3] kvm-s390: interprocessor communication via sigp

2008-03-25 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This patch introduces in-kernel handling of _some_ sigp interprocessor signals (similar to ipi). kvm_s390_handle_sigp() decodes the sigp instruction and calls individual handlers depending on t

[kvm-devel] [RFC/PATCH 06/15 v3] kvm-s390: sie intercept handling

2008-03-25 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This path introduces handling of sie intercepts in three flavors: Intercepts are either handled completely in-kernel by kvm_handle_sie_intercept(), or passed to userspace with corresponding da

[kvm-devel] [RFC/PATCH 10/15 v3] kvm-s390: intercepts for diagnose instructions

2008-03-25 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This patch introduces interpretation of some diagnose instruction intercepts. Diagnose is our classic architected way of doing a hypercall. This patch features the following diagnose codes: - vm

[kvm-devel] [RFC/PATCH 11/15 v3] kvm-s390: add kvm to kconfig on s390

2008-03-25 Thread Carsten Otte
From: Carsten Otte <[EMAIL PROTECTED]> From: Christian Borntraeger <[EMAIL PROTECTED]> This patch adds the virtualization submenu and the kvm option to the kernel config. It also defines HAVE_KVM for 64bit kernels. Acked-by: Martin Schwidefsky <[EMAIL PROTECTED]> Signed

[kvm-devel] [RFC/PATCH 15/15 v3] guest: virtio device support, and kvm hypercalls

2008-03-25 Thread Carsten Otte
for the parameters. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Acked-by: Martin Schwidefsky <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[EMAIL PROTECTED]> --- drivers/s390/Makefile |2 drivers/s390/kvm/Makefile |9 + drivers/s

[kvm-devel] [RFC/PATCH 14/15 v3] guest: detect when running on kvm

2008-03-25 Thread Carsten Otte
From: Christian Borntraeger <[EMAIL PROTECTED]> From: Carsten Otte <[EMAIL PROTECTED]> This patch adds functionality to detect if the kernel runs under the KVM hypervisor. A macro MACHINE_IS_KVM is exported for device drivers. This allows drivers to skip device detection if the syst

[kvm-devel] [RFC/PATCH 13/15 v3] kvm-s390: update maintainers

2008-03-25 Thread Carsten Otte
From: Christian Borntraeger <[EMAIL PROTECTED]> This patch adds an entry for kvm on s390 to the MAINTAINERS file :-). We intend to push all patches regarding this via Avi's kvm.git. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte

Re: [kvm-devel] [01/17]PATCH Add API for allocating dynamic TR resouce. V8

2008-03-31 Thread Carsten Otte
Zhang, Xiantao wrote: > +/* mca_insert_tr > + * > + * Switch rid when TR reload and needed! > + * iord: 1: itr, 2: itr; > + * > +*/ > +static void mca_insert_tr(u64 iord) > +{ > + > + int i; > + u64 old_rr; > + struct ia64_tr_entry *p; > + unsigned long psr; > + int cpu = smp

Re: [kvm-devel] [03/15][PATCH] kvm/ia64: Add header files for kvm/ia64. V8

2008-03-31 Thread Carsten Otte
Zhang, Xiantao wrote: > +typedef union context { > + /* 8K size */ > + chardummy[KVM_CONTEXT_SIZE]; > + struct { > + unsigned long psr; > + unsigned long pr; > + unsigned long caller_unat; > + unsigned long pad;

Re: [kvm-devel] [04/17] [PATCH] Add kvm arch-specific core code for kvm/ia64.-V8

2008-03-31 Thread Carsten Otte
Zhang, Xiantao wrote: > +static struct kvm_vcpu *lid_to_vcpu(struct kvm *kvm, unsigned long id, > + unsigned long eid) > +{ > + ia64_lid_t lid; > + int i; > + > + for (i = 0; i < KVM_MAX_VCPUS; i++) { > + if (kvm->vcpus[i]) { > + lid.v

Re: [kvm-devel] [05/17][PATCH] kvm/ia64 : Add head files for kvm/ia64

2008-03-31 Thread Carsten Otte
> +/** > > + VCPU control register access routines > + > > **/ > +static inline u64 vcpu_get_itir(VCPU *vcpu) > +{ > + return ((u64)VCPU(vcpu, itir

Re: [kvm-devel] [01/17]PATCH Add API for allocating dynamic TR resouce. V8

2008-04-01 Thread Carsten Otte
Zhang, Xiantao wrote: > Carsten Otte wrote: >> Zhang, Xiantao wrote: >>> +/* mca_insert_tr >>> + * >>> + * Switch rid when TR reload and needed! >>> + * iord: 1: itr, 2: itr; >>> + * >>> +*/ >>> +static void mca_insert_tr(

Re: [kvm-devel] [04/17] [PATCH] Add kvm arch-specific core code for kvm/ia64.-V8

2008-04-01 Thread Carsten Otte
Zhang, Xiantao wrote: > Hi, Carsten > Why do you think it is racy? In this function, > target_vcpu->arch.launched should be set to 1 for the first run, and > keep its value all the time. Except the first IPI to wake up the vcpu, > all IPIs received by target vcpu should go into "else" condi

Re: [kvm-devel] [04/17] [PATCH] Add kvm arch-specific core code for kvm/ia64.-V8

2008-04-01 Thread Carsten Otte
Zhang, Xiantao wrote: > Carsten Otte wrote: >> Zhang, Xiantao wrote: >>> Hi, Carsten >>> Why do you think it is racy? In this function, >>> target_vcpu->arch.launched should be set to 1 for the first run, and >>> keep its value all the time. E

Re: [kvm-devel] [04/17] [PATCH] Add kvm arch-specific core code for kvm/ia64.-V8

2008-04-01 Thread Carsten Otte
Zhang, Xiantao wrote: > Carsten Otte wrote: >> Zhang, Xiantao wrote: >>> Carsten Otte wrote: >>>> Zhang, Xiantao wrote: >>>>> Hi, Carsten >>>>> Why do you think it is racy? In this function, >>>>> target_vcpu->ar

[kvm-devel] [PATCH 01/04] kvm-s390: Some codingstyle issues.

2008-04-04 Thread Carsten Otte
From: Heiko Carstens <[EMAIL PROTECTED]> Just a few codingstyle issues that have already been commented on but that somehow got forgotten. Signed-off-by: Heiko Carstens <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[EMAIL PROTECTED]> --- arch/s390/kvm/

[kvm-devel] [PATCH 04/04] kvm-s390: rename stfl to kvm_stfl

2008-04-04 Thread Carsten Otte
From: Heiko Carstens <[EMAIL PROTECTED]> Temporarily rename this function to avoid merge conflicts and/or dependencies. This function will be removed as soon as git-s390 and kvm.git are finally upstream. Signed-off-by: Heiko Carstens <[EMAIL PROTECTED]> Signed-off-by: Carsten

[kvm-devel] [PATCH 02/04] kvm-s390: Fix incorrect return value

2008-04-04 Thread Carsten Otte
From: Heiko Carstens <[EMAIL PROTECTED]> kvm_arch_vcpu_ioctl_run currently incorrectly always returns 0. Signed-off-by: Heiko Carstens <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[EMAIL PROTECTED]> --- arch/s390/kvm/kvm-s390.c |2 +- 1 files changed, 1 insert

[kvm-devel] [PATCH 03/04] kvm-s390: Improve pgste accesses

2008-04-04 Thread Carsten Otte
From: Heiko Carstens <[EMAIL PROTECTED]> There is no need to use interlocked updates when the rcp lock is held. Therefore the simple bitops variants can be used. This should improve performance. Signed-off-by: Heiko Carstens <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[

[kvm-devel] [PATCH 00/04] kvm-s390 updates

2008-04-04 Thread Carsten Otte
Hi Avi, looks like Heiko played around with kvm a bit :-): 01/04: cosmetics, including part of Arnd's review feedback 02/04: bugfix, if KVM_VCPU_IOCTL_RUN got interrupted by signal 03/04: performance improvement with our pgste memory handling 04/04: resolve merge conflict in linux-next kvm.git ver

[kvm-devel] [PATCH 03/04 v2] kvm-s390: Improve pgste accesses

2008-04-04 Thread Carsten Otte
From: Heiko Carstens <[EMAIL PROTECTED]> There is no need to use interlocked updates when the rcp lock is held. Therefore the simple bitops variants can be used. This should improve performance. Signed-off-by: Heiko Carstens <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[

Re: [kvm-devel] [PATCH 03/04] kvm-s390: Improve pgste accesses

2008-04-04 Thread Carsten Otte
[EMAIL PROTECTED] wrote: > Major formatting accident ? Ops! How did that happen? Thanks, will resend that patch. - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just abo

Re: [kvm-devel] [patch 1/2] KVM: hlt emulation should take in-kernel APIC/PIT timers into account

2008-04-11 Thread Carsten Otte
Avi Kivity wrote: >> @@ -765,6 +766,7 @@ void kvm_vcpu_block(struct kvm_vcpu *vcp >> > > > This breaks ia64 (and shouldn't s390 use this too?) >> * We will block until either an interrupt or a signal wakes us up >> */ >> while (!kvm_cpu_has_interrupt(vcpu) >> + && !k

Re: [kvm-devel] [patch 1/2] KVM: hlt emulation should take in-kernel APIC/PIT timers into account

2008-04-14 Thread Carsten Otte
Avi Kivity wrote: > Why? This one does'nt work for us. Our arch defines various reasons why we would not fall asleep but do something else, and we need to check them while in atomic of a lock that other archs don't have before sleeping. See kvm_s390_handle_wait in arch/s390/kvm/interrupt.c.

Re: [kvm-devel] [patch 2/2] QEMU: decrease console "refresh rate" with -nographic

2008-04-14 Thread Carsten Otte
Avi Kivity wrote: > Anthony Liguori wrote: >> BTW, when we set O_ASYNC on the tap fd, we're eliminating O_NONBLOCK. >> This means that we have to poll loop select() when readv()'ing packets >> instead of just reading until hitting AGAIN. This means at least an >> extra syscall per packet. > >

[kvm-devel] [PATCH 2/2] virtio-s390: Change virtio interrupt definitions to follow architecture

2008-04-16 Thread Carsten Otte
pfault. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Signed-off-by: Carsten Otte <[EMAIL PROTECTED]> --- arch/s390/kvm/interrupt.c |6 +- drivers/s390/kvm/kvm_virtio.c |8 +++- 2 files changed, 12 insertions(+), 2 deletions(-) Index: kvm/arch/s3

  1   2   3   4   >