Re: [Qemu-block] [Qemu-devel] Question about xen disk unplug support for ahci missed in qemu

2015-10-15 Thread Anthony PERARD
ing, but I think one difference would be the viridian setting, I'm pretty sure I did not set it. -- Anthony PERARD

Re: [Qemu-block] [Qemu-devel] Question about xen disk unplug support for ahci missed in qemu

2015-10-16 Thread Anthony PERARD
On Fri, Oct 16, 2015 at 10:32:44AM +0200, Fabio Fantoni wrote: > Il 15/10/2015 20:02, Anthony PERARD ha scritto: > >On Thu, Oct 15, 2015 at 06:27:17PM +0200, Fabio Fantoni wrote: > >>Il 14/10/2015 13:06, Stefano Stabellini ha scritto: > >>>I would suggest Fabio to a

Re: [Qemu-block] [PATCH v3] xen_disk: split discard input to match internal representation

2016-11-23 Thread Anthony PERARD
checking to avoid overflow. > > Fixes f313520 ("xen_disk: add discard support") > > Signed-off-by: Olaf Hering Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH 1/3] Improve xen_disk batching behaviour

2018-11-02 Thread Anthony PERARD
eck to start batching I/O requests via blk_io_plug()/ > blk_io_unplug() in an amount proportional to the number which were > already in flight at the time we started reading the ring. > > Signed-off-by: Tim Smith Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH 2/3] Improve xen_disk response latency

2018-11-02 Thread Anthony PERARD
y should be sent, which is all the batching we need. > > Signed-off-by: Tim Smith Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH 3/3] Avoid repeated memory allocation in xen_disk

2018-11-02 Thread Anthony PERARD
s > should actually improve memory usage. > > Signed-off-by: Tim Smith Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH 01/18] xen: re-name XenDevice to XenLegacyDevice...

2018-11-28 Thread Anthony PERARD
is purely cosmetic. No functional change. Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH 02/18] xen: introduce new 'XenBus' and 'XenDevice' object hierarchy

2018-11-28 Thread Anthony PERARD
ne with TYPE_XENSYSBUS? The rest looks good, Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH 02/18] xen: introduce new 'XenBus' and 'XenDevice' object hierarchy

2018-11-28 Thread Anthony PERARD
sure what that does. Indeed, that works fine, and I think I've tested block-detach as well. Maybe we will need something if we initiate attach of a block device via QMP instead of xenstore, but we can fix that later. -- Anthony PERARD

Re: [Qemu-block] [PATCH 03/18] xen: introduce 'xen-qdisk'

2018-11-29 Thread Anthony PERARD
quot;); > +g_free(str); :(, g_free is called twice. maybe we could have: vdev->valid=true; out: if (!vdev->valid) error_setg(...); g_free; > diff --git a/include/hw/xen/xen-qdisk.h b/include/hw/xen/xen-qdisk.h > new file mode 100644 > index 00..ade0866037 > --- /dev/null > +++ b/include/hw/xen/xen-qdisk.h > @@ -0,0 +1,38 @@ > +/* > + * Copyright (c) Citrix Systems Inc. > + * All rights reserved. > + */ > + > +#ifndef HW_XEN_QDISK_H > +#define HW_XEN_QDISK_H > + > +#include "hw/xen/xen-bus.h" > + > +typedef enum XenQdiskVdevType { > +XEN_QDISK_VDEV_TYPE_DP, Maybe we could set type_dp value to 1, so that, when vdev->type isn't set, we can detect it later. > +XEN_QDISK_VDEV_TYPE_XVD, > +XEN_QDISK_VDEV_TYPE_HD, > +XEN_QDISK_VDEV_TYPE_SD, > +XEN_QDISK_VDEV_TYPE__MAX > +} XenQdiskVdevType; Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH 04/18] xen: create xenstore areas for XenDevice-s

2018-11-29 Thread Anthony PERARD
xsh, const char *node, const char *key, > +const char *fmt, ...); This prototype needs GCC_FMT_ATTR(), that's the printf format __attribute__. > + > +int xs_node_vscanf(struct xs_handle *xsh, const char *node, const char *key, > + const char *fmt, va_list ap); > +int xs_node_scanf(struct xs_handle *xsh, const char *node, const char *key, > + const char *fmt, ...); Maybe here as well. -- Anthony PERARD

Re: [Qemu-block] [PATCH 05/18] xen: add xenstore watcher infratructure

