Re: [kvm-devel] [PATCH RFC 3/3] virtio infrastructure: example block driver

2007-05-31 Thread Carsten Otte
Rusty Russell wrote: Example block driver using virtio. The block driver uses outbufs with sg[0] being the request information (struct virtio_blk_outhdr) with the type, sector and inbuf id. For a write, the rest of the sg will contain the data to be written. The first segment of the inbuf is a

Re: [kvm-devel] [PATCH RFC 1/3] virtio infrastructure

2007-05-31 Thread Carsten Otte
Rusty Russell wrote: This attempts to implement a "virtual I/O" layer which should allow common drivers to be efficiently used across most virtual I/O mechanisms. It will no-doubt need further enhancement. The details of probing the device are left to hypervisor-specific code: it simple constru

Re: [kvm-devel] [PATCH RFC 3/3] virtio infrastructure: example block driver

2007-05-31 Thread Carsten Otte
Troy Benjegerdes wrote: This kind of a claim needs some benchmark data to document it. We've implemented both for our vdisk driver on 390. At least on our platform, merging in the host is preferable because vmenter/vmexit is very fast and we would merge twice because we submit the result via i

Re: [kvm-devel] [PATCH RFC 3/3] virtio infrastructure: example block driver

2007-06-01 Thread Carsten Otte
Rusty Russell wrote: Now my lack of block-layer knowledge is showing. I would have thought that if we want to do things like ionice(1) to work, we have to do some guest scheduling or pass that information down to the host. Yea that would only work on the host: one can use ionice to set the io n

Re: [kvm-devel] [PATCH RFC 3/3] virtio infrastructure: example block driver

2007-06-04 Thread Carsten Otte
Rusty Russell wrote: Is the noop scheduler significantly worse than hooking directly into q->make_request_fn? The noop scheduler does do request merging, and has the same device plug latency as other schedulers. so long, Carsten ___ Virtualization ma

Re: [kvm-devel] [PATCH RFC 3/3] virtio infrastructure: example block driver

2007-06-04 Thread Carsten Otte
Jens Axboe wrote: On Fri, Jun 01 2007, Carsten Otte wrote: With regard to compute power needed, almost none. The penalty is latency, not overhead: A small request may sit on the request queue to wait for other work to arrive until the queue gets unplugged. This penality is compensated by the

Re: [kvm-devel] [PATCH RFC 3/3] virtio infrastructure: example block driver

2007-06-04 Thread Carsten Otte
Jens Axboe wrote: Most people should not fiddle with it, the defaults are there for good reason. I can provide a blk_queue_unplug_thresholds(q, depth, delay) helper that you could use for the virtualized drivers, perhaps that would be better for that use? Yea, we should'nt change the defaults wit

Re: RFC: multiple address spaces for one process

2007-06-29 Thread Carsten Otte
Jeremy Fitzhardinge wrote: It might be interesting if the two cases could be unified in some way, so that the VMMs could use a common usermode mechanism to achieve the same end, which is what Carsten was proposing. But its not obvious to me how much common mechanism can be pulled out, since it

Re: [kvm-devel] [RFC] KVM Source layout Proposal to accommodate new CPU architecture

2007-09-28 Thread Carsten Otte
Zhang, Xiantao wrote: We are working on enabling KVM support on IA64 platform, and now Linux, Windows guests get stable run and achieve reasonable performance on KVM with Open GFW. But you know, the current KVM only considers x86 platform, and is short of cross-architecture framework. Curr

Re: [kvm-devel] [PATCH 3/3] virtio PCI device

2007-11-27 Thread Carsten Otte
Avi Kivity wrote: No, definitely not define a hypercall ABI. The feature bit should say "this device understands a hypervisor-specific way of kicking. consult your hypervisor manual and cpuid bits for further details. should you not be satisfied with this method, port io is still available".

Re: [kvm-devel] [PATCH 3/3] virtio PCI device

2007-11-27 Thread Carsten Otte
Avi Kivity wrote: Unfortunately, we have to care for platform differences, subarch differences (vmx/svm), hypervisor differences (with virtio), and guest differences (Linux/Windows/pvLinux, 32/64). Much care is needed when designing the ABI here. Yea, I agree. [actually thinking a bit, this

Re: [kvm-devel] [PATCH 3/3] virtio PCI device

2007-11-27 Thread Carsten Otte
Avi Kivity wrote: We intend to bind our virtio devices to PCI too, so that they look the same in Linux userland across architectures. Ouch. That was my initial opinion too, but HPA has come up with a lean and clean PCI binding for lguest. I think we should seriously consider using that over t

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

Re: [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: [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 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 :-). ___ Virtualization mailing list Virtualization@lists.linux-foundatio

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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

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. ___ Virtualization mailing list Virtualization@lists.linux-foundatio

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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

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