Re: [Qemu-devel] [Qemu-ppc] [PATCH 14/15] target-ppc: Use tcg_gen_extract_*

2016-10-16 Thread David Gibson
On Mon, Oct 17, 2016 at 02:38:06PM +1100, David Gibson wrote: > On Sat, Oct 15, 2016 at 08:37:49PM -0700, Richard Henderson wrote: > > Use the new primitives for RDWINM and RLDICL. > > > > Cc: qemu-...@nongnu.org > > Signed-off-by: Richard Henderson > > Applied to ppc-for-2.8,

Re: [Qemu-devel] [PATCH] Fix build for less common build directories names

2016-10-16 Thread Stefan Weil
Am 16.10.2016 um 21:04 schrieb Peter Maydell: On 16 October 2016 at 15:31, Michael Tokarev wrote: 13.10.2016 21:29, Stefan Weil wrote: scripts/tracetool generates a C preprocessor macro from the name of the build directory. Any characters which are possible in a directory

Re: [Qemu-devel] [PATCH 0/3] Allow ISA to be disabled on some platforms

2016-10-16 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH 0/3] Allow ISA to be disabled on some platforms Type: series Message-id: 1476678204-11511-1-git-send-email-da...@gibson.dropbear.id.au === TEST SCRIPT BEGIN ===

[Qemu-devel] [PATCH 2/3] Allow ISA bus to be configured out

2016-10-16 Thread David Gibson
Currently, the code to handle the legacy ISA bus is always included in qemu. However there are lots of platforms that don't include ISA legacy devies, and quite a few that have never used ISA legacy devices at all. This patch allows the ISA bus code to be disabled in the configuration for

[Qemu-devel] [PATCH 3/3] Split ISA and sysbus versions of m48t59 device

2016-10-16 Thread David Gibson
The m48t59 device supports both ISA and direct sysbus attached versions of the device in the one .c file. This can be awkward for some embedded machine types which need the sysbus M48T59, but don't want to pull in the ISA bus code and its other dependencies. Therefore, this patch splits out the

[Qemu-devel] [PATCH 0/3] Allow ISA to be disabled on some platforms

2016-10-16 Thread David Gibson
This is a rebase/repost of a series I sent quite some time ago. This makes some cleanups that are a start on allowing ISA to be compiled out for platforms which don't use it. David Gibson (3): Split serial-isa into its own config option Allow ISA bus to be configured out Split ISA and

[Qemu-devel] [PATCH 1/3] Split serial-isa into its own config option

2016-10-16 Thread David Gibson
At present, the core device model code for 8250-like serial ports (serial.c) and the code for serial ports attached to ISA-style legacy IO (serial-isa.c) are both controlled by the CONFIG_SERIAL variable. There are lots and lots of embedded platforms that have 8250-like serial ports but have

Re: [Qemu-devel] [PATCH v3 2/3] exec: rename cpu_exec_init() as cpu_exec_realizefn()

