Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-08 Thread Sridhar Samudrala
On 12/7/2011 3:02 AM, Jason Wang wrote: On 12/06/2011 11:42 PM, Sridhar Samudrala wrote: On 12/6/2011 5:15 AM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 10:21 AM, Jason Wang wrote: On 12/06/2011 05:18 PM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 6:33 AM, Jason Wang wrote: On 12/

Re: [PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2011-12-08 Thread Raghavendra K T
On 12/02/2011 01:20 AM, Raghavendra K T wrote: +/* + * kvm_pv_kick_cpu_op: Kick a vcpu. + * + * @cpu - vcpu to be kicked. + */ +static void kvm_pv_kick_cpu_op(struct kvm *kvm, int cpu) +{ + struct kvm_vcpu *vcpu = kvm_get_vcpu(kvm, cpu); There is no guarantee that guest cpu numbers match host

Re: [PATCH 0/11] RFC: PCI using capabilitities

2011-12-08 Thread Sasha Levin
On Thu, 2011-12-08 at 20:52 +1030, Rusty Russell wrote: > Here's the patch series I ended up with. I haven't coded up the QEMU > side yet, so no idea if the new driver works. > > Questions: > (1) Do we win from separating ISR, NOTIFY and COMMON? > (2) I used a "u8 bar"; should I use a bir and pac

Re: [PATCH v3 2/3] hvc_init(): Enforce one-time initialization.

2011-12-08 Thread Amit Shah
On (Tue) 06 Dec 2011 [09:05:38], Miche Baker-Harvey wrote: > Amit, > > Ah, indeed. I am not using MSI-X, so virtio_pci::vp_try_to_find_vqs() > calls vp_request_intx() and sets up an interrupt callback. From > there, when an interrupt occurs, the stack looks something like this: > > virtio_pci::

Re: [PATCH v4 00/12] virtio: s4 support

2011-12-08 Thread Amit Shah
On (Wed) 07 Dec 2011 [21:22:41], Rusty Russell wrote: > On Wed, 7 Dec 2011 13:14:56 +0530, Amit Shah wrote: > > On (Wed) 07 Dec 2011 [17:54:29], Rusty Russell wrote: > > > I figure there's a reason, but it seems a bit weird :) > > > > Well, there is one reason right now: migrating storage along w

[RFC 8/11] virtio_pci: share structure between legacy and modern.

2011-12-08 Thread Rusty Russell
They're almost identical: we add a "legacy" ioregion (what was "ioaddr" in the legacy driver), and move it out to virtio_pci-common.h. --- drivers/virtio/virtio_pci-common.h | 72 ++ drivers/virtio/virtio_pci.c| 64 --- drivers/virtio/virtio_pci_lega

[RFC 10/11] virtio_pci: share virtqueue setup/teardown between modern and legacy driver.

2011-12-08 Thread Rusty Russell
There's a great deal of work in setting up and disabling interrupts, particularly with MSI-X, which is generic. So we move most of the work out to helpers which take the location of the msix_config register, and setup_vq and del_vq functions. --- drivers/virtio/virtio_pci-common.c | 249

[RFC 3/11] pci: add pci_iomap_range

2011-12-08 Thread Rusty Russell
From: Michael S Tsirkin Virtio drivers should map the part of the range they need, not necessarily all of it. Signed-off-by: Michael S. Tsirkin Signed-off-by: Rusty Russell --- include/asm-generic/io.h|4 include/asm-generic/iomap.h | 11 +++ lib/iomap.c

[RFC 9/11] virtio_pci: share interrupt/notify handlers between legacy and modern.

2011-12-08 Thread Rusty Russell
If we make the legacy driver set up the ->notify and ->isr pointers in the struct virtio_pci_device structure, we can use them in common code (the positions have changed, but the semantics haven't). --- drivers/virtio/Makefile|4 - drivers/virtio/virtio_pci-common.c | 81

[RFC 6/11] virtio_pci: don't use the legacy driver if we find the new PCI capabilities.

2011-12-08 Thread Rusty Russell
With module option to override. I assume I can call pci_find_capability() before pci_request_regions? --- drivers/virtio/virtio_pci_legacy.c | 20 +++- include/linux/virtio_pci.h | 19 +++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/

[RFC 4/11] virtio-pci: define layout for virtio vendor-specific capabilities.

2011-12-08 Thread Rusty Russell
Based on patch by Michael S. Tsirkin , but I found it hard to follow so changed to use structures which are more self-documenting. Signed-off-by: Rusty Russell --- include/linux/virtio_pci.h | 41 + 1 file changed, 41 insertions(+) diff --git a/include/

[RFC 6/11] virtio_pci: move old defines to legacy, introduce new structure.

2011-12-08 Thread Rusty Russell
We don't *remove* the old ones, unless VIRTIO_PCI_NO_LEGACY is defined, but they get a friendly #warning about the change. Note that config option is not promted; we always enable it for now. Signed-off-by: Rusty Russell --- drivers/virtio/Kconfig | 12 +++ drivers/virtio/Make

[RFC 7/11] virtio_pci: new, capability-aware driver.

2011-12-08 Thread Rusty Russell
Differences: 1) Uses 4 pci capabilities to demark common, irq, notify and dev-specific areas. 2) Guest sets queue size, using host-provided maximum. 3) Guest sets queue alignment, rather than ABI-defined 4096. 4) More than 32 feature bits (a lot more!). --- drivers/virtio/Makefile |1 driv

