[PATCH] kvm: qemu: use proper open call for init file

2008-08-13 Thread Avi Kivity
From: Philippe Gerum <[EMAIL PROTECTED]> This patch fixes misspelled calls to qemu_fopen_file(). Signed-off-by: Philippe Gerum <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/qemu/hw/ds1225y.c b/qemu/hw/ds1225y.c index 3b91b4f..b1d0284 100644 --- a/qemu/hw/ds1225y.

[PATCH] kvm: configure: fix qemu options with multiple arguments

2008-08-13 Thread Avi Kivity
From: Avi Kivity <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/configure b/configure index 72337c9..3bb10ce 100755 --- a/configure +++ b/configure @@ -8,7 +8,7 @@ objcopy=objcopy want_module=1 qemu_cflags= qemu_ldflags= -qemu_opts= +qemu_opts=() cross_prefix=

[PATCH] KVM: set debug registers after "schedulable" section

2008-08-13 Thread Avi Kivity
From: Marcelo Tosatti <[EMAIL PROTECTED]> The vcpu thread can be preempted after the guest_debug_pre() callback, resulting in invalid debug registers on the new vcpu. Move it inside the non-preemptable section. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL

[PATCH] KVM: VMX: Clean up magic number 0x66 in init_rmode_tss

2008-08-13 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index c4510fe..337670b 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1732,7 +1732,8 @@ static int in

[PATCH] KVM: remove unused field from the assigned dev struct

2008-08-13 Thread Avi Kivity
From: Ben-Ami Yassour <[EMAIL PROTECTED]> Remove unused field: struct kvm_assigned_pci_dev assigned_dev from struct: struct kvm_assigned_dev_kernel Signed-off-by: Ben-Ami Yassour <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/include/asm-x86/kvm_host.h b/include/a

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

2008-08-13 Thread Avi Kivity
From: Mark McLoughlin <[EMAIL PROTECTED]> Hi Avi, Thanks for catching the build error in this one. Here's a new (yet uglier) version; the rest remain the same. Cheers, Mark. Subject: [PATCH 08/11] kvm: qemu: Don't require all drivers to use virtio_net_hdr The virtio-net driver is the only on

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

2008-08-13 Thread Avi Kivity
From: Mark McLoughlin <[EMAIL PROTECTED]> 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 k

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

2008-08-13 Thread Avi Kivity
From: Mark McLoughlin <[EMAIL PROTECTED]> 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

[PATCH] kvm: qemu: Actually enable GSO support

2008-08-13 Thread Avi Kivity
From: Mark McLoughlin <[EMAIL PROTECTED]> Now that GSO support doesn't break e.g. e1000, we can enable it. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/qemu/vl.c b/qemu/vl.c index 63e21f2..0ba8ace 100644 --- a/qemu/vl.c +++ b/qemu/

[PATCH] kvm: qemu: Increase size of virtio_net rings

2008-08-13 Thread Avi Kivity
From: Mark McLoughlin <[EMAIL PROTECTED]> GSO packets uses up a lot more buffer entries, so double the size of the rings Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index 2298316..61215b

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

2008-08-13 Thread Avi Kivity
From: Mark McLoughlin <[EMAIL PROTECTED]> Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> 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 { unsigne

[PATCH] kvm: qemu: Rename tap_readv() to tap_receive_iov()

2008-08-13 Thread Avi Kivity
From: Mark McLoughlin <[EMAIL PROTECTED]> Rename tap_readv() so as to match tap_receive() naming and also to allow a tap_writev() helper function to not seem so weird. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/qemu/vl.c b/qemu/v

[PATCH] kvm: qemu: Add VIRTIO_F_NOTIFY_ON_EMPTY

2008-08-13 Thread Avi Kivity
From: Mark McLoughlin <[EMAIL PROTECTED]> 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

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

2008-08-13 Thread Avi Kivity
From: Mark McLoughlin <[EMAIL PROTECTED]> Once we know we have buffers available on the receive ring, we can safely disable notifications. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c ind

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

2008-08-13 Thread Avi Kivity
From: Mark McLoughlin <[EMAIL PROTECTED]> 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 b

[PATCH] kvm: qemu: Fix virtio_net tx timer

2008-08-13 Thread Avi Kivity
From: Mark McLoughlin <[EMAIL PROTECTED]> 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, e

[PATCH] kvm: Fix kvm startup script

2008-08-13 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/kvm b/kvm index 2a7dc85..cb9ecf8 100755 --- a/kvm +++ b/kvm @@ -18,6 +18,14 @@ config = ShellConfigParser() config.read('config.mak') external_module =

[PATCH] kvm: qemu: Provide dummy cpu_vendor_string

2008-08-13 Thread Avi Kivity
From: Philippe Gerum <[EMAIL PROTECTED]> This patch defines cpu_vendor_string for linux-user builds. Signed-off-by: Philippe Gerum <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/qemu/linux-user/main.c b/qemu/linux-user/main.c index 023aac3..8387b16 100644 --- a/qe