Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Anthony Liguori
Gregory Haskins wrote: >> While KVM will inevitably start requiring newer kernel versions, do we >> really need to do it right now? Perhaps we could add dummy eventfd_* >> functions to the module compat header? Then at least older kernels will >> continue to work with in- kernel APIC disabled.

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Davide Libenzi
On Tue, 15 May 2007, Christoph Hellwig wrote: > On Tue, May 15, 2007 at 12:18:17PM -0400, Gregory Haskins wrote: > > >>> On Tue, May 15, 2007 at 11:40 AM, in message > > <[EMAIL PROTECTED]>, Davide Libenzi > > <[EMAIL PROTECTED]> wrote: > > > > > > I don't know how critical is the path where you

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Gregory Haskins
>>> On Tue, May 15, 2007 at 12:39 PM, in message <[EMAIL PROTECTED]>, Anthony Liguori <[EMAIL PROTECTED]> wrote: > This patch series depends on eventfd which means that KVM now requires > 2.6.22- rc1. This is understood. > > While KVM will inevitably start requiring newer kernel versions, do w

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Anthony Liguori
This patch series depends on eventfd which means that KVM now requires 2.6.22-rc1. While KVM will inevitably start requiring newer kernel versions, do we really need to do it right now? Perhaps we could add dummy eventfd_* functions to the module compat header? Then at least older kernels wil

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Gregory Haskins
>>> On Tue, May 15, 2007 at 12:22 PM, in message <[EMAIL PROTECTED]>, Christoph Hellwig <[EMAIL PROTECTED]> wrote: > On Tue, May 15, 2007 at 12:18:17PM - 0400, Gregory Haskins wrote: >> >>> On Tue, May 15, 2007 at 11:40 AM, in message >> <[EMAIL PROTECTED]>, Davide Libenzi >> <[EMAIL PROTECTED]> w

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Christoph Hellwig
On Tue, May 15, 2007 at 12:18:17PM -0400, Gregory Haskins wrote: > >>> On Tue, May 15, 2007 at 11:40 AM, in message > <[EMAIL PROTECTED]>, Davide Libenzi > <[EMAIL PROTECTED]> wrote: > > > > I don't know how critical is the path where you will be doing check. The > > eventfd_fget() is pretty fast

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Gregory Haskins
>>> On Tue, May 15, 2007 at 11:40 AM, in message <[EMAIL PROTECTED]>, Davide Libenzi <[EMAIL PROTECTED]> wrote: > > I don't know how critical is the path where you will be doing check. The > eventfd_fget() is pretty fast, so if you're not looking at a performance > critical path, I'd suggest tha

[kvm-devel] [PATCH 7/9] KVM: Adds support for real NMI injection on VMX processors

2007-05-15 Thread Gregory Haskins
Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- drivers/kvm/vmx.c | 57 - drivers/kvm/vmx.h |3 +++ 2 files changed, 55 insertions(+), 5 deletions(-) diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 580b99f..26c6dc6 100644

[kvm-devel] [PATCH 9/9] KVM: Add statistics from interrupt subsystem

2007-05-15 Thread Gregory Haskins
Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |5 + drivers/kvm/kvm_main.c | 17 +++-- drivers/kvm/vmx.c |2 ++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index a48e833..2c109

[kvm-devel] [PATCH 8/9] KVM: Adds basic plumbing to support TPR shadow features

2007-05-15 Thread Gregory Haskins
Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- drivers/kvm/irqdevice.h |3 +++ drivers/kvm/kvm.h |1 + drivers/kvm/lapic.c | 15 +++ 3 files changed, 19 insertions(+), 0 deletions(-) diff --git a/drivers/kvm/irqdevice.h b/drivers/kvm/irqdevice.h index 097d

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Davide Libenzi
On Tue, 15 May 2007, Gregory Haskins wrote: > >>> On Tue, May 15, 2007 at 3:45 AM, in message <[EMAIL PROTECTED]>, > Avi Kivity <[EMAIL PROTECTED]> wrote: > > Gregory Haskins wrote: > >> Signed- off- by: Gregory Haskins <[EMAIL PROTECTED]> > >> --- > >> > >> drivers/kvm/kvm.h |1 + > >>

[kvm-devel] [PATCH 1/9] KVM: Adds support for in-kernel mmio handlers

2007-05-15 Thread Gregory Haskins
Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h | 60 +++ drivers/kvm/kvm_main.c | 94 ++-- 2 files changed, 142 insertions(+), 12 deletions(-) diff --git a/drivers/kvm/kvm.h b/drivers/kvm/k

[kvm-devel] [PATCH 0/9] in-kernel APIC v5 (kernel side)

2007-05-15 Thread Gregory Haskins
This is rapidly converging, so sorry for the v4 and v5 posts back to back. I am now running through the test matrix as proposed by Avi. v5 builds upon v4 by adding: 1) Incorporated general minor feedback 2) Big change is vcpu->irq.task is now "pid_t vcpu->owner" to eliminate potential danglin