[RFC 2/11] virtio: add support for 64 bit features.

2011-12-08 Thread Rusty Russell
Change the u32 to a u64, and make sure to use 1ULL everywhere! --- drivers/char/virtio_console.c |2 +- drivers/lguest/lguest_device.c | 10 +- drivers/s390/kvm/kvm_virtio.c | 10 +- drivers/virtio/virtio.c| 12 ++-- drivers/virtio/virtio_mmio.c | 14

[RFC 11/11] virtio_pci: simplify common helpers.

2011-12-08 Thread Rusty Russell
Our helpers can take a virtio_pci_device, rather than converting from a virtio_device all the time. They couldn't do this when they were called from the common virtio code, but now we wrap them anyway, it simplifies things. --- drivers/virtio/virtio_pci-common.c | 54 ---

[RFC 1/11] virtio: use u32, not bitmap for struct virtio_device's features

2011-12-08 Thread Rusty Russell
It seemed like a good idea, but it's actually a pain when we get more than 32 feature bits. Just change it to a u32 for now. --- drivers/char/virtio_console.c |2 +- drivers/lguest/lguest_device.c |2 +- drivers/s390/kvm/kvm_virtio.c |2 +- drivers/virtio/virtio.c| 10

Re: [PATCH] virtio-ring: Use threshold for switching to indirect descriptors

2011-12-08 Thread Sasha Levin
On Thu, 2011-12-08 at 20:14 +1030, Rusty Russell wrote: > On Wed, 7 Dec 2011 17:48:17 +0200, "Michael S. Tsirkin" > wrote: > > On Wed, Dec 07, 2011 at 04:02:45PM +0200, Sasha Levin wrote: > > > On Sun, 2011-12-04 at 20:23 +0200, Sasha Levin wrote: > > > > > > [snip] > > > > > > Rusty, Michael,

Re: [PATCH 0/11] RFC: PCI using capabilitities

2011-12-08 Thread Sasha Levin
Rusty, I can't find the actual patches, could you verify that they were indeed sent? On Thu, 2011-12-08 at 20:52 +1030, Rusty Russell wrote: > Here's the patch series I ended up with. I haven't coded up the QEMU > side yet, so no idea if the new driver works. > > Questions: > (1) Do we win from

Re: [PATCH] virtio-ring: Use threshold for switching to indirect descriptors

2011-12-08 Thread Rusty Russell
On Wed, 7 Dec 2011 17:48:17 +0200, "Michael S. Tsirkin" wrote: > On Wed, Dec 07, 2011 at 04:02:45PM +0200, Sasha Levin wrote: > > On Sun, 2011-12-04 at 20:23 +0200, Sasha Levin wrote: > > > > [snip] > > > > Rusty, Michael, does the below looks a reasonable optimization for you? > > OK overall b

[PATCH 0/11] RFC: PCI using capabilitities

2011-12-08 Thread Rusty Russell
Here's the patch series I ended up with. I haven't coded up the QEMU side yet, so no idea if the new driver works. Questions: (1) Do we win from separating ISR, NOTIFY and COMMON? (2) I used a "u8 bar"; should I use a bir and pack it instead? BIR seems a little obscure (noone else in the ker

Re: [net-next RFC PATCH 0/5] Series short description

2011-12-08 Thread Jason Wang
On 12/08/2011 01:02 AM, Ben Hutchings wrote: On Wed, 2011-12-07 at 19:31 +0800, Jason Wang wrote: On 12/07/2011 03:30 PM, Rusty Russell wrote: On Mon, 05 Dec 2011 16:58:37 +0800, Jason Wang wrote: multiple queue virtio-net: flow steering through host/guest cooperation Hello all: This is a

Re: [PATCH] macvtap: Fix macvtap_get_queue to use rxhash first

2011-12-08 Thread Jason Wang
On 12/08/2011 12:10 AM, Michael S. Tsirkin wrote: On Fri, Nov 25, 2011 at 01:35:52AM -0500, David Miller wrote: From: Krishna Kumar2 Date: Fri, 25 Nov 2011 09:39:11 +0530 Jason Wang wrote on 11/25/2011 08:51:57 AM: My description is not clear again :( I mean the same vhost thead: vhost thre

Re: [PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2011-12-08 Thread Avi Kivity
On 12/07/2011 06:46 PM, Raghavendra K T wrote: > On 12/07/2011 08:22 PM, Avi Kivity wrote: >> On 12/07/2011 03:39 PM, Marcelo Tosatti wrote: Also I think we can keep the kicked flag in vcpu->requests, no need for new storage. >>> >>> Was going to suggest it but it violates the curren

Re: [PATCH RFC] virtio_net: fix refill related races

2011-12-08 Thread Rusty Russell
On Wed, 7 Dec 2011 17:21:22 +0200, "Michael S. Tsirkin" wrote: > Fix theoretical races related to refill work: > 1. After napi is disabled by ndo_stop, refill work >can run and re-enable it. > 2. Refill can reschedule itself, if this happens >it can run after cancel_delayed_work_sync, >