Re: 64bit guest thinks it is 32bit in kvm-86 - Intel only

2009-05-25 Thread Mark McLoughlin
On Sun, 2009-05-24 at 19:45 -0700, Josh Wilsdon wrote: > the kernel refuses to boot with the error message: > > "This kernel requires an x86-64 CPU, but only detected an i686 CPU. > Unable to boot - please use a kernel appropriate for your CPU." This should fix it: http://git.kernel.

Re: Add qemu_send_raw() to vlan.

2009-05-26 Thread Mark McLoughlin
On Tue, 2009-05-26 at 13:11 +0300, Avi Kivity wrote: > Gleb Natapov wrote: > > On Tue, May 26, 2009 at 01:05:35PM +0300, Avi Kivity wrote: > > > >> Gleb Natapov wrote: > >> > >>> It gets packet without virtio header and adds it if needed. Allows to > >>> inject packets to vlan from outside

Re: Add qemu_send_raw() to vlan.

2009-05-26 Thread Mark McLoughlin
On Tue, 2009-05-26 at 13:03 +0300, Gleb Natapov wrote: > It gets packet without virtio header and adds it if needed. Allows to > inject packets to vlan from outside. To send gracious arp for instance. Acked-by: Mark McLoughlin This isn't ideal, but neither is the current VNET_HDR s

Re: [KVM PATCH v4 3/3] kvm: add iosignalfd support

2009-05-27 Thread Mark McLoughlin
On Wed, 2009-05-27 at 15:11 +0300, Avi Kivity wrote: > Multiple cookies on the same address are required by virtio. You can't > mux since the data doesn't go anywhere. > > Virtio can survive by checking all rings on a notify, and we can later > add a mechanism that has a distinct address for e

Re: [KVM PATCH v4 3/3] kvm: add iosignalfd support

2009-05-27 Thread Mark McLoughlin
On Wed, 2009-05-27 at 13:40 -0400, Gregory Haskins wrote: > Mark McLoughlin wrote: > > On Wed, 2009-05-27 at 15:11 +0300, Avi Kivity wrote: > > > > > >> Multiple cookies on the same address are required by virtio. You can't > >> mux since the da

Re: [KVM PATCH v4 3/3] kvm: add iosignalfd support

2009-05-28 Thread Mark McLoughlin
On Wed, 2009-05-27 at 16:45 -0400, Gregory Haskins wrote: > Mark McLoughlin wrote: > > The virtio ABI is fixed, so we couldn't e.g. have the guest use a cookie > > to identify a queue - it's just going to continue using a per-device > > queue number. > > Act

Re: KVM-86 not exposing 64 bits CPU anymore, NICE

2009-06-04 Thread Mark McLoughlin
On Thu, 2009-06-04 at 09:20 +0200, Gilles PIETRI wrote: > I'm quite pissed off. I just upgraded to kvm-86 on a host that has > worked nicely on kvm-78 for quite some time. But since I was fearing the > qcow2 corruption issues, I wanted to upgrade kvm-86. After testing the > performance, I decid

Re: [KVM PATCH v4 3/3] kvm: add iosignalfd support