2016-10-16 Thread David Gibson
On Sat, Oct 15, 2016 at 12:52:48AM +0200, Laurent Vivier wrote: > Modify all CPUs to call it from XXX_cpu_realizefn() function. > > Remove all the cannot_destroy_with_object_finalize_yet as > unsafe references have been moved to cpu_exec_realizefn(). > (tested with QOM command provided by commit

Re: [Qemu-devel] [PATCH v3 0/3] Split cpu_exec_init() into an init and a realize part

2016-10-16 Thread David Gibson
On Sat, Oct 15, 2016 at 12:52:46AM +0200, Laurent Vivier wrote: > Since commit 42ecaba ("target-i386: Call cpu_exec_init() on realize"), > , commit 6dd0f83 ("target-ppc: Move cpu_exec_init() call to realize > function"), > and commit c6644fc ("s390x/cpu: Get rid of side effects when creating a >

Re: [Qemu-devel] [PATCH v3 1/3] exec: split cpu_exec_init()

2016-10-16 Thread David Gibson
On Sat, Oct 15, 2016 at 12:52:47AM +0200, Laurent Vivier wrote: > Put in cpu_exec_initfn() what initializes the CPU, > and let in cpu_exec_init() what adds it to the environment. > > As cpu_exec_initfn() is called by all XX_cpu_initfn() call it > directly in cpu_common_initfn(). > cpu_exec_init()

Re: [Qemu-devel] [PATCH v3 3/3] exec: call cpu_exec_exit() from a CPU unrealize common function

2016-10-16 Thread David Gibson
On Sat, Oct 15, 2016 at 12:52:49AM +0200, Laurent Vivier wrote: > As cpu_exec_exit() mirrors the cpu_exec_realizefn(), > rename it as cpu_exec_unrealizefn(). > > Create and register a cpu_common_unrealizefn() function for > the CPU device class and call cpu_exec_unrealizefn() from > this

Re: [Qemu-devel] [Qemu-ppc] [PATCH 14/15] target-ppc: Use tcg_gen_extract_*

2016-10-16 Thread David Gibson
On Sat, Oct 15, 2016 at 08:37:49PM -0700, Richard Henderson wrote: > Use the new primitives for RDWINM and RLDICL. > > Cc: qemu-...@nongnu.org > Signed-off-by: Richard Henderson Applied to ppc-for-2.8, thanks. > --- > target-ppc/translate.c | 9 - > 1 file changed, 4

Re: [Qemu-devel] [very-WIP 1/7] migration: Add VMSTATE_WITH_TMP

2016-10-16 Thread David Gibson
On Tue, Oct 11, 2016 at 06:18:30PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > VMSTATE_WITH_TMP is for handling structures where some calculation > or rearrangement of the data needs to be performed before the data > hits the wire. > For

Re: [Qemu-devel] [very-WIP 3/4] slirp: VMStatify sbuf

2016-10-16 Thread David Gibson
On Tue, Oct 11, 2016 at 06:18:32PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Convert the sbuf structure to a VMStateDescription. > Note this uses the VMSTATE_WITH_TMP mechanism to calculate > and reload the offsets based on the pointers.

Re: [Qemu-devel] [very-WIP 2/7] tests/migration: Add test for VMSTATE_WITH_TMP

2016-10-16 Thread David Gibson
On Tue, Oct 11, 2016 at 06:18:31PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Add a test for VMSTATE_WITH_TMP to tests/test-vmstate.c > > Signed-off-by: Dr. David Alan Gilbert Looks reasonable. The other obvious

Re: [Qemu-devel] [PATCH v6 13/35] tcg: Add atomic helpers

2016-10-16 Thread Emilio G. Cota
On Sun, Oct 16, 2016 at 18:40:05 -0700, Richard Henderson wrote: > On 10/16/2016 03:17 PM, Emilio G. Cota wrote: > >>+#if DATA_SIZE == 1 > >>> +# define END > >>> +#elif defined(HOST_WORDS_BIGENDIAN) > >>> +# define END _be > >>> +#else > >>> +# define END _le > >>> +#endif > >It took me a while

Re: [Qemu-devel] [PULL 00/16] ppc-for-2.8 queue 20161017

2016-10-16 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PULL 00/16] ppc-for-2.8 queue 20161017 Type: series Message-id: 1476672219-8836-1-git-send-email-da...@gibson.dropbear.id.au === TEST SCRIPT BEGIN === #!/bin/bash BASE=base

Re: [Qemu-devel] [PATCH 07/11] spapr: add hotplug interrupt machine options

2016-10-16 Thread Bharata B Rao
On Fri, Oct 14, 2016 at 01:04:37PM -0500, Michael Roth wrote: > Quoting Bharata B Rao (2016-10-14 03:37:32) > > On Wed, Oct 12, 2016 at 06:13:55PM -0500, Michael Roth wrote: > > > This adds machine options of the form: > > > > > > -machine pseries,legacy-hotplug-events=true > > > -machine

[Qemu-devel] [PULL 08/16] ppc/xics: Make the ICSState a list

2016-10-16 Thread David Gibson
From: Benjamin Herrenschmidt Instead of an array of fixed sized blocks, use a list, as we will need to have sources with variable number of interrupts. SPAPR only uses a single entry. Native will create more. If performance becomes an issue we can add some hashed lookup

[Qemu-devel] [PULL 09/16] ppc/xics: Split ICS into ics-base and ics class

2016-10-16 Thread David Gibson
From: Benjamin Herrenschmidt The existing implementation remains same and ics-base is introduced. The type name "ics" is retained, and all the related functions renamed as ics_simple_* This will allow different implementations for the source controllers such as the MSI

[Qemu-devel] [PULL 16/16] spapr: Improved placement of PCI host bridges in guest memory map

2016-10-16 Thread David Gibson
Currently, the MMIO space for accessing PCI on pseries guests begins at 1 TiB in guest address space. Each PCI host bridge (PHB) has a 64 GiB chunk of address space in which it places its outbound PIO and 32-bit and 64-bit MMIO windows. This scheme as several problems: - It limits guest RAM to

[Qemu-devel] [PULL 13/16] spapr_pci: Delegate placement of PCI host bridges to machine type

2016-10-16 Thread David Gibson
The 'spapr-pci-host-bridge' represents the virtual PCI host bridge (PHB) for a PAPR guest. Unlike on x86, it's routine on Power (both bare metal and PAPR guests) to have numerous independent PHBs, each controlling a separate PCI domain. There are two ways of configuring the spapr-pci-host-bridge

[Qemu-devel] [PULL 11/16] libqos: Correct error in PCI hole sizing for spapr

2016-10-16 Thread David Gibson
In pci-spapr.c (as in pci-pc.c from which it was derived), the pci_hole_start/pci_hole_size and pci_iohole_start/pci_iohole_size pairs[1] essentially define the region of PCI (not CPU) addresses in which MMIO or PIO BARs respectively will be allocated. The size value is relative to the start

[Qemu-devel] [PULL 07/16] spapr: fix inheritance chain for default machine options

2016-10-16 Thread David Gibson
From: Michael Roth Rather than machine instances having backward-compatible option defaults that need to be repeatedly re-enabled for every new machine type we introduce, we set the defaults appropriate for newer machine types, then add code to explicitly disable

[Qemu-devel] [PULL 15/16] spapr_pci: Add a 64-bit MMIO window

2016-10-16 Thread David Gibson
On real hardware, and under pHyp, the PCI host bridges on Power machines typically advertise two outbound MMIO windows from the guest's physical memory space to PCI memory space: - A 32-bit window which maps onto 2GiB..4GiB in the PCI address space - A 64-bit window which maps onto a large

[Qemu-devel] [PULL 12/16] libqos: Limit spapr-pci to 32-bit MMIO for now

2016-10-16 Thread David Gibson
Currently the functions in pci-spapr.c (like pci-pc.c on which it's based) don't distinguish between 32-bit and 64-bit PCI MMIO. At the moment, the qemu side implementation is a bit weird and has a single MMIO window straddling 32-bit and 64-bit regions, but we're likely to change that in future.

[Qemu-devel] [PULL 10/16] libqos: Isolate knowledge of spapr memory map to qpci_init_spapr()

2016-10-16 Thread David Gibson
The libqos code for accessing PCI on the spapr machine type uses IOBASE() and MMIOBASE() macros to determine the address in the CPU memory map of the windows to PCI address space. This is a detail of the implementation of PCI in the machine type, it's not specified by the PAPR standard. Real

[Qemu-devel] [PULL 00/16] ppc-for-2.8 queue 20161017

2016-10-16 Thread David Gibson
The following changes since commit 6aa5a3679449cdf0b6fe5a6829b22e642ded57fd: Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20161013-1' into staging (2016-10-13 14:27:58 +0100) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.8-20161017

[Qemu-devel] [PULL 04/16] tests/boot-sector: Use mkstemp() to create a unique file name

2016-10-16 Thread David Gibson
From: Thomas Huth The pxe-test is run for three different targets now (x86_64, i386 and ppc64), and the bios-tables-test is run for two targets (x86_64 and i386). But each of the tests is using an invariant name for the disk image with the boot sector code - so if the tests are

[Qemu-devel] [PULL 06/16] target-ppc: implement vexts[bh]2w and vexts[bhw]2d

2016-10-16 Thread David Gibson
From: Nikunj A Dadhania Vector Extend Sign Instructions: vextsb2w: Vector Extend Sign Byte To Word vextsh2w: Vector Extend Sign Halfword To Word vextsb2d: Vector Extend Sign Byte To Doubleword vextsh2d: Vector Extend Sign Halfword To Doubleword vextsw2d: Vector Extend

[Qemu-devel] [PULL 02/16] qtest: ask endianness of the target in qtest_init()

2016-10-16 Thread David Gibson
From: Laurent Vivier The target endianness is not deduced anymore from the architecture name but asked directly to the guest, using a new qtest command: "endianness". As it can't change (this is the value of TARGET_WORDS_BIGENDIAN), we store it to not have to ask every time

[Qemu-devel] [PULL 05/16] tests/boot-sector: Increase time-out to 90 seconds

2016-10-16 Thread David Gibson
From: Thomas Huth Since the PXE tester runs rather slow on ppc64 with tcg, there is a chance that we hit the 60 seconds timeout on machines that have a heavy CPU load. So let's increase the timeout to ease the situation. Signed-off-by: Thomas Huth

[Qemu-devel] [PULL 03/16] tests/boot-sector: Use minimum length for the Forth boot script

2016-10-16 Thread David Gibson
From: Thomas Huth The pxe-test is quite slow on ppc64 with tcg. We can speed it up a little bit by decreasing the size of the file that has to be loaded via TFTP. Signed-off-by: Thomas Huth Reviewed-by: Eric Blake Reviewed-by: Michael S.

[Qemu-devel] [PULL 14/16] spapr: Adjust placement of PCI host bridge to allow > 1TiB RAM

2016-10-16 Thread David Gibson
Currently the default PCI host bridge for the 'pseries' machine type is constructed with its IO windows in the 1TiB..(1TiB + 64GiB) range in guest memory space. This means that if > 1TiB of guest RAM is specified, the RAM will collide with the PCI IO windows, causing serious problems. Problems

[Qemu-devel] [PULL 01/16] tests: minor cleanups in usb-hcd-uhci-test

2016-10-16 Thread David Gibson
From: Laurent Vivier Two minor cleanups: - exit gracefully in case on unsupported target, - put machine command line in a constant to avoid to duplicate it. Signed-off-by: Laurent Vivier Reviewed-by: Gerd Hoffmann Signed-off-by:

[Qemu-devel] [PULL v2 4/4] tests/docker/Makefile.include: add a generic docker-run target

2016-10-16 Thread Fam Zheng
From: Alex Bennée This re-factors the docker makefile to include a docker-run target which can be controlled entirely from environment variables specified on the make command line. This allows us to run against any given docker image we may have in our repository, for

[Qemu-devel] [PULL v2 1/4] tests/docker: add travis dockerfile

2016-10-16 Thread Fam Zheng
From: Alex Bennée This target grabs the latest Travis containers from their repository at quay.io and then installs QEMU's build dependencies. With this it is possible to run on broadly the same setup as they have on travis-ci.org. Signed-off-by: Alex Bennée

[Qemu-devel] [PULL v2 3/4] tests/docker: make test-mingw honour TARGET_LIST

2016-10-16 Thread Fam Zheng
From: Alex Bennée The other builders honour this variable, so should the mingw build. Signed-off-by: Alex Bennée Message-Id: <20161011161625.9070-4-alex.ben...@linaro.org> Signed-off-by: Fam Zheng --- tests/docker/test-mingw |

[Qemu-devel] [PULL v2 2/4] tests/docker: test-build script

2016-10-16 Thread Fam Zheng
From: Alex Bennée Much like test-quick but only builds. This is useful for some of the build targets like ThreadSanitizer that don't yet pass "make check". Signed-off-by: Alex Bennée Message-Id: <20161011161625.9070-3-alex.ben...@linaro.org>

[Qemu-devel] [PULL v2 0/4] Docker patches

2016-10-16 Thread Fam Zheng
The following changes since commit 6aa5a3679449cdf0b6fe5a6829b22e642ded57fd: Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20161013-1' into staging (2016-10-13 14:27:58 +0100) are available in the git repository at: g...@github.com:famz/qemu tags/for-upstream for you to fetch

Re: [Qemu-devel] [PULL 4/4] tests/docker/Makefile.include: add a generic docker-run target

2016-10-16 Thread Fam Zheng
On Sat, 10/15 15:48, Alex Bennée wrote: > > Paolo Bonzini writes: > > > On 14/10/2016 17:29, Fam Zheng wrote: > >> From: Alex Bennée > >> > >> This re-factors the docker makefile to include a docker-run target which > >> can be controlled entirely

Re: [Qemu-devel] [PATCH v6 26/35] tests: add atomic_add-bench

2016-10-16 Thread Richard Henderson
On 10/14/2016 02:19 PM, Emilio G. Cota wrote: On Tue, Oct 11, 2016 at 14:40:52 -0500, Richard Henderson wrote: > From: "Emilio G. Cota" > > With this microbenchmark we can measure the overhead of emulating atomic > instructions with a configurable degree of contention. > > The

Re: [Qemu-devel] [PATCH v6 13/35] tcg: Add atomic helpers

2016-10-16 Thread Richard Henderson
On 10/16/2016 03:17 PM, Emilio G. Cota wrote: +#if DATA_SIZE == 1 > +# define END > +#elif defined(HOST_WORDS_BIGENDIAN) > +# define END _be > +#else > +# define END _le > +#endif It took me a while to figure out that ATOMIC_NAME needs END (ATOMIC_NAME is defined later in the patch). It

Re: [Qemu-devel] [PATCH v6 13/35] tcg: Add atomic helpers

2016-10-16 Thread Richard Henderson
On 10/16/2016 03:17 PM, Emilio G. Cota wrote: > +/* Note that for addition, we need to use a separate cmpxchg loop instead > + of bswaps for the reverse-host-endian helpers. */ > +ABI_TYPE ATOMIC_NAME(fetch_add)(CPUArchState *env, target_ulong addr, > + ABI_TYPE val

Re: [Qemu-devel] [PATCH 08/11] spapr_events: add support for dedicated hotplug event source

2016-10-16 Thread David Gibson
On Fri, Oct 14, 2016 at 01:44:17PM -0500, Michael Roth wrote: > Quoting David Gibson (2016-10-13 23:56:43) > > On Wed, Oct 12, 2016 at 06:13:56PM -0500, Michael Roth wrote: > > > Hotplug events were previously delivered using an EPOW interrupt > > > and were queued by linux guests into a circular

Re: [Qemu-devel] [PATCH v4 17/20] ppc/pnv: Add cut down PSI bridge model and hookup external interrupt

2016-10-16 Thread David Gibson
On Fri, Oct 14, 2016 at 10:07:53AM +0200, Cédric Le Goater wrote: > >> --- a/hw/ppc/pnv.c > >> +++ b/hw/ppc/pnv.c > >> @@ -318,15 +318,24 @@ static void ppc_powernv_reset(void) > >> * have a CPLD that will collect the SerIRQ and shoot them as a > >> * single level interrupt to the P8 chip. So

Re: [Qemu-devel] [PATCH v4 15/20] ppc/xics: Add "native" XICS subclass

2016-10-16 Thread David Gibson
On Fri, Oct 14, 2016 at 11:40:30AM +0200, Cédric Le Goater wrote: > On 10/14/2016 08:10 AM, David Gibson wrote: > > On Mon, Oct 03, 2016 at 09:24:51AM +0200, Cédric Le Goater wrote: > >> From: Benjamin Herrenschmidt > >> > >> This provides access to the MMIO based

Re: [Qemu-devel] [PATCH v4 10/20] ppc/xics: Make the ICSState a list

2016-10-16 Thread David Gibson
On Fri, Oct 14, 2016 at 09:35:46AM +0200, Cédric Le Goater wrote: > On 10/14/2016 07:32 AM, David Gibson wrote: > > On Mon, Oct 03, 2016 at 09:24:46AM +0200, Cédric Le Goater wrote: > >> From: Benjamin Herrenschmidt > >> > >> Instead of an array of fixed sized blocks,

[Qemu-devel] [PATCH] e1000e: Don't zero out buffer address in rx descriptor

2016-10-16 Thread Kevin Wolf
The e1000e emulation zeroes out any used rx descriptor and then writes a completely newly constructed value there. By doing this, it doesn't only update the write-back area of the descriptors (as it's supposed to do), but it also clears the buffer address, which real hardware doesn't do. The spec

Re: [Qemu-devel] [PATCH v6 00/35] cmpxchg-based emulation of atomics

2016-10-16 Thread Emilio G. Cota
On Tue, Oct 11, 2016 at 14:40:26 -0500, Richard Henderson wrote: > Sixth time is the charm, right? This time I'm certain that it > compiles with centos6, and contains the previously missing update > from Emilio to atomic_add-bench. For patches 03-16 (including the elusive patch 06 for which I

Re: [Qemu-devel] [PATCH v6 13/35] tcg: Add atomic helpers

2016-10-16 Thread Emilio G. Cota
On Tue, Oct 11, 2016 at 14:40:39 -0500, Richard Henderson wrote: > Add all of cmpxchg, op_fetch, fetch_op, and xchg. > Handle both endian-ness, and sizes up to 8. > Handle expanding non-atomically, when emulating in serial. > > Signed-off-by: Richard Henderson > --- >

[Qemu-devel] [PATCH] include/qemu: Add documentation to functions in include/qemu/id.h

2016-10-16 Thread Veronia Bahaa
Add documentation to the functions id_generate and id_wellformed in include/qemu/id.h Signed-off-by: Veronia Bahaa --- include/qemu/id.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/include/qemu/id.h b/include/qemu/id.h index

Re: [Qemu-devel] [PATCH] linux-user: Fix do_store_exclusive for shared memory of interprocess.

2016-10-16 Thread Emilio G. Cota
(Adding Richard to Cc) On Sat, Oct 15, 2016 at 23:53:48 +0800, Heiher wrote: > From: Heiher > > test case: http://pastebin.com/raw/x2GW4xNW You should check out this patchset and use it as a base for working on this topic:

Re: [Qemu-devel] [PATCH] Fix build for less common build directories names

2016-10-16 Thread Peter Maydell
On 16 October 2016 at 15:31, Michael Tokarev wrote: > 13.10.2016 21:29, Stefan Weil wrote: >> scripts/tracetool generates a C preprocessor macro from the name of the >> build directory. Any characters which are possible in a directory name >> but not allowed in a macro name must

Re: [Qemu-devel] [PATCH 4/4] Added error checking for msix_init.

2016-10-16 Thread Stefan Hajnoczi
On Sun, Oct 16, 2016 at 12:53:16AM -, Shreya Shrivastava wrote: > Add checks for negative return value to uses of msix_init. > Signed-off-by: Shreya Shrivastava > > --- > hw/usb/hcd-xhci.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git

Re: [Qemu-devel] [PATCH 3/4] Add error checking for event_notifier_init.

2016-10-16 Thread Stefan Hajnoczi
On Sun, Oct 16, 2016 at 12:50:58AM -, Shreya Shrivastava wrote: > Add checks for negative return value to uses of event_notifier_init. > Signed-off-by: Shreya Shrivastava > > --- > tests/test-aio.c | 59 > > 1 file

Re: [Qemu-devel] [PATCH 2/4] Add error checking for load_image_targphys.

2016-10-16 Thread Stefan Hajnoczi
On Sun, Oct 16, 2016 at 12:48:24AM -, Shreya Shrivastava wrote: > Add checks for negative return value to uses of load_image_targphys. > Signed-off-by: Shreya Shrivastava > > --- > hw/arm/nseries.c | 9 +++-- > hw/lm32/milkymist.c | 19 +++ >

Re: [Qemu-devel] [Qemu-block] [PATCH v2] rbd: make the code more readable

2016-10-16 Thread Stefan Hajnoczi
On Sat, Oct 15, 2016 at 04:26:13PM +0800, Xiubo Li wrote: > Make it a bit clearer and more readable. > > Signed-off-by: Xiubo Li > CC: John Snow > --- > > V2: > - Advice from John Snow. Thanks. > > > block/rbd.c | 25 -

Re: [Qemu-devel] [Qemu-block] [PATCH 18/18] aio: convert from RFifoLock to QemuRecMutex

2016-10-16 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 07:34:22PM +0200, Paolo Bonzini wrote: > It is simpler and a bit faster, and QEMU does not need the contention > callbacks (and thus the fairness) anymore. > > Reviewed-by: Fam Zheng > Signed-off-by: Paolo Bonzini > --- > async.c

Re: [Qemu-devel] [Qemu-block] [PATCH 15/18] block: only call aio_poll on the current thread's AioContext

2016-10-16 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 07:34:19PM +0200, Paolo Bonzini wrote: > aio_poll is not thread safe; for example bdrv_drain can hang if > the last in-flight I/O operation is completed in the I/O thread after > the main thread has checked bs->in_flight. > > The bug remains latent as long as all of it is

Re: [Qemu-devel] [Qemu-block] [PATCH 14/18] block: prepare bdrv_reopen_multiple to release AioContext

2016-10-16 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 07:34:18PM +0200, Paolo Bonzini wrote: > After the next patch bdrv_drain_all will have to be called without holding any > AioContext. Prepare to do this by adding an AioContext argument to > bdrv_reopen_multiple. > > Signed-off-by: Paolo Bonzini >

Re: [Qemu-devel] [PATCH 13/18] replication: pass BlockDriverState to reopen_backing_file

2016-10-16 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 07:34:17PM +0200, Paolo Bonzini wrote: > This will be needed in the next patch to retrieve the AioContext. > > Signed-off-by: Paolo Bonzini > --- > block/replication.c | 21 - > 1 file changed, 12 insertions(+), 9 deletions(-)

Re: [Qemu-devel] [Qemu-block] [PATCH 11/18] aio: introduce qemu_get_current_aio_context

2016-10-16 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 07:34:15PM +0200, Paolo Bonzini wrote: > This will be used by bdrv_poll_while (and thus by bdrv_drain) > to choose how to wait for I/O completion. > > Reviewed-by: Fam Zheng > Signed-off-by: Paolo Bonzini > --- > include/block/aio.h

Re: [Qemu-devel] [Qemu-block] [PATCH 10/18] sheepdog: use bdrv_poll_while and bdrv_wakeup

2016-10-16 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 07:34:14PM +0200, Paolo Bonzini wrote: > These ensure that bdrv_poll_while will exit for a BlockDriverState > that is not in the main AioContext. > > Signed-off-by: Paolo Bonzini > --- > block/sheepdog.c | 67 >

Re: [Qemu-devel] [PATCH v4 08/14] tcg/s390: Add support for fence

2016-10-16 Thread Pranith Kumar
On Sun, Oct 16, 2016 at 4:47 AM, Stefan Hajnoczi wrote: > On Thu, Jul 14, 2016 at 04:20:20PM -0400, Pranith Kumar wrote: >> Cc: Alexander Graf >> Signed-off-by: Pranith Kumar >> Signed-off-by: Richard Henderson >> ---

Re: [Qemu-devel] [Qemu-block] [PATCH 09/18] nfs: use bdrv_poll_while and bdrv_wakeup

2016-10-16 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 07:34:13PM +0200, Paolo Bonzini wrote: > These will make it possible to use nfs_get_allocated_file_size on > a file that is not in the main AioContext. > > Signed-off-by: Paolo Bonzini > --- > block/nfs.c | 47

Re: [Qemu-devel] [PATCH] MAINTAINERS: Update PPC status and maintainer

2016-10-16 Thread Pranith Kumar
Ping, looks like this patch fell through. On Tue, Aug 2, 2016 at 10:52 AM, Pranith Kumar wrote: > Richard agreed to make odd fixes to PPC tcg parts[1]. This patch makes > the change. > > [1] https://lists.gnu.org/archive/html/qemu-ppc/2016-03/msg00657.html > > CC: Richard

Re: [Qemu-devel] [PATCH] scripts/hxtool: fix undefined behavour of echo

2016-10-16 Thread Daniel Shahaf
Michael Tokarev wrote on Sun, Oct 16, 2016 at 17:30:28 +0300: > From: Daniel Shahaf > > Avoid undefined behaviour of echo(1) with backslashes in arguments > The behaviour is implementation-defined, different /bin/sh's behave > differently. > Signed-off-by: Daniel Shahaf

Re: [Qemu-devel] [PATCH] scripts/hxtool: fix undefined behavour of echo

2016-10-16 Thread Michael Tokarev
16.10.2016 18:22, Daniel Shahaf wrote: > Signed-off-by: Daniel Shahaf > Like this? Yes, exactly, thank you! :) /mjt

Re: [Qemu-devel] [PATCH] scripts/hxtool: fix undefined behavour of echo

2016-10-16 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1476628228-7425-1-git-send-email-...@msgid.tls.msk.ru Subject: [Qemu-devel] [PATCH] scripts/hxtool: fix undefined behavour of echo === TEST SCRIPT BEGIN === #!/bin/bash

Re: [Qemu-devel] [PATCH] Fix build for less common build directories names

2016-10-16 Thread Michael Tokarev
13.10.2016 21:29, Stefan Weil wrote: > scripts/tracetool generates a C preprocessor macro from the name of the > build directory. Any characters which are possible in a directory name > but not allowed in a macro name must be substituted, otherwise builds > will fail. Applied to -trivial, thank

[Qemu-devel] [PATCH] scripts/hxtool: fix undefined behavour of echo

2016-10-16 Thread Michael Tokarev
From: Daniel Shahaf Avoid undefined behaviour of echo(1) with backslashes in arguments The behaviour is implementation-defined, different /bin/sh's behave differently. Signed-off-By: Michael Tokarev --- Submitting this patch upstream, thank you very much!

[Qemu-devel] [PATCH] qemu-options.hx: set: fix copy-paste error

2016-10-16 Thread Michael Tokarev
Reported-By: Daniel Shahaf Signed-off-by: Michael Tokarev --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index c209b53..f296406 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@

Re: [Qemu-devel] [PATCH v3] usb: Change *_exitfn return type from int to void

2016-10-16 Thread Michael Tokarev
13.10.2016 23:21, Akanksha Srivastava wrote: > The *_exitfn functions cannot fail and should not be > returning int. ... Applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [PATCH] Fix build for less common build directories names

2016-10-16 Thread Stefan Hajnoczi
On Fri, Oct 14, 2016 at 10:05:18PM +0200, Stefan Weil wrote: > On 10/14/16 12:01, Stefan Hajnoczi wrote: > > dirname should only contain QEMU source tree subdirectory paths (e.g. > > hw/net). How did you get a comma in there? > > > > I tried an out-of-tree build in a directory called 'a,b' but

Re: [Qemu-devel] [PATCH v2 3/4] sockets: add AF_VSOCK support

2016-10-16 Thread Stefan Hajnoczi
On Fri, Oct 14, 2016 at 09:40:40AM -0500, Eric Blake wrote: > On 10/14/2016 04:00 AM, Stefan Hajnoczi wrote: > > Add the AF_VSOCK address family so that qemu-ga will be able to use > > virtio-vsock. > > > > The AF_VSOCK address family uses address tuples. The cid is > > the unique

Re: [Qemu-devel] [PATCH v7 12/12] virtio-crypto: perfect algorithms chainning support

2016-10-16 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 03:12:06PM +0800, Gonglei wrote: > diff --git a/include/standard-headers/linux/virtio_crypto.h > b/include/standard-headers/linux/virtio_crypto.h > index f2a059e..9ae02fb 100644 > --- a/include/standard-headers/linux/virtio_crypto.h > +++

Re: [Qemu-devel] [PATCH v7 10/12] cryptodev: introduce an unified wrapper for crypto operation

2016-10-16 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 03:12:04PM +0800, Gonglei wrote: > We use an opaque point to the VirtIOCryptoReq which > can support different packets based on different > algorithms. > > Signed-off-by: Gonglei > --- > backends/cryptodev-builtin.c | 2 +- >

Re: [Qemu-devel] [PATCH v7 09/12] virtio-crypto: add data queue processing handler

2016-10-16 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 03:12:03PM +0800, Gonglei wrote: > Introduces VirtIOCryptoReq structure to store > crypto request so that we can support sync and async > crypto operation in the future. What do you mean by "sync and async" operations? > > At present, we only support cipher and algorithm

Re: [Qemu-devel] [PATCH v7 08/12] virtio-crypto: add control queue handler

2016-10-16 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 03:12:02PM +0800, Gonglei wrote: > +static int64_t > +virtio_crypto_create_sym_session(VirtIOCrypto *vcrypto, > + struct virtio_crypto_sym_create_session_req *sess_req, > + uint32_t queue_id, > + uint32_t opcode, > +

Re: [Qemu-devel] [Qemu-block] [PATCH 08/18] nfs: move nfs_set_events out of the while loops

2016-10-16 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 07:34:12PM +0200, Paolo Bonzini wrote: > nfs_set_events only needs to be called once before entering the > while loop; afterwards, nfs_process_read and nfs_process_write > take care of it. > > Signed-off-by: Paolo Bonzini > --- > block/nfs.c | 8

Re: [Qemu-devel] [PATCH v3] usb: Change *_exitfn return type from int to void

2016-10-16 Thread Stefan Hajnoczi
On Fri, Oct 14, 2016 at 01:51:31AM +0530, Akanksha Srivastava wrote: > The *_exitfn functions cannot fail and should not be > returning int. > This also removes the passthru_exitfn since this callback > does nothing as of now. > This was suggested as a Bite-sized task for code cleanup. >

Re: [Qemu-devel] [Qemu-block] [PATCH 07/18] block: introduce bdrv_poll_while and bdrv_wakeup

2016-10-16 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 07:34:11PM +0200, Paolo Bonzini wrote: > @@ -485,9 +474,14 @@ void bdrv_inc_in_flight(BlockDriverState *bs) > atomic_inc(>in_flight); > } > > +void bdrv_wakeup(BlockDriverState *bs) > +{ > +} Please write a doc comment explaining the semantics of this new API.

Re: [Qemu-devel] [Qemu-block] [PATCH 02/18] blockjob: introduce .drain callback for jobs

2016-10-16 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 07:34:06PM +0200, Paolo Bonzini wrote: > +static void backup_drain(BlockJob *job) > +{ > +BackupBlockJob *s = container_of(job, BackupBlockJob, common); > + > +/* Need to keep a reference in case blk_drain triggers execution > + * of backup_complete... > +

Re: [Qemu-devel] [PATCH] trace: fix group name generation

2016-10-16 Thread Greg Kurz
On Sat, 15 Oct 2016 13:03:10 +0100 Peter Maydell wrote: > On 14 October 2016 at 23:06, Greg Kurz wrote: > > On Fri, 14 Oct 2016 16:31:01 -0500 > > Eric Blake wrote: > > > >> On 10/14/2016 04:26 PM, Greg Kurz wrote: > >> > Since

Re: [Qemu-devel] [v2 2/5] block/ssh: Add InetSocketAddress and accept it

2016-10-16 Thread Ashijeet Acharya
>>> /* Check the remote host's key against known_hosts. */ >>> -ret = check_host_key(s, host, port, host_key_check, errp); >>> +ret = check_host_key(s, s->inet->host, port, host_key_check, >> >> But then you're still using the port here... And I can't come up with a >> way (not even a

Re: [Qemu-devel] [v2 2/5] block/ssh: Add InetSocketAddress and accept it

2016-10-16 Thread Ashijeet Acharya
On Sun, Oct 16, 2016 at 4:00 AM, Max Reitz wrote: > On 15.10.2016 11:04, Ashijeet Acharya wrote: >> Add InetSocketAddress compatibility to SSH driver. >> >> Add a new option "server" to the SSH block driver which then accepts >> a InetSocketAddress. >> >> "host" and "port" are

Re: [Qemu-devel] [PATCH v4 08/14] tcg/s390: Add support for fence

2016-10-16 Thread Stefan Hajnoczi
On Thu, Jul 14, 2016 at 04:20:20PM -0400, Pranith Kumar wrote: > Cc: Alexander Graf > Signed-off-by: Pranith Kumar > Signed-off-by: Richard Henderson > --- > tcg/s390/tcg-target.inc.c | 11 +++ > 1 file changed, 11 insertions(+) >

[Qemu-devel] -Werror=tautological-compare error with -save-temps on fedora 24 gcc 6.2.1

2016-10-16 Thread Anand J
Hi, I'm using gcc 6.2.1 for compiling qemu with following options in Fedora 24 ../../../configure --enable-debug --extra-cflags="-save-temps" make and getting following error. * CC ui/gtk.o* *qemu/ui/gtk.c: In function ‘gd_map_keycode’:* *qemu/ui/gtk.c:1030:21: error: self-comparison