[kvm-devel] [PATCH 2/9] KVM: VMX - fix interrupt checking on light-exit

2007-05-15 Thread Gregory Haskins
Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- drivers/kvm/vmx.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 804a623..e696d02 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -1934,13 +1934,13 @@ static

[kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Gregory Haskins
Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |1 + drivers/kvm/kvm_main.c | 55 +++- include/linux/kvm.h|1 + 3 files changed, 51 insertions(+), 6 deletions(-) diff --git a/drivers/kvm/kvm.h b/drivers/kvm/

[kvm-devel] [PATCH 3/9] KVM: Add irqdevice object

2007-05-15 Thread Gregory Haskins
The current code is geared towards using a user-mode (A)PIC. This patch adds an "irqdevice" abstraction, and implements a "userint" model to handle the duties of the original code. Later, we can develop other irqdevice models to handle objects like LAPIC, IOAPIC, i8259, etc, as appropriate Signe

[kvm-devel] [PATCH 6/9] KVM: Add support for in-kernel LAPIC model

2007-05-15 Thread Gregory Haskins
Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- drivers/kvm/Makefile |2 drivers/kvm/kernint.c | 149 + drivers/kvm/kvm.h | 35 + drivers/kvm/kvm_main.c | 182 ++ drivers/kvm/lapic.c| 1421 drivers/kvm/svm.c

[kvm-devel] [PATCH 1/6] KVM: Updates for compiling in-kernel APIC support with external-modules

2007-05-15 Thread Gregory Haskins
Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- kernel/Kbuild |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/Kbuild b/kernel/Kbuild index e9bcda7..103a179 100644 --- a/kernel/Kbuild +++ b/kernel/Kbuild @@ -1,5 +1,5 @@ EXTRA_CFLAGS := -I$(src)/include -inc

[kvm-devel] [PATCH 2/6] KVM-USER: Make the kvm_allowed flag always defined so we dont need #ifdefs

2007-05-15 Thread Gregory Haskins
Non-performance critical code is made more awkward by having to always define both "#ifdef KVM" and "if (kvm_allowed)". Define "kvm_allowed = 0" by default. Anthony Ligouri is credited with the idea. Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- qemu/qemu-kvm.c |9 - 1 fil

[kvm-devel] [PATCH 3/6] KVM-USER: Add ability to specify APIC emulation type from the command-line

2007-05-15 Thread Gregory Haskins
Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- qemu/qemu-kvm.c |1 + qemu/vl.c |5 + qemu/vl.h |1 + 3 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index d4419a3..faa4684 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/

[kvm-devel] [PATCH 4/6] KVM: in-kernel-apic modification to QEMU

2007-05-15 Thread Gregory Haskins
Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- qemu/hw/apic.c | 20 +++- qemu/hw/pc.c| 29 - qemu/qemu-kvm.c | 49 +++-- qemu/qemu-kvm.h |2 ++ qemu/vl.h |7 ++- user/kvmct

[kvm-devel] [PATCH 5/6] KVM-USER: Add support for listening for kernel-based interrupts

2007-05-15 Thread Gregory Haskins
Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- user/kvmctl.c | 32 user/kvmctl.h |2 ++ 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/user/kvmctl.c b/user/kvmctl.c index bc6e238..ea86426 100644 --- a/user/kvmctl.c +++ b/user/kvmctl.

[kvm-devel] [PATCH 0/6] in-kernel APIC v5 (usermode side)

2007-05-15 Thread Gregory Haskins
Changelog: 1) Incorporated Anthony's feedback regarding the missed use_kernel_apic() 2) Added a new patch to allow new userspace on old kernels Regards, -Greg - This SF.net email is sponsored by DB2 Express Download DB2 Exp

[kvm-devel] [PATCH 6/6] KVM-USER: Check kvm extensions at runtime

2007-05-15 Thread Gregory Haskins
Newer userspace may run on an older kernel. Therefore we need a way to check the capabilities of the kernel so that we can downgrade userspace dynamically if necessary Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- qemu/qemu-kvm.c | 19 +++ user/kvmctl.c | 14

[kvm-devel] [PATCH 4/9] KVM: Adds ability to preempt an executing VCPU

2007-05-15 Thread Gregory Haskins
The VCPU executes synchronously w.r.t. userspace today, and therefore interrupt injection is pretty straight forward. However, we will soon need to be able to inject interrupts asynchronous to the execution of the VCPU due to the introduction of SMP, paravirtualized drivers, and asynchronous hyper

Re: [kvm-devel] [PATCH 4/5] KVM: in-kernel-apic modification to QEMU

