Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA

2011-12-15 Thread Sasha Levin
On Fri, 2011-12-16 at 15:40 +0800, Zang Hongyong wrote: > 于 2011/12/16,星期五 15:05, Sasha Levin 写道: > > On Fri, 2011-12-16 at 13:32 +0800, zanghongy...@huawei.com wrote: > >> From: Hongyong Zang > >> > >> Vhost-net uses its own vhost_memory, which results from user space (qemu) > >> info, > >> to tr

Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA

2011-12-15 Thread Sasha Levin
On Fri, 2011-12-16 at 13:32 +0800, zanghongy...@huawei.com wrote: > From: Hongyong Zang > > Vhost-net uses its own vhost_memory, which results from user space (qemu) > info, > to translate GPA to HVA. Since kernel's kvm structure already maintains the > address relationship in its member *kvm_m

Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA

2011-12-15 Thread Takuya Yoshikawa
(2011/12/16 14:32), zanghongy...@huawei.com wrote: > From: Hongyong Zang > > Vhost-net uses its own vhost_memory, which results from user space (qemu) > info, > to translate GPA to HVA. Since kernel's kvm structure already maintains the > address relationship in its member *kvm_memslots*, these p

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

2011-12-15 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: [RFC 7/11] virtio_pci: new, capability-aware driver.

2011-12-15 Thread Rusty Russell
On Mon, 12 Dec 2011 13:10:08 -0500, Don Dutile wrote: > On 12/12/2011 06:49 AM, Michael S. Tsirkin wrote: > > On Mon, Dec 12, 2011 at 09:15:03AM +1030, Rusty Russell wrote: > >> On Sun, 11 Dec 2011 11:42:56 +0200, "Michael S. Tsirkin" > >> wrote: > >>> On Thu, Dec 08, 2011 at 09:09:33PM +1030, R

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

