[COMMIT master] Update source link

2009-08-12 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/linux-2.6 b/linux-2.6 index 1374571..5383e99 16 --- a/linux-2.6 +++ b/linux-2.6 @@ -1 +1 @@ -Subproject commit 1374571813a9e30e65c5274aa9fdff15f2c58ee2 +Subproject commit

[COMMIT master] Adjust for x86_emulate.c - emulate.c change

2009-08-12 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/x86/Kbuild b/x86/Kbuild index c4694a7..66e23a0 100644 --- a/x86/Kbuild +++ b/x86/Kbuild @@ -3,7 +3,7 @@ include $(obj)/../config.kbuild obj-m := kvm.o kvm-intel.o kvm-amd.o -kvm-objs := kvm_main.o x86.o

[COMMIT master] KVM: When switching to a vm8086 task, load segments as 16-bit

2009-08-12 Thread Avi Kivity
From: Anthony Liguori aligu...@us.ibm.com According to 16.2.5 in the SDM, eflags.vm in the tss is consulted before loading and new segments. If eflags.vm == 1, then the segments are treated as 16-bit segments. The LDTR and TR are not normally available in vm86 mode so if they happen to somehow

[COMMIT master] KVM: Rename x86_emulate.c to emulate.c

2009-08-12 Thread Avi Kivity
From: Avi Kivity a...@redhat.com We're in arch/x86, what could we possibly be emulating? Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/include/asm/kvm_x86_emulate.h b/arch/x86/include/asm/kvm_emulate.h similarity index 100% rename from arch/x86/include/asm/kvm_x86_emulate.h

Re: Page allocation failures in guest

2009-08-12 Thread Pierre Ossman
On Wed, 12 Aug 2009 12:49:51 +0930 Rusty Russell ru...@rustcorp.com.au wrote: It's kind of the nature of networking devices :( I'd say your host now offers GSO features, so the guest allocates big packets. I doesn't get out of it though, or at least the virtio net driver wedges

Re: Page allocation failures in guest

2009-08-12 Thread Rusty Russell
On Wed, 12 Aug 2009 03:11:21 pm Avi Kivity wrote: + /* In theory, this can happen: if we don't get any buffers in +* we will*never* try to fill again. Sleeping in keventd if +* bad, but that is worse. */ + if (still_empty) { + msleep(100); +

Re: [PATCHv2 0/2] vhost: a kernel-level virtio server

2009-08-12 Thread Michael S. Tsirkin
On Tue, Aug 11, 2009 at 07:49:37PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: This implements vhost: a kernel-level backend for virtio, The main motivation for this work is to reduce virtualization overhead for virtio by removing system calls on data path, without guest

Re: Page allocation failures in guest

2009-08-12 Thread Avi Kivity
On 08/12/2009 09:19 AM, Pierre Ossman wrote: Will it still trigger the OOM killer with this patch, or will things behave slightly more gracefully? I don't think you mentioned the OOM killer in your original report? Did it trigger? -- error compiling committee.c: too many arguments to

Re: [PATCH] When switching to a vm8086 task, load segments as 16-bit (v2)

2009-08-12 Thread Avi Kivity
On 08/11/2009 11:57 PM, Anthony Liguori wrote: According to 16.2.5 in the SDM, eflags.vm in the tss is consulted before loading and new segments. If eflags.vm == 1, then the segments are treated as 16-bit segments. The LDTR and TR are not normally available in vm86 mode so if they happen to

Re: [PATCH 1/8 v2] Change irq routing table to use gsi indexed array.

2009-08-12 Thread Avi Kivity
On 08/11/2009 03:31 PM, Gleb Natapov wrote: Use gsi indexed array instead of scanning all entries on each interrupt injection. @@ -163,20 +166,23 @@ int kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level) void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned

Re: [PATCH 2/8 v2] Maintain back mapping from irqchip/pin to gsi.

2009-08-12 Thread Avi Kivity
On 08/11/2009 03:31 PM, Gleb Natapov wrote: Maintain back mapping from irqchip/pin to gsi to speedup interrupt acknowledgment notifications. Signed-off-by: Gleb Natapovg...@redhat.com --- include/linux/kvm_host.h |1 + virt/kvm/irq_comm.c | 24 +++- 2 files

Re: Page allocation failures in guest

2009-08-12 Thread Pierre Ossman
On Wed, 12 Aug 2009 10:43:46 +0300 Avi Kivity a...@redhat.com wrote: On 08/12/2009 09:19 AM, Pierre Ossman wrote: Will it still trigger the OOM killer with this patch, or will things behave slightly more gracefully? I don't think you mentioned the OOM killer in your original report?

Re: [PATCH 6/8 v2] Move IO APIC to its own lock.

2009-08-12 Thread Avi Kivity
On 08/11/2009 03:31 PM, Gleb Natapov wrote: What is the motivation for this change? Why a spinlock and not a mutex? diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index 0ad09f0..dd7ef2d 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c @@ -850,9 +850,16

Re: [PATCH 8/8 v2] Change irq_lock from mutex to spinlock.

