Re: *insane* amount of host_state_reloads for openbsd guest in 0.14

2011-03-17 Thread Gleb Natapov
On Wed, Mar 16, 2011 at 10:55:02PM +0300, Michael Tokarev wrote: > 16.03.2011 22:48, Marcelo Tosatti wrote: > > On Fri, Mar 11, 2011 at 03:02:33PM +0300, Michael Tokarev wrote: > >> I tried Openbsd 4.8 in kvm today and immediately noticed > >> that it is running _very_ slow, boot takes several minu

Re: Bug inkvm_set_irq

2011-03-17 Thread Michael S. Tsirkin
On Thu, Mar 17, 2011 at 09:00:30AM +0100, Jean-Philippe Menil wrote: > >>Are you running a preemptible kernel? > >>Does the following help at all? > >> > >>diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c > >>index 2ca4535..cdf51c9 100644 > >>--- a/virt/kvm/eventfd.c > >>+++ b/virt/kvm/eventfd.

[PATCH] kvm: fix crash on irqfd deassign

2011-03-17 Thread Michael S. Tsirkin
irqfd in kvm used flush_work incorrectly: it assumed that work scheduled previously can't run after flush_work, but since kvm uses a non-reentrant workqueue (by means of schedule_work) we need flush_work_sync to get that guarantee. Signed-off-by: Michael S. Tsirkin Reported-by: Jean-Philippe Meni

SR-IOV of LSI MegaRAID storage controller?

2011-03-17 Thread ya su
hi,all: I noticed a news that kvm can use the SR-IOV function of LSI MegaRAID storage controller on 2009 IDT, have anyone been succeed in testing this function, and how to configure the kernel and qemu? thanks. Regards. Green. -- To unsubscribe from this list: send the line "unsubscribe kvm

Re: [libvirt] [Qemu-devel] KVM call minutes for Mar 15

2011-03-17 Thread Daniel P. Berrange
On Tue, Mar 15, 2011 at 12:06:06PM -0700, Chris Wright wrote: > * Anthony Liguori (anth...@codemonkey.ws) wrote: > > On 03/15/2011 09:53 AM, Chris Wright wrote: > > > QAPI > > > >- c library implementation is critical to have unit tests and test > > > driven development > > > - thread safe? >

Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-03-17 Thread Rusty Russell
On Wed, 16 Mar 2011 17:12:55 -0700, Shirley Ma wrote: > Signed-off-by: Shirley Ma This is fascinating... and deeply weird. OK, what's the difference between calling xmit_skb and ignoring failure, and this patch which figures out it's going to fail before calling xmit_skb? ie. what if you *just

Re: [PATCH 1/2] virtio: put last seen used index into ring itself

2011-03-17 Thread Michael S. Tsirkin
The following is needed on top: still compiled only, post here in case Tom is willing to test this meanwhile. --> virtio: fix vring_last_used Reported-by: Shirley Ma Signed-off-by: Michael S. Tsirkin --- diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index a6fc5

[PULL net-2.6] vhost: cleanups and fixes

2011-03-17 Thread Michael S. Tsirkin
The following tree has fixes for vhost-net for 2.6.39. These are easier to apply on top of Jason's and Krishna's cleanups, and they got tested this way, so I thought it's better for everyone to include that, and the trivial copy_from_user optimization. But if you think it's too late for that, pls

Clock skew after pausing guests

2011-03-17 Thread Virtbie
Hello all I am seeing, perhaps unsurprisingly, a skewed system clock after pausing and then resuming a qemu-kvm guest. The guest continues with its earlier time. Since I'd like to use the pause technique for backups, which can take 1 hour, this is significant. This is with windows guests, and it d

Re: Clock skew after pausing guests

2011-03-17 Thread Timur Safin
Have you checked with Windows Time service enabled in the guest? net start w32time Best Regards, Timur 2011/3/17 Virtbie : > Hello all > I am seeing, perhaps unsurprisingly, a skewed system clock after pausing > and then resuming a qemu-kvm guest. The guest continues with its earlier > time. >

Re: TX from KVM guest virtio_net to vhost issues