2018-12-03 Thread Anthony PERARD
XenBus *xenbus = XEN_BUS(bus); > @@ -230,12 +419,24 @@ static void xen_device_frontend_create(XenDevice > *xendev, Error **errp) > error_propagate(errp, local_err); > error_prepend(errp, "failed to create frontend: "); > } > + > +xendev->frontend_state_watch = > +xen_bus_add_watch(xenbus, xendev->frontend_path, "state", > + xen_device_frontend_changed, xendev, &local_err); You can't reuse local_err here, *local_err must be null (It isn't exactly written like this, but that what I understand from reading qapi/error.h). Maybe you meant to return when the previous function failed (call of xs_node_create)? > +if (local_err) { > +error_propagate(errp, local_err); > +error_prepend(errp, "failed to watch frontend state: "); > +} > } Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH 06/18] xen: add grant table interface for XenDevice-s

2018-12-03 Thread Anthony PERARD
ize_t len; > +} XenDeviceGrantCopySegment; Anyway, it's not very important: Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH 07/18] xen: add event channel interface for XenDevice-s

2018-12-03 Thread Anthony PERARD
he xenstore watches in previous patches, as NotifierLists are normaly used when every Notifiers want to do something, but here there is only one that is going to do something. But I guess it might not be much better to write a loop in here rather than use the one in notifier_list_notify. > + > +xenevtchn_unmask(xendev->xeh, port); > +} > + -- Anthony PERARD

Re: [Qemu-block] [PATCH 08/18] xen: duplicate xen_disk.c as basis of dataplane/xen-qdisk.c

2018-12-03 Thread Anthony PERARD
On Mon, Dec 03, 2018 at 04:35:39PM +, Anthony PERARD wrote: > On Wed, Nov 21, 2018 at 03:12:01PM +, Paul Durrant wrote: > > The new xen-qdisk XenDevice implementation requires the same core dataplane > > as the legacy xen_disk implementation it will eventually replace.

Re: [Qemu-block] [PATCH 08/18] xen: duplicate xen_disk.c as basis of dataplane/xen-qdisk.c

2018-12-03 Thread Anthony PERARD
s that will need to be made to the code are not > conflated with code movement, thus making review harder. > > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH 09/18] xen: remove unnecessary code from dataplane/xen-qdisk.c

2018-12-03 Thread Anthony PERARD
re licensed under the terms of the > - * GNU GPL, version 2 or (at your option) any later version. > + * Based on original code (c) Gerd Hoffmann > */ Once this license boilerplate is kept unchange, beside the extra Copyright line, then: Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH 10/18] xen: add header and build dataplane/xen-qdisk.c

2018-12-03 Thread Anthony PERARD
16bcd500bf > --- /dev/null > +++ b/hw/block/dataplane/xen-qdisk.h > @@ -0,0 +1,25 @@ > +/* > + * Copyright (c) Citrix Systems Inc. > + * All rights reserved. > + */ > + > +#ifndef HW_BLOCK_DATAPLANE_QDISK_H > +#define HW_BLOCK_DATAPLANE_QDISK_H > + > +#include "hw/xen/xen-bus.h" > +#include "sysemu/iothread.h" I would add #include "hw/block/block.h" since it includes the definition of BlockConf. > + > +typedef struct XenBlkDev XenQdiskDataPlane; > + > +XenQdiskDataPlane *xen_qdisk_dataplane_create(XenDevice *xendev, > + BlockConf *conf, > + IOThread *iothread); Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH 11/18] xen: remove 'XenBlkDev' and 'blkdev' names from dataplane/xen-qdisk

2018-12-04 Thread Anthony PERARD
cessary fix-up to adhere to coding style. > > No functional change. > > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH 12/18] xen: remove 'ioreq' struct/varable/field names from dataplane/xen-qdisk.c

2018-12-04 Thread Anthony PERARD
this patch. Yhey will be dealt with in s/Yhey/They/ > a subsequent patch. > > No functional change. > > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH 13/18] xen: purge 'blk' and 'ioreq' from function names in dataplane/xen-qdisk.c

2018-12-04 Thread Anthony PERARD
ve xendisk_start_request, or xendisk_request_start. I don't have a preference beside staying away from generic names. Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH 14/18] xen: add implementations of xen-qdisk connect and disconnect functions...

2018-12-04 Thread Anthony PERARD
ad.h" #include "hw/block/dataplane/xen-qdisk.h" > > typedef enum XenQdiskVdevType { > XEN_QDISK_VDEV_TYPE_DP, > @@ -33,6 +41,10 @@ typedef struct XenQdiskDevice XenQdiskDevice; > struct XenQdiskDevice { > XenDevice xendev; > XenQdiskVdev vdev; > +BlockConf conf; > +unsigned int max_ring_page_order; > +IOThread *iothread; > +XenQdiskDataPlane *dataplane; > }; > > #endif /* HW_XEN_QDISK_H */ -- Anthony PERARD

Re: [Qemu-block] [PATCH 07/18] xen: add event channel interface for XenDevice-s