2009-06-04 Thread Mark McLoughlin
Hi Greg, On Wed, 2009-06-03 at 18:04 -0400, Gregory Haskins wrote: > Hi Mark, > So with the v5 release of iosignalfd, we now have the notion of a > "trigger", the API of which is as follows: > > --- > /*! > * \brief Assign an eventfd to an IO port (PIO or MMIO) > * > * As

Re: Network throughput limits for local VM <-> VM communication

2009-06-09 Thread Mark McLoughlin
On Tue, 2009-06-09 at 11:06 +, Fischer, Anna wrote: > I am testing network throughput between two guests residing on the > same physical machine. I use a bridge to pass packets between those > guests and the virtio NIC model. I am wondering why the throughput > only goes up to about 970Mbps. S

[GIT PULL] Merge latest qemu.git

2009-06-11 Thread Mark McLoughlin
nitor: Remove unused variable monitor: Introduce get_command_name() Fix "defined but not used" warning Mark McLoughlin (22): Revert "Fix output of uninitialized strings" net: fix error reporting for some net parameter checks net: factor tap_read_packet()

Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-12 Thread Mark McLoughlin
On Wed, 2009-06-10 at 20:27 +0100, Jamie Lokier wrote: > Michael S. Tsirkin wrote: > > > I think the right long term answer to all this is a way to get QEMU to > > > dump it's current machine configuration in glorious detail as a file > > > which can be reloaded as a machine configuration. > > > >

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-12 Thread Mark McLoughlin
On Fri, 2009-06-12 at 16:59 +0300, Michael S. Tsirkin wrote: > On Fri, Jun 12, 2009 at 09:43:29AM +0100, Mark McLoughlin wrote: > > = Solution - Separate configuration from compat hints = > > > > As I suggested before: > > > > - Allow the VM manager to du

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-12 Thread Mark McLoughlin
On Fri, 2009-06-12 at 09:51 -0500, Anthony Liguori wrote: > Mark McLoughlin wrote: > > On Wed, 2009-06-10 at 20:27 +0100, Jamie Lokier wrote: > > > >> Michael S. Tsirkin wrote: > >> > >>>> I think the right long term answer to all this

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-12 Thread Mark McLoughlin
On Fri, 2009-06-12 at 09:55 -0500, Anthony Liguori wrote: > Mark McLoughlin wrote: > > On Wed, 2009-06-10 at 20:27 +0100, Jamie Lokier wrote: > > > > = Solution - Separate configuration from compat hints = > > > > As I suggested before: > > > >

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-12 Thread Mark McLoughlin
On Fri, 2009-06-12 at 11:11 -0500, Anthony Liguori wrote: > Mark McLoughlin wrote: > > On Fri, 2009-06-12 at 09:51 -0500, Anthony Liguori wrote: > > > >> Mark McLoughlin wrote: > >> > >>> On Wed, 2009-06-10 at 20:27 +0100, Jamie Lokier wrote: &g

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-12 Thread Mark McLoughlin
On Fri, 2009-06-12 at 11:12 -0500, Anthony Liguori wrote: > Mark McLoughlin wrote: > > On Fri, 2009-06-12 at 09:55 -0500, Anthony Liguori wrote: > > > >> Mark McLoughlin wrote: > >> > >>> On Wed, 2009-06-10 at 20:27 +0100, Jamie Lokie

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-12 Thread Mark McLoughlin
On Fri, 2009-06-12 at 12:00 -0500, Anthony Liguori wrote: > Mark McLoughlin wrote: > > So, when libvirt creates a guest for the first time, it makes a copy of > > the device tree and continues to use that even if qemu is upgraded. > > That's enough to ensure compat is

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-12 Thread Mark McLoughlin
On Fri, 2009-06-12 at 20:44 +0300, Blue Swirl wrote: > If the device has different behavior or different properties from > guest perspective compared to the old device, it should get a new > device type so that you could specify in the device tree either the > old device or the new one. Yes, that

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Mark McLoughlin
On Sun, 2009-06-14 at 12:34 +0300, Michael S. Tsirkin wrote: > On Fri, Jun 12, 2009 at 04:53:27PM +0100, Mark McLoughlin wrote: > > The other obvious piece to add to it would be PCI addresses, so that > > even if you remove a device, the addresses assigned to existing devices &

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Mark McLoughlin
On Sun, 2009-06-14 at 12:50 +0300, Michael S. Tsirkin wrote: > On Fri, Jun 12, 2009 at 05:48:23PM +0100, Mark McLoughlin wrote: > > However, in order to retain compat for that SCSI device (e.g. ensuring > > the PCI address doesn't change as other devices are added an removed

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Mark McLoughlin
On Sun, 2009-06-14 at 10:58 +0300, Avi Kivity wrote: > Mark McLoughlin wrote: > > > > >> I think the point is that you don't need version numbers if you have a > >> proper device tree. > >> > > > > How do you add a new attribute

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Mark McLoughlin
On Mon, 2009-06-15 at 07:48 -0500, Anthony Liguori wrote: > Avi Kivity wrote: > > On 06/15/2009 12:09 PM, Mark McLoughlin wrote: > >>>>> I think the point is that you don't need version numbers if you > >>>>> have a > >>>>> prope

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Mark McLoughlin
On Mon, 2009-06-15 at 18:12 +0300, Dor Laor wrote: > > It doesn't want to. As Mark said, libvirt just wants to be able to ensure > > a stable guest ABI, of which stable PCI addresses is one aspect. This does > > not imply libvirt wants to allocate the PCI addresses, just that it wants > > a way to

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Mark McLoughlin
On Mon, 2009-06-15 at 18:05 +0300, Avi Kivity wrote: > On 06/15/2009 05:24 PM, Anthony Liguori wrote: > > Dor Laor wrote: > >> Libvirt does not support r2d. I hope it won't start to support it. > > > > It supports mips, sparc, and ppc machines now. I don't see why it > > wouldn't support r2d. Fo

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-16 Thread Mark McLoughlin
On Mon, 2009-06-15 at 13:12 -0500, Anthony Liguori wrote: > Mark McLoughlin wrote: > > So long as the restrictions would be known to the management app via > > some "what slots are available" mechanism in qemu, that sounds fine. > > > > I'm not sure a

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-16 Thread Mark McLoughlin
On Tue, 2009-06-16 at 15:28 +0300, Avi Kivity wrote: > On 06/16/2009 03:14 PM, Mark McLoughlin wrote: > > On Mon, 2009-06-15 at 13:12 -0500, Anthony Liguori wrote: > > > >> Mark McLoughlin wrote: > >> > >>> So long as the restrictions would

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-17 Thread Mark McLoughlin
On Tue, 2009-06-16 at 19:44 +0100, Jamie Lokier wrote: > Mark McLoughlin wrote: > > > Worst case we hardcode those numbers (gasp, faint). > > > > Maybe we can just add the open slots to the -help output. That'd be nice > > and clean. I was being sarcastic

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-17 Thread Mark McLoughlin
On Wed, 2009-06-17 at 12:03 +0300, Avi Kivity wrote: > On 06/17/2009 11:33 AM, Mark McLoughlin wrote: > >> I particularly don't like the idea of arcane machine-dependent slot > >> allocation knowledge living in libvirt, because it needs to be in Qemu > >> anyway

Re: a few words about drive/pci add/remove

2009-06-17 Thread Mark McLoughlin
On Wed, 2009-06-17 at 17:44 +0400, Michael Tokarev wrote: > WARNING: at drivers/base/core.c:122 device_release+0x5f/0x70() > Device 'virtio8' does not have a release() function, it is broken and > must be fixed. This should be fixed in 2.6.29 Cheers, Mark. -- To unsubscribe from this list: send

[PATCH] Fix pcspk build with kvm disabled

2009-06-29 Thread Mark McLoughlin
function ‘kvm_get_pit_ch2’ hw/pcspk.c:185: error: too many arguments to function ‘kvm_set_pit_ch2’ hw/pcspk.c:171: warning: unused variable ‘inkernel_state’ Signed-off-by: Mark McLoughlin Cc: Jan Kiszka --- hw/pcspk.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a

Re: slow guest performance with build load, looking for ideas

2009-07-03 Thread Mark McLoughlin
On Thu, 2009-07-02 at 12:41 +0300, Avi Kivity wrote: > On 07/02/2009 08:48 AM, Avi Kivity wrote: > >> HOST time (make -j12&& make -j12 modules) with no guest running > >> > >> real6m50.936s > >> user29m12.051s > >> sys5m

[PATCH] net: re-instate some lost vnet_hdr code

2009-07-08 Thread Mark McLoughlin
/?func=detail&atid=893831&aid=2817367&group_id=180599 Network doesn't work anymore switching from kvm-86 to kvm-87 Signed-off-by: Mark McLoughlin --- net.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/net.c b/net.c index ac06ea1..19e

Re: [Qemu-devel] Planning for the 0.11.0 release

2009-07-09 Thread Mark McLoughlin
Hi Anthony, On Mon, 2009-06-22 at 18:57 -0500, Anthony Liguori wrote: > Hi, > > It's getting to be about the time to start thinking about the 0.11.0 > release. 0.10.0 was released on March 2nd so following with the 6 month > release cycle, that would put 0.11.0 at September 2nd. > > Based on

Re: Fix migration issue when the destination is loaded

2009-07-16 Thread Mark McLoughlin
Hi Dor, On Wed, 2009-07-15 at 18:03 +0300, Dor Laor wrote: > If the migration socket is full, we get EAGAIN for the write. > The set_fd_handler2 defers the write for later on. The function > tries to wake up the iothread by qemu_kvm_notify_work. > Since this happens in a loop, multiple times, the

Re: Fix migration issue when the destination is loaded

2009-07-16 Thread Mark McLoughlin
On Thu, 2009-07-16 at 15:00 +0300, Dor Laor wrote: > On 07/16/2009 12:39 PM, Mark McLoughlin wrote: > > Hi Dor, > > > > On Wed, 2009-07-15 at 18:03 +0300, Dor Laor wrote: > >> If the migration socket is full, we get EAGAIN for the write. > >> The set_fd_hand

[PATCH 1/1] net: fix vnet_hdr bustage with slirp

2009-08-07 Thread Mark McLoughlin
table-0.11 too] Signed-off-by: Mark McLoughlin --- net.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index c7702f8..2428f63 100644 --- a/net.c +++ b/net.c @@ -1521,6 +1521,9 @@ int tap_has_vnet_hdr(void *opaque) VLANClientState *vc = o

Re: [PATCH 1/1] net: fix vnet_hdr bustage with slirp

2009-08-07 Thread Mark McLoughlin
On Fri, 2009-08-07 at 13:51 +0200, Arnd Bergmann wrote: > On Friday 07 August 2009, Mark McLoughlin wrote: > > slirp has started using VLANClientState::opaque and this has caused the > > kvm specific tap_has_vnet_hdr() hack to break because we blindly use > > this opaque poin

Re: [PATCH]: Always use KVM_VERSION to build version number

2009-08-10 Thread Mark McLoughlin
On Sun, 2009-08-09 at 12:58 +0300, Avi Kivity wrote: > On 08/07/2009 03:31 PM, Chris Lalancette wrote: > > Avi, > > Trying to use libvirt with development snapshots of qemu-kvm is a bit > > problematic. The trouble is that for all development snapshots, the value > > that > > gets placed in

[PATCH] configure: make default KVM_VERSION qemu-kvm-devel

2009-08-10 Thread Mark McLoughlin
, 87 etc.) and just uses the 'qemu-kvm-' string to detect that this is the kvm fork of qemu. The actual kvm snapshot number is no longer important, it's the qemu version number which is important. Signed-off-by: Mark McLoughlin --- configure |2 +- 1 files changed, 1 i

Re: [PATCH]: Always use KVM_VERSION to build version number

2009-08-10 Thread Mark McLoughlin
On Mon, 2009-08-10 at 12:46 +0300, Avi Kivity wrote: > On 08/10/2009 12:19 PM, Mark McLoughlin wrote: > > > > Or we could drop this kvm snapshot numbering system and just use qemu > > VERSION numbering - i.e. qemu-kvm-devel-88 could have been published as > > qemu-kv

Re: [PATCHv3 3/4] qemu-kvm: vhost-net implementation

2009-08-20 Thread Mark McLoughlin
Hi Michael, Some random high-level comments: - I had expected this to be available as: -net raw,ifname=eth2 -net nic,model=virtio I'd prefer it this way, because it means you can use this mode even without vhost and it's ties in better with the way all other qemu networkin

Re: [PATCH] qemu-kvm: fix segfault when running kvm without /dev/kvm, falling back to non-accelerated mode

2009-09-03 Thread Mark McLoughlin
On Thu, 2009-09-03 at 12:31 -0500, Dustin Kirkland wrote: > qemu-kvm: fix segfault when running kvm without /dev/kvm, falling back > to non-accelerated mode > > We're seeing segfaults on systems without access to /dev/kvm. It > looks like the global kvm_allowed is being set just a little too late

Re: [PATCH] qemu-kvm: fix segfault when running kvm without /dev/kvm, falling back to non-accelerated mode

2009-09-04 Thread Mark McLoughlin
On Thu, 2009-09-03 at 19:18 -0300, Glauber Costa wrote: > On Thu, Sep 3, 2009 at 6:48 PM, Dustin Kirkland wrote: > > On Thu, Sep 3, 2009 at 3:01 PM, Mark McLoughlin wrote: > >> On Thu, 2009-09-03 at 12:31 -0500, Dustin Kirkland wrote: > >>> qemu-kvm: fix segfault whe

Re: [PATCH] qemu-kvm: fix error handling in msix vector add

2009-09-07 Thread Mark McLoughlin
On Sat, 2009-07-25 at 12:30 -0300, Marcelo Tosatti wrote: > On Thu, Jul 23, 2009 at 04:34:13PM +0300, Michael S. Tsirkin wrote: > > When adding a vector fails, the used counter should > > not be incremented, otherwise on vector change we will > > try to update the routing entry. > > > > Signed-off

Re: [PATCH 1/1] qemu-kvm: virtio-net: Re-instate GSO code removed upstream

2009-09-29 Thread Mark McLoughlin
On Tue, 2009-05-05 at 09:56 +0100, Mark McLoughlin wrote: > This commit: > >commit 559a8f45f34cc50d1a60b4f67a06614d506b2e01 >Subject: Remove stray GSO code from virtio_net (Mark McLoughlin) > > Removed some GSO code from upstream qemu.git, but it needs to > be re-ins

Re: [PATCH 1/1] qemu-kvm: virtio-net: Re-instate GSO code removed upstream

2009-09-29 Thread Mark McLoughlin
On Tue, 2009-09-29 at 21:45 +0100, Mark McLoughlin wrote: > On Tue, 2009-05-05 at 09:56 +0100, Mark McLoughlin wrote: > > This commit: > > > >commit 559a8f45f34cc50d1a60b4f67a06614d506b2e01 > >Subject: Remove stray GSO code from virtio_net (Mark McLoughlin) >

Re: [PATCH 1/1] qemu-kvm: virtio-net: Re-instate GSO code removed upstream

2009-09-30 Thread Mark McLoughlin
On Wed, 2009-09-30 at 08:24 -0300, Glauber Costa wrote: > On Wed, Sep 30, 2009 at 08:24:18AM +0200, Avi Kivity wrote: > > On 09/29/2009 10:45 PM, Mark McLoughlin wrote: > >> On Tue, 2009-05-05 at 09:56 +0100, Mark McLoughlin wrote: > >> > >>&

Re: [PATCH 1/1] qemu-kvm: virtio-net: Re-instate GSO code removed upstream

2009-09-30 Thread Mark McLoughlin
On Wed, 2009-09-30 at 15:55 +0200, Avi Kivity wrote: > On 09/30/2009 03:51 PM, Christoph Hellwig wrote: > > I might sound like a broken record, but why isn't the full GSO support > > for virtio-net upstream in qemu? > > > > IIRC the current hacks are not upstream quality. > > The problem (aga

Re: [Qemu-devel] Re: [PATCH 1/1] qemu-kvm: virtio-net: Re-instate GSO code removed upstream

2009-10-01 Thread Mark McLoughlin
On Wed, 2009-09-30 at 21:15 +0200, Gerd Hoffmann wrote: > On 09/30/09 15:59, Mark McLoughlin wrote: > > I'm planning on adding -hostnet and -nic arguments, which would not use > > vlans by default but rather connect the nic directly to the host side. > > No new -nic a

Re: [PATCH 1/1] qemu-kvm: virtio-net: Re-instate GSO code removed upstream

2009-10-01 Thread Mark McLoughlin
On Thu, 2009-10-01 at 18:49 +0200, Avi Kivity wrote: > On 09/30/2009 03:59 PM, Mark McLoughlin wrote: > > I think we should keep the vlan stuff, just de-emphasise it. > > > > Maybe we should do what X.org does, break it silently and remove it some > time later when

Re: [PATCH qemu-kvm] Enable UFO on virtio-net and tap devices

2009-10-08 Thread Mark McLoughlin
On Wed, 2009-10-07 at 14:50 -0700, Sridhar Samudrala wrote: > linux 2.6.32 includes UDP fragmentation offload support in software. > So we can enable UFO on the host tap device if supported and allow setting > UFO on virtio-net in the guest. Hmm, we really need to detect whether the host has tunt

Re: [PATCH qemu-kvm] Enable UFO on virtio-net and tap devices

2009-10-09 Thread Mark McLoughlin
On Thu, 2009-10-08 at 15:31 -0700, Sridhar Samudrala wrote: > On Thu, 2009-10-08 at 11:07 +0100, Mark McLoughlin wrote: > > On Wed, 2009-10-07 at 14:50 -0700, Sridhar Samudrala wrote: > > > linux 2.6.32 includes UDP fragmentation offload support in software. > > > So we

Re: QemuOpts changes breaks multiple nic options

2009-10-13 Thread Mark McLoughlin
Hi Tom, On Mon, 2009-10-12 at 17:05 -0500, Tom Lendacky wrote: > The recent change to QemuOpts for the -net nic option breaks specifying -net > nic,... more than once. The net_init_nic function's return value in net.c is > a table index, which is non-zero after the first time it is called. The

[PATCH] kvm: qemu: Handle tap fds with IFF_VNET_HDR

2008-08-20 Thread Mark McLoughlin
an fd and b) that the TUNGETIFF ioctl() is available in the running kernel. We add a comment to the "qemu -help" output to indicate to users that this version of qemu supports IFF_VNET_HDR. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- qemu/vl.c | 21

Re: [PATCH] kvm: qemu: Handle tap fds with IFF_VNET_HDR

2008-08-20 Thread Mark McLoughlin
On Wed, 2008-08-20 at 18:05 +0100, Mark McLoughlin wrote: > Allow users to pass an IFF_VNET_HDR tap fd via "-net tap,fd=X" > by querying the fd with the recently added TUNGETIFF ioctl() to > see if IFF_VNET_HDR has been enabled. This was merged by Linus today: http://git.

Re: [PATCH] kvm: qemu: Handle tap fds with IFF_VNET_HDR

2008-08-21 Thread Mark McLoughlin
On Wed, 2008-08-20 at 20:51 +0300, Avi Kivity wrote: > Anthony Liguori wrote: > > Mark McLoughlin wrote: > >> Allow users to pass an IFF_VNET_HDR tap fd via "-net tap,fd=X" > >> by querying the fd with the recently added TUNGETIFF ioctl() to >

Re: massive performance drop after a while when using virtio nics

2008-09-09 Thread Mark McLoughlin
Hi, On Sat, 2008-08-23 at 21:21 +0200, Fabian Deutsch wrote: > Hey. > > When running a guest in the following setup, I observ a "massive" > performance decrease after a couple of gigabytes of transfrerred data. > > other guests keep running fine (no regressions) and nothing unusual is > observed

Re: massive performance drop after a while when using virtio nics

2008-09-09 Thread Mark McLoughlin
On Tue, 2008-09-09 at 12:32 +0200, Fabian Deutsch wrote: > Am Dienstag, den 09.09.2008, 11:22 +0100 schrieb Mark McLoughlin: > > Hi, > > > > On Sat, 2008-08-23 at 21:21 +0200, Fabian Deutsch wrote: > > > Hey. > > > > > > When running a g

Re: massive performance drop after a while when using virtio nics

2008-09-09 Thread Mark McLoughlin
On Tue, 2008-09-09 at 13:11 +0200, Henrik Holst wrote: > tis 2008-09-09 klockan 11:47 +0100 skrev Mark McLoughlin: > > On Tue, 2008-09-09 at 12:32 +0200, Fabian Deutsch wrote: > > > Am Dienstag, den 09.09.2008, 11:22 +0100 schrieb Mark McLoughlin: > > > > Hi, > >

Re: [PATCH] Fix COMPAT_csum_offset #endif in virtio_net.c

2008-09-10 Thread Mark McLoughlin
gt; +} > + > +/hdr->csum_offset = skb->csum_offset/ { > need_endif = 1; > } This looks right to me; I had a slightly uglier version that I forgot to upstream. Acked-by: Mark McLoughlin <[EMAIL PROTECTED]> Cheers, Mark. -- To unsubscribe from this list: send th

Re: virtio performance issue

2008-09-17 Thread Mark McLoughlin
On Tue, 2008-09-16 at 22:24 +0300, Ben-Ami Yassour wrote: > On Tue, 2008-09-16 at 09:16 -0500, Anthony Liguori wrote: > > Ben-Ami Yassour wrote: > > > I am running virtio with the latest KVM code, and see a significant > > > performance issue. > > > > > > Ping to the host (or any other close machin

[PATCH 3/5] kvm: qemu: Simplify virtio_net_can_receive() a little

2008-10-08 Thread Mark McLoughlin
In order to de-obfuscate the final patch in this series Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- qemu/hw/virtio-net.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index bc2ede6..4b4c48b 100644

[PATCH 2/5] kvm: qemu: Introduce virtqueue_fill() and virtqueue_flush()

2008-10-08 Thread Mark McLoughlin
Split virtqueue_push() into two logical steps - adding an element to the used ring and notifying the other side of added elements. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- qemu/hw/virtio.c | 23 ++- qemu/hw/virtio.h |3 +++ 2 files changed, 21 inse

[PATCH 1/5] kvm: qemu: Move virtqueue_next_desc() around

2008-10-08 Thread Mark McLoughlin
virtio_next_desc() is only used in virtqueue_pop(), so move it alongside that. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- qemu/hw/virtio.c | 30 +++--- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/qemu/hw/virtio.c b/qemu/hw/virtio.c

[PATCH 5/5] kvm: qemu: Improve virtio_net recv buffer allocation scheme

2008-10-08 Thread Mark McLoughlin
benchmark with GSO disabled on the host side, throughput was seen to increase from 700Mb/s to 1.7Gb/s. Based on a patch from Herbert, with the feature renamed from "datahead" and some re-factoring for readability. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> Signed-off-by: Mark McL

[PATCH 4/5] kvm: qemu: Split iov_fill() out from virtio_net_receive()

2008-10-08 Thread Mark McLoughlin
Simplifies the current code, but more especially, the code in the next patch. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- qemu/hw/virtio-net.c | 32 +--- 1 files changed, 21 insertions(+), 11 deletions(-) diff --git a/qemu/hw/virtio-net.c b/q

Re: [PATCH 5/5] kvm: qemu: Improve virtio_net recv buffer allocation scheme

2008-10-14 Thread Mark McLoughlin
On Sun, 2008-10-12 at 12:00 +0200, Avi Kivity wrote: > Mark McLoughlin wrote: > > diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c > > index 403247b..afa5fe5 100644 > > --- a/qemu/hw/virtio-net.c > > +++ b/qemu/hw/virtio-net.c > > @@ -34,9 +34,13 @@ &g

[PATCH 3/3] virtio_net: support ethtool offload queries

2008-10-22 Thread Mark McLoughlin
Since 2.6.24, if get_tx_csum, get_sg or get_tso are NULL then the default ethtool_op_get_xxx functions are called. Before 2.6.24, however, these need to be manually hooked in. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- hack-module.awk |6 ++ 1 files changed, 6 inse

[PATCH 1/3] virtio_net: Fix leaked netdev->refcnt

2008-10-22 Thread Mark McLoughlin
pping the extra reference taken. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- hack-module.awk |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hack-module.awk b/hack-module.awk index 7cb9381..b401aae 100644 --- a/hack-module.awk +++ b/hack-module.awk @@

[PATCH 2/3] virtio_net: Make use of napi_weight module param

2008-10-22 Thread Mark McLoughlin
always. Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]> Allowing the weight to be higher should reduce the interrupt rate in the guest. In practice, though, it doesn't appear to make much difference. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> Cc: Anthony Li

[PATCH 0/3] Some kvm-guest-drivers-linux/virtio_net fixes

2008-10-22 Thread Mark McLoughlin
Hi Avi, Here's a few virtio_net fixes for kvm-guest-drivers-linux. Cheers, Mark. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-28 Thread Mark McLoughlin
On Tue, 2008-10-28 at 12:06 +0200, [EMAIL PROTECTED] wrote: ... > +static int get_real_device(AssignedDevice *pci_dev, uint8_t r_bus, > + uint8_t r_dev, uint8_t r_func) > +{ > +char dir[128], name[128]; > +int fd, r = 0; > +FILE *f; > +unsigned long long st

Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread Mark McLoughlin
On Wed, 2008-10-29 at 12:31 +0200, Muli Ben-Yehuda wrote: > On Tue, Oct 28, 2008 at 04:55:22PM +0000, Mark McLoughlin wrote: > > On Tue, 2008-10-28 at 12:06 +0200, [EMAIL PROTECTED] wrote: > > > +void assigned_dev_set_vector(int irq, int vector); > > > +void assig

Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread Mark McLoughlin
On Wed, 2008-10-29 at 12:31 +0200, Muli Ben-Yehuda wrote: > On Tue, Oct 28, 2008 at 04:55:22PM +0000, Mark McLoughlin wrote: > > nr_assigned_devices isn't actually used anywhere. > > Nuked. Still there. > > > +#define MAX_IO_REGIONS (6) > > > > Perha

Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread Mark McLoughlin
On Wed, 2008-10-29 at 14:20 +0200, [EMAIL PROTECTED] wrote: > diff --git a/qemu/hw/piix_pci.c b/qemu/hw/piix_pci.c > index b9067b8..27d5f02 100644 > --- a/qemu/hw/piix_pci.c > +++ b/qemu/hw/piix_pci.c > @@ -246,9 +246,9 @@ static void piix3_set_irq(qemu_irq *pic, int > irq_num, int level) > int pi

[PATCH 4/6] kvm: qemu: aggregate reads from eventfd

2008-10-30 Thread Mark McLoughlin
Keep reading from eventfd until it's empty and aggregate the results. Only really important when we're emulating eventfd using a pipe as in that case we may have multiple "1" values queued up, potentially leading to the pipe buffer filling up and the write side blocking.

[PATCH 3/6] kvm: qemu: add qemu_eventfd_write() and qemu_eventfd_read()

2008-10-30 Thread Mark McLoughlin
Split out code for common eventfd operations to avoid re-implementation. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- qemu/compatfd.c | 48 qemu/compatfd.h |2 ++ qemu/qemu-kvm.c | 42 ---

[PATCH 0/6] Kill off the virtio_net tx mitigation timer

2008-10-30 Thread Mark McLoughlin
Hey, The main patch in this series is 5/6 - it just kills off the virtio_net tx mitigation timer and does all the tx I/O in the I/O thread. Below are the results I got from benchmarking guest->host and host->guest on my machine. There's enough numbers there to make anyone blind, but basically t

[PATCH 1/6] kvm: qemu: virtio: remove unused variable

2008-10-30 Thread Mark McLoughlin
Remove a variable from virtqueue_pop() which has been unused since the very start. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- qemu/hw/virtio.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/qemu/hw/virtio.c b/qemu/hw/virtio.c index e675f43..8fac354

[PATCH 6/6] kvm: qemu: virtio-net: drop mutex during tx tapfd write

2008-10-30 Thread Mark McLoughlin
This allows the guest vcpu thread to exit while the I/O thread is churning away. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- qemu/hw/virtio-net.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index 0

[PATCH 2/6] kvm: qemu: dup the qemu_eventfd() return

2008-10-30 Thread Mark McLoughlin
qemu_eventfd() returns two file descriptors, both of which must be closed when pipe() is used in the absence of eventfd(). Duplicate the eventfd() file descriptor so that closing both descriptors will work in that case. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- qemu/comp

[PATCH 5/6] kvm: qemu: virtio-net: handle all tx in I/O thread without timer

2008-10-30 Thread Mark McLoughlin
ant. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- qemu/hw/virtio-net.c | 79 - 1 files changed, 45 insertions(+), 34 deletions(-) diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index bc2ede6..0612f5f 100644 --- a/qemu

Re: [PATCH 5/6] kvm: qemu: virtio-net: handle all tx in I/O thread without timer

2008-10-31 Thread Mark McLoughlin
der e.g. an I/O thread per device. Note also that when tuning for a specific workload, which CPU the I/O thread is pinned to is important. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- qemu/hw/virtio-net.c | 60 + 1 files changed, 2

Re: [PATCH 0/6] Kill off the virtio_net tx mitigation timer

2008-10-31 Thread Mark McLoughlin
On Thu, 2008-10-30 at 14:20 -0500, Anthony Liguori wrote: > Mark McLoughlin wrote: > > | guest->host tput | > > host->guest tput > > netperf, 10x20s runs (Gb/s) |min/ mean/ max/stddev | mi

[PATCH] kvm: qemu: increase the size of the tap buffer [was Re: TAP MTU >= 4055 problem?]

2008-10-31 Thread Mark McLoughlin
retry with a larger buffer. We could add that as an extension, I guess. Best short term thing to do is just increase the tap buffer size. Patch below. A similar patch should go into qemu upstream. Cheers, Mark. From: Mark McLoughlin <[EMAIL PROTECTED]> Subject: [PATCH] kvm: qemu: increase size o

Re: [PATCH 0/6] Kill off the virtio_net tx mitigation timer

2008-11-03 Thread Mark McLoughlin
On Sun, 2008-11-02 at 11:48 +0200, Avi Kivity wrote: > Mark McLoughlin wrote: > > Hey, > > > > The main patch in this series is 5/6 - it just kills off the > > virtio_net tx mitigation timer and does all the tx I/O in the > > I/O thread. > > > > >

Re: [PATCH 0/6] Kill off the virtio_net tx mitigation timer

2008-11-03 Thread Mark McLoughlin
On Mon, 2008-11-03 at 14:40 +0200, Avi Kivity wrote: > Mark McLoughlin wrote: > > On Sun, 2008-11-02 at 11:48 +0200, Avi Kivity wrote: > > > >> Mark McLoughlin wrote: > >>> The main patch in this series is 5/6 - it just kills off the > >>> virtio

Re: [PATCH 5/6] kvm: qemu: virtio-net: handle all tx in I/O thread without timer

2008-11-03 Thread Mark McLoughlin
On Fri, 2008-10-31 at 09:16 +, Mark McLoughlin wrote: > +static void virtio_net_tx_bh(void *opaque) > { > VirtIONet *n = opaque; > > -n->tx_timer_active = 0; > - > -/* Just in case the driver is not ready on more */ > -if (!(n->vdev.stat

Re: [PATCH] virtio: Define and use per-architecture "pfn shift" constants

2008-11-06 Thread Mark McLoughlin
On Wed, 2008-11-05 at 22:49 -0600, Hollis Blanchard wrote: > - info->queue = kzalloc(PAGE_ALIGN(vring_size(num,PAGE_SIZE)), > GFP_KERNEL); > + vring_bytes = PAGE_ALIGN(vring_size(num, VRING_PAGE_SIZE)); > + info->queue = kzalloc(vring_bytes, GFP_KERNEL); You're still aligning t

Re: [PATCH] qemu: define and use VIRTIO_PFN_SHIFT

2008-11-06 Thread Mark McLoughlin
On Wed, 2008-11-05 at 22:49 -0600, Hollis Blanchard wrote: > diff --git a/qemu/hw/virtio.c b/qemu/hw/virtio.c > --- a/qemu/hw/virtio.c > +++ b/qemu/hw/virtio.c > @@ -56,6 +56,10 @@ > */ > #define wmb() do { } while (0) > > +#define VRING_PAGE_SIZE (1<<12) > + > +#define ALIGN(x, a) (((x)+(a)

Re: [PATCH 0/6] Kill off the virtio_net tx mitigation timer

2008-11-06 Thread Mark McLoughlin
Hey, So, I went off and spent some time gathering more data on this stuff and putting it together in a more consumable fashion. Here are some graphs showing the effect some of these changes have on throughput, cpu utilization and vmexit rate: http://markmc.fedorapeople.org/virti

Re: [PATCH 5/6] kvm: qemu: virtio-net: handle all tx in I/O thread without timer

2008-11-06 Thread Mark McLoughlin
On Tue, 2008-11-04 at 08:23 -0700, David S. Ahern wrote: > > Mark McLoughlin wrote: > > > Note also that when tuning for a specific workload, which CPU > > the I/O thread is pinned to is important. > > > > Hi Mark: > > Can you give an example of when

Re: [PATCH 0/6] Kill off the virtio_net tx mitigation timer

2008-11-06 Thread Mark McLoughlin
Hi Avi, Just thinking about your variable window suggestion ... On Mon, 2008-11-03 at 14:40 +0200, Avi Kivity wrote: > Mark McLoughlin wrote: > > On Sun, 2008-11-02 at 11:48 +0200, Avi Kivity wrote: > >> Where does the benefit come from? > >> > > > >

Re: virtio_net hang

2008-11-13 Thread Mark McLoughlin
On Thu, 2008-11-13 at 13:27 +0100, Emmanuel Lacour wrote: > Dear kvm users/developpers, > > I have a problem here where the network interface of a guest hang > 2 or 3 times a day. No more packets can be sent out or received, no > error in guest or host logs. I have to stop networking, remove modul

Re: virtio_net hang

2008-11-14 Thread Mark McLoughlin
On Fri, 2008-11-14 at 10:23 +0100, Emmanuel Lacour wrote: > On Thu, Nov 13, 2008 at 04:24:52PM +0100, Emmanuel Lacour wrote: > > On Thu, Nov 13, 2008 at 03:12:33PM +0000, Mark McLoughlin wrote: > > > The fact that re-loading the virtio_net driver fixes things up makes me > >

Re: virtio_net hang

2008-11-19 Thread Mark McLoughlin
On Tue, 2008-11-18 at 19:37 +0100, Emmanuel Lacour wrote: > On Fri, Nov 14, 2008 at 06:26:44PM +0000, Mark McLoughlin wrote: > > > > Right, the tap device tx queue is full because kvm-userspace isn't > > reading packets from it. > > > > This could be

Re: virtio_net hang

2008-11-19 Thread Mark McLoughlin
On Wed, 2008-11-19 at 13:13 +, Mark McLoughlin wrote: > On Tue, 2008-11-18 at 19:37 +0100, Emmanuel Lacour wrote: > > On Fri, Nov 14, 2008 at 06:26:44PM +0000, Mark McLoughlin wrote: > > > > > > Right, the tap device tx queue is full because kvm-userspace isn'

[PATCH] kvm: header-sync: fix to work with 2.6.28 kernel

2008-11-24 Thread Mark McLoughlin
_stat ".../asm/vmx*.h" failed: No such file or directory (2) Fix by passing the expanded paths returned by the wildcard function to rsync. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- kernel/Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --gi

[PATCH 4/5] kvm: qemu: virtio-net: split iov_fill() out from virtio_net_receive()

2008-11-26 Thread Mark McLoughlin
Simplifies the current code, but more especially, simplifies the implementation of the mergeable receive buffers scheme. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> --- qemu/hw/virtio-net.c | 27 ++- 1 files changed, 18 insertions(+), 9 deletions(-) diff -

[PATCH 0/5] kvm: qemu: virtio_net: add support for mergeable rx buffers

2008-11-26 Thread Mark McLoughlin
Hi, The mergeable receive buffers scheme has been in the Linux virtio_net driver in net-next-2.6 for a while now, so it's probably safe to assume what's there now is the final iteration of the ABI. The following patches implement support for the scheme in KVM. Only the 5/5 patch c

  1   2   3   4   >