2007-05-15 Thread Gregory Haskins
>>> On Tue, May 15, 2007 at 10:17 AM, in message <[EMAIL PROTECTED]>, Anthony Liguori <[EMAIL PROTECTED]> wrote: > Gregory Haskins wrote: >> Signed- off- by: Gregory Haskins <[EMAIL PROTECTED]> >> --- >> +if (kvm_allowed && kvm_apic_level) { >> > use_kernel_apic()? Oops..

Re: [kvm-devel] [PATCH 4/5] KVM: in-kernel-apic modification to QEMU

2007-05-15 Thread Anthony Liguori
Gregory Haskins wrote: > Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> > --- > + if (kvm_allowed && kvm_apic_level) { > use_kernel_apic()? > + ext_apic_bus_deliver(dest, trig_mode, dest_mode, > + delivery_mode, vector

Re: [kvm-devel] [PATCH] lighweight VM Exit

2007-05-15 Thread Dong, Eddie
Alternative to swaping host/guest MSR entry array to avoid MSR bitmap. More suggestions? thx,eddie Signed-off-by: Yaozu(Eddie) Dong [EMAIL PROTECTED] against ca76d209b88c344fc6a8eac17057c0088a3d6940. diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 1bbafba..5f056d9 100644 --- a/driver

[kvm-devel] [PATCH] KVM-USER: Check kvm extensions at runtime

2007-05-15 Thread Gregory Haskins
Newer userspace may run on an older kernel. Therefore we need a way to check the capabilities of the kernel so that we can downgrade userspace dynamically if necessary Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- qemu/qemu-kvm.c | 19 +++ user/kvmctl.c | 14

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Gregory Haskins
>>> On Tue, May 15, 2007 at 3:45 AM, in message <[EMAIL PROTECTED]>, Avi Kivity <[EMAIL PROTECTED]> wrote: > Gregory Haskins wrote: >> Signed- off- by: Gregory Haskins <[EMAIL PROTECTED]> >> --- >> >> drivers/kvm/kvm.h |1 + >> drivers/kvm/kvm_main.c | 52 >> +

Re: [kvm-devel] [PATCH 3/8] KVM: Adds ability to preempt an executing VCPU

2007-05-15 Thread Gregory Haskins
>>> On Tue, May 15, 2007 at 3:28 AM, in message <[EMAIL PROTECTED]>, Avi Kivity <[EMAIL PROTECTED]> wrote: > Gregory Haskins wrote: > >> >> I like having both states tracked, because it allows me to optimize the vcpu > interrupt if the context of the injection is the same as the execution. E.g.

Re: [kvm-devel] [PATCH/RFC 6/9] virtual block device driver

2007-05-15 Thread Carsten Otte
Avi Kivity wrote: > I don't see an immediate need to put the host-side driver in the kernel, > but I don't want to embed the host fd (which is an implementation > detail) into the host/guest ABI. There may not even be a host fd. Your point is taken, it also punches a hole in the security barrier

Re: [kvm-devel] [PATCH] lighweight VM Exit

2007-05-15 Thread Dong, Eddie
Avi Kivity wrote: > > You missed my comments regarding coding style. > Oo, I read the original mail too quickly and goes to bottom directly. Here is the update. BTW, vcpu->active_msr_list is not in this patch. I am working on another patch for MSR_EFER acceleration now which give me another 5-10

Re: [kvm-devel] [PATCH/RFC 5/9] s390 virtual console for guests

2007-05-15 Thread Carsten Otte
Anthony Liguori wrote: > It seems like request_irq is roughly the same as > register_external_interrupt. I suspect that you could get away with > either patching hvc_console to use register_external_interrupt if > CONFIG_S390 or perhaps providing a common interface. > > I suspect that this is

Re: [kvm-devel] SDL problem with 2.6.21/kvm-17 on x86_64?

2007-05-15 Thread Avi Kivity
Joshua Hoblitt wrote: > Hello, > > I'm attempting to get kvm-17 to work on a "server" system that has a kernel > built without alsa support and libsdl is built without alsa or oss support. > > I get this error when attempting to start qemu: > -- > $ sudo /usr/local/kvm/bin/qemu-system-x86_64 . -hd

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Avi Kivity
Gregory Haskins wrote: > Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> > --- > > drivers/kvm/kvm.h |1 + > drivers/kvm/kvm_main.c | 52 > ++-- > include/linux/kvm.h|1 + > 3 files changed, 48 insertions(+), 6 deletions(-) > > dif

Re: [kvm-devel] [PATCH] lighweight VM Exit

2007-05-15 Thread Avi Kivity
Dong, Eddie wrote: > Avi Kivity wrote: > >> Why not use hardware autoloading? Is it slower than software? >> > > I believe HW is faster than SW, but the problem is that this kind of > save/restore is > only needed for heavy weight VM Exit in KVM. While HW doesn't provide an > easy > way t

Re: [kvm-devel] [PATCH 3/8] KVM: Adds ability to preempt an executing VCPU

2007-05-15 Thread Avi Kivity
Gregory Haskins wrote: On Mon, May 14, 2007 at 11:45 AM, in message <[EMAIL PROTECTED]>, > Avi Kivity <[EMAIL PROTECTED]> wrote: > >> Gregory Haskins wrote: >> > index 059f074..0f6cc32 100644 > --- a/drivers/kvm/kvm.h > +++ b/drivers/kvm/kvm.h > @@ - 3