2018-12-04 Thread Anthony PERARD
On Mon, Dec 03, 2018 at 04:24:24PM +, Anthony PERARD wrote: > On Wed, Nov 21, 2018 at 03:12:00PM +, Paul Durrant wrote: > > +static void xen_device_event(void *opaque) > > +{ > > +XenDevice *xendev = opaque; > > +unsigned long port = xe

Re: [Qemu-block] [PATCH 15/18] xen: add a mechanism to automatically create XenDevice-s...

2018-12-04 Thread Anthony PERARD
xendev, &local_err); > +if (local_err) { > +error_propagate(errp, local_err); > +error_prepend(errp, "failed to watch backend state: "); You should return here, as local_err mustn't be reused. > + } > + > +xendev->backend_online_watch = > +xen_bus_add_watch(xenbus, xendev->backend_path, > + "online", xen_device_backend_changed, > + xendev, &local_err); > +if (local_err) { > +error_propagate(errp, local_err); > +error_prepend(errp, "failed to watch backend online: "); You probably want a return here, in case there is more code added after. > +} Other instances of error_propagate;error_prepend to be replaced by error_propagate_prepend. > } > Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH 03/18] xen: introduce 'xen-qdisk'

2018-12-04 Thread Anthony PERARD
+#include "hw/xen/xen-bus.h" > > > + > > > +typedef enum XenQdiskVdevType { > > > +XEN_QDISK_VDEV_TYPE_DP, > > > > Maybe we could set type_dp value to 1, so that, when vdev->type isn't > > set, we can detect it later. > > Rather than having the 'valid' bool? Yes, that would work. Well, the 'valid' bool doesn't seems to always be check so it would be better. e.g. xen_qdisk_get_vdev() doesn't check `valid` before genereting a string. Then xen_qdisk_set_vdev could set `type` to invalid when it is invalid. -- Anthony PERARD

Re: [Qemu-block] [PATCH 17/18] MAINTAINERS: add myself as a Xen maintainer

2018-12-04 Thread Anthony PERARD
ends to the new framework with the intent of eventually removing the > legacy code. It therefore seems reasonable that I become a maintiner of > the Xen code. > > Signed-off-by: Paul Durrant With the typo fixed: Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH 16/18] xen: automatically create XenQdiskDevice-s

2018-12-04 Thread Anthony PERARD
error_propagate(errp, local_err); > +error_prepend(errp, "failed to set 'drive': "); > +goto unref; > +} > + > +XEN_QDISK_DEVICE(dev)->auto_iothread = iothread; > + > +qdev_init_nofail(dev); That function shouldn't be use during hotplug. But I'm not sure what should be done instead, probably object_property_set_bool(..., true "realized") and check for error. Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH 04/18] xen: create xenstore areas for XenDevice-s

2018-12-05 Thread Anthony PERARD
QEMU. But g_strdup_printf is fine too. https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-vasprintf -- Anthony PERARD

Re: [Qemu-block] [PATCH 04/18] xen: create xenstore areas for XenDevice-s

2018-12-05 Thread Anthony PERARD
g the nul. > */ > > and I think we should check it for NULL before passing it to vsscanf(). I've sent a patch against xenstore.h to document that xs_read, and some other functions, can return NULL. <20181205162603.25788-1-anthony.per...@citrix.com> -- Anthony PERARD

Re: [Qemu-block] [PATCH 15/18] xen: add a mechanism to automatically create XenDevice-s...

2018-12-06 Thread Anthony PERARD
On Thu, Dec 06, 2018 at 12:36:52PM +, Paul Durrant wrote: > > -Original Message- > > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > > Sent: 04 December 2018 15:35 > > > > On Wed, Nov 21, 2018 at 03:12:08PM +, Paul Durrant wrote: &g

Re: [Qemu-block] [PATCH v2 02/18] xen: introduce new 'XenBus' and 'XenDevice' object hierarchy

2018-12-07 Thread Anthony PERARD
> > The XenBus object is instantiated by a new xen_bus_init() function called > from the same sites as the legacy xen_be_init() function. > > Subsequent patches will flesh-out the functionality of these objects. > > Signed-off-by: Paul Durrant > --- > Cc: Stefano

Re: [Qemu-block] [PATCH v2 03/18] xen: introduce 'xen-block', 'xen-disk' and 'xen-cdrom'

