Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 23:30, Michael S. Tsirkin ha scritto: >> +static int virtblk_get_cache_mode(struct virtio_device *vdev) > > Why are you converting u8 to int here? The fact that it is a u8 is really an internal detail. Perhaps the bug is using u8 in the callers. >>> >>> Mak

Re: [PATCH 6/6] virtio-scsi: Set shost->max_id=1 for tcm_vhost WWPNs

2012-07-04 Thread Paolo Bonzini
Il 05/07/2012 04:05, Nicholas A. Bellinger ha scritto: >> > But that's what the config field is for... why can't tcm_vhost (or QEMU) >> > set max_id to 0? >> > > So this patch was carried forward from Stefan's original code that I > thought was required due to other limitations.. > > If that's no

Re: [PATCH] tcm_vhost: Fix tv_cmd completion -> release SGL memory leak

2012-07-04 Thread Zhi Yong Wu
On Thu, 2012-07-05 at 04:14 +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > The SGL memory allocated during vhost_scsi_map_iov_to_sgl() setup was never > getting freed during tv_cmd completion -> release path. Fix this up by > releasing > tv_cmd->tvc_sgl in vhost_scsi_free_cm

[PATCH] tcm_vhost: Fix tv_cmd completion -> release SGL memory leak

2012-07-04 Thread Nicholas A. Bellinger
From: Nicholas Bellinger The SGL memory allocated during vhost_scsi_map_iov_to_sgl() setup was never getting freed during tv_cmd completion -> release path. Fix this up by releasing tv_cmd->tvc_sgl in vhost_scsi_free_cmd() ahead of tv_cmd descriptor free. Cc: Stefan Hajnoczi Cc: Zhi Yong Wu

Re: [PATCH 6/6] virtio-scsi: Set shost->max_id=1 for tcm_vhost WWPNs

2012-07-04 Thread Nicholas A. Bellinger
On Wed, 2012-07-04 at 16:50 +0200, Paolo Bonzini wrote: > Il 04/07/2012 06:24, Nicholas A. Bellinger ha scritto: > > From: Nicholas Bellinger > > > > This is currently required for connecting to tcm_vhost in order to prevent > > the client LUN scan from detecting the same tcm_vhost WWPN on multip

