Re: [Qemu-devel] [PATCH 4/4] xen: Avoid VLA

2019-06-18 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 17 June 2019 18:37 > To: Paul Durrant > Cc: qemu-devel@nongnu.org; xen-de...@lists.xenproject.org; Stefano Stabellini > > Subject: Re: [PATCH 4/4] xen: Avoid VLA > > On Mon, Jun 17, 2019 at 05:39:09PM

Re: [Qemu-devel] [PATCH 4/4] xen: Avoid VLA

2019-06-17 Thread Anthony PERARD
On Mon, Jun 17, 2019 at 05:39:09PM +0100, Paul Durrant wrote: > > @@ -632,6 +633,8 @@ static void xen_sync_dirty_bitmap(XenIOState *state, > > return; > > } > > > > +bitmap = g_new0(unsigned long, bitmap_size); > > + > > How hot is this function? It looks (unsurprisingly) like t

Re: [Qemu-devel] [PATCH 4/4] xen: Avoid VLA

2019-06-17 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 17 June 2019 16:41 > To: qemu-devel@nongnu.org > Cc: xen-de...@lists.xenproject.org; Anthony Perard > ; Stefano Stabellini > ; Paul Durrant > Subject: [PATCH 4/4] xen: Avoid VLA > > Avoid using a varia

[Qemu-devel] [PATCH 4/4] xen: Avoid VLA

2019-06-17 Thread Anthony PERARD
Avoid using a variable length array. Signed-off-by: Anthony PERARD --- Notes: Was suggested by Peter here: "should we try to stop using variable length arrays?" hw/i386/xen/xen-hvm.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/i386/xen/xen-hv