2018-12-07 Thread Anthony PERARD
7;; > +} > +*endp = name; > + > +return disk; > +} > + > +static void xen_block_set_vdev(Object *obj, Visitor *v, const char *name, > + void *opaque, Error **errp) > +{ Setting vdev doesn't work. I've tried to add a disk `xvdaa', and it result in `xvda', or `d0p0' (in the trace). (Same result with `xvdaaa', and 'xvdba' gives 'xvdaa'/d26p0) -- Anthony PERARD

Re: [Qemu-block] [PATCH v2 04/18] xen: create xenstore areas for XenDevice-s

2018-12-07 Thread Anthony PERARD
t; [1] The 'scanf' functions are actually not yet needed, but they will be > needed by code delivered in subsequent patches. > > Signed-off-by: Paul Durrant Looks good, Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH v2 03/18] xen: introduce 'xen-block', 'xen-disk' and 'xen-cdrom'

2018-12-07 Thread Anthony PERARD
On Fri, Dec 07, 2018 at 02:39:40PM +, Paul Durrant wrote: > > -Original Message- > > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > > Sent: 07 December 2018 14:35 > > To: Paul Durrant > > Cc: qemu-de...@nongnu.org; qemu-block@nongnu.org; xen-

Re: [Qemu-block] [PATCH v2 05/18] xen: add xenstore watcher infrastructure

2018-12-07 Thread Anthony PERARD
rr); You could simply pass `errp' directly instead of having `local_err'. > + > +notifier_remove(&watch->notifier); > +free_watch(watch); > + > +if (local_err) { > +error_propagate(errp, local_err); > +} > +} > + -- Anthony PERARD

Re: [Qemu-block] [PATCH v2 07/18] xen: add event channel interface for XenDevice-s

2018-12-07 Thread Anthony PERARD
> support. > > Signed-off-by: Paul Durrant Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [Qemu-block] [Xen-devel] [PATCH v2 09/18] xen: remove unnecessary code from dataplane/xen-block.c

2018-12-07 Thread Anthony PERARD
Systems Inc. You can add this copyright line just after Gerd's one abrove. > + * > + * This work is licensed under the terms of the GNU GPL, version 2 or later. > + * See the COPYING file in the top-level directory. And I'm pretty sure this should not be added. The boilerplate at

Re: [Qemu-block] [PATCH v2 10/18] xen: add header and build dataplane/xen-block.c

2018-12-07 Thread Anthony PERARD
x27;t need to leak out of the > dataplane code. > > Signed-off-by: Paul Durrant Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH v2 13/18] xen: purge 'blk' and 'ioreq' from function names in dataplane/xen-block.c

2018-12-07 Thread Anthony PERARD
onal change. > > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v2 14/18] xen: add implementations of xen-block connect and disconnect functions...

2018-12-07 Thread Anthony PERARD
ys be present, even for CDRom devices. > + */ > +assert(conf->blk); That assert should probably not be there, as a missing conf->blk isn't a programming error, but a user error, I think. Actually, the issue is the missing return abrove, and the assert is probably fine. -- Anthony PERARD

Re: [Qemu-block] [PATCH v2 15/18] xen: add a mechanism to automatically create XenDevice-s...

2018-12-07 Thread Anthony PERARD
s > implementation to handle enumeration of new backends and also destruction > of XenDevice-s when the toolstack sets the backend 'online' key to 0. > > NOTE: This patch only adds the framework. A subsequent patch will add a > creator function for xen-block device

Re: [Qemu-block] [PATCH v2 16/18] xen: automatically create XenBlockDevice-s

2018-12-07 Thread Anthony PERARD
de is redundant. It > will be removed by a subsequent patch. > > Signed-off-by: Paul Durrant Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH v2 18/18] xen: remove the legacy 'xen_disk' backend

2018-12-07 Thread Anthony PERARD
On Thu, Dec 06, 2018 at 03:08:44PM +, Paul Durrant wrote: > This backend has now been replaced by the 'xen-qdisk' XenDevice. > > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v3 03/18] xen: introduce 'xen-block', 'xen-disk' and 'xen-cdrom'

2018-12-11 Thread Anthony PERARD
done with an argument > similar to the following: > > -device xen-disk,vdev=hda > > The implementation of the vdev parameter formulates the appropriate VBD > number for use in the PV protocol. > > [1] https://xenbits.xen.org/docs/unstable/man/xen-vbd-interface.7.html &g

Re: [Qemu-block] [PATCH v3 04/18] xen: create xenstore areas for XenDevice-s

2018-12-11 Thread Anthony PERARD
t; [1] The 'scanf' functions are actually not yet needed, but they will be > needed by code delivered in subsequent patches. > > Signed-off-by: Paul Durrant > --- > > v3: > - Add transaction id parameters to xen-bus-helper functions > - Not added Anthony's R-b because of change > Reviewed-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [Xen-devel] [PATCH v3 09/18] xen: remove unnecessary code from dataplane/xen-block.c

2018-12-11 Thread Anthony PERARD
Inc. Can you move this copyright line to the existing license boilerplate as I've asked on v2? > + * > + * This work is licensed under the terms of the GNU GPL, version 2 or later. > + * See the COPYING file in the top-level directory. And this isn't needed as it just duplicate the already existing one. > + */ > Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH v3 05/18] xen: add xenstore watcher infrastructure