2011-12-15 Thread Rusty Russell
On Thu, 15 Dec 2011 10:27:50 +0200, "Michael S. Tsirkin" wrote: > On Tue, Dec 13, 2011 at 12:51:20PM +1030, Rusty Russell wrote: > I mean like this in block: > > > > /* Host must always specify the capacity. */ > vdev->config->get(vdev, offsetof(struct virtio_blk_config, > capa

Re: [RFC 3/11] pci: add pci_iomap_range

2011-12-15 Thread Rusty Russell
On Thu, 15 Dec 2011 10:30:49 +0200, "Michael S. Tsirkin" wrote: > On Thu, Dec 08, 2011 at 09:02:46PM +1030, Rusty Russell wrote: > > 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. Tsirk

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

2011-12-15 Thread Rusty Russell
On Thu, 15 Dec 2011 01:36:44 +, Ben Hutchings wrote: > On Fri, 2011-12-09 at 16:01 +1030, Rusty Russell wrote: > > On Wed, 7 Dec 2011 17:02:04 +, Ben Hutchings > > wrote: > > > Most multi-queue controllers could support a kind of hash-based > > > filtering for TCP/IP by adjusting the RS

Re: [PATCH v5 00/11] virtio: s4 support

2011-12-15 Thread Amit Shah
On (Thu) 15 Dec 2011 [15:13:14], Michael S. Tsirkin wrote: > On Thu, Dec 15, 2011 at 06:15:46PM +0530, Amit Shah wrote: > > Hi, > > > > These patches add support for S4 to virtio (pci) and all drivers. > > > > Michael saw some race in virtio-net module removal which will need a > > similar fix fo

CFP: ACM Symposium on High-Performance Parallel and Distributed Computing (HPDC'12)

2011-12-15 Thread Ioan Raicu
CALL FOR PAPERS The 21st International ACM Symposium on High-Performance Parallel and Distributed Computing (HPDC'12) Delft University of Technology, Delft, the Netherlands Ju

Re: [PATCH v5 00/11] virtio: s4 support

2011-12-15 Thread Michael S. Tsirkin
On Thu, Dec 15, 2011 at 06:15:46PM +0530, Amit Shah wrote: > Hi, > > These patches add support for S4 to virtio (pci) and all drivers. > > Michael saw some race in virtio-net module removal which will need a > similar fix for the freeze code as well. I'll update the virtio-net > patch with that

[PATCH v5 11/11] virtio: balloon: Add freeze, restore handlers to support S4

2011-12-15 Thread Amit Shah
Handling balloon hibernate / restore is tricky. If the balloon was inflated before going into the hibernation state, upon resume, the host will not have any memory of that. Any pages that were passed on to the host earlier would most likely be invalid, and the host will have to re-balloon to the

[PATCH v5 10/11] virtio: balloon: Move vq initialization into separate function

2011-12-15 Thread Amit Shah
The probe and PM restore functions will share this code. Signed-off-by: Amit Shah --- drivers/virtio/virtio_balloon.c | 48 -- 1 files changed, 30 insertions(+), 18 deletions(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c

[PATCH v5 09/11] virtio: net: Add freeze, restore handlers to support S4

2011-12-15 Thread Amit Shah
Remove all the vqs, disable napi and detach from the netdev on hibernation. Re-create vqs after restoring from a hibernated image, re-enable napi and re-attach the netdev. This keeps networking working across hibernation. Signed-off-by: Amit Shah --- drivers/net/virtio_net.c | 36 +++

[PATCH v5 08/11] virtio: net: Move vq and vq buf removal into separate function

2011-12-15 Thread Amit Shah
The remove and PM freeze functions will share this code. Signed-off-by: Amit Shah --- drivers/net/virtio_net.c | 19 --- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 6baa563..697a0fc 100644 --- a/drive

[PATCH v5 07/11] virtio: net: Move vq initialization into separate function

2011-12-15 Thread Amit Shah
The probe and PM restore functions will share this code. Signed-off-by: Amit Shah --- drivers/net/virtio_net.c | 47 +++-- 1 files changed, 28 insertions(+), 19 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 6ee8410.

[PATCH v5 06/11] virtio: blk: Add freeze, restore handlers to support S4

2011-12-15 Thread Amit Shah
Delete the vq and flush any pending requests from the block queue on the freeze callback to prepare for hibernation. Re-create the vq in the restore callback to resume normal function. Signed-off-by: Amit Shah --- drivers/block/virtio_blk.c | 38 ++ 1 files

[PATCH v5 05/11] virtio: blk: Move vq initialization to separate function

2011-12-15 Thread Amit Shah
The probe and PM restore functions will share this code. Signed-off-by: Amit Shah --- drivers/block/virtio_blk.c | 19 ++- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 4d0b70a..467f218 100644 --- a

[PATCH v5 04/11] virtio: console: Add freeze and restore handlers to support S4

2011-12-15 Thread Amit Shah
Remove all vqs and associated buffers in the freeze callback which prepares us to go into hibernation state. On restore, re-create all the vqs and populate the input vqs with buffers to get to the pre-hibernate state. Note: Any outstanding unconsumed buffers are discarded; which means there's a p

[PATCH v5 03/11] virtio: console: Move vq and vq buf removal into separate functions

2011-12-15 Thread Amit Shah
This common code will be shared with the PM freeze function. Signed-off-by: Amit Shah --- drivers/char/virtio_console.c | 68 - 1 files changed, 40 insertions(+), 28 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c

[PATCH v5 02/11] virtio: pci: add PM notification handlers for restore, freeze, thaw, poweroff

2011-12-15 Thread Amit Shah
Handle thaw, restore and freeze notifications from the PM core. Expose these to individual virtio drivers that can quiesce and resume vq operations. For drivers not implementing the thaw() method, use the restore method instead. These functions also save device-specific data so that the device c

[PATCH v5 01/11] virtio: pci: switch to new PM API

2011-12-15 Thread Amit Shah
The older PM API doesn't have a way to get notifications on hibernate events. Switch to the newer one that gives us those notifications. Signed-off-by: Amit Shah --- drivers/virtio/virtio_pci.c | 16 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/virt

[PATCH v5 00/11] virtio: s4 support

2011-12-15 Thread Amit Shah
Hi, These patches add support for S4 to virtio (pci) and all drivers. Michael saw some race in virtio-net module removal which will need a similar fix for the freeze code as well. I'll update the virtio-net patch with that fix once the fix is settled upon and applied. For each driver, all vqs a

Re: [PATCH 1/2] params: _initcall-like kernel parameters

2011-12-15 Thread Pawel Moll
Morning, On Thu, 2011-12-15 at 03:51 +, Rusty Russell wrote: > On Mon, 12 Dec 2011 17:57:06 +, Pawel Moll wrote: > > This patch adds a set of macros that can be used to declare > > kernel parameters to be parsed _before_ initcalls at a chosen > > level are executed. Such parameters are ma

Re: [RFC 3/11] pci: add pci_iomap_range

2011-12-15 Thread Michael S. Tsirkin
On Thu, Dec 08, 2011 at 09:02:46PM +1030, Rusty Russell wrote: > 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 I think that we should add a forcenocache

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

2011-12-15 Thread Michael S. Tsirkin
On Tue, Dec 13, 2011 at 12:51:20PM +1030, Rusty Russell wrote: > On Mon, 12 Dec 2011 20:25:34 +0200, "Michael S. Tsirkin" > wrote: > > By the way, a generic question on virtio-pci: we now have: > > > > /* virtio config->get() implementation */ > > static void vp_get(struct virtio_device *vdev, u