2011-03-17 Thread Shirley Ma
On Thu, 2011-03-17 at 08:00 +0200, Michael S. Tsirkin wrote: > On Wed, Mar 16, 2011 at 05:20:14PM -0700, Shirley Ma wrote: > > This patch doesn't seem to help guest TX queue overrun. > > Just making sure: what exactly was tested? > You did combine this with a vhost-net and qemu patches, right? >

Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-03-17 Thread Shirley Ma
On Thu, 2011-03-17 at 15:40 +1030, Rusty Russell wrote: > This is fascinating... and deeply weird. > > OK, what's the difference between calling xmit_skb and ignoring > failure, > and this patch which figures out it's going to fail before calling > xmit_skb? > > ie. what if you *just* delete this

Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-03-17 Thread Shirley Ma
On Thu, 2011-03-17 at 07:02 +0200, Michael S. Tsirkin wrote: > So, this just tries to make sure there's enough space for > max packet in the ring, if not - drop and return OK. > Why bother checking beforehand though? > If that's what we want to do, we can just call add_buf and see > if it fails? I

Re: [stable] [PATCH] kvm: fix crash on irqfd deassign

2011-03-17 Thread Greg KH
On Thu, Mar 17, 2011 at 10:53:33AM +0200, Michael S. Tsirkin wrote: > irqfd in kvm used flush_work incorrectly: > it assumed that work scheduled previously can't run > after flush_work, but since kvm uses a non-reentrant > workqueue (by means of schedule_work) > we need flush_work_sync to get that

[GIT PULL] KVM updates for 2.6.39

2011-03-17 Thread Marcelo Tosatti
Linus, please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git kvm-updates/2.6.39 To receive the following updates. Avi Kivity (11): KVM: MMU: Don't flush shadow when enabling dirty tracking KVM: VMX: Save and restore tr selector across mode switches KVM: VMX: Avoid

Re: [PATCH] virtio: Avoid virtio_net TX queue over run

2011-03-17 Thread Shirley Ma
On Thu, 2011-03-17 at 07:05 +0200, Michael S. Tsirkin wrote: > Could you add CPU utilization data pls? I also wonder what does this > do > to UDP? Won't a lot of packets be dropped? Guest CPU utilization slightly increased a few %. UDP performance send rate increased 200% - 400%, recv rate incre

Re: [PATCH] virtio: Avoid virtio_net TX queue over run

2011-03-17 Thread Eric Dumazet
Le jeudi 17 mars 2011 à 09:50 -0700, Shirley Ma a écrit : > On Thu, 2011-03-17 at 07:05 +0200, Michael S. Tsirkin wrote: > > Could you add CPU utilization data pls? I also wonder what does this > > do > > to UDP? Won't a lot of packets be dropped? > > Guest CPU utilization slightly increased a fe

Re: [PATCH] virtio: Avoid virtio_net TX queue over run

2011-03-17 Thread Shirley Ma
On Thu, 2011-03-17 at 17:58 +0100, Eric Dumazet wrote: > Could you run your tests with only one cpu ? > (offline all cpus but cpu0 on your hypervisor) > > Dropping packets is fine, unless consumer cant run ;) Sure, will report the data soon. Thanks Shirley -- To unsubscribe from this list: sen

Re: USB EHCI patch for 0.14.0?

2011-03-17 Thread Erik Rull
erik.r...@rdsoftware.de wrote: Hi all, I've tested the following: - EHCI patch without auto_add and adding the devices manually Result: Works fine, all devices could be added. I've tested only 2 but it is more than with the auto_add feature :-) - UHCI only (no EHCI patch) with enabled "-device

Re: openbsd system_powerdown: "KVM internal error. Suberror: 1"

2011-03-17 Thread Marcelo Tosatti
On Wed, Mar 16, 2011 at 11:09:11PM +0300, Michael Tokarev wrote: > 16.03.2011 22:44, Marcelo Tosatti wrote: > > On Fri, Mar 11, 2011 at 02:54:00PM +0300, Michael Tokarev wrote: > >> Hello. > >> > >> I installed an openbsd 4.8 image today to play with, > >> and noticed that when issuing "system_powe

Re: [PATCH] virtio: Avoid virtio_net TX queue over run

2011-03-17 Thread Shirley Ma
On Thu, 2011-03-17 at 10:01 -0700, Shirley Ma wrote: > On Thu, 2011-03-17 at 17:58 +0100, Eric Dumazet wrote: > > Could you run your tests with only one cpu ? > > (offline all cpus but cpu0 on your hypervisor) > > > > Dropping packets is fine, unless consumer cant run ;) > > Sure, will report th

Re: [PATCH] virtio: Avoid virtio_net TX queue over run

2011-03-17 Thread Shirley Ma
On Thu, 2011-03-17 at 11:49 -0700, Shirley Ma wrote: > With a single CPU, before/after with this patch the performance has no > difference for both UDP and TCP, and it seems hitting TX overrun, CPU > is > 100% used. Sorry, should be: it seems never hitting TX overrun. Shirley -- To unsubscribe

[PATCH] device-assignment: Reset device on system reset