2018-12-11 Thread Anthony PERARD
ls as-yet stub 'connect' and 'disconnect' functions when the > relevant frontend state transitions occur. A subsequent patch will supply > a full implementation for these functions. > > Signed-off-by: Paul Durrant Reviewed-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v3 07/18] xen: add event channel interface for XenDevice-s

2018-12-11 Thread Anthony PERARD
> support. > > Signed-off-by: Paul Durrant > Reviewed-by: Stefano Stabellini When and where did this review happend? I can only find my review-by tag on v2, which is missing here. -- Anthony PERARD

Re: [Qemu-block] [PATCH v3 14/18] xen: add implementations of xen-block connect and disconnect functions...

2018-12-11 Thread Anthony PERARD
d the 'ring-ref' and > 'event-channel' values specified in the frontend xenstore area are > mapped/bound and used to set up the dataplane. > > Signed-off-by: Paul Durrant Reviewed-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v4 14/18] xen: add implementations of xen-block connect and disconnect functions...

2018-12-11 Thread Anthony PERARD
d the 'ring-ref' and > 'event-channel' values specified in the frontend xenstore area are > mapped/bound and used to set up the dataplane. > > Signed-off-by: Paul Durrant Reviewed-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v4 15/18] xen: add a mechanism to automatically create XenDevice-s...

2018-12-11 Thread Anthony PERARD
s > implementation to handle enumeration of new backends and also destruction > of XenDevice-s when the toolstack sets the backend 'online' key to 0. > > NOTE: This patch only adds the framework. A subsequent patch will add a > creator function for xen-block device

Re: [Qemu-block] [PATCH v1] xen_disk: fix memory leak

2018-12-13 Thread Anthony PERARD
oid ioreq_buf_free(struct ioreq *ioreq) > +{ > +if (ioreq->buf) > +qemu_vfree(ioreq->buf); > +ioreq->buf = NULL; > +} Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH v3 0/3] Performance improvements for xen_disk^Wxen-block

2018-12-13 Thread Anthony PERARD
271.html For the series: Acked-by: Anthony PERARD And I've pushed that here: https://xenbits.xen.org/gitweb/?p=people/aperard/qemu-dm.git;a=shortlog;h=refs/heads/xen-next -- Anthony PERARD

Re: [Qemu-block] [Xen-devel] [PATCH v5 09/18] xen: remove unnecessary code from dataplane/xen-block.c

2018-12-17 Thread Anthony PERARD
t patch. > > Signed-off-by: Paul Durrant > Acked-by: Anthony Perard > --- > Cc: Stefano Stabellini > Cc: Stefan Hajnoczi > Cc: Kevin Wolf > Cc: Max Reitz > > v2: > - Leave existing boilerplate alone, other than removing the now-incorrect >

Re: [Qemu-block] [PATCH v6 16/18] xen: automatically create XenBlockDevice-s

2018-12-19 Thread Anthony PERARD
ict_put_str(qdict, "locking", "off"); > + > +xen_block_drive_layer_add(drive, qdict, &local_err); > +qobject_unref(qdict); > + > +if (local_err) { > +error_propagate(errp, local_err); > +goto done; > +} > + > +/* If the image is a raw file then we are done */ I don't think that is true, as I have this warning in QEMU: qemu-system-i386: warning: Opening a block device as a file using the 'file' driver is deprecated We would need a "raw" driver. > +if (!strcmp(driver, "file")) { > +goto done; > +} > + > +qdict = qdict_new(); > + > +qdict_put_str(qdict, "driver", driver); > + > +xen_block_drive_layer_add(drive, qdict, &local_err); > +qobject_unref(qdict); > + > +done: > +g_free(driver); > +g_free(filename); > + > +if (local_err) { > +xen_block_drive_destroy(drive, NULL); > +return NULL; > +} > + > +return drive; > +} -- Anthony PERARD

Re: [Qemu-block] [PATCH v6 15/18] xen: add a mechanism to automatically create XenDevice-s...

2018-12-19 Thread Anthony PERARD
t; NOTE: This patch only adds the framework. A subsequent patch will add a > creator function for xen-block devices. > > Signed-off-by: Paul Durrant Reviewed-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v6 16/18] xen: automatically create XenBlockDevice-s

2018-12-19 Thread Anthony PERARD
scalar types. It should not be used for anything else, and it should go away once the block subsystem has been cleaned up. We might as well avoid using it right now, as it's easy to do so. -- Anthony PERARD

Re: [Qemu-block] [PATCH v7 09/18] xen: remove unnecessary code from dataplane/xen-block.c

2019-01-04 Thread Anthony PERARD
t patch. > > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v7 16/18] xen: automatically create XenBlockDevice-s