Re: [PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-04 Thread Nicholas A. Bellinger
On Wed, 2012-07-04 at 18:05 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 04, 2012 at 04:52:00PM +0200, Paolo Bonzini wrote: > > Il 04/07/2012 16:02, Michael S. Tsirkin ha scritto: > > > On Wed, Jul 04, 2012 at 04:24:00AM +, Nicholas A. Bellinger wrote: > > >> From: Nicholas Bellinger > > >>

Re: [PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-04 Thread Nicholas A. Bellinger
Hi Anthony & Co, On Wed, 2012-07-04 at 17:12 -0500, Anthony Liguori wrote: > On 07/04/2012 10:05 AM, Michael S. Tsirkin wrote: > > On Wed, Jul 04, 2012 at 04:52:00PM +0200, Paolo Bonzini wrote: > >> Il 04/07/2012 16:02, Michael S. Tsirkin ha scritto: > >>> On Wed, Jul 04, 2012 at 04:24:00AM +,

Re: [PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-04 Thread Anthony Liguori
On 07/04/2012 10:05 AM, Michael S. Tsirkin wrote: On Wed, Jul 04, 2012 at 04:52:00PM +0200, Paolo Bonzini wrote: Il 04/07/2012 16:02, Michael S. Tsirkin ha scritto: On Wed, Jul 04, 2012 at 04:24:00AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger Hi folks, This series contains

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Michael S. Tsirkin
On Wed, Jul 04, 2012 at 06:08:50PM +0200, Paolo Bonzini wrote: > Il 04/07/2012 18:02, Michael S. Tsirkin ha scritto: > > On Wed, Jul 04, 2012 at 05:54:16PM +0200, Paolo Bonzini wrote: > >> Il 04/07/2012 17:42, Michael S. Tsirkin ha scritto: > >>> On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonz

Re: [PATCH v3 2/4] virtio_balloon: handle concurrent accesses to virtio_balloon struct elements

2012-07-04 Thread Rafael Aquini
Howdy Rusty, First and foremost, thank you very much for taking the time to go through this proposal and provide me with such valuable feedback. I really appreciate that. On Wed, Jul 04, 2012 at 04:08:23PM +0930, Rusty Russell wrote: > On Tue, 3 Jul 2012 20:48:50 -0300, Rafael Aquini wrote: > >

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 18:02, Michael S. Tsirkin ha scritto: > On Wed, Jul 04, 2012 at 05:54:16PM +0200, Paolo Bonzini wrote: >> Il 04/07/2012 17:42, Michael S. Tsirkin ha scritto: >>> On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini wrote: This patch adds support for the new VIRTIO_BLK_F_CONFIG

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Michael S. Tsirkin
On Wed, Jul 04, 2012 at 05:54:16PM +0200, Paolo Bonzini wrote: > Il 04/07/2012 17:42, Michael S. Tsirkin ha scritto: > > On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini wrote: > >> This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, > >> which exposes the cache mode in the

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 17:42, Michael S. Tsirkin ha scritto: > On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini wrote: >> This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, >> which exposes the cache mode in the configuration space and lets the >> driver modify it. The cache mode i

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Michael S. Tsirkin
On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini wrote: > This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, > which exposes the cache mode in the configuration space and lets the > driver modify it. The cache mode is exposed via sysfs. > > Even if the host does not suppo

Re: [PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-04 Thread Michael S. Tsirkin
On Wed, Jul 04, 2012 at 04:52:00PM +0200, Paolo Bonzini wrote: > Il 04/07/2012 16:02, Michael S. Tsirkin ha scritto: > > On Wed, Jul 04, 2012 at 04:24:00AM +, Nicholas A. Bellinger wrote: > >> From: Nicholas Bellinger > >> > >> Hi folks, > >> > >> This series contains patches required to updat

Re: [PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 16:02, Michael S. Tsirkin ha scritto: > On Wed, Jul 04, 2012 at 04:24:00AM +, Nicholas A. Bellinger wrote: >> From: Nicholas Bellinger >> >> Hi folks, >> >> This series contains patches required to update tcm_vhost <-> virtio-scsi >> connected hosts <-> guests to run on v3.5-rc2

Re: [PATCH 6/6] virtio-scsi: Set shost->max_id=1 for tcm_vhost WWPNs

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 06:24, Nicholas A. Bellinger ha scritto: > From: Nicholas Bellinger > > This is currently required for connecting to tcm_vhost in order to prevent > the client LUN scan from detecting the same tcm_vhost WWPN on multiple target > IDs. But that's what the config field is for... why c

Re: [PATCH 5/6] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 06:24, Nicholas A. Bellinger ha scritto: > From: Nicholas Bellinger > > This patch changes virtio-scsi to use a new virtio_driver->scan() callback > so that scsi_scan_host() can be properly invoked once virtio_dev_probe() has > set add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK) to signa

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-04 Thread Paolo Bonzini
Il 03/07/2012 16:28, Dor Laor ha scritto: Users using a spinning disk still get IO scheduling in the host though. What benefit is there in doing it in the guest as well? >>> >>> The io scheduler waits for requests to merge and thus batch IOs >>> together. It's not important w.r.t spinning

Re: [PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-04 Thread Michael S. Tsirkin
On Wed, Jul 04, 2012 at 04:24:00AM +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > Hi folks, > > This series contains patches required to update tcm_vhost <-> virtio-scsi > connected hosts <-> guests to run on v3.5-rc2 mainline code. This series is > available on top of targe

Re: [PATCH v2] virtio-scsi: hotplug support for virtio-scsi

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 10:11, m...@linux.vnet.ibm.com ha scritto: >>> >>> >>> Signed-off-by: Cong Meng >>> Signed-off-by: Sen Wang >> >> The SoB lines are swapped. Otherwise looks good. Since you have to >> respin, please add dropped event support too, it shouldn't be hard. > > What does "The SoB lines

Re: RFD: virtio balloon API use (was Re: [PATCH 5 of 5] virtio: expose added descriptors immediately)

2012-07-04 Thread Michael S. Tsirkin
On Mon, Jul 02, 2012 at 01:08:19PM -0300, Rafael Aquini wrote: > On Mon, Jul 02, 2012 at 10:25:58AM +0300, Michael S. Tsirkin wrote: > > On Mon, Jul 02, 2012 at 10:35:47AM +0930, Rusty Russell wrote: > > > On Sun, 1 Jul 2012 12:20:51 +0300, "Michael S. Tsirkin" > > > wrote: > > > > On Thu, Nov 03

Re: RFD: virtio balloon API use (was Re: [PATCH 5 of 5] virtio: expose added descriptors immediately)

2012-07-04 Thread Michael S. Tsirkin
On Tue, Jul 03, 2012 at 10:17:46AM +0930, Rusty Russell wrote: > On Mon, 2 Jul 2012 13:08:19 -0300, Rafael Aquini wrote: > > As 'locking in balloon', may I assume the approach I took for the > > compaction case > > is OK and aligned to address these concerns of yours? If not, do not > > hesitate

Re: [PATCH v2] virtio-scsi: hotplug support for virtio-scsi

2012-07-04 Thread mc
Quoting Paolo Bonzini : Il 03/07/2012 07:41, Cong Meng ha scritto: This patch implements the hotplug support for virtio-scsi. When there is a device attached/detached, the virtio-scsi driver will be signaled via event virtual queue and it will add/remove the scsi device in question automatical