2011-03-17 Thread Alex Williamson
On system reset, we currently try to quiesce DMA by clearing the command register. This assumes that nothing re-enables bus master support without first de-programming the device. Use a bigger hammer to help the guest not shoot itself by issuing a function reset via sysfs on each system reset. S

Re: openbsd system_powerdown: "KVM internal error. Suberror: 1"

2011-03-17 Thread Michael Tokarev
17.03.2011 20:52, Marcelo Tosatti wrote: [] > iret emulation is only partially implemented. Why is iret faulting > in the first place i don't know. Can you enable tracing with > > echo kvm > /$debugfs/tracing/set_event > > And save the tail of the log, including events at $RIP? Something like t

Re: [PATCH] device-assignment: Reset device on system reset

2011-03-17 Thread Chris Wright
* Alex Williamson (alex.william...@redhat.com) wrote: > static void reset_assigned_device(DeviceState *dev) > { > -PCIDevice *d = DO_UPCAST(PCIDevice, qdev, dev); > +PCIDevice *pci_dev = DO_UPCAST(PCIDevice, qdev, dev); > +AssignedDevice *adev = DO_UPCAST(AssignedDevice, dev, pci_dev)

Re: [PATCH] device-assignment: Reset device on system reset

2011-03-17 Thread Alex Williamson
On Thu, 2011-03-17 at 14:12 -0700, Chris Wright wrote: > * Alex Williamson (alex.william...@redhat.com) wrote: > > static void reset_assigned_device(DeviceState *dev) > > { > > -PCIDevice *d = DO_UPCAST(PCIDevice, qdev, dev); > > +PCIDevice *pci_dev = DO_UPCAST(PCIDevice, qdev, dev); > >

[PATCH v2] device-assignment: Reset device on system reset

2011-03-17 Thread Alex Williamson
On system reset, we currently try to quiesce DMA by clearing the command register. This assumes that nothing re-enables bus master support without first de-programming the device. Use a bigger hammer to help the guest not shoot itself by issuing a function reset via sysfs on each system reset. S

Re: [PATCH v2] device-assignment: Reset device on system reset

2011-03-17 Thread Chris Wright
* Alex Williamson (alex.william...@redhat.com) wrote: > On system reset, we currently try to quiesce DMA by clearing the > command register. This assumes that nothing re-enables bus master > support without first de-programming the device. Use a bigger > hammer to help the guest not shoot itself

Re: [PATCH] device-assignment: Reset device on system reset

2011-03-17 Thread Chris Wright
* Alex Williamson (alex.william...@redhat.com) wrote: > On Thu, 2011-03-17 at 14:12 -0700, Chris Wright wrote: > > * Alex Williamson (alex.william...@redhat.com) wrote: > > > +fd = open(reset_file, O_WRONLY); > > > +if (fd != -1) { > > > +ret = write(fd, reset, strlen(reset)); > > >

[PATCH 0/3] enable newer msr set for kvm

2011-03-17 Thread Glauber Costa
This patch is a follow up to an earlier one that aims to enable kvmclock newer msr set. This time I'm doing it through a more sane mechanism of consulting the kernel about the supported msr set. Glauber Costa (3): use kernel-provided para_features instead of statically coming up with new cap

[PATCH 1/3] use kernel-provided para_features instead of statically coming up with new capabilities

2011-03-17 Thread Glauber Costa
According to Avi's comments over my last submission, I decided to take a different, and more correct direction - we hope. This patch is now using the features provided by KVM_GET_SUPPORTED_CPUID directly to mask out features from guest-visible cpuid. The old get_para_features() mechanism is kept

[PATCH 2/3] add kvmclock to its second bit

2011-03-17 Thread Glauber Costa
We have two bits that can represent kvmclock in cpuid. They signal the guest which msr set to use. When we tweak flags involving this value - specially when we use "-", we have to act on both. Besides adding it to the kvm features list, we also have to "break" the assumption represented by the bre

[PATCH 3/3] don't create kvmclock when one of the flags are present.

2011-03-17 Thread Glauber Costa
kvmclock presence can be signalled by two different flags. So for device creation, we have to test for both. Signed-off-by: Glauber Costa --- hw/kvmclock.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/hw/kvmclock.c b/hw/kvmclock.c index b6ceddf..004c4ad 100644 --

Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-03-17 Thread Shirley Ma
On Thu, 2011-03-17 at 08:18 -0700, Shirley Ma wrote: > On Thu, 2011-03-17 at 07:02 +0200, Michael S. Tsirkin wrote: > > So, this just tries to make sure there's enough space for > > max packet in the ring, if not - drop and return OK. > > Why bother checking beforehand though? > > If that's what we