2009-08-12 Thread Avi Kivity
On 08/11/2009 03:31 PM, Gleb Natapov wrote: Change irq_lock from mutex to spinlock. We do not sleep while holding it. But why change? The only motivation I can see is to allow injection from irqfd and interrupt contexts without requiring a tasklet/work. But that needs

Re: Page allocation failures in guest

2009-08-12 Thread Avi Kivity
On 08/12/2009 11:22 AM, Pierre Ossman wrote: Will it still trigger the OOM killer with this patch, or will things behave slightly more gracefully? I don't think you mentioned the OOM killer in your original report? Did it trigger? I might have things backwards here, but I

Re: [PATCH 1/8 v2] Change irq routing table to use gsi indexed array.

2009-08-12 Thread Gleb Natapov
On Wed, Aug 12, 2009 at 11:05:06AM +0300, Avi Kivity wrote: On 08/11/2009 03:31 PM, Gleb Natapov wrote: Use gsi indexed array instead of scanning all entries on each interrupt injection. @@ -163,20 +166,23 @@ int kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level) void

Re: [PATCH 2/8 v2] Maintain back mapping from irqchip/pin to gsi.

2009-08-12 Thread Gleb Natapov
On Wed, Aug 12, 2009 at 11:09:58AM +0300, Avi Kivity wrote: On 08/11/2009 03:31 PM, Gleb Natapov wrote: Maintain back mapping from irqchip/pin to gsi to speedup interrupt acknowledgment notifications. Signed-off-by: Gleb Natapovg...@redhat.com --- include/linux/kvm_host.h |1 +

Re: [PATCH 6/8 v2] Move IO APIC to its own lock.

2009-08-12 Thread Gleb Natapov
On Wed, Aug 12, 2009 at 11:27:13AM +0300, Avi Kivity wrote: On 08/11/2009 03:31 PM, Gleb Natapov wrote: What is the motivation for this change? The motivation was explained in 0/0. I want to get rid of lock on general irq injection path so the lock have to be pushed into ioapic since multiple

Re: [PATCHv2 2/2] vhost_net: a kernel-level virtio server

2009-08-12 Thread Michael S. Tsirkin
On Tue, Aug 11, 2009 at 08:06:02PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: What it is: vhost net is a character device that can be used to reduce the number of system calls involved in virtio networking. Existing virtio net code is used in the guest without modification.

Re: [PATCH 1/8 v2] Change irq routing table to use gsi indexed array.

