[PATCH] kvm: external module: only advertise sync mmu if host has mmu notifiers

2008-08-11 Thread Avi Kivity
From: Avi Kivity [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] diff --git a/kernel/hack-module.awk b/kernel/hack-module.awk index a9ac1f2..ac03a37 100644 --- a/kernel/hack-module.awk +++ b/kernel/hack-module.awk @@ -70,6 +70,8 @@ BEGIN { split(INIT_WORK, compat_apis); } {

Re: [et-mgmt-tools] Re: [libvirt] RE: [Qemu-devel] [ANNOUNCE] virt-mem tools version 0.2.8 released

2008-08-11 Thread Richard W.M. Jones
On Mon, Aug 11, 2008 at 07:39:34PM +1200, james wrote: This is what libvirt gives you (and lots more, eg. secure remote access to hypervisors, bindings to Perl many other languages, etc.). Can you be more specfic about what you couldn't do with libvirt? I can give you such an example

Re: [RFC][PATCH] VMX: Invalid guest state emulation

2008-08-11 Thread Avi Kivity
Mohammed Gamal wrote: On Sun, Aug 10, 2008 at 11:09 AM, Avi Kivity [EMAIL PROTECTED] wrote: Mohammed Gamal wrote: This patch aims to allow emulation whenever guest state is not valid for VMX operation. This usually happens in mode switches with guests such as older versions of gfxboot

Re: [PATCH 1/4] reduce kvm stack usage in kvm_arch_vm_ioctl()

2008-08-11 Thread Avi Kivity
(Please use [EMAIL PROTECTED], not [EMAIL PROTECTED]) Dave Hansen wrote: On my machine with gcc 3.4, kvm uses ~2k of stack in a few select functions. This is mostly because gcc fails to notice that the different case: statements could have their stack usage combined. It overflows very nicely

Re: [PATCH 2/4] reduce stack usage in kvm_vcpu_ioctl()

2008-08-11 Thread Avi Kivity
Dave Hansen wrote: Same as the last one, but this time we use kmalloc() for all of the uses. Note that the kfree()s take advantage of the fact that kfree() is OK on NULL. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- virt/kvm/kvm_main.c | 48

Re: [PATCH] x86 emulator: Add opcodes 0xb9-0xbf (mov r,imm)

2008-08-11 Thread Avi Kivity
Mohammed Gamal wrote: The emulator only supported opcode 0xb8 for mov r,imm. However 0xb9-0xbf are also mov r,imm. This patch adds support for these instructions. Looks good, but I'd like to merge this together with a testcase. -- error compiling committee.c: too many arguments to function

Re: [PATCH] x86 emulator: Add in/out instructions, opcodes (0xe4-0xe7, 0xec-0xef)

2008-08-11 Thread Avi Kivity
Mohammed Gamal wrote: This patch adds instructions 'in' and 'out' to the x86 emulator. + SrcNone | ByteOp | ImplicitOps, SrcNone |ImplicitOps, Missing blank. case 0xe8: /* call (near) */ { long int rel; switch (c-op_bytes) { @@ -1732,6

[ kvm-Bugs-2042889 ] guest: device offline, then kernel panic

2008-08-11 Thread SourceForge.net
Bugs item #2042889, was opened at 2008-08-08 13:16 Message generated for change (Comment added) made by ravpl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2042889group_id=180599 Please note that this message will contain a full copy of the comment

Re: Use of barriers in pvclock ABI

2008-08-11 Thread Avi Kivity
Gerd Hoffmann wrote: Hi, However, the pvclock_clocksource_read() implementation is over-engineered, because it checks for an odd version and uses very strong rmb() barriers (which generates either an lfence or lock add $0, (%esp)). If we're happy to guarantee as an ABI issue that the

[ kvm-Bugs-2019608 ] Ubuntu 8.04.1 (IA32 x86_64) - cannot install bootloader

2008-08-11 Thread SourceForge.net
Bugs item #2019608, was opened at 2008-07-16 17:03 Message generated for change (Comment added) made by henrikholst You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2019608group_id=180599 Please note that this message will contain a full copy of the comment

Migrating Vm's from one machine to another...and back

2008-08-11 Thread Jean-Pierre Dion
Hi, I made some VM migrations between several machines (Intel-Intel and Intel-AMD) and when one VM has been migrated onto a second machine, I cannot put it back on the first one. I talked with Laurent and it seems that there is no way (or no obvious one) to do that. This could be useful when

[PATCH 1/4] reduce kvm stack usage in kvm_arch_vm_ioctl()

2008-08-11 Thread Dave Hansen
On my machine with gcc 3.4, kvm uses ~2k of stack in a few select functions. This is mostly because gcc fails to notice that the different case: statements could have their stack usage combined. It overflows very nicely if interrupts happen during one of these large uses. This patch uses two

Re: Migrating Vm's from one machine to another...and back

2008-08-11 Thread Chris Lalancette
Jean-Pierre Dion wrote: Hi, I made some VM migrations between several machines (Intel-Intel and Intel-AMD) and when one VM has been migrated onto a second machine, I cannot put it back on the first one. I talked with Laurent and it seems that there is no way (or no obvious one) to do

Re: [PATCH 0/9][RFC] KVM virtio_net performance

2008-08-11 Thread Mark McLoughlin
Hi Avi, Sorry, I got distracted from this ... On Sat, 2008-07-26 at 12:45 +0300, Avi Kivity wrote: Mark McLoughlin wrote: 1) The length of the tx mitigation timer makes quite a difference to throughput achieved; we probably need a good heuristic for adjusting this on the fly.

[PATCH 01/12] kvm: qemu: Fix virtio_net tx timer

2008-08-11 Thread Mark McLoughlin
The current virtio_net tx timer is 2ns, which doesn't make any sense. Set it to a more reasonable 250us instead. However, even though we were requesting a 2ns tx timer, it was actually getting limited to MIN_TIMER_REARM_US which is currently 250us. So, even though the timer itself would only

[PATCH 07/12] kvm: qemu: Move some code around for the next commit

2008-08-11 Thread Mark McLoughlin
Signed-off-by: Mark McLoughlin [EMAIL PROTECTED] --- qemu/vl.c | 26 +- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/qemu/vl.c b/qemu/vl.c index 126944d..f5aacf0 100644 --- a/qemu/vl.c +++ b/qemu/vl.c @@ -4369,19 +4369,6 @@ typedef struct TAPState {

[PATCH 04/12] kvm: qemu: Disable recv notifications until avail buffers exhausted

2008-08-11 Thread Mark McLoughlin
Once we know we have buffers available on the receive ring, we can safely disable notifications. Signed-off-by: Mark McLoughlin [EMAIL PROTECTED] --- qemu/hw/virtio-net.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c

[PATCH 08/12] kvm: qemu: Don't require all drivers to use virtio_net_hdr

2008-08-11 Thread Mark McLoughlin
The virtio-net driver is the only one which wishes to deal with virtio_net_hdr headers, so add a using_vnet_hdr flag to allow it to indicate this. Preferably, we'd prefer to only enable IFF_VNET_HDR when we're using virtio-net, but qemu's various abstractions would make this very messy.

[PATCH 02/12] kvm: qemu: Remove virtio_net tx ring-full heuristic

2008-08-11 Thread Mark McLoughlin
virtio_net tries to guess when it has received a tx notification from the guest whether it indicates that the guest has no more room in the tx ring and it should immediately flush the queued buffers. The heuristic is based on the fact that there are 128 buffer entries in the ring and each packet

[PATCH 12/12] kvm: qemu: Drop the mutex while reading from tapfd

2008-08-11 Thread Mark McLoughlin
The idea here is that with GSO, packets are much larger and we can allow the vcpu threads to e.g. process irq acks during the window where we're reading these packets from the tapfd. One known issue with this is that it triggers a subtle SMP race in the kernel's posix-timers and signalfd code.

[PATCH 03/12] kvm: qemu: Add VIRTIO_F_NOTIFY_ON_EMPTY

2008-08-11 Thread Mark McLoughlin
Set the VIRTIO_F_NOTIFY_ON_EMPTY feature bit so the guest can rely on us notifying them when the queue is empty. Also, only notify when the available queue is empty *and* when we've finished with all the buffers we had detached. Right now, when the queue is empty, we notify the guest for every

[PATCH 09/12] kvm: qemu: Actually enable GSO support

2008-08-11 Thread Mark McLoughlin
Now that GSO support doesn't break e.g. e1000, we can enable it. Signed-off-by: Mark McLoughlin [EMAIL PROTECTED] --- qemu/vl.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/qemu/vl.c b/qemu/vl.c index 9bfe480..14a66e0 100644 --- a/qemu/vl.c +++

[PATCH 11/12] kvm: qemu: Increase size of virtio_net rings

2008-08-11 Thread Mark McLoughlin
GSO packets uses up a lot more buffer entries, so double the size of the rings Signed-off-by: Mark McLoughlin [EMAIL PROTECTED] --- qemu/hw/virtio-net.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index

[PATCH 10/12] kvm: qemu: Add a -net tap,fd=X,vnet_hdr=on option

2008-08-11 Thread Mark McLoughlin
Some management apps like libvirt creates a tap interface, adds it to a bridge and then passes the fd to qemu-kvm. Since we have no way of querying whether the IFF_VNET_HDR flag has been enabled on the interface, the app needs to tell us if has enabled it. Signed-off-by: Mark McLoughlin [EMAIL

[PATCH 05/12] kvm: qemu: Add support for partial csums and GSO

2008-08-11 Thread Mark McLoughlin
The tun/tap driver in 2.6.27 contains a new IFF_VNET_HDR flag which makes every packet read from or written to the tap fd be preceded by a virtio_net_hdr header. This allows us to pass larger packets and packets with partial checkums between the guest and the host, greatly increasing the

Re: [PATCH 0/12] virtio_net perf patches

2008-08-11 Thread Anthony Liguori
Mark McLoughlin wrote: Hi Avi, Here's the set of patches that I think make sense to apply. We probably need to disable checksum offload on the RX side until we figure out what to do about the broken dhclient. That's going to hit a lot of users otherwise. Regards, Anthony

Re: [PATCH 10/12] kvm: qemu: Add a -net tap,fd=X,vnet_hdr=on option

2008-08-11 Thread Anthony Liguori
Mark McLoughlin wrote: Some management apps like libvirt creates a tap interface, adds it to a bridge and then passes the fd to qemu-kvm. Since we have no way of querying whether the IFF_VNET_HDR flag has been enabled on the interface, the app needs to tell us if has enabled it. Sounds

[PATCH] Fix build issue for IA64

2008-08-11 Thread Zhang, Xiantao
From 40df689b23263ffe2f2efed9950700d42f985b29 Mon Sep 17 00:00:00 2001 From: Xiantao Zhang [EMAIL PROTECTED] Date: Tue, 12 Aug 2008 08:15:10 +0800 Subject: [PATCH] KVM:Userspace: Fix build issue for IA64. 1. Generating asm-offset.h @ build time with host kernel 2. Make -C user doesn't support for

RE: [PATCH 5/5] This patch extends the VT-d driver to support KVM

2008-08-11 Thread Han, Weidong
Ben-Ami Yassour wrote: On Thu, 2008-08-07 at 09:21 +0800, Han, Weidong wrote: Ben-Ami Yassour wrote: On Wed, 2008-08-06 at 17:12 +0800, Han, Weidong wrote: Ben-Ami Yassour wrote: On Wed, 2008-08-06 at 14:18 +0800, Han, Weidong wrote: Ben-Ami Yassour wrote: On Tue, 2008-08-05 at 22:46 +0800,