2019-01-04 Thread Anthony PERARD
strdup(v[0]); > +} > +filename = g_strdup(v[1]); > +} > + > +g_strfreev(v); > +} > + ... > +/* If the image is a raw file then we are done */ raw files should use the "raw" driver, so we aren't done yet. > +if (!strcmp(driver, "file")) { > +goto done; > +} -- Anthony PERARD

Re: [Qemu-block] [PATCH v7 16/18] xen: automatically create XenBlockDevice-s

2019-01-08 Thread Anthony PERARD
On Tue, Jan 08, 2019 at 01:07:49PM +, Paul Durrant wrote: > > -Original Message- > > From: Kevin Wolf [mailto:kw...@redhat.com] > > Sent: 08 January 2019 12:53 > > To: Paul Durrant > > Cc: Anthony Perard ; qemu-de...@nongnu.org; >

Re: [Qemu-block] [PATCH v7 16/18] xen: automatically create XenBlockDevice-s

2019-01-08 Thread Anthony PERARD
> I've tested your patch and it does seem like the best way forward. I'll > squash it in. Do you want me to put your S-o-b on the combined patch? You can, I'll have to add it anyway when I'll prepare the pull request. Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH v9 16/18] xen: automatically create XenBlockDevice-s

2019-01-09 Thread Anthony PERARD
7;qdisk' is removed by this patch, which makes > the 'xen_disk' code is redundant. The code will be removed by a subsequent > patch. > > Signed-off-by: Paul Durrant > Signed-off-by: Anthony Perard > --- > diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c

Re: [Qemu-block] [PATCH] xen-block: handle resize callback

2019-01-29 Thread Anthony PERARD
nd will get the new size information online. */ xenbus_printf(xbt, dev->nodename, "state", "%d", dev->state); Maybe the QEMU backend needs do to the same thing, and write its current state again? FreeBSD doesn't seems to care about resize. And there is nothing in blkif.h about resizing :(. Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH 0/4] block/xen_disk: legacy code removal and cleanup

2018-05-02 Thread Anthony PERARD
py probably mean that it is too soon to remove the compatibility code from qemu. Regards, -- Anthony PERARD

Re: [Qemu-block] [PATCH 0/4] block/xen_disk: legacy code removal and cleanup

2018-05-03 Thread Anthony PERARD
On Wed, May 02, 2018 at 05:03:09PM +0100, Paul Durrant wrote: > > -Original Message- > > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > > Sent: 02 May 2018 16:58 > > To: Paul Durrant > > Cc: xen-de...@lists.xenproject.org; qemu-block@nongnu.o

Re: [Qemu-block] [PATCH v3 2/8] xen_disk: remove open-coded use of libxengnttab

2018-05-16 Thread Anthony PERARD
itialise method. > > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v3 3/8] xen: remove other open-coded use of libxengnttab

2018-05-16 Thread Anthony PERARD
b_map_grant_ref(netdev->xendev.gnttabdev, > - netdev->xendev.dom, > - rxreq.gref, PROT_WRITE); > +page = xen_be_map_grant_refs(&netdev->xendev, &rxreq.gref, 1, > + PROT_WRITE); xen_be_map_grant_ref instead? With that fix: Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v3 1/8] xen_backend: add grant table helpers

2018-05-16 Thread Anthony PERARD
in XenDevOps is invoked. This method is responsible for > mapping the shared ring. No prior method requires access to the grant table. > > Signed-off-by: Paul Durrant > --- > Cc: Stefano Stabellini > Cc: Anthony Perard > > v2: > - New in v2 &

Re: [Qemu-block] [PATCH v3 4/8] xen_backend: add an emulation of grant copy

2018-05-16 Thread Anthony PERARD
rant_refs() and memcpy() for those environments. > > Signed-off-by: Paul Durrant > --- The patch looks ok, but since patch 1 is going to be change, this one is going to need to be change as well. -- Anthony PERARD

Re: [Qemu-block] [PATCH v3 5/8] xen_disk: remove use of grant map/unmap

2018-05-17 Thread Anthony PERARD
y: Paul Durrant Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v3 6/8] xen_backend: make the xen_feature_grant_copy flag private

2018-05-17 Thread Anthony PERARD
On Fri, May 04, 2018 at 08:26:05PM +0100, Paul Durrant wrote: > There is no longer any use of this flag outside of the xen_backend code. > > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v3 7/8] xen_disk: use a single entry iovec

2018-05-17 Thread Anthony PERARD
tructure can shrink significantly. > > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v3 8/8] xen_disk: be consistent with use of xendev and blkdev->xendev

2018-05-17 Thread Anthony PERARD
is need on multiple > occasions modified those functions to use it consistently. > > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v4 1/9] xen: add a meaningful declaration of grant_copy_segment into xen_common.h

2018-05-18 Thread Anthony PERARD
> pre-4.8 compat area in xen_common.h, which allows xen_disk to be cleaned > up. > > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v4 2/9] xen_backend: add grant table helpers

