Re: [PATCH] Enable dirty logging for all regions during migration

2009-05-13 Thread Avi Kivity
Glauber Costa wrote: From: Glauber de Oliveira Costa In current calculations, we are not activating dirty logging for all regions, leading migration to fail. This problem was already raised by Yaniv Kamay a while ago. The proposed solution at the time (not merged), was a calculation to convert

Re: [PATCH v3] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Michael S. Tsirkin
On Tue, May 12, 2009 at 04:07:15PM -0600, Alex Williamson wrote: > We're currently using a counter to track the most recent GSI we've > handed out. This quickly hits KVM_MAX_IRQ_ROUTES when using device > assignment with a driver that regularly toggles the MSI enable bit. BTW, dwhich driver does

Re: [PATCH v3] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Michael S. Tsirkin
On Tue, May 12, 2009 at 04:07:15PM -0600, Alex Williamson wrote: > We're currently using a counter to track the most recent GSI we've > handed out. This quickly hits KVM_MAX_IRQ_ROUTES when using device > assignment with a driver that regularly toggles the MSI enable bit. > This can mean only a fe

Re: Best choice for copy/clone/snapshot

2009-05-13 Thread Avi Kivity
Ross Boylan wrote: First, I have a feeling this might be a question I could ask on a qemu list. It is. Is there a way for me to tell which questions should go where? If the question is equally valid for qemu and qemu-kvm, then qemu-devel is the correct forum. Is it OK to ask here?

Re: [PATCH][KVM-AUTOTEST] Add custom install option for kvm_install

2009-05-13 Thread Avi Kivity
Michael Goldish wrote: That is, assuming you want to - install KVM from F10 branch - run all tests - install KVM from F11 branch - run all tests - install KVM from devel branch - run all tests If you meant something different please correct me. Note kvm is moving to split userspace/kernel p

Re: [PATCH RFC 0/2] qemu-kvm: MSI-X support