2009-08-12 Thread Avi Kivity
On 08/12/2009 11:41 AM, Gleb Natapov wrote: On Wed, Aug 12, 2009 at 11:05:06AM +0300, Avi Kivity wrote: On 08/11/2009 03:31 PM, Gleb Natapov wrote: Use gsi indexed array instead of scanning all entries on each interrupt injection. @@ -163,20 +166,23 @@ int kvm_set_irq(struct kvm

Re: [PATCH 2/8 v2] Maintain back mapping from irqchip/pin to gsi.

2009-08-12 Thread Avi Kivity
On 08/12/2009 11:42 AM, Gleb Natapov wrote: What's this? If there is not GSI mapping use pin as gsi. This what current code does. We can BUG() here I think. We can't BUG() userspace can change the mapping before the ack is received. -- error compiling committee.c: too many

Re: [PATCH 8/8 v2] Change irq_lock from mutex to spinlock.

2009-08-12 Thread Gleb Natapov
On Wed, Aug 12, 2009 at 11:29:00AM +0300, Avi Kivity wrote: On 08/11/2009 03:31 PM, Gleb Natapov wrote: Change irq_lock from mutex to spinlock. We do not sleep while holding it. But why change? Isn't it more lightweight? For the remaining use of the lock it doesn't really matters, but

Re: [PATCH 6/8 v2] Move IO APIC to its own lock.

2009-08-12 Thread Avi Kivity
On 08/12/2009 12:04 PM, Gleb Natapov wrote: On Wed, Aug 12, 2009 at 11:27:13AM +0300, Avi Kivity wrote: On 08/11/2009 03:31 PM, Gleb Natapov wrote: What is the motivation for this change? The motivation was explained in 0/0. I want to get rid of lock on general irq injection path

Re: [PATCH 8/8 v2] Change irq_lock from mutex to spinlock.

2009-08-12 Thread Avi Kivity
On 08/12/2009 12:11 PM, Gleb Natapov wrote: On Wed, Aug 12, 2009 at 11:29:00AM +0300, Avi Kivity wrote: On 08/11/2009 03:31 PM, Gleb Natapov wrote: Change irq_lock from mutex to spinlock. We do not sleep while holding it. But why change? Isn't it more lightweight?

[PATCH KVM-AUTOTEST 1/2] Replace subprocess 'rm *.ppm' by equivalent Python code

2009-08-12 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- client/tests/kvm/kvm_preprocessing.py |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py index d118826..c3772a3 100644 ---

[PATCH KVM-AUTOTEST 0/2] Remove some external command callouts

2009-08-12 Thread Avi Kivity
Calling out to external commands is slow, noisy, and unreliable. This patchset replaces two such cases with Python equivalents. Avi Kivity (2): Replace subprocess 'rm *.ppm' by equivalent Python code Convert images to JPEG using PIL instead of an external program

[PATCH KVM-AUTOTEST 2/2] Convert images to JPEG using PIL instead of an external program

2009-08-12 Thread Avi Kivity
This is faster since we don't need to fork/exec/wait for an external program each time. Signed-off-by: Avi Kivity a...@redhat.com --- client/tests/kvm/kvm_guest_wizard.py |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/tests/kvm/kvm_guest_wizard.py

Re: [KVM-AUTOTEST PATCH v2 3/3] KVM test: add AutoIt test to kvm_tests.cfg.sample

2009-08-12 Thread Michael Goldish
- Chen Cao k...@redhat.com wrote: On Tue, Aug 11, 2009 at 03:10:44PM +0300, Michael Goldish wrote: Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.cfg.sample | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git

Re: [PATCH 6/8 v2] Move IO APIC to its own lock.

2009-08-12 Thread Gleb Natapov
On Wed, Aug 12, 2009 at 12:18:10PM +0300, Avi Kivity wrote: On 08/12/2009 12:04 PM, Gleb Natapov wrote: On Wed, Aug 12, 2009 at 11:27:13AM +0300, Avi Kivity wrote: On 08/11/2009 03:31 PM, Gleb Natapov wrote: What is the motivation for this change? The motivation was explained

Re: [PATCH 8/8 v2] Change irq_lock from mutex to spinlock.

2009-08-12 Thread Gleb Natapov
On Wed, Aug 12, 2009 at 12:22:34PM +0300, Avi Kivity wrote: On 08/12/2009 12:11 PM, Gleb Natapov wrote: On Wed, Aug 12, 2009 at 11:29:00AM +0300, Avi Kivity wrote: On 08/11/2009 03:31 PM, Gleb Natapov wrote: Change irq_lock from mutex to spinlock. We do not sleep while holding it.

Re: [PATCH 6/8 v2] Move IO APIC to its own lock.

2009-08-12 Thread Avi Kivity
On 08/12/2009 12:47 PM, Gleb Natapov wrote: Ah, the real motivation is msi. Pushing locks down doesn't help if we keep locking them. But for msi we avoid the lock entirely. Yes. MSI is one. Multiple IOAPICs may inject interrupt in parallel too (if we will choose to implement multiple

Re: [PATCH 6/8 v2] Move IO APIC to its own lock.

2009-08-12 Thread Gleb Natapov
On Wed, Aug 12, 2009 at 12:57:07PM +0300, Avi Kivity wrote: On 08/12/2009 12:47 PM, Gleb Natapov wrote: Ah, the real motivation is msi. Pushing locks down doesn't help if we keep locking them. But for msi we avoid the lock entirely. Yes. MSI is one. Multiple IOAPICs may inject

Re: [PATCH 6/8 v2] Move IO APIC to its own lock.

2009-08-12 Thread Avi Kivity
On 08/12/2009 01:05 PM, Gleb Natapov wrote: Let's leave _irqsave() until later since that has other implications. So change it to mutex then? Yes please. Doing this will just re-enable host interrupt while irq condition is not cleared in the device. The host will hang. So

Re: Unable to activate windows 2003 se

2009-08-12 Thread duck
I post here because I experiment a lot of problem to activate windows 2003 server I have, similarly, never been able to activate Vista under KVM. After some negotiation with the Windows activation backend, I receive an error inviting me to call Microsoft to use telephone activation, which is

Re: [PATCH KVM-AUTOTEST 2/2] Convert images to JPEG using PIL instead of an external program

2009-08-12 Thread Michael Goldish
- Avi Kivity a...@redhat.com wrote: This is faster since we don't need to fork/exec/wait for an external program each time. Signed-off-by: Avi Kivity a...@redhat.com --- client/tests/kvm/kvm_guest_wizard.py |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff

Re: [PATCH 2/8 v2] Maintain back mapping from irqchip/pin to gsi.

2009-08-12 Thread Avi Kivity
On 08/12/2009 01:17 PM, Gleb Natapov wrote: Yes. Malicious userspace can remove GSI mapping for GSI with ack notifier registered, so we can't BUG(). But making GSI=pin doesn't look correct too. Should we just skip calling ack notifier? I think so. -- error compiling committee.c: too many

Re: [PATCHv2 2/2] vhost_net: a kernel-level virtio server

2009-08-12 Thread Michael S. Tsirkin
On Tue, Aug 11, 2009 at 08:06:02PM -0400, Gregory Haskins wrote: diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index 0521177..781a8bb 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h @@ -30,6 +30,7 @@ #define HPET_MINOR 228

Re: qemu-kvm-0.11.0-rc1 guests failing without noapic (on x86_64 host)

2009-08-12 Thread Avi Kivity
On 08/11/2009 11:53 PM, Charles Duffy wrote: Howdy. The libguestfs kernel and appliance I've been using successfully with qemu-kvm-0.10.6 and prior fails horribly with qemu-kvm-0.11.0-rc1 unless 'noapic' is passed on the kernel command line: What about qemu-kvm.git master? -- error

Re: [KVM-AUTOTEST PATCH v2 3/3] KVM test: add AutoIt test to kvm_tests.cfg.sample

2009-08-12 Thread Cao, Chen
On Wed, Aug 12, 2009 at 05:44:34AM -0400, Michael Goldish wrote: - Chen Cao k...@redhat.com wrote: On Tue, Aug 11, 2009 at 03:10:44PM +0300, Michael Goldish wrote: Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.cfg.sample | 12 +++-

Re: [PATCHv2 0/2] vhost: a kernel-level virtio server

2009-08-12 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Tue, Aug 11, 2009 at 07:49:37PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: This implements vhost: a kernel-level backend for virtio, The main motivation for this work is to reduce virtualization overhead for virtio by removing system calls on data

Re: [PATCHv2 0/2] vhost: a kernel-level virtio server

2009-08-12 Thread Michael S. Tsirkin
On Wed, Aug 12, 2009 at 07:56:05AM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Tue, Aug 11, 2009 at 07:49:37PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: This implements vhost: a kernel-level backend for virtio, The main motivation for this work is to reduce

Re: [PATCH] When switching to a vm8086 task, load segments as 16-bit (v2)

2009-08-12 Thread Avi Kivity
On 08/11/2009 11:57 PM, Anthony Liguori wrote: According to 16.2.5 in the SDM, eflags.vm in the tss is consulted before loading and new segments. If eflags.vm == 1, then the segments are treated as 16-bit segments. The LDTR and TR are not normally available in vm86 mode so if they happen to

[PATCH v3 4/8] Move irq routing data structure to rcu locking

2009-08-12 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- virt/kvm/irq_comm.c | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 00e4be7..35c3bbf 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c @@ -152,7

[PATCH v3 1/8] Do not call ack notifiers on PIC reset.

2009-08-12 Thread Gleb Natapov
For device assigned it may cause host hang since ack notifier callback enables host interrupt and guest not necessary cleared interrupt condition in an assigned device. For PIT we should not call ack notifier here since interrupt was not acked by a guest and should be redelivered. Signed-off-by:

[PATCH v3 3/8] Maintain back mapping from irqchip/pin to gsi.

2009-08-12 Thread Gleb Natapov
Maintain back mapping from irqchip/pin to gsi to speedup interrupt acknowledgment notifications. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/ia64/include/asm/kvm.h |1 + arch/x86/include/asm/kvm.h |1 + include/linux/kvm_host.h|1 + virt/kvm/irq_comm.c | 31

[PATCH v3 0/8] make interrupt injection lockless (almost)

2009-08-12 Thread Gleb Natapov
kvm-irq_lock protects too much stuff, but still fail to protect everything it was design to protect (see ack notifiers call in pic). I want to make IRQ injection fast path as lockless as possible. This patch series removes kvm-irq_lock from irq injection path effectively making interrupt injection

[PATCH v3 6/8] Convert irq notifiers lists to RCU locking.

2009-08-12 Thread Gleb Natapov
Use RCU locking for mask/ack notifiers lists. Signed-off-by: Gleb Natapov g...@redhat.com --- virt/kvm/irq_comm.c | 22 -- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index ad84758..d276b42 100644 ---

[PATCH v3 7/8] Move IO APIC to its own lock.

2009-08-12 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/ia64/kvm/kvm-ia64.c |7 +--- arch/x86/kvm/i8259.c | 22 +--- arch/x86/kvm/lapic.c |5 +-- arch/x86/kvm/x86.c | 10 + virt/kvm/ioapic.c| 80 +++---

[PATCH v3 8/8] Drop kvm-irq_lock lock from irq injection path.

2009-08-12 Thread Gleb Natapov
The only thing it protects now is interrupt injection into lapic and this can work lockless. Even now with kvm-irq_lock in place access to lapic is not entirely serialized since vcpu access doesn't take kvm-irq_lock. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/ia64/kvm/kvm-ia64.c |2

[PATCH v3 5/8] Move irq ack notifier list to arch independent code.

2009-08-12 Thread Gleb Natapov
Mask irq notifier list is already there. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/ia64/include/asm/kvm_host.h |1 - arch/x86/include/asm/kvm_host.h |1 - include/linux/kvm_host.h |1 + virt/kvm/irq_comm.c |5 ++--- virt/kvm/kvm_main.c

[PATCH v3 2/8] Change irq routing table to use gsi indexed array.

2009-08-12 Thread Gleb Natapov
Use gsi indexed array instead of scanning all entries on each interrupt injection. Signed-off-by: Gleb Natapov g...@redhat.com --- include/linux/kvm_host.h | 16 -- virt/kvm/irq_comm.c | 77 +- virt/kvm/kvm_main.c |1 - 3

Re: [PATCH] When switching to a vm8086 task, load segments as 16-bit (v2)

2009-08-12 Thread Avi Kivity
On 08/12/2009 03:11 PM, Avi Kivity wrote: On 08/11/2009 11:57 PM, Anthony Liguori wrote: According to 16.2.5 in the SDM, eflags.vm in the tss is consulted before loading and new segments. If eflags.vm == 1, then the segments are treated as 16-bit segments. The LDTR and TR are not normally

Re: [PATCHv2 0/2] vhost: a kernel-level virtio server

2009-08-12 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Wed, Aug 12, 2009 at 07:56:05AM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: snip 1. use a dedicated network interface with SRIOV, program mac to match that of guest (for testing, you can set promisc mode, but that is bad for performance) Are

Re: [PATCH] fix memory leak in virtio_net

2009-08-12 Thread Rusty Russell
On Tue, 11 Aug 2009 09:22:58 pm Avi Kivity wrote: (copying Rusty, the virtio maintainer) On 08/10/2009 11:05 PM, Shirley Ma wrote: Whild reading virtio code, I found some memory leak in removing virtio_net. In virtnet_remove, only skb has been freed not the pages in skb frags. Here

Re: [PATCH KVM-AUTOTEST 2/2] Convert images to JPEG using PIL instead of an external program

2009-08-12 Thread Lucas Meneghel Rodrigues
On Wed, 2009-08-12 at 12:34 +0300, Avi Kivity wrote: This is faster since we don't need to fork/exec/wait for an external program each time. Signed-off-by: Avi Kivity a...@redhat.com --- client/tests/kvm/kvm_guest_wizard.py |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)

Re: [PATCHv2 0/2] vhost: a kernel-level virtio server

2009-08-12 Thread Arnd Bergmann
On Wednesday 12 August 2009, Gregory Haskins wrote: Are you saying SRIOV is a requirement, and I can either program the SRIOV adapter with a mac or use promis? Or are you saying I can use SRIOV+programmed mac OR a regular nic + promisc (with a perf penalty). SRIOV is not a requirement.

Re: [PATCH KVM-AUTOTEST 2/2] Convert images to JPEG using PIL instead of an external program

2009-08-12 Thread Avi Kivity
On 08/12/2009 03:44 PM, Lucas Meneghel Rodrigues wrote: @@ -110,9 +111,8 @@ def barrier_2(vm, words, params, debug_dir, data_scrdump_filename, history_scrdump_filename = os.path.join(history_dir, scrdump-step_%s-%s.jpg % (current_step_num,

Re: [PATCHv2 2/2] vhost_net: a kernel-level virtio server

2009-08-12 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Tue, Aug 11, 2009 at 08:06:02PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: What it is: vhost net is a character device that can be used to reduce the number of system calls involved in virtio networking. Existing virtio net code is used in the guest

Re: [PATCHv2 0/2] vhost: a kernel-level virtio server

2009-08-12 Thread Michael S. Tsirkin
On Wed, Aug 12, 2009 at 08:41:31AM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Wed, Aug 12, 2009 at 07:56:05AM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: snip 1. use a dedicated network interface with SRIOV, program mac to match that of guest (for

Re: [PATCHv2 0/2] vhost: a kernel-level virtio server

2009-08-12 Thread Michael S. Tsirkin
On Wed, Aug 12, 2009 at 02:52:01PM +0200, Arnd Bergmann wrote: On Wednesday 12 August 2009, Gregory Haskins wrote: Are you saying SRIOV is a requirement, and I can either program the SRIOV adapter with a mac or use promis? Or are you saying I can use SRIOV+programmed mac OR a regular

KVM problems with Vt-d and wireless adapter

2009-08-12 Thread Michael J Coss
I'm exploring the use of Vt-d with KVM. I'm running the following setup Processor:Intel Core2 Duo P8600 KVM version: 88-r1 Host : Gentoo 32 bit, 2.6.30-r4 Architecture:i386 Guest VM: CentOS 5.3, 32 bit, 2.6.18-128 kernel Command: kvm -hda vdisk.img -boot c -m

Re: [PATCH] When switching to a vm8086 task, load segments as 16-bit (v2)

2009-08-12 Thread Anthony Liguori
Avi Kivity wrote: On 08/12/2009 03:11 PM, Avi Kivity wrote: On 08/11/2009 11:57 PM, Anthony Liguori wrote: According to 16.2.5 in the SDM, eflags.vm in the tss is consulted before loading and new segments. If eflags.vm == 1, then the segments are treated as 16-bit segments. The LDTR and TR

Re: [PATCH KVM-AUTOTEST 2/2] Convert images to JPEG using PIL instead of an external program

2009-08-12 Thread Lucas Meneghel Rodrigues
On Wed, 2009-08-12 at 16:00 +0300, Avi Kivity wrote: On 08/12/2009 03:44 PM, Lucas Meneghel Rodrigues wrote: @@ -110,9 +111,8 @@ def barrier_2(vm, words, params, debug_dir, data_scrdump_filename, history_scrdump_filename = os.path.join(history_dir,

Re: [PATCHv2 2/2] vhost_net: a kernel-level virtio server

2009-08-12 Thread Michael S. Tsirkin
On Wed, Aug 12, 2009 at 09:01:35AM -0400, Gregory Haskins wrote: I think I understand what your comment above meant: You don't need to do synchronize_rcu() because you can flush the workqueue instead to ensure that all readers have completed. Yes. But if thats true, to me, the

Re: [PATCH KVM-AUTOTEST 2/2] Convert images to JPEG using PIL instead of an external program

2009-08-12 Thread Avi Kivity
On 08/12/2009 04:26 PM, Lucas Meneghel Rodrigues wrote: But I prefer to follow the project policy when possible. The reason why I accepted the original code that Michael wrote to perform the conversion was graceful degradation of functionality (if you don't have ImageMagick installed, the test

Re: Unable to activate windows 2003 se

2009-08-12 Thread Tharindu Rukshan Bamunuarachchi
if you do not worry about date inside Windows ... you can use following option ... I have not used this but i am going to use this with windows 7 ... QEMU Manpage -startdate date Set the initial date of the real time clock. Valid format for date are: now or 2006-06-17T16:01:21 or 2006-06-17.

Re: [PATCH] When switching to a vm8086 task, load segments as 16-bit (v2)

2009-08-12 Thread Avi Kivity
On 08/12/2009 04:15 PM, Anthony Liguori wrote: While the code looks nicer with the second patch, the fact that get_rflags() does a vmcs_read() seems 7 times more than before seems unfortunate. We can add kvm_rflags_read(), see kvm_cache_regs.h. In any case, it's purely academic since task

Re: [PATCHv2 2/2] vhost_net: a kernel-level virtio server

2009-08-12 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Wed, Aug 12, 2009 at 09:01:35AM -0400, Gregory Haskins wrote: I think I understand what your comment above meant: You don't need to do synchronize_rcu() because you can flush the workqueue instead to ensure that all readers have completed. Yes. But if thats

Re: [PATCHv2 0/2] vhost: a kernel-level virtio server

2009-08-12 Thread Michael S. Tsirkin
On Wed, Aug 12, 2009 at 03:40:44PM +0200, Arnd Bergmann wrote: On Wednesday 12 August 2009, Michael S. Tsirkin wrote: If I understand it correctly, you can at least connect a veth pair to a bridge, right? Something like veth0 - veth1 - vhost - guest 1 eth0 - br0-|

Re: [PATCHv2 0/2] vhost: a kernel-level virtio server

2009-08-12 Thread Arnd Bergmann
On Wednesday 12 August 2009, Michael S. Tsirkin wrote: If I understand it correctly, you can at least connect a veth pair to a bridge, right? Something like veth0 - veth1 - vhost - guest 1 eth0 - br0-| veth2 - veth3 - vhost - guest 2 Heh, you

Re: [PATCH] When switching to a vm8086 task, load segments as 16-bit (v2)

2009-08-12 Thread Anthony Liguori
Avi Kivity wrote: On 08/12/2009 04:15 PM, Anthony Liguori wrote: While the code looks nicer with the second patch, the fact that get_rflags() does a vmcs_read() seems 7 times more than before seems unfortunate. We can add kvm_rflags_read(), see kvm_cache_regs.h. In any case, it's purely

Re: [PATCHv2 2/2] vhost_net: a kernel-level virtio server

2009-08-12 Thread Michael S. Tsirkin
On Wed, Aug 12, 2009 at 09:41:35AM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Wed, Aug 12, 2009 at 09:01:35AM -0400, Gregory Haskins wrote: I think I understand what your comment above meant: You don't need to do synchronize_rcu() because you can flush the workqueue instead

Re: Unable to activate windows 2003 se

2009-08-12 Thread dgour...@itool.com
Thanks for your anwers ! I've install this server for production use and I need to have the right date and time... I've finaly activate my windows 2003 server by phone and it works perfectly. Thanks, Tharindu Rukshan Bamunuarachchi a écrit : if you do not worry about date inside Windows ...

Re: Unable to activate windows 2003 se

2009-08-12 Thread Avi Kivity
On 08/12/2009 11:12 AM, duck wrote: I post here because I experiment a lot of problem to activate windows 2003 server I have, similarly, never been able to activate Vista under KVM. After some negotiation with the Windows activation backend, I receive an error inviting me to call

Re: [PATCHv2 0/2] vhost: a kernel-level virtio server

2009-08-12 Thread Michael S. Tsirkin
On Wed, Aug 12, 2009 at 09:51:45AM -0400, Gregory Haskins wrote: Arnd Bergmann wrote: On Wednesday 12 August 2009, Michael S. Tsirkin wrote: If I understand it correctly, you can at least connect a veth pair to a bridge, right? Something like veth0 - veth1 - vhost - guest 1

Re: [PATCHv2 2/2] vhost_net: a kernel-level virtio server

2009-08-12 Thread Paul E. McKenney
On Wed, Aug 12, 2009 at 04:25:40PM +0300, Michael S. Tsirkin wrote: On Wed, Aug 12, 2009 at 09:01:35AM -0400, Gregory Haskins wrote: I think I understand what your comment above meant: You don't need to do synchronize_rcu() because you can flush the workqueue instead to ensure that all

Re: [PATCHv2 2/2] vhost_net: a kernel-level virtio server

2009-08-12 Thread Michael S. Tsirkin
On Wed, Aug 12, 2009 at 07:11:07AM -0700, Paul E. McKenney wrote: On Wed, Aug 12, 2009 at 04:25:40PM +0300, Michael S. Tsirkin wrote: On Wed, Aug 12, 2009 at 09:01:35AM -0400, Gregory Haskins wrote: I think I understand what your comment above meant: You don't need to do

[PATCH] KVM test: Remove unnecessary callouts to external programs

2009-08-12 Thread Lucas Meneghel Rodrigues
From: Avi Kivity a...@redhat.com Calling out to external commands is slow, noisy, and unreliable. This patchset replaces two such cases with Python equivalents. * Replace subprocess 'rm' by equivalent Python code * Convert images to JPEG and PNG using PIL instead of an external program.

Re: [PATCH KVM-AUTOTEST 2/2] Convert images to JPEG using PIL instead of an external program

2009-08-12 Thread Lucas Meneghel Rodrigues
On Wed, 2009-08-12 at 16:33 +0300, Avi Kivity wrote: On 08/12/2009 04:26 PM, Lucas Meneghel Rodrigues wrote: But I prefer to follow the project policy when possible. The reason why I accepted the original code that Michael wrote to perform the conversion was graceful degradation of

qemu-kvm segfaults in qemu_del_timer (0.10.5 and 0.10.6)

2009-08-12 Thread Chris Webb
I have a couple of clusters hosting qemu-kvm virtual machines. One of these clusters consists of dual quad-core Xeon E5420s (vmx), the other consists of dual quad-core Barcelona Opterons (svm), and both are running x86-64 Linux 2.6.30.4 with the kvm modules included with the upstream kernel

Re: [PATCH KVM-AUTOTEST 2/2] Convert images to JPEG using PIL instead of an external program

2009-08-12 Thread Avi Kivity
On 08/12/2009 06:01 PM, Lucas Meneghel Rodrigues wrote: Ok Avi, I've spotted other places where we are also making unneeded calls to rm and mogrify, so I changed them, combined the patches, changed the exception trap only to catch the exceptions we are waiting for, and send the patch to the

Re: [PATCH] KVM test: Remove unnecessary callouts to external programs

2009-08-12 Thread Lucas Meneghel Rodrigues
On Wed, Aug 12, 2009 at 12:00 PM, Lucas Meneghel Rodriguesl...@redhat.com wrote: From: Avi Kivity a...@redhat.com Calling out to external commands is slow, noisy, and unreliable.  This patchset replaces two such cases with Python equivalents.  * Replace subprocess 'rm' by equivalent Python

Re: [PATCHv2 2/2] vhost_net: a kernel-level virtio server

2009-08-12 Thread Paul E. McKenney
On Wed, Aug 12, 2009 at 05:15:59PM +0300, Michael S. Tsirkin wrote: On Wed, Aug 12, 2009 at 07:11:07AM -0700, Paul E. McKenney wrote: On Wed, Aug 12, 2009 at 04:25:40PM +0300, Michael S. Tsirkin wrote: On Wed, Aug 12, 2009 at 09:01:35AM -0400, Gregory Haskins wrote: I think I understand

Re: qemu-kvm segfaults in qemu_del_timer (0.10.5 and 0.10.6)

2009-08-12 Thread Avi Kivity
On 08/12/2009 06:01 PM, Chris Webb wrote: I have a couple of clusters hosting qemu-kvm virtual machines. One of these clusters consists of dual quad-core Xeon E5420s (vmx), the other consists of dual quad-core Barcelona Opterons (svm), and both are running x86-64 Linux 2.6.30.4 with the kvm

[KVM-AUTOTEST PATCH v2 01/11] KVM test: add some MAC/IP address utilities to kvm_utils

2009-08-12 Thread Michael Goldish
Add function get_mac_ip_pair_from_dict() which gets a dict (specified in the config file by the user) and fetches a MAC-IP address pair according to a certain syntax. The syntax allows the user to specify a group of MAC-IP address ranges. For example: address_ranges = r1 r2 r3

[KVM-AUTOTEST PATCH v2 02/11] KVM test: add basic TAP support with static MAC-IP mapping

2009-08-12 Thread Michael Goldish
The network mode is specified by a NIC parameter named 'nic_mode'. Currently two modes are supported: 'tap' and 'user'. Other NIC parameters are now handled: nic_script, nic_downscript and nic_ifname. nic_ifname should usually not be specified (qemu chooses one automatically). nic_script and

[KVM-AUTOTEST PATCH v2 03/11] KVM test: add sample 'qemu-ifup' script

2009-08-12 Thread Michael Goldish
The script adds a requested interface to an existing bridge. It is meant to be used by qemu when running in TAP mode. Note: the user is responsible for setting up the bridge before running any tests. This can be done with brctl or in any manner that is appropriate for the host OS. It can be

[KVM-AUTOTEST PATCH v2 04/11] KVM test: add host-specific MAC-IP pool configuration

2009-08-12 Thread Michael Goldish
- Add kvm_address_pools.cfg which specifies a set of MAC-IP ranges for each host. - Read kvm_address_pools.cfg in the control file and filter it by hostname, so that each host uses only the MAC addresses assigned to it. If the hostname doesn't match any hostname in kvm_address_pools.cfg,

[KVM-AUTOTEST PATCH v2 05/11] KVM test: specify installation cdkeys in a dedicated file

2009-08-12 Thread Michael Goldish
- Add file kvm_cdkeys.cfg.sample which specifies cdkeys for guests that require them. Users should rename the file to kvm_cdkeys.cfg and enter the real cdkeys in the file. - Remove all cdkey lines from kvm_tests.cfg.sample and add an include statement instead ('include kvm_cdkeys.cfg').

[KVM-AUTOTEST PATCH v2 06/11] KVM test: kvm_config.py: do not fail when including a nonexistent file

2009-08-12 Thread Michael Goldish
Instead of failing, just print a warning. Included files may not always be crucial for tests to run (kvm_cdkeys.cfg for example). Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_config.py | 21 +++-- 1 files changed, 11 insertions(+), 10

[KVM-AUTOTEST PATCH v2 07/11] KVM test: kvm_subprocess: send user specified parameters to kvm_tail callbacks

2009-08-12 Thread Michael Goldish
(A mistake was made in the first version of this patch -- this is a corrected version.) Allow the user to specify parameters to send to output_func and termination_func in addition to the regular output string and exit status. The user specified parameters will be pre-pended to the other

[KVM-AUTOTEST PATCH v2 08/11] KVM test: dynamically detect and cache MAC-IP pairs using tcpdump

2009-08-12 Thread Michael Goldish
Run tcpdump in the background at all times and listen for DHCP communication. Whenever a DHCP server assigns an IP address to a MAC address, cache it for future reference. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py | 41

[KVM-AUTOTEST PATCH v2 09/11] KVM test: kvm_utils.py: small fix for format_str_for_message()

2009-08-12 Thread Michael Goldish
format_str_for_message() sometimes adds an extra newline. Fix that. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py

[KVM-AUTOTEST PATCH v2 11/11] KVM test: make stress_boot work properly with TAP networking

2009-08-12 Thread Michael Goldish
Take an additional parameter 'clone_address_index_base' which indicates the initial value for 'address_index' for the cloned VMs. This value is incremented after each clone is created. I assume the original VM has a single NIC; otherwise NICs will end up sharing MAC addresses, which is bad.

[KVM-AUTOTEST PATCH v2 10/11] KVM test: make VMs use a dynamic MAC-IP mapping generated by tcpdump

2009-08-12 Thread Michael Goldish
In VM.get_address(), return an IP address from the MAC-IP cache if an IP address base wasn't specified by the user, or if the user requested that IP addresses be taken from the dynamic cache. To force the system to obtain IP addresses from the dynamic cache even when static base addresses are

[KVM-AUTOTEST PATCH v2] KVM test: treat all user specified paths equally

2009-08-12 Thread Michael Goldish
(This patch breaks compatibility with existing config files.) The user must now specify paths relative to test.bindir whenever a path is required. For example, image filenames specified in the config file should now begin with 'images/', cdrom filenames should begin with 'isos/' and stepfile

Re: [PATCHv2 0/2] vhost: a kernel-level virtio server

2009-08-12 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Wed, Aug 12, 2009 at 09:51:45AM -0400, Gregory Haskins wrote: Arnd Bergmann wrote: On Wednesday 12 August 2009, Michael S. Tsirkin wrote: If I understand it correctly, you can at least connect a veth pair to a bridge, right? Something like veth0 -

Re: [PATCHv2 0/2] vhost: a kernel-level virtio server

2009-08-12 Thread Michael S. Tsirkin
On Wed, Aug 12, 2009 at 12:13:43PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Wed, Aug 12, 2009 at 09:51:45AM -0400, Gregory Haskins wrote: Arnd Bergmann wrote: On Wednesday 12 August 2009, Michael S. Tsirkin wrote: If I understand it correctly, you can at least connect a

Re: [Autotest] [KVM-AUTOTEST PATCH 11/12] KVM test: make VMs use a dynamic MAC-IP mapping generated by tcpdump

2009-08-12 Thread Michael Goldish
- Jason Wang jasow...@redhat.com wrote: On Tue, Aug 11, 2009 at 1:16 PM, Michael Goldishmgold...@redhat.com wrote: - Jason Wang jasow...@redhat.com wrote: Hello Michael: Based on our experiences with TAP networking scripts, the verify_mac_ip_pair() could not work

Re: [PATCH 2/2] vhost_net: a kernel-level virtio server

2009-08-12 Thread Arnd Bergmann
On Monday 10 August 2009, Michael S. Tsirkin wrote: +struct workqueue_struct *vhost_workqueue; [nitpicking] This could be static. +/* The virtqueue structure describes a queue attached to a device. */ +struct vhost_virtqueue { + struct vhost_dev *dev; + + /* The actual ring of

  1   2   >