2018-05-18 Thread Anthony PERARD
in XenDevOps is invoked. This method is responsible for > mapping the shared ring. No prior method requires access to the grant table. > > Signed-off-by: Paul Durrant Reviewed-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH v4 5/9] xen_backend: add an emulation of grant copy

2018-05-18 Thread Anthony PERARD
rant_refs() and memcpy() for those environments. > > Signed-off-by: Paul Durrant Reviewed-by: Anthony PERARD -- Anthony PERARD

Re: [Qemu-block] [PATCH 1/2] xen: add xen disk naming for use in monitor

2018-06-13 Thread Anthony PERARD
; +return xen_blk_get_attached_dev_id(blk->dev); > +} > dev = blk->dev; > > if (!dev) { Hi Bruce, Thanks for your patches! But I don't think that the right way to go. We probably needs to qdevifie xen_disk instead. This is point out by the numerous TODO about "qdevified", and this very old mail: https://lists.nongnu.org/archive/html/qemu-devel/2016-09/msg07902.html Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH v2 30/30] xen: use the BYTE-based definitions

2018-03-05 Thread Anthony PERARD
> > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Alan Robinson > --- > hw/block/xen_disk.c| 4 ++-- > hw/xenpv/xen_domainbuild.c | 10 +- > 2 files changed, 7 insertions(+), 7 deletions(-) > Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH] xen-block: support feature-large-sector-size

2019-06-26 Thread Anthony PERARD
against a recent Windows PV XENVBD > > driver [2] using a xen-disk device with a 4kB logical block size. > > > > [1] > > http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=67e1c050e36b2c9900cca83618e56189effbad98 > > [2] https://winpvdrvbuild.xenproject.org:8080/job

Re: [PATCH] xen-block: treat XenbusStateUnknown the same as XenbusStateClosed

2019-09-23 Thread Anthony PERARD
This patch simply treats a frontend state of XenbusStateUnknown the same > as XenbusStateClosed, which will unblock the backend in these circumstances. > > Reported-by: Mark Syms > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH] xen-bus/block: explicitly assign event channels to an AioContext

2020-01-31 Thread Anthony PERARD
On Wed, Jan 29, 2020 at 10:22:14PM +, Julien Grall wrote: > Hi Anthony, > > On 19/12/2019 17:11, Anthony PERARD wrote: > > On Mon, Dec 16, 2019 at 02:34:51PM +, Paul Durrant wrote: > > > It is not safe to close an event channel from the QEMU main thread when > &

Re: [PATCH 08/20] hw/xen/xen_pt_load_rom: Remove unused includes

2020-02-27 Thread Anthony PERARD
d-by: Paul Durrant Hi, I've added this patch to a pull requests for the xen. Cheers, -- Anthony PERARD

Re: [Qemu-block] [PATCH v2] xen-block: handle resize callback

2019-01-31 Thread Anthony PERARD
/* > + * Mimic the behaviour of Linux xen-blkback and re-write the state > + * to trigger the frontend watch. > + */ > +xen_device_backend_set_state(xendev, backend_state); :(, that function doesn't write the state again if it hasn't changed. So in my test

Re: [Qemu-block] [PATCH v2] xen-block: handle resize callback

2019-01-31 Thread Anthony PERARD
On Thu, Jan 31, 2019 at 03:22:18PM +, Paul Durrant wrote: > > -Original Message- > > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > > Sent: 31 January 2019 15:21 > > To: Paul Durrant > > Cc: qemu-de...@nongnu.org; qemu-block@nongnu.org; xen-

Re: [Qemu-block] [PATCH v3] xen-block: handle resize callback

2019-01-31 Thread Anthony PERARD
On Thu, Jan 31, 2019 at 03:33:16PM +, Paul Durrant wrote: > Some frontend drivers will handle dynamic resizing of PV disks, so set up > the BlockDevOps resize_cb() method during xen_block_realize() to allow > this to be done. > > Signed-off-by: Paul Durrant Reviewed-by:

Re: [Qemu-block] [Qemu-devel] [PATCH 1/3] dataplane/xen-block: remove dead code

2019-02-18 Thread Anthony PERARD
4ad)." Actually, it looks like c6025bd197 should have remove the if statement. > > > > Spotted by Coverity: CID 1398635 > > > > While in the neighbourhood, add a missing 'fall through' annotation. > > > > Reported-by: Peter Maydell > > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH 2/3] xen-block: remove redundant assignment

2019-02-18 Thread Anthony PERARD
On Fri, Feb 15, 2019 at 04:25:32PM +, Paul Durrant wrote: > The assignment to 'p' is unnecessary as the code will either goto 'invalid' > or p will get overwritten. > > Spotted by Coverity: CID 1398638 > > Reported-by: Peter Maydell > Signed-off-by