2009-05-13 Thread Avi Kivity
Michael S. Tsirkin wrote: It seems that if I just call apic_deliver_irq each time I want to send MSI, things will work. However, large part of the msix code is managing IRQs versus kernel, and I'm not sure it's a wise investment of effort to rip it all out. So IMHO, what's missing is API that ab

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-13 Thread Michael S. Tsirkin
On Wed, May 13, 2009 at 10:47:08AM +0930, Rusty Russell wrote: > On Wed, 13 May 2009 01:03:30 am Michael S. Tsirkin wrote: > > On Wed, May 13, 2009 at 12:00:02AM +0930, Rusty Russell wrote > > > and perhaps consider > > > varargs for the callbacks (or would that be too horrible at the > > > impleme

Re: Network I/O performance

2009-05-13 Thread Avi Kivity
Fischer, Anna wrote: I am running KVM with Fedora Core 8 on a 2.6.23 32-bit kernel. I use the tun/tap device model and the Linux bridge kernel module to connect my VM to the network. I have 2 10G Intel 82598 network devices (with the ixgbe driver) attached to my machine and I want to do packet

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-13 Thread Avi Kivity
Michael S. Tsirkin wrote: On Wed, May 13, 2009 at 10:47:08AM +0930, Rusty Russell wrote: On Wed, 13 May 2009 01:03:30 am Michael S. Tsirkin wrote: On Wed, May 13, 2009 at 12:00:02AM +0930, Rusty Russell wrote and perhaps consider varargs for the callbacks (or would that be too h

Re: [PATCH 0/2] Deal with shadow interrupts after emulated instructions

2009-05-13 Thread Avi Kivity
Glauber Costa wrote: Same story, more avi's comments merged. Applied, thanks. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org Mor

Re: [patch 0/3] locking fixes / cr3 validation v3

2009-05-13 Thread Avi Kivity
mtosa...@redhat.com wrote: Addressing comments. Applied all. But please fix you From: header. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vg

Re: [patch 1/1] kvm: expand on "help" info to specify kvm intel and amd module names

2009-05-13 Thread Avi Kivity
a...@linux-foundation.org wrote: From: "Robert P. J. Day" Signed-off-by: Robert P. J. Day Cc: Avi Kivity Signed-off-by: Andrew Morton Applied, thanks. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- To unsubscribe from this list: send the lin

Re: [PATCH 0/6] kvm-s390: collection of kvm-s390 fixes - v3

2009-05-13 Thread Avi Kivity
ehrha...@linux.vnet.ibm.com wrote: From: Christian Ehrhardt *updates in v3* - fix memory slot vs. run uses trylock to avoid a potential livelock - fix memory slot vs. run checks if it is the first and only memslot registered *updates in v2* - hrtimer wakeup use a more accurate calculation - un

Re: [PATCH 4/4] Userspace changes for KVM HPET (v3)

2009-05-13 Thread Avi Kivity
Beth Kon wrote: Beth Kon wrote: Avi Kivity wrote: Beth Kon wrote: Signed-off-by: Beth Kon diff --git a/hw/hpet.c b/hw/hpet.c index c7945ec..100abf5 100644 --- a/hw/hpet.c +++ b/hw/hpet.c @@ -30,6 +30,7 @@ #include "console.h" #include "qemu-timer.h" #include "hpet_emul.h" +#include "qemu

Re: [PATCH 4/4] Userspace changes for KVM HPET (v3)

2009-05-13 Thread Avi Kivity
Avi Kivity wrote: My assumption about hpet_load was that the correct pit state would be established via pit_load (since all saves/loads are done together). But when I wrote this, I was thinking only about the userspace pit (for qemu). I'm not sure how the "load" concept applies to kernel stat

[GIT PULL] KVM fixes for 2.6.30rc3

2009-05-13 Thread Avi Kivity
Linus, please pull repo and branch at git://git.kernel.org/pub/scm/virt/kvm/kvm.git kvm-updates/2.6.30 To receive the following KVM fixes. Interetingly, there is a replay of the port 80 debacle where writing to the BIOS debug port kills the machine; KVM allowed the guest to write to the port t

Re: [GIT PULL] KVM fixes for 2.6.30rc3

2009-05-13 Thread Avi Kivity
Avi Kivity wrote: Linus, please pull repo and branch at Typo in $subject, branch is against recent git. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majo

RE: Enable IRQ windows after exception injection if there are pending virq

2009-05-13 Thread Dong, Eddie
Gleb Natapov wrote: > On Tue, May 12, 2009 at 11:06:39PM +0800, Dong, Eddie wrote: >> >> I didn't take many test since our PTS system stop working now due to >> KVM userspace >> build changes. But since the logic is pretty simple, so I want to >> post here to see comments. Thx, eddie >> >> >>

Re: [PATCH -tip v5 1/7] x86: instruction decorder API

2009-05-13 Thread Gleb Natapov
On Fri, May 08, 2009 at 08:48:42PM -0400, Masami Hiramatsu wrote: > +++ b/arch/x86/scripts/gen-insn-attr-x86.awk > @@ -0,0 +1,314 @@ > +#!/bin/awk -f On some distributions (debian) it is /usr/bin/awk. -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm

[PATCH] kvm: user: include arch specific headers from $(KERNELDIR)

2009-05-13 Thread Mark McLoughlin
Currently we only include $(KERNELDIR)/include in CFLAGS, but we also have $(KERNELDIR)/arch/$(arch)/include or else we'll get mis-matched headers. Signed-off-by: Mark McLoughlin --- kvm/user/config-i386.mak |1 - kvm/user/config-ia64.mak |1 + kvm/user/config-powerpc.mak

[PATCH][Resend] Fix Warnining in arch/x86/kvm/vmx.c

2009-05-13 Thread Subrata Modak
Hi Avi/Yaniv, With gcc --version 4.4.1 20090429 (prerelease) I get the following warning: arch/x86/kvm/vmx.c: In function ‘vmx_intr_assist’: arch/x86/kvm/vmx.c:3233: warning: ‘max_irr’ may be used uninitialized in this function arch/x86/kvm/vmx.c:3233: note: ‘max_irr’ was declared he

Re: [PATCH -tip v5 1/7] x86: instruction decorder API

2009-05-13 Thread Przemysław Pawełczyk
On Wed, May 13, 2009 at 10:23, Gleb Natapov wrote: > On Fri, May 08, 2009 at 08:48:42PM -0400, Masami Hiramatsu wrote: >> +++ b/arch/x86/scripts/gen-insn-attr-x86.awk >> @@ -0,0 +1,314 @@ >> +#!/bin/awk -f > On some distributions (debian) it is /usr/bin/awk. True, but on most of them (all?) there

Re: [PATCH][Resend] Fix Warnining in arch/x86/kvm/vmx.c

2009-05-13 Thread Avi Kivity
Subrata Modak wrote: Hi Avi/Yaniv, With gcc --version 4.4.1 20090429 (prerelease) I get the following warning: arch/x86/kvm/vmx.c: In function ‘vmx_intr_assist’: arch/x86/kvm/vmx.c:3233: warning: ‘max_irr’ may be used uninitialized in this function arch/x86/kvm/vmx.c:3233: note: ‘max_irr’ was

Re: [PATCH -tip v5 1/7] x86: instruction decorder API

2009-05-13 Thread Gleb Natapov
On Wed, May 13, 2009 at 11:35:16AM +0200, Przemysssaw Paweeeczyk wrote: > On Wed, May 13, 2009 at 10:23, Gleb Natapov wrote: > > On Fri, May 08, 2009 at 08:48:42PM -0400, Masami Hiramatsu wrote: > >> +++ b/arch/x86/scripts/gen-insn-attr-x86.awk > >> @@ -0,0 +1,314 @@ > >> +#!/bin/awk -f > > On som

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Avi Kivity
Alex Williamson wrote: We're currently using a counter to track the most recent GSI we've handed out. This quickly hits KVM_MAX_IRQ_ROUTES when using device assignment with a driver that regularly toggles the MSI enable bit. This can mean only a few minutes of usable run time. Instead, track us

Re: [ANNOUNCE] qemu-kvm-0.10.4

2009-05-13 Thread Mark McLoughlin
On Tue, 2009-05-12 at 22:30 +0200, Farkas Levente wrote: > Avi Kivity wrote: > > qemu-kvm-0.10.4 is now available. This is the first release of the 0.10 > > stable branch of qemu-kvm. The qemu-kvm 0.10.4 includes all of the > > features and fixes of qemu-0.10.4, plus adaptations for improved kvm

Re: event injection MACROs

2009-05-13 Thread Avi Kivity
Dong, Eddie wrote: I noticed the MACRO for SVM vmcb->control.event_inj and VMX VM_EXIT_INTR_INFO are almost same, I have a need to query the event injection situation in common code so plan to expose this register read/write to x86.c. Should we define a new format for evtinj/VM_EXIT_INTR_INFO

Re: [ANNOUNCE] qemu-kvm-0.10.4

2009-05-13 Thread Farkas Levente
Mark McLoughlin wrote: > On Tue, 2009-05-12 at 22:30 +0200, Farkas Levente wrote: >> Avi Kivity wrote: >>> qemu-kvm-0.10.4 is now available. This is the first release of the 0.10 >>> stable branch of qemu-kvm. The qemu-kvm 0.10.4 includes all of the >>> features and fixes of qemu-0.10.4, plus ada

Re: Enable IRQ windows after exception injection if there are pending virq

2009-05-13 Thread Gleb Natapov
On Wed, May 13, 2009 at 03:45:37PM +0800, Dong, Eddie wrote: > Gleb Natapov wrote: > > On Tue, May 12, 2009 at 11:06:39PM +0800, Dong, Eddie wrote: > >> > >> I didn't take many test since our PTS system stop working now due to > >> KVM userspace > >> build changes. But since the logic is pretty s

Re: [RFC PATCH 0/3] generic hypercall support

2009-05-13 Thread Gregory Haskins
Anthony Liguori wrote: > Gregory Haskins wrote: >> >> So, yes, the delta from PIO to HC is 350ns. Yes, this is a ~1.4% >> improvement. So what? Its still an improvement. If that improvement >> were for free, would you object? And we all know that this change isn't >> "free" because we have to

[PATCH][KVM-AUTOTEST] TAP network support in kvm-autotest

2009-05-13 Thread Jason Wang
Hi All: This patch tries to add tap network support in kvm-autotest. Multiple nics connected to different bridges could be achieved through this script. Public bridge is important for testing real network traffic and migration. The patch gives each nic with randomly generated mac address. The ip

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-13 Thread Rusty Russell
On Wed, 13 May 2009 04:48:34 pm Michael S. Tsirkin wrote: > Let's just add a helper function for the single vq case? > > static inline struct virtqueue *virtio_find_vq(struct virtio_devide *vdev, > vq_callback_t *c, const char *n) virtio_find_single_vq(

Re: [PATCH 1/1] KVM: Fix potentially recursively get kvm lock

2009-05-13 Thread Gleb Natapov
On Tue, May 12, 2009 at 11:30:21AM -0300, Marcelo Tosatti wrote: > On Tue, May 12, 2009 at 10:13:36PM +0800, Yang, Sheng wrote: > > > > + mutex_unlock(&kvm->lock); > > > > > > assigned_dev list is protected by kvm->lock. So you could have another > > > ioctl adding to it at the same time you'

Re: [PATCH 01/10] Unprotect a page if #PF happens during NMI injection.

2009-05-13 Thread Avi Kivity
Gleb Natapov wrote: It is done for exception and interrupt already. Applied, thanks. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.or

Re: [PATCH v3] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Alex Williamson
On Wed, 2009-05-13 at 10:03 +0300, Michael S. Tsirkin wrote: > On Tue, May 12, 2009 at 04:07:15PM -0600, Alex Williamson wrote: > > We're currently using a counter to track the most recent GSI we've > > handed out. This quickly hits KVM_MAX_IRQ_ROUTES when using device > > assignment with a driver

Re: [PATCH v3] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Alex Williamson
On Wed, 2009-05-13 at 10:04 +0300, Michael S. Tsirkin wrote: > On Tue, May 12, 2009 at 04:07:15PM -0600, Alex Williamson wrote: > > @@ -286,6 +289,9 @@ kvm_context_t kvm_init(struct kvm_callbacks *callbacks, > > int fd; > > kvm_context_t kvm; > > int r; > > +#ifdef KVM_CAP_IRQ_ROUTING >

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Alex Williamson
On Wed, 2009-05-13 at 12:47 +0300, Avi Kivity wrote: > Alex Williamson wrote: > > We're currently using a counter to track the most recent GSI we've > > handed out. This quickly hits KVM_MAX_IRQ_ROUTES when using device > > assignment with a driver that regularly toggles the MSI enable bit. > > Th

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Avi Kivity
Alex Williamson wrote: On Wed, 2009-05-13 at 12:47 +0300, Avi Kivity wrote: Alex Williamson wrote: We're currently using a counter to track the most recent GSI we've handed out. This quickly hits KVM_MAX_IRQ_ROUTES when using device assignment with a driver that regularly toggles the M

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Alex Williamson
On Wed, 2009-05-13 at 15:35 +0300, Avi Kivity wrote: > Alex Williamson wrote: > > On Wed, 2009-05-13 at 12:47 +0300, Avi Kivity wrote: > > > >> Alex Williamson wrote: > >> > >>> We're currently using a counter to track the most recent GSI we've > >>> handed out. This quickly hits KVM_MAX_I

Re: virtio net regression

2009-05-13 Thread Antoine Martin
Re-sending as this does not seem to have made it to the list. Antoine Martin wrote: > Hi, > > Here is another one, any ideas? > These oopses do look quite deep. Is it normal to end up in tcp_send_ack > from pdflush?? > > Cheers > Antoine > > [929492.154634] pdflush: page allocation failure. ord

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Avi Kivity
Alex Williamson wrote: When you say "multiple times", it is several, or a lot more? Maybe it is NAPI? The system would run out of the ~1000 available GSIs in a minute or two with just an e1000e available to the guest. So that's something on the order of 10/s. This also causes a printk

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Alex Williamson
On Wed, 2009-05-13 at 16:00 +0300, Avi Kivity wrote: > Alex Williamson wrote: > >> > >> When you say "multiple times", it is several, or a lot more? > >> > >> Maybe it is NAPI? > >> > > > > The system would run out of the ~1000 available GSIs in a minute or two > > with just an e1000e availabl

Re: [PATCH 1/1] KVM: Fix potentially recursively get kvm lock

2009-05-13 Thread Marcelo Tosatti
On Wed, May 13, 2009 at 10:07:54AM +0800, Yang, Sheng wrote: > > KVM: workaround workqueue / deassign_host_irq deadlock > > > > I think I'm running into the following deadlock in the kvm kernel module > > when trying to use device assignment: > > > > CPU A CPU B > > kv

Re: [PATCH -tip v5 0/7] tracing: kprobe-based event tracer and x86 instruction decoder

2009-05-13 Thread Ingo Molnar
* Masami Hiramatsu wrote: > Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > > > >> Hi, > >> > >> Here are the patches of kprobe-based event tracer for x86, version > >> 5, which allows you to probe various kernel events through ftrace > >> interface. > >> > >> This version supports only x

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Michael S. Tsirkin
On Wed, May 13, 2009 at 07:11:16AM -0600, Alex Williamson wrote: > On Wed, 2009-05-13 at 16:00 +0300, Avi Kivity wrote: > > Alex Williamson wrote: > > >> > > >> When you say "multiple times", it is several, or a lot more? > > >> > > >> Maybe it is NAPI? > > >> > > > > > > The system would run

RE: Implement generic double fault generation mechanism

2009-05-13 Thread Dong, Eddie
> That is OK, You can send two patches. The first one will WARN_ON and > overwrite exception like the current code does. And the second one > will remove WARN_ON explaining that this case is actually possible to > trigger from a guest. > Sounds you don't like to provide this additional one, here i

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Alex Williamson
On Wed, 2009-05-13 at 16:55 +0300, Michael S. Tsirkin wrote: > On Wed, May 13, 2009 at 07:11:16AM -0600, Alex Williamson wrote: > > On Wed, 2009-05-13 at 16:00 +0300, Avi Kivity wrote: > > > Alex Williamson wrote: > > > >> > > > >> When you say "multiple times", it is several, or a lot more? > > >

RE: event injection MACROs

2009-05-13 Thread Dong, Eddie
Avi Kivity wrote: > Dong, Eddie wrote: >> I noticed the MACRO for SVM vmcb->control.event_inj and VMX >> VM_EXIT_INTR_INFO are almost same, I have a need to query the event >> injection situation in common code so plan to expose this register >> read/write to x86.c. Should we define a new format f

Re: [PATCH v3] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Michael S. Tsirkin
On Wed, May 13, 2009 at 06:19:35AM -0600, Alex Williamson wrote: > On Wed, 2009-05-13 at 10:04 +0300, Michael S. Tsirkin wrote: > > On Tue, May 12, 2009 at 04:07:15PM -0600, Alex Williamson wrote: > > > @@ -286,6 +289,9 @@ kvm_context_t kvm_init(struct kvm_callbacks > > > *callbacks, > > > int f

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Michael S. Tsirkin
On Wed, May 13, 2009 at 08:15:29AM -0600, Alex Williamson wrote: > On Wed, 2009-05-13 at 16:55 +0300, Michael S. Tsirkin wrote: > > On Wed, May 13, 2009 at 07:11:16AM -0600, Alex Williamson wrote: > > > On Wed, 2009-05-13 at 16:00 +0300, Avi Kivity wrote: > > > > Alex Williamson wrote: > > > > >> >

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Michael S. Tsirkin
On Tue, May 12, 2009 at 10:41:29PM -0600, Alex Williamson wrote: > + gsi_count = kvm_get_gsi_count(kvm); > + /* Round up so we can search ints using ffs */ > + gsi_bytes = ((gsi_count + 31) / 32) * 4; > + kvm->used_gsi_bitmap = malloc(gsi_bytes); What happens on error in kvm_get_gs

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Alex Williamson
On Wed, 2009-05-13 at 08:15 -0600, Alex Williamson wrote: > On Wed, 2009-05-13 at 16:55 +0300, Michael S. Tsirkin wrote: > > On Wed, May 13, 2009 at 07:11:16AM -0600, Alex Williamson wrote: > > > On Wed, 2009-05-13 at 16:00 +0300, Avi Kivity wrote: > > > > Alex Williamson wrote: > > > > >> > > > >

Re: [PATCH -tip v5 1/7] x86: instruction decorder API

2009-05-13 Thread Masami Hiramatsu
Gleb Natapov wrote: > On Wed, May 13, 2009 at 11:35:16AM +0200, Przemysssaw Paweeeczyk wrote: >> On Wed, May 13, 2009 at 10:23, Gleb Natapov wrote: >>> On Fri, May 08, 2009 at 08:48:42PM -0400, Masami Hiramatsu wrote: +++ b/arch/x86/scripts/gen-insn-attr-x86.awk @@ -0,0 +1,314 @@ +#

Re: [RFC PATCH 0/3] generic hypercall support

2009-05-13 Thread Gregory Haskins
Anthony Liguori wrote: > Gregory Haskins wrote: >> I specifically generalized my statement above because #1 I assume >> everyone here is smart enough to convert that nice round unit into the >> relevant figure. And #2, there are multiple potential latency sources >> at play which we need to factor

[PATCH v5] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Alex Williamson
We're currently using a counter to track the most recent GSI we've handed out. This quickly hits KVM_MAX_IRQ_ROUTES when using device assignment with a driver that regularly toggles the MSI enable bit. This can mean only a few minutes of usable run time. Instead, track used GSIs in a bitmap. Sig

Re: [PATCH -tip v5 1/7] x86: instruction decorder API

2009-05-13 Thread Gleb Natapov
On Wed, May 13, 2009 at 10:35:55AM -0400, Masami Hiramatsu wrote: > Gleb Natapov wrote: > > On Wed, May 13, 2009 at 11:35:16AM +0200, Przemysssaw Paweeeczyk wrote: > >> On Wed, May 13, 2009 at 10:23, Gleb Natapov wrote: > >>> On Fri, May 08, 2009 at 08:48:42PM -0400, Masami Hiramatsu wrote: >

Re: Best choice for copy/clone/snapshot

2009-05-13 Thread Ross Boylan
Thanks for all the info. I have one follow up. On Wed, 2009-05-13 at 10:07 +0300, Avi Kivity wrote: > > > As I install software onto a system I want to preserve its > state--just > > the disk state---at various points so I can go back. What is the > best > > way to do this? > > > > LVM snaps

RE: Network I/O performance

2009-05-13 Thread Fischer, Anna
> Subject: Re: Network I/O performance > > Fischer, Anna wrote: > > I am running KVM with Fedora Core 8 on a 2.6.23 32-bit kernel. I use > the tun/tap device model and the Linux bridge kernel module to connect > my VM to the network. I have 2 10G Intel 82598 network devices (with > the ixgbe drive

Re: [PATCH v5] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Michael S. Tsirkin
On Wed, May 13, 2009 at 09:13:38AM -0600, Alex Williamson wrote: > @@ -323,6 +326,28 @@ kvm_context_t kvm_init(struct kvm_callbacks *callbacks, > kvm->no_irqchip_creation = 0; > kvm->no_pit_creation = 0; > > + gsi_count = kvm_get_gsi_count(kvm); > + if (gsi_count > 0) { > +

Re: [RFC + PATCHES] Work to get KVM autotest upstream

2009-05-13 Thread Michael Goldish
The patches look good, but I haven't tested them yet to make sure they leave everything at a functional state (will test them and let you know). I have a somewhat related question: how is KVM-Autotest development going to proceed after the upstream merge? Currently I have comfortable access to our

Re: [PATCH v5] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Alex Williamson
On Wed, 2009-05-13 at 19:05 +0300, Michael S. Tsirkin wrote: > On Wed, May 13, 2009 at 09:13:38AM -0600, Alex Williamson wrote: > > @@ -323,6 +326,28 @@ kvm_context_t kvm_init(struct kvm_callbacks *callbacks, > > kvm->no_irqchip_creation = 0; > > kvm->no_pit_creation = 0; > > > > + gsi_

[PATCH 0/2] Add serial number support for virtio_blk, V2

2009-05-13 Thread john cooper
[Resend of earlier patch: 1/2 rebased to qemu-kvm, 2/2 minor tweak] This patch allows passing of a virtio_blk drive serial number from qemu into a guest's virtio_blk driver, and provides a means to access the serial number from a guest's userspace. Equivalent functionality currently exists for I

Re: [RFC + PATCHES] Work to get KVM autotest upstream

2009-05-13 Thread Lucas Meneghel Rodrigues
On Wed, 2009-05-13 at 12:23 -0400, Michael Goldish wrote: > The patches look good, but I haven't tested them yet to make sure > they leave everything at a functional state (will test them and let > you know). Thanks Michael! I will start to give more thorough test on this today, since we finally g

[PATCH 1/2] Add serial number support for virtio_blk, V2

2009-05-13 Thread john cooper
-- john.coo...@redhat.com diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index dad4ef0..90825a8 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -25,6 +25,7 @@ typedef struct VirtIOBlock BlockDriverState *bs; VirtQueue *vq; void *rq; +char serial_str[BLOCK_SERIAL_STRLEN +

[PATCH 2/2] Add serial number support for virtio_blk, V2

2009-05-13 Thread john cooper
-- john.coo...@redhat.com drivers/block/virtio_blk.c | 35 --- include/linux/virtio_blk.h | 10 ++ 2 files changed, 42 insertions(+), 3 deletions(-) = --- a/drivers/block/virtio_blk.c +++

Re: Best choice for copy/clone/snapshot

2009-05-13 Thread Charles Duffy
Ross Boylan wrote: Or do you mean I should back each virtual disk with an LVM volume? Yes, this option is what was meant. That does seem cleaner; I've just been following the docs and they use regular files. They say I can't just use a raw partition, but maybe kvm-img -f qcow2 /dev/MyVolumeGr

RE: Problem doing pci passthrough of the network card without VT-d

2009-05-13 Thread Fischer, Anna
Are you expecting this to work using the 1:1 mapping for direct device assignment? I use a similar setup (e.g. dma=none and no VT-d) but a different NIC (Intel 82598 10G) and a different driver (ixgbe). I see the same messages, but also don't get the device to work in the guest (while it does wo

[PATCH v6] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Alex Williamson
We're currently using a counter to track the most recent GSI we've handed out. This quickly hits KVM_MAX_IRQ_ROUTES when using device assignment with a driver that regularly toggles the MSI enable bit. This can mean only a few minutes of usable run time. Instead, track used GSIs in a bitmap. Sig

RE: Problem doing pci passthrough of the network card without VT-d

2009-05-13 Thread Passera, Pablo R
Hi Anna, >Are you expecting this to work using the 1:1 mapping for direct device >assignment? Actually, I want to use the current qemu implementation for this. AFAIK from the code seems that qemu mmaps the device memory into the qemu pci subsystem memory space. Is this correct? >In fact I don'

kvm-autotest: The automation plans?

2009-05-13 Thread sudhir kumar
Hi Uri/Lucas, Do you have any plans for enhancing kvm-autotest? I was looking mainly on the following 2 aspects: (1). we have standalone migration only. Is there any plans of enhancing kvm-autotest so that we can trigger migration while a workload is running? Something like this: Start a workload

Re: kvm-autotest: The automation plans?

2009-05-13 Thread Michael Goldish
- "sudhir kumar" wrote: > Hi Uri/Lucas, > > Do you have any plans for enhancing kvm-autotest? > I was looking mainly on the following 2 aspects: > > (1). > we have standalone migration only. Is there any plans of enhancing > kvm-autotest so that we can trigger migration while a workload is

Re: changing guest CD

2009-05-13 Thread Stuart Jansen
On Mon, 2009-05-11 at 17:13 -0500, Anthony Liguori wrote: > Stuart Jansen wrote: > > Does KVM support changing the CD in a running guest's disc drive? I've > > tried to do it using the qemu monitor, but so far haven't been able to. > > I've seen rumor and innuendo that KVM can't change the disc in

Re: [KVM-AUTOTEST][PATCH] timedrift support

2009-05-13 Thread Lucas Meneghel Rodrigues
On Tue, 2009-05-12 at 21:07 +0800, Bear Yang wrote: > Sorry forgot to attach my new patch. > Bear Yang wrote: > > Hi Lucas: > > First, I want to say really thanks for your kindly,carefully words and > > suggestions. now, I modified my scripts follow your opinions. > > 1. Add the genload to timedr

Re: kvm-autotest: The automation plans?

2009-05-13 Thread Lucas Meneghel Rodrigues
On Wed, 2009-05-13 at 23:21 +0530, sudhir kumar wrote: > Hi Uri/Lucas, > > Do you have any plans for enhancing kvm-autotest? > I was looking mainly on the following 2 aspects: Hi Sudhir, about the two questions you've made, Michael has answered them a lot better than I possibly could. So please k

Re: [PATCH v6] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Michael S. Tsirkin
On Wed, May 13, 2009 at 11:28:16AM -0600, Alex Williamson wrote: > We're currently using a counter to track the most recent GSI we've > handed out. This quickly hits KVM_MAX_IRQ_ROUTES when using device > assignment with a driver that regularly toggles the MSI enable bit. > This can mean only a fe

[PATCHv5 0/3] virtio: MSI-X support

2009-05-13 Thread Michael S. Tsirkin
Here's the latest draft of virtio patches. This is on top of Rusty's recent virtqueue list + name patch. Michael S. Tsirkin (3): virtio: find_vqs/del_vqs virtio operations virtio_pci: split up vp_interrupt virtio_pci: optional MSI-X support drivers/block/virtio_blk.c |6 +- dr

[PATCHv5 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-13 Thread Michael S. Tsirkin
This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations, and updates all drivers. This is needed for MSI support, because MSI needs to know the total number of vectors upfront. Signed-off-by: Michael S. Tsirkin --- drivers/block/virtio_blk.c |6 ++-- drivers/char/hw_ran

[PATCHv5 2/3] virtio_pci: split up vp_interrupt

2009-05-13 Thread Michael S. Tsirkin
This reorganizes virtio-pci code in vp_interrupt slightly, so that it's easier to add per-vq MSI support on top. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_pci.c | 53 +++--- 1 files changed, 34 insertions(+), 19 deletions(-) diff --git a/d

[PATCHv5 3/3] virtio_pci: optional MSI-X support

2009-05-13 Thread Michael S. Tsirkin
This implements optional MSI-X support in virtio_pci. MSI-X is used whenever the host supports at least 2 MSI-X vectors: 1 for configuration changes and 1 for virtqueues. Per-virtqueue vectors are allocated if enough vectors available. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_

kvm-85 sometimes not starting on 2.6.30-rc5

2009-05-13 Thread Nikola Ciprich
Hi, sometimes trying to start kvm on 2.6.30-rc5 (with kvm module v85, userspace v85) fails with: kvm_create_vm: Interrupted system call Could not create KVM context and following backtrace appears in dmesg: [ 309.546138] BUG: MAX_LOCK_DEPTH too low! [ 309.549964] turning off the locking correct

[PATCH] don't use a 32-bit bit type as offset argument.

2009-05-13 Thread Glauber Costa
In the call path of kvm_get_dirty_pages_log_range(), its caller kvm_get_dirty_bitmap_cb() passes the target_phys_addr_t both as start_addr and the offset. So, using int will make dirty tracking over 4G fail completely. Of course we should be using qemu types in here, so please don't get me started

Re: [RFC + PATCHES] Work to get KVM autotest upstream

2009-05-13 Thread Michael Goldish
- "Lucas Meneghel Rodrigues" wrote: > On Wed, 2009-05-13 at 12:23 -0400, Michael Goldish wrote: > > The patches look good, but I haven't tested them yet to make sure > > they leave everything at a functional state (will test them and let > > you know). > > Thanks Michael! I will start to gi

Re: [RFC + PATCHES] Work to get KVM autotest upstream

2009-05-13 Thread Ryan Harper
* Michael Goldish [2009-05-13 14:54]: > > - "Lucas Meneghel Rodrigues" wrote: > > > On Wed, 2009-05-13 at 12:23 -0400, Michael Goldish wrote: > > > The patches look good, but I haven't tested them yet to make sure > > > they leave everything at a functional state (will test them and let > >

Re: XP smp using a lot of CPU

2009-05-13 Thread Erik Rull
Hi all, very very interesting. I have a similar problem but the other way round. If my XP runs up tp 100% CPU usage "top" on the linux host reports "only" 33% cpu usage. I would expect around 50% because I only provide one core for the guest. I already increased the process priority of qemu an

Re: [PATCH] don't use a 32-bit bit type as offset argument.

2009-05-13 Thread Ryan Harper
* Glauber Costa [2009-05-13 14:22]: > In the call path of kvm_get_dirty_pages_log_range(), > its caller kvm_get_dirty_bitmap_cb() passes the > target_phys_addr_t both as start_addr and the offset. > So, using int will make dirty tracking over 4G fail > completely. Does this patch fix someting lik

Re: [PATCH] don't use a 32-bit bit type as offset argument.

2009-05-13 Thread Glauber Costa
On Wed, May 13, 2009 at 5:23 PM, Ryan Harper wrote: > * Glauber Costa [2009-05-13 14:22]: >> In the call path of kvm_get_dirty_pages_log_range(), >> its caller kvm_get_dirty_bitmap_cb() passes the >> target_phys_addr_t both as start_addr and the offset. >> So, using int will make dirty tracking o

Re: [PATCH] kvm: user: include arch specific headers from $(KERNELDIR)

2009-05-13 Thread Arnd Bergmann
On Wednesday 13 May 2009 08:32:21 Mark McLoughlin wrote: > Currently we only include $(KERNELDIR)/include in CFLAGS, > but we also have $(KERNELDIR)/arch/$(arch)/include or else > we'll get mis-matched headers. > I think this is fundamentally wrong. User files should never directly access kernel

Re: [PATCH] don't use a 32-bit bit type as offset argument.

2009-05-13 Thread Anthony Liguori
Glauber Costa wrote: In the call path of kvm_get_dirty_pages_log_range(), its caller kvm_get_dirty_bitmap_cb() passes the target_phys_addr_t both as start_addr and the offset. So, using int will make dirty tracking over 4G fail completely. Of course we should be using qemu types in here, so plea

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-13 Thread Alex Williamson
On Wed, 2009-05-13 at 08:33 -0600, Alex Williamson wrote: > On Wed, 2009-05-13 at 08:15 -0600, Alex Williamson wrote: > > On Wed, 2009-05-13 at 16:55 +0300, Michael S. Tsirkin wrote: > > > Very surprising: I haven't seen any driver disable MSI expect on device > > > destructor path. Is this a linux

Re: [PATCH 5/5] add ksm kernel shared memory driver.

2009-05-13 Thread Andrew Morton
On Mon, 20 Apr 2009 04:36:06 +0300 Izik Eidus wrote: > Ksm is driver that allow merging identical pages between one or more > applications in way unvisible to the application that use it. > Pages that are merged are marked as readonly and are COWed when any > application try to change them. > >

Re: [PATCH 5/5] add ksm kernel shared memory driver.

2009-05-13 Thread Chris Wright
* Andrew Morton (a...@linux-foundation.org) wrote: > Breaks ppc64 allmodcofnig because that architecture doesn't export its > copy_user_page() to modules. Things like this and updating to use madvise() I think all point towards s/tristate/bool/. I don't think CONFIG_KSM=M has huge benefit. thank

Re: [RFC + PATCHES] Work to get KVM autotest upstream

2009-05-13 Thread Glauber Costa
On Wed, May 13, 2009 at 5:21 PM, Ryan Harper wrote: > * Michael Goldish [2009-05-13 14:54]: >> >> - "Lucas Meneghel Rodrigues" wrote: >> >> > On Wed, 2009-05-13 at 12:23 -0400, Michael Goldish wrote: >> > > The patches look good, but I haven't tested them yet to make sure >> > > they leave e

Re: [PATCH 5/5] add ksm kernel shared memory driver.

2009-05-13 Thread Anthony Liguori
Chris Wright wrote: * Andrew Morton (a...@linux-foundation.org) wrote: Breaks ppc64 allmodcofnig because that architecture doesn't export its copy_user_page() to modules. Things like this and updating to use madvise() I think all point towards s/tristate/bool/. I don't think CONFIG_KS

Re: [PATCH 5/5] add ksm kernel shared memory driver.

2009-05-13 Thread Izik Eidus
Anthony Liguori wrote: Chris Wright wrote: * Andrew Morton (a...@linux-foundation.org) wrote: Breaks ppc64 allmodcofnig because that architecture doesn't export its copy_user_page() to modules. Things like this and updating to use madvise() I think all point towards s/tristate/bool/.

Re: [RFC + PATCHES] Work to get KVM autotest upstream

2009-05-13 Thread Anthony Liguori
Glauber Costa wrote: On Wed, May 13, 2009 at 5:21 PM, Ryan Harper wrote: I'd definitely like to see patches to the list before committing; we do the same for kvm, qemu etc, not sure why kvm-autotest should be any different. On the other hand, it's not currently being done that way and I'm n

Re: [PATCH 5/5] add ksm kernel shared memory driver.

2009-05-13 Thread Izik Eidus
Andrew Morton wrote: On Mon, 20 Apr 2009 04:36:06 +0300 Izik Eidus wrote: Ksm is driver that allow merging identical pages between one or more applications in way unvisible to the application that use it. Pages that are merged are marked as readonly and are COWed when any application try to

[PATCH] bios: Fix MADT corruption and RSDT size when using -acpitable

2009-05-13 Thread Vincent Minet
External ACPI tables are counted twice for the RSDT size and the load address for the first external table is in the MADT (interrupt override entries are overwritten). Signed-off-by: Vincent Minet --- kvm/bios/rombios32.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a

Re: [PATCH] bios: Fix MADT corruption and RSDT size when using -acpitable

2009-05-13 Thread Anthony Liguori
Vincent Minet wrote: External ACPI tables are counted twice for the RSDT size and the load address for the first external table is in the MADT (interrupt override entries are overwritten). Signed-off-by: Vincent Minet Beth, I think you had a patch attempting to address the same issue. It

Re: [RFC + PATCHES] Work to get KVM autotest upstream

2009-05-13 Thread Glauber Costa
On Wed, May 13, 2009 at 9:19 PM, Anthony Liguori wrote: > Glauber Costa wrote: >> >> On Wed, May 13, 2009 at 5:21 PM, Ryan Harper wrote: >> >>> >>> I'd definitely like to see patches to the list before committing; we do >>> the same for kvm, qemu etc, not sure why kvm-autotest should be any >>> d

Re: [PATCH 5/5] add ksm kernel shared memory driver.

2009-05-13 Thread Tony Breeds
On Thu, May 14, 2009 at 03:15:05AM +0300, Izik Eidus wrote: > Hi > > There is some way (script) that i can run that will allow compile this > code for every possible arch? Segher Boessenkool has a tool for builing cross toolchains and the kernel at git://git.infradead.org/users/segher/buildall.

  1   2   >