Re: [Qemu-block] [PATCH 3/3] xen-block: report error condition from vbd_name_to_disk()

2019-02-18 Thread Anthony PERARD
ter Maydell > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH] xen-block: stop leaking memory in xen_block_drive_create()

2019-02-25 Thread Anthony PERARD
be NULL > > anyway. > > > > This patch also makes that more obvious by taking the error path if > > 'params' is NULL and then asserting that both driver and filename are > > non-NULL in the normal path. > > > > Reported-by: Peter Maydell > > Signed-off-by: Paul Durrant Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [Qemu-block] [Qemu-devel] [PATCH] xen-block: Replace qdict_put_obj() by qdict_put() where appropriate

2019-03-15 Thread Anthony PERARD
go through? The Xen one? > > Fine with me. I could also include it in a "miscellaneous cleanup" pull > request along with other cleanup patches I got in flight. Markus, I don't have any other Xen patches, so could you include this one in your pull request? Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH] xen-block: only advertize discard to the frontend when it is enabled...

2019-03-21 Thread Anthony PERARD
t; Signed-off-by: Paul Durrant With the two typos fixed (which I can try to remember to do on commit): Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH] xen-block: scale sector based quantities correctly

2019-03-21 Thread Anthony PERARD
ECTOR_SIZE; That the only thing that the thread [1] is changing. > XenDevice *xendev = XEN_DEVICE(blockdev); > > trace_xen_block_size(type, vdev->disk, vdev->partition, sectors); Thanks, -- Anthony PERARD

Re: [Qemu-block] [Xen-devel] [PATCH v2 0/2] xen-block: fix sector size confusion

2019-03-28 Thread Anthony PERARD
; > Cc: Kevin Wolf ; Stefano Stabellini > > ; Max Reitz > > ; Stefan Hajnoczi ; Anthony Perard > > > > Subject: Re: [Xen-devel] [PATCH v2 0/2] xen-block: fix sector size confusion > > > > On 27/03/2019 17:32, Paul Durrant wrote: > > > The Xen blkif p

Re: [Qemu-block] [PATCH v3] xen-block: scale sector based quantities correctly

2019-04-01 Thread Anthony PERARD
alue of 512 in xenstore and > scaling 'sectors' accordingly. The realize() method is also modified to > fail if logical_block_size is set to anything other than 512. > > Signed-off-by: Paul Durrant Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH 1/3] xen-bus: use a separate fd for each event channel

2019-04-10 Thread Anthony PERARD
> Signed-off-by: Paul Durrant Reviewed-by: Anthony PERARD There are a few places were I would have like to add an assert, but they can't be compiled-out in QEMU :-(. Thanks, -- Anthony PERARD

Re: [Qemu-block] [PATCH 2/3] xen-bus: allow AioContext to be specified for each event channel

2019-04-10 Thread Anthony PERARD
xen_device_event, NULL, NULL, channel); I wonder if the `'is_external' parameter of aio_set_fd_handler shoud be `true' here, instead. That flag seems to be used when making a snapshot of a blockdev, for example. That was introduced by: dca21ef23ba48f6f1428c59f295a857e5dc203c8^..c07bc2c1658fffeee08eb46402b2f66d55b07586 What do you think? -- Anthony PERARD

Re: [Qemu-block] [PATCH 3/3] xen-bus / xen-block: add support for event channel polling

2019-04-10 Thread Anthony PERARD
hedule() > is moved into xen_block_complete_aio(), which is more intuitive since the > only reason for doing a deferred poll of the shared ring should be because > there were previously insufficient resources to fully complete a previous > poll. > > Signed-off-by: Paul Durrant > --- Revie

Re: [Qemu-block] [PATCH 2/3] xen-bus: allow AioContext to be specified for each event channel

2019-04-10 Thread Anthony PERARD
On Wed, Apr 10, 2019 at 04:20:05PM +0100, Paul Durrant wrote: > > -Original Message- > > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > > Sent: 10 April 2019 13:57 > > To: Paul Durrant > > Cc: qemu-de...@nongnu.org; qemu-block@nongnu.org; >

Re: [Qemu-block] [PATCH] xen-block: support feature-large-sector-size

2019-04-10 Thread Anthony PERARD
or_setg(errp, "logical_block_size != %u not supported", Maybe add "by frontend" to the error message? > + XEN_BLKIF_SECTOR_SIZE); > +return; > +} > + With the question answered: Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

[PATCH for-5.0] xen-block: Fix double qlist remove

2020-04-02 Thread Anthony PERARD
to remove a request from the inflight list and when not. Fixes: bfd0d6366043 ("xen-block: improve response latency") Signed-off-by: Anthony PERARD --- hw/block/dataplane/xen-block.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/block/dataplane/x

  1   2   >