Re: [Qemu-devel] [RFC QEMU PATCH v4 03/10] hostmem-xen: add a host memory backend for Xen

2018-02-27 Thread Haozhong Zhang
On 02/27/18 16:41 +, Anthony PERARD wrote: > On Thu, Dec 07, 2017 at 06:18:05PM +0800, Haozhong Zhang wrote: > > diff --git a/backends/hostmem.c b/backends/hostmem.c > > index ee2c2d5bfd..ba13a52994 100644 > > --- a/backends/hostmem.c > > +++ b/backends/hostmem.c > > @@ -12,6 +12,7 @@ > > #inc

Re: [Qemu-devel] [RFC QEMU PATCH v4 02/10] xen-hvm: create the hotplug memory region on Xen

2018-02-27 Thread Haozhong Zhang
On 02/27/18 16:37 +, Anthony PERARD wrote: > On Thu, Dec 07, 2017 at 06:18:04PM +0800, Haozhong Zhang wrote: > > The guest physical address of vNVDIMM is allocated from the hotplug > > memory region, which is not created when QEMU is used as Xen device > > model. In order to use vNVDIMM for Xen

[Qemu-devel] [PATCH v4 6/8] migration/ram: ensure write persistence on loading normal pages to PMEM

2018-02-27 Thread Haozhong Zhang
When loading a normal page to persistent memory, load its data by libpmem function pmem_memcpy_nodrain() instead of memcpy(). Combined with a call to pmem_drain() at the end of memory loading, we can guarantee all those normal pages are persistenly loaded to PMEM. Signed-off-by: Haozhong Zhang --

Re: [Qemu-devel] [PATCH v4 0/8] nvdimm: guarantee persistence of QEMU writes to persistent memory

2018-02-27 Thread Haozhong Zhang
On 02/28/18 15:25 +0800, Haozhong Zhang wrote: > QEMU writes to vNVDIMM backends in the vNVDIMM label emulation and > live migration. If the backend is on the persistent memory, QEMU needs > to take proper operations to ensure its writes persistent on the > persistent memory. Otherwise, a host powe

[Qemu-devel] [PATCH v4 4/8] mem/nvdimm: ensure write persistence to PMEM in label emulation

2018-02-27 Thread Haozhong Zhang
Guest writes to vNVDIMM labels are intercepted and performed on the backend by QEMU. When the backend is a real persistent memort, QEMU needs to take proper operations to ensure its write persistence on the persistent memory. Otherwise, a host power failure may result in the loss of guest label con

[Qemu-devel] [PATCH v4 7/8] migration/ram: ensure write persistence on loading compressed pages to PMEM

2018-02-27 Thread Haozhong Zhang
When loading a compressed page to persistent memory, flush CPU cache after the data is decompressed. Combined with a call to pmem_drain() at the end of memory loading, we can guarantee those compressed pages are persistently loaded to PMEM. Signed-off-by: Haozhong Zhang --- include/qemu/pmem.h |

[Qemu-devel] [PATCH v4 8/8] migration/ram: ensure write persistence on loading xbzrle pages to PMEM

2018-02-27 Thread Haozhong Zhang
When loading a xbzrle encoded page to persistent memory, load the data via libpmem function pmem_memcpy_nodrain() instead of memcpy(). Combined with a call to pmem_drain() at the end of memory loading, we can guarantee those xbzrle encoded pages are persistently loaded to PMEM. Signed-off-by: Haoz

[Qemu-devel] [PATCH v4 3/8] configure: add libpmem support

2018-02-27 Thread Haozhong Zhang
Add a pair of configure options --{enable,disable}-libpmem to control whether QEMU is compiled with PMDK libpmem [1]. QEMU may write to the host persistent memory (e.g. in vNVDIMM label emulation and live migration), so it must take the proper operations to ensure the persistence of its own writes

[Qemu-devel] [PATCH v4 5/8] migration/ram: ensure write persistence on loading zero pages to PMEM

2018-02-27 Thread Haozhong Zhang
When loading a zero page, check whether it will be loaded to persistent memory If yes, load it by libpmem function pmem_memset_nodrain(). Combined with a call to pmem_drain() at the end of RAM loading, we can guarantee all those zero pages are persistently loaded. Depending on the host HW/SW conf

[Qemu-devel] [PATCH v4 1/8] memory, exec: switch file ram allocation functions to 'flags' parameters

2018-02-27 Thread Haozhong Zhang
As more flag parameters besides the existing 'share' are going to be added to following functions memory_region_init_ram_from_file qemu_ram_alloc_from_fd qemu_ram_alloc_from_file , let's switch them to use the 'flags' parameters so as to ease future flag additions. The existing 'share'

[Qemu-devel] [PATCH v4 2/8] hostmem-file: add the 'pmem' option

2018-02-27 Thread Haozhong Zhang
When QEMU emulates vNVDIMM labels and migrates vNVDIMM devices, it needs to know whether the backend storage is a real persistent memory, in order to decide whether special operations should be performed to ensure the data persistence. This boolean option 'pmem' allows users to specify whether the

[Qemu-devel] [PATCH v4 0/8] nvdimm: guarantee persistence of QEMU writes to persistent memory

2018-02-27 Thread Haozhong Zhang
QEMU writes to vNVDIMM backends in the vNVDIMM label emulation and live migration. If the backend is on the persistent memory, QEMU needs to take proper operations to ensure its writes persistent on the persistent memory. Otherwise, a host power failure may result in the loss the guest data on the

Re: [Qemu-devel] Deprecate tilegx ?

2018-02-27 Thread Paolo Bonzini
On 28/02/2018 07:11, Thomas Huth wrote: > On 27.02.2018 12:51, Peter Maydell wrote: >> I propose that we deprecate and plan to remove the unicore32 code: > [...] >> Essentially, it seems to be a largely-inactive university R&D project, >> it's costing us in maintenance effort every time we have to

Re: [Qemu-devel] [PATCH v3 05/29] postcopy: Add vhost-user flag for postcopy and check it

2018-02-27 Thread Peter Xu
On Fri, Feb 16, 2018 at 01:16:01PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Add a vhost feature flag for postcopy support, and > use the postcopy notifier to check it before allowing postcopy. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter X

Re: [Qemu-devel] [PATCH] balloon: Fix documentation of the --balloon parameter and deprecate it

2018-02-27 Thread Paolo Bonzini
On 28/02/2018 06:38, Thomas Huth wrote: > There are two issues with the documentation of the --balloon parameter: > First, "--balloon none" is simply doing nothing. Even if a machine had a > balloon device by default, this option is not disabling anything, it is > simply ignored. Thus let's simply

Re: [Qemu-devel] [PATCH v3 03/29] postcopy: use UFFDIO_ZEROPAGE only when available

2018-02-27 Thread Peter Xu
On Fri, Feb 16, 2018 at 01:15:59PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Use a flag on the RAMBlock to state whether it has the > UFFDIO_ZEROPAGE capability, use it when it's available. > > This allows the use of postcopy on tmpfs as well as hugepage > b

Re: [Qemu-devel] [PATCH v3 01/29] migrate: Update ram_block_discard_range for shared

2018-02-27 Thread Peter Xu
On Fri, Feb 16, 2018 at 01:15:57PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The choice of call to discard a block is getting more complicated > for other cases. We use fallocate PUNCH_HOLE in any file cases; > it works for both hugepage and for tmpfs. > We

Re: [Qemu-devel] [PULL 00/12] Ui 20180227 patches

2018-02-27 Thread Gerd Hoffmann
Hi, > Hi. This failed to build on my OpenBSD test box: > > CC qga/guest-agent-command-state.o > In file included from /home/qemu/include/qemu/osdep.h:30:0, > from /home/qemu/qga/guest-agent-command-state.c:12: > ./config-host.h:29:0: warning: "CONFIG_SDL" redefined > #d

[Qemu-devel] Deprecate tilegx ? (was: Proposal: deprecate and remove QEMU's unicore32 target code)

2018-02-27 Thread Thomas Huth
On 27.02.2018 12:51, Peter Maydell wrote: > I propose that we deprecate and plan to remove the unicore32 code: [...] > Essentially, it seems to be a largely-inactive university R&D project, > it's costing us in maintenance effort every time we have to touch it, > and I don't think it has any real u

[Qemu-devel] [PATCH] balloon: Fix documentation of the --balloon parameter and deprecate it

2018-02-27 Thread Thomas Huth
There are two issues with the documentation of the --balloon parameter: First, "--balloon none" is simply doing nothing. Even if a machine had a balloon device by default, this option is not disabling anything, it is simply ignored. Thus let's simply drop this option from the documentation to avoid

[Qemu-devel] [PATCH 12/14] qio: move QIOTaskThreadData into QIOTask

2018-02-27 Thread Peter Xu
The major reason to do this is that, after the upper level can cache the QIOTask, it should also be able to further manage the QIOTask. And, it can't if it does not have the information in QIOTaskThreadData. So let's just merge this struct with QIOTask. Actually by doing this, it'll simplify the

[Qemu-devel] [PATCH 10/14] qio: refcount QIOTask

2018-02-27 Thread Peter Xu
It will be used in multiple threads in follow-up patches. Let it start to have refcounts. Signed-off-by: Peter Xu --- include/io/task.h | 3 +++ io/task.c | 23 ++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/include/io/task.h b/include/io/task.h

[Qemu-devel] [PATCH 05/14] qio: refactor net listener source operations

2018-02-27 Thread Peter Xu
Three functions are abstracted from the old code: - qio_net_listener_source_add(): create one source for listener - qio_net_listener_sources_clear(): unset existing net lister sources - qio_net_listener_sources_update(): setup all sources for listener Use them where possible. Signed-off-by: Pete

[Qemu-devel] [PATCH 13/14] qio: allow threaded qiotask to switch contexts

2018-02-27 Thread Peter Xu
This is the part of work to allow the QIOTask to use a different gcontext rather than the default main gcontext, by providing qio_task_context_set() API. We have done some work before on doing similar things to add non-default gcontext support. The general idea is that we delete the old GSource f

[Qemu-devel] [PATCH 09/14] qio: basic non-default context support for thread

2018-02-27 Thread Peter Xu
qio_task_run_in_thread() allows main thread to run blocking operations in the background. However it has an assumption on that it's always working with the default context. This patch tries to allow the QIO task framework to run with non-default gcontext. Currently no functional change so far, so

[Qemu-devel] [PATCH 08/14] chardev: allow telnet gsource to switch gcontext

2018-02-27 Thread Peter Xu
It was originally created by qio_channel_add_watch() so it's always assigning the task to main context. Now we use the new API called qio_channel_add_watch_full() so that we get the GSource handle rather than the tag ID. Meanwhile, caching the gsource in SocketChardev.telnet_source so that we can

[Qemu-devel] [PATCH 04/14] migration: let incoming side use thread context

2018-02-27 Thread Peter Xu
The old incoming migration is running in main thread and default gcontext. With the new qio_channel_add_watch_full() we can now let it run in the thread's own gcontext (if there is one). Currently this patch does nothing alone. But when any of the incoming migration is run in another iothread (e

[Qemu-devel] [PATCH 07/14] qio/chardev: update net listener gcontext

2018-02-27 Thread Peter Xu
TCP chardevs can be using QIO network listeners working in the background when in listening mode. However the network listeners are always running in main context. This can race with chardevs that are running in non-main contexts. To solve this: firstly introduce qio_net_listener_set_context() t

[Qemu-devel] [PATCH 14/14] qio/chardev: specify gcontext for TLS handshake

2018-02-27 Thread Peter Xu
We allow the TLS code to be run with non-default gcontext by providing a new qio_channel_tls_handshake_full() API. With the new API, we can re-setup the TLS handshake GSource by calling it again with the correct gcontext. Any call to the function will clean up existing GSource tasks, and re-setup

[Qemu-devel] [PATCH 00/14] qio: general non-default GMainContext support

2018-02-27 Thread Peter Xu
This is another preparation work for monitor OOB seires. This series tries to allow QIO code to run with non-default GMainContext. Note that for most places I kept the old code untouched, and only modified/introduced new interfaces where there can be a non-default GMainContext. The "where" is mo

[Qemu-devel] [PATCH 03/14] qio: introduce qio_channel_add_watch_full()

2018-02-27 Thread Peter Xu
It's a more powerful version of qio_channel_add_watch(), which supports non-default gcontext. It's stripped from the old one, then we have g_source_get_id() to fetch the tag ID to keep the old interface. Note that the new API will return a gsource, meanwhile keep a reference of it so that callers

[Qemu-devel] [PATCH 11/14] qio/chardev: return QIOTask when connect async

2018-02-27 Thread Peter Xu
Let qio_channel_socket_connect_async() return the created QIOTask object for the async connection. In tcp chardev, cache that in SocketChardev for further use. With the QIOTask refcount, this is pretty safe. Since at it, generalize out tcp_chr_socket_connect_async() since the logic is used in bo

[Qemu-devel] [PATCH 06/14] qio: store gsources for net listeners

2018-02-27 Thread Peter Xu
Originally we were storing the GSources tag IDs. That'll be not enough if we are going to support non-default gcontext for QIO code. Switch to GSources without changing anything real. Now we still always pass in NULL, which means the default gcontext. Signed-off-by: Peter Xu --- include/io/ne

[Qemu-devel] [PATCH 01/14] chardev: fix leak in tcp_chr_telnet_init_io()

2018-02-27 Thread Peter Xu
Need to free TCPChardevTelnetInit when session established. Since at it, switch to use G_SOURCE_* macros. Signed-off-by: Peter Xu --- chardev/char-socket.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index bdd6cff5

[Qemu-devel] [PATCH 02/14] qio: rename qio_task_thread_result

2018-02-27 Thread Peter Xu
It is strange that it was called gio_task_thread_result. Rename it to follow the naming rule of the file. Signed-off-by: Peter Xu --- io/task.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/io/task.c b/io/task.c index 3ce556017c..1a0a1c7185 100644 --- a/io/task.c +++ b

Re: [Qemu-devel] [RFC PATCH 0/5] atapi: change unlimited recursion to while loop

2018-02-27 Thread John Snow
On 02/23/2018 10:26 AM, Paolo Bonzini wrote: > Real hardware doesn't have an unlimited stack, so the unlimited > recursion in the ATAPI code smells a bit. In fact, the call to > ide_transfer_start easily becomes a tail call with a small change > to the code (patch 4). The remaining four patches

Re: [Qemu-devel] [PATCH] macio: fix NULL pointer dereference when issuing IDE trim

2018-02-27 Thread John Snow
On 02/26/2018 03:56 AM, Anton Nefedov wrote: > > > On 23/2/2018 9:47 PM, Mark Cave-Ayland wrote: >> Commit ef0e64a983 "ide: pass IDEState to trim AIO callback" changed the >> IDE trim callback from using a BlockBackend to an IDEState but forgot >> to update >> the dma_blk_io() call in hw/ide/ma

[Qemu-devel] [PATCH v2 3/3] tests/bios-tables-test: add test cases for DIMM proximity

2018-02-27 Thread Haozhong Zhang
QEMU now builds one SRAT memory affinity structure for each static-plugged PC-DIMM and NVDIMM device with the proximity domain specified in the device option 'node', rather than only one SRAT memory affinity structure covering the entire hotpluggable address space with the proximity domain of the l

[Qemu-devel] [PATCH v2 0/3] hw/acpi-build: build SRAT memory affinity structures for DIMM devices

2018-02-27 Thread Haozhong Zhang
ACPI 6.2A Table 5-129 "SPA Range Structure" requires the proximity domain of a NVDIMM SPA range must match with corresponding entry in SRAT table. The address ranges of vNVDIMM in QEMU are allocated from the hot-pluggable address space, which is entirely covered by one SRAT memory affinity structu

[Qemu-devel] [PATCH v2 2/3] tests/bios-tables-test: allow setting extra machine options

2018-02-27 Thread Haozhong Zhang
Some test cases may require extra machine options than the those used in the current test_acpi_ones(), e.g., nvdimm test cases require the machine option 'nvdimm=on'. Signed-off-by: Haozhong Zhang --- tests/bios-tables-test.c | 45 + 1 file changed, 29

[Qemu-devel] [PATCH v2 1/3] hw/acpi-build: build SRAT memory affinity structures for DIMM devices

2018-02-27 Thread Haozhong Zhang
ACPI 6.2A Table 5-129 "SPA Range Structure" requires the proximity domain of a NVDIMM SPA range must match with corresponding entry in SRAT table. The address ranges of vNVDIMM in QEMU are allocated from the hot-pluggable address space, which is entirely covered by one SRAT memory affinity structu

[Qemu-devel] [PATCH v3] scripts/checkpatch.pl: add check for `while` and `for`

2018-02-27 Thread Su Hang
Adding check for `while` and `for` statements, which condition has more than one line. The former checkpatch.pl can check `if` statement, which condition has more than one line, whether block misses brace round, like this: ''' if (cond1 || cond2) statement; ''' But it doesn't do the same c

Re: [Qemu-devel] [PATCH 00/11] macio: remove legacy macio_init() function

2018-02-27 Thread David Gibson
On Fri, Feb 23, 2018 at 02:51:48PM +, Mark Cave-Ayland wrote: > On 23/02/18 12:11, no-re...@patchew.org wrote: > > > Hi, > > > > This series failed build test on s390x host. Please find the details below. > > > > Type: series > > Message-id: 20180219181922.21586-1-mark.cave-ayl...@ilande.co.

Re: [Qemu-devel] [Qemu-block] [PATCH] vl: introduce vm_shutdown()

2018-02-27 Thread Fam Zheng
On Tue, 02/27 15:30, Stefan Hajnoczi wrote: > On Fri, Feb 23, 2018 at 04:20:44PM +0800, Fam Zheng wrote: > > On Tue, 02/20 13:10, Stefan Hajnoczi wrote: > > > 1. virtio_scsi_handle_cmd_vq() racing with iothread_stop_all() hits the > > >virtio_scsi_ctx_check() assertion failure because the BDS A

[Qemu-devel] [PATCH] PowerPC: Add TM bits into msr_mask

2018-02-27 Thread wei . guo . simon
From: Simon Guo During migration, cpu_post_load() will use msr_mask to determine which PPC MSR bits will be sync to the target side. Hardware Transaction Memory(HTM) has been supported since Power8. This patch adds TM/TS bits into msr_mask for Power8, so that transactional application can be migr

Re: [Qemu-devel] [PATCH 0/2] spapr: fix migration of old guests

2018-02-27 Thread David Gibson
On Tue, Feb 27, 2018 at 04:22:40PM +0100, Greg Kurz wrote: > Recent VSMT work broke migration of old guests as reported in this BZ: > > https://bugzilla.redhat.com/show_bug.cgi?id=1549087 > > Patch 1 fixes the issue, while patch 2 is a tentative code reorg to > ensure VSMT is set before anyone tr

Re: [Qemu-devel] [patches] Re: [PULL] RISC-V QEMU Port Submission

2018-02-27 Thread Michael Clark
On Wed, Feb 28, 2018 at 5:00 AM, Igor Mammedov wrote: > On Tue, 27 Feb 2018 14:01:05 + > Peter Maydell wrote: > > > On 27 February 2018 at 00:15, Michael Clark wrote: > > > -BEGIN PGP SIGNED MESSAGE- > > > Hash: SHA1 > > > > > > The following changes since commit 0a773d55ac76c5aa89e

Re: [Qemu-devel] [PULL] RISC-V QEMU Port Submission

2018-02-27 Thread Michael Clark
On Wed, Feb 28, 2018 at 3:01 AM, Peter Maydell wrote: > On 27 February 2018 at 00:15, Michael Clark wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > The following changes since commit 0a773d55ac76c5aa89ed9187a3bc5a > f8c5c2a6d0: > > > > maintainers: Add myself as a OpenBSD

Re: [Qemu-devel] [patches] Re: [PULL] RISC-V QEMU Port Submission

2018-02-27 Thread Michael Clark
On Wed, Feb 28, 2018 at 6:50 AM, Peter Maydell wrote: > On 27 February 2018 at 15:50, Stef O'Rear wrote: > > On Tue, Feb 27, 2018 at 6:01 AM, Peter Maydell > wrote: > >> On 27 February 2018 at 00:15, Michael Clark wrote: > >>> The spike_v1.9 > >>> machine has been renamed to spike_v1.9.1 to ma

Re: [Qemu-devel] [patches] Re: [PULL] RISC-V QEMU Port Submission

2018-02-27 Thread Michael Clark
On Wed, Feb 28, 2018 at 4:50 AM, Stef O'Rear wrote: > On Tue, Feb 27, 2018 at 6:01 AM, Peter Maydell > wrote: > > On 27 February 2018 at 00:15, Michael Clark wrote: > >> -BEGIN PGP SIGNED MESSAGE- > >> Hash: SHA1 > >> > >> The following changes since commit 0a773d55ac76c5aa89ed9187a3bc5

Re: [Qemu-devel] [PATCH] i386: Allow monitor / mwait cpuid override

2018-02-27 Thread Alexander Graf
On 27.02.18 10:52, Gonglei (Arei) wrote: > Hi all, > > Guests could achive good performance in 'Message Passing Workloads' > scenarios when knowing the X86_FEATURE_MWAIT feature which is presented by > qemu. > the reason is that after knowing that feature, > the guest could use mwait method,

Re: [Qemu-devel] Call for GSoC & Outreachy 2018 mentors & project ideas

2018-02-27 Thread Philippe Mathieu-Daudé
On 02/14/2018 04:00 PM, Alistair Francis wrote: > On Mon, Jan 15, 2018 at 4:59 AM, Stefan Hajnoczi wrote: >> On Thu, Jan 11, 2018 at 03:25:56PM -0800, Alistair Francis wrote: >>> On Wed, Jan 10, 2018 at 4:52 AM, Stefan Hajnoczi wrote: On Tue, Jan 9, 2018 at 9:45 PM, Alistair Francis w

Re: [Qemu-devel] [PATCH v7 2/3] xlnx-zynqmp-rtc: Add basic time support

2018-02-27 Thread Philippe Mathieu-Daudé
On 02/27/2018 03:52 PM, Alistair Francis wrote: > Allow the guest to determine the time set from the QEMU command line. > > This includes adding a trace event to debug the new time. > > Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé > --- > V7: > - Make the current_tm lo

Re: [Qemu-devel] [PATCH 06/11] macio: move macio related structures and defines into separate macio.h file

2018-02-27 Thread Philippe Mathieu-Daudé
On 02/19/2018 03:19 PM, Mark Cave-Ayland wrote: > Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé > --- > hw/misc/macio/macio.c | 43 + > hw/ppc/mac.h | 3 -- > hw/ppc/mac_newworld.c | 1 + > hw/ppc/mac_oldworld.c

Re: [Qemu-devel] [Qemu-arm] [PATCH 2/9] pc: replace pm object initialization with one-liner in acpi_get_pm_info()

2018-02-27 Thread Philippe Mathieu-Daudé
On 02/22/2018 09:42 AM, Igor Mammedov wrote: > next patch will need it before it gets to piix4/lpc branches > that initializes 'obj' now. > > Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé > --- > hw/i386/acpi-build.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-

Re: [Qemu-devel] [PATCH 3/5] hw/i2c-ddc: Do not fail writes

2018-02-27 Thread Philippe Mathieu-Daudé
On 02/27/2018 07:49 AM, Linus Walleij wrote: > The tx function of the DDC I2C slave emulation was returning 1 > on all writes resulting in NACK in the I2C bus. Changing it to > 0 makes the DDC I2C work fine with bit-banged I2C such as the > versatile I2C. > > I guess it was not affecting whatever

Re: [Qemu-devel] [PATCH 5/5] arm/vexpress: Add proper display connector emulation

2018-02-27 Thread Philippe Mathieu-Daudé
On 02/27/2018 07:49 AM, Linus Walleij wrote: > This adds the SiI9022 and EDID I2C devices to the ARM Versatile > Express machine, and selects the two I2C devices necessary in the > arm-softmmy.mak configuration so everything will build smoothly. > > I am implementing proper handling of the graphic

[Qemu-devel] [PATCH] decodetree: Propagate return value from translate subroutines

2018-02-27 Thread Richard Henderson
Allow the translate subroutines to return false for invalid insns. At present we can of course invoke an invalid insn exception from within the translate subroutine, but in the short term this consolidates code. In the long term it would allow the decodetree language to support overlapping pattern

Re: [Qemu-devel] [PATCH v5 0/7] Generalize MDIO framework

2018-02-27 Thread Philippe Mathieu-Daudé
Hi Edgar, On 10/09/2017 10:21 AM, Edgar E. Iglesias wrote: > On Fri, Sep 22, 2017 at 02:13:16PM -0300, Philippe Mathieu-Daudé wrote: >> Hi, >> >> I have a follow up series using multiples PHY on the MDIO bus based on this >> series. > > Hi Philippe! > > I think this is a good improvement compare

Re: [Qemu-devel] [PATCH 19/19] mps2-an505: New board model: MPS2 with AN505 Cortex-M33 FPGA image

2018-02-27 Thread Richard Henderson
On 02/20/2018 10:03 AM, Peter Maydell wrote: > Define a new board model for the MPS2 with an AN505 FPGA image > containing a Cortex-M33. Since the FPGA images for TrustZone > cores (AN505, and the similar AN519 for Cortex-M23) have a > significantly different layout of devices to the non-TrustZone

Re: [Qemu-devel] [PATCH 18/19] hw/arm/iotkit: Model Arm IOT Kit

2018-02-27 Thread Richard Henderson
On 02/20/2018 10:03 AM, Peter Maydell wrote: > Model the Arm IoT Kit documented in > http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ecm0601256/index.html > > The Arm IoT Kit is a subsystem which includes a CPU and some devices, > and is intended be extended by adding extra devices to

Re: [Qemu-devel] [PATCH v5 6/7] hw/mdio: Add VMState support

2018-02-27 Thread Alistair Francis
On Fri, Sep 22, 2017 at 10:13 AM, Philippe Mathieu-Daudé wrote: > From: Grant Likely > > The MDIO model needs to have VMState support before it can be used by > devices that support VMState. This patch adds VMState macros for both > qemu_mdio and qemu_phy. > > Signed-off-by: Grant Likely > Signe

Re: [Qemu-devel] [PATCH v5 5/7] hw/mdio: Refactor bitbanging state machine

2018-02-27 Thread Alistair Francis
On Fri, Sep 22, 2017 at 10:13 AM, Philippe Mathieu-Daudé wrote: > From: Grant Likely > > The MDIO state machine has a moderate amount of duplicate code in the > state processing that can be consolidated. This patch does so and > reorganizes it a bit so that far less code is required. Most of the

Re: [Qemu-devel] [PATCH v5 4/7] hw/mdio: Mask out read-only bits.

2018-02-27 Thread Alistair Francis
On Fri, Sep 22, 2017 at 10:13 AM, Philippe Mathieu-Daudé wrote: > From: Grant Likely > > The RST and ANEG_RST bits are commands, not settings. An operating > system will get confused (or at least u-boot does) if those bits remain > set after writing to them. Therefore, mask them out on write. > >

Re: [Qemu-devel] [PATCH v5 3/7] hw/mdio: Generalize phy initialization routine

2018-02-27 Thread Alistair Francis
On Fri, Sep 22, 2017 at 10:13 AM, Philippe Mathieu-Daudé wrote: > From: Grant Likely > > There really isn't anything tdk-specific about tdk_init() other than the > phy id registers. The function should instead be generalized for any > phy, at least as far as the ID registers are concerned. For th

Re: [Qemu-devel] [PATCH v5 2/7] hw/mdio: Add PHY register definition

2018-02-27 Thread Alistair Francis
On Fri, Sep 22, 2017 at 10:13 AM, Philippe Mathieu-Daudé wrote: > From: Grant Likely > > Trivial patch to add #defines for defined PHY register address and bit fields > > Signed-off-by: Grant Likely > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > incl

Re: [Qemu-devel] [PATCH v5 1/7] hw/mdio: Generalize etraxfs MDIO bitbanging emulation

2018-02-27 Thread Alistair Francis
On Fri, Sep 22, 2017 at 10:13 AM, Philippe Mathieu-Daudé wrote: > From: Grant Likely > > The etraxfs and Xilinx axienet Ethernet models implement quite a nice > MDIO core that supports both bitbanging and direct register access. This > change factors the common code out into a separate file. Ther

Re: [Qemu-devel] [RFC v4 19/21] blockjobs: Expose manual property

2018-02-27 Thread Eric Blake
On 02/27/2018 03:57 PM, John Snow wrote: On 02/27/2018 03:16 PM, Eric Blake wrote: On 02/23/2018 05:51 PM, John Snow wrote: Expose the "manual" property via QAPI for the backup-related jobs. As of this commit, this allows the management API to request the "concluded" and "dismiss" semantics f

Re: [Qemu-devel] [PATCH v3 9/9] tests: functional tests for QMP command set-numa-node

2018-02-27 Thread Eric Blake
On 02/16/2018 06:37 AM, Igor Mammedov wrote: * start QEMU with 2 unmapped cpus, * while in preconfig state * add 2 numa nodes * assign cpus to them * exit preconfig and in running state check that cpus are mapped correctly. Signed-off-by: Igor Mammedov --- tests/numa-test.

Re: [Qemu-devel] [PATCH v3 8/9] QMP: add set-numa-node command

2018-02-27 Thread Eric Blake
On 02/16/2018 06:37 AM, Igor Mammedov wrote: Command is allowed to run only in preconfig stage and will allow to configure numa mapping for CPUs depending on possible CPUs layout (query-hotpluggable-cpus) for given machine instance. Signed-off-by: Igor Mammedov --- numa.c | 5 +

Re: [Qemu-devel] [PATCH v3 6/9] tests: extend qmp test with pereconfig checks

2018-02-27 Thread Eric Blake
On 02/16/2018 06:37 AM, Igor Mammedov wrote: In the subject line: s/pereconfig/preconfig/ Add permission checks for commands in 'preconfig' state. It should work for all targets, but won't work with machine 'none' as it's limited to -smp 1 only. So use PC machine for testing preconfig and 'run

Re: [Qemu-devel] [PATCH v3 5/9] QAPI: allow to specify valid runstates per command

2018-02-27 Thread Eric Blake
On 02/16/2018 06:37 AM, Igor Mammedov wrote: Add optional 'runstates' parameter in QAPI command definition, which will permit to specify RunState variations in which a command could be exectuted via QMP monitor. s/exectuted/executed/ For compatibility reasons, commands, that don't use s/co

Re: [Qemu-devel] [PATCH 17/19] hw/misc/iotkit-secctl: Add remaining simple registers

2018-02-27 Thread Richard Henderson
On 02/20/2018 10:03 AM, Peter Maydell wrote: > +case A_BRGINTEN: > +s->brginten = value & 0x; > +break; Looks to me like bits 0-15 are read-only 0x, so, that 0x should be 0x. r~

Re: [Qemu-devel] [PATCH] hw/s390x/ipl: Bail out if the network bootloader can not be found

2018-02-27 Thread Farhan Ali
On 02/27/2018 02:11 PM, Thomas Huth wrote: On 27.02.2018 18:26, Farhan Ali wrote: On 02/27/2018 05:16 AM, Viktor Mihajlovski wrote: On 27.02.2018 11:05, Thomas Huth wrote: If QEMU fails to load 's390-netboot.img', the guest firmware currently loops forever and just floods the console with

Re: [Qemu-devel] [RFC v4 19/21] blockjobs: Expose manual property

2018-02-27 Thread John Snow
On 02/27/2018 03:16 PM, Eric Blake wrote: > On 02/23/2018 05:51 PM, John Snow wrote: >> Expose the "manual" property via QAPI for the backup-related jobs. >> As of this commit, this allows the management API to request the >> "concluded" and "dismiss" semantics for backup jobs. >> >> Signed-off-b

Re: [Qemu-devel] [PATCH 16/19] hw/misc/iotkit-secctl: Add handling for PPCs

2018-02-27 Thread Richard Henderson
On 02/20/2018 10:03 AM, Peter Maydell wrote: > The IoTKit Security Controller includes various registers > that expose to software the controls for the Peripheral > Protection Controllers in the system. Implement these. > > Signed-off-by: Peter Maydell > --- > include/hw/misc/iotkit-secctl.h |

Re: [Qemu-devel] [PATCH 15/19] hw/misc/iotkit-secctl: Arm IoT Kit security controller initial skeleton

2018-02-27 Thread Richard Henderson
On 02/20/2018 10:03 AM, Peter Maydell wrote: > +r >>= 8 * (addr & 3); > +r &= (1 << (size * 8)) - 1; extract32(r, (addr & 3) * 8, size * 8) ? Otherwise, Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 14/19] hw/misc/tz-ppc: Model TrustZone peripheral protection controller

2018-02-27 Thread Richard Henderson
On 02/20/2018 10:03 AM, Peter Maydell wrote: > Add a model of the TrustZone peripheral protection controller (PPC), > which is used to gate transactions to non-TZ-aware peripherals so > that secure software can configure them to not be accessible to > non-secure software. > > Signed-off-by: Peter

[Qemu-devel] [Bug 1673976] Re: linux-user clone() can't handle glibc posix_spawn() (causes locale-gen to assert)

2018-02-27 Thread Peter Maydell
That glibc change has caused the assert to go away, but QEMU's spawn(CLONE_VFORK) still does not have the "always waits for child" semantics that glibc has assumed since glibc commit 4b4d4056bb154. The child and the parent will end up racing each other, and the child will never be able to write to

Re: [Qemu-devel] [PATCH 13/19] hw/misc/mps2-fpgaio: FPGA control block for MPS2 AN505

2018-02-27 Thread Richard Henderson
On 02/20/2018 10:03 AM, Peter Maydell wrote: > The MPS2 AN505 FPGA image includes a "FPGA control block" > which is a small set of registers handling LEDs, buttons > and some counters. > > Signed-off-by: Peter Maydell > --- > hw/misc/Makefile.objs | 1 + > include/hw/misc/mps2-fpgaio

Re: [Qemu-devel] [RFC v4 00/21] blockjobs: add explicit job management

2018-02-27 Thread John Snow
On 02/24/2018 09:31 AM, no-re...@patchew.org wrote: > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Type: series > Message-id: 20180223235142.21501-1-js...@redhat.com > Subject: [Qemu-devel] [RFC v4 00/21] blockjobs: add explicit job

Re: [Qemu-devel] [PATCH 12/19] hw/core/split-irq: Device that splits IRQ lines

2018-02-27 Thread Richard Henderson
On 02/20/2018 10:03 AM, Peter Maydell wrote: > In some board or SoC models it is necessary to split a qemu_irq line > so that one input can feed multiple outputs. We currently have > qemu_irq_split() for this, but that has several deficiencies: > * it can only handle splitting a line into two >

Re: [Qemu-devel] [RFC v4 00/21] blockjobs: add explicit job management

2018-02-27 Thread John Snow
On 02/25/2018 06:25 PM, no-re...@patchew.org wrote: > CC scsi/qemu-pr-helper.o > /var/tmp/patchew-tester-tmp-9ukz0kme/src/blockjob.c: In function > ‘block_job_txn_apply.isra.8’: > /var/tmp/patchew-tester-tmp-9ukz0kme/src/blockjob.c:511:5: error: ‘rc’ may be > used uninitialized in this f

Re: [Qemu-devel] [RFC v4 17/21] blockjobs: add PENDING status and event

2018-02-27 Thread John Snow
On 02/27/2018 03:05 PM, Eric Blake wrote: > On 02/23/2018 05:51 PM, John Snow wrote: >> For jobs utilizing the new manual workflow, we intend to prohibit >> them from modifying the block graph until the management layer provides >> an explicit ACK via block-job-finalize to move the process forwar

Re: [Qemu-devel] [PATCH 11/19] qdev: Add new qdev_init_gpio_in_named_with_opaque()

2018-02-27 Thread Richard Henderson
On 02/20/2018 10:03 AM, Peter Maydell wrote: > The function qdev_init_gpio_in_named() passes the DeviceState pointer > as the opaque data pointor for the irq handler function. Usually > this is what you want, but in some cases it would be helpful to use > some other data pointer. > > Add a new fu

Re: [Qemu-devel] [PATCH 09/19] hw/misc/unimp: Move struct to header file

2018-02-27 Thread Richard Henderson
On 02/20/2018 10:03 AM, Peter Maydell wrote: > Move the definition of the struct for the unimplemented-device > from unimp.c to unimp.h, so that users can embed the struct > in their own device structs if they prefer. > > Signed-off-by: Peter Maydell > --- > include/hw/misc/unimp.h | 10

Re: [Qemu-devel] [PATCH 10/19] include/hw/or-irq.h: Add missing include guard

2018-02-27 Thread Richard Henderson
On 02/20/2018 10:03 AM, Peter Maydell wrote: > The or-irq.h header file is missing the customary guard against > multiple inclusion, which means compilation fails if it gets > included twice. Fix the omission. > > Signed-off-by: Peter Maydell > --- > include/hw/or-irq.h | 5 + > 1 file chang

Re: [Qemu-devel] [RFC v4 16/21] blockjobs: add waiting status

2018-02-27 Thread John Snow
On 02/27/2018 03:00 PM, Eric Blake wrote: > On 02/23/2018 05:51 PM, John Snow wrote: >> For jobs that are stuck waiting on others in a transaction, it would >> be nice to know that they are no longer "running" in that sense, but >> instead are waiting on other jobs in the transaction. >> >> Jobs

Re: [Qemu-devel] [RFC v4 12/21] blockjobs: ensure abort is called for cancelled jobs

2018-02-27 Thread John Snow
On 02/27/2018 02:49 PM, Eric Blake wrote: > On 02/23/2018 05:51 PM, John Snow wrote: >> Presently, even if a job is canceled post-completion as a result of >> a failing peer in a transaction, it will still call .commit because >> nothing has updated or changed its return code. >> >> The reason wh

Re: [Qemu-devel] [PATCH 08/19] target/arm: Add Cortex-M33

2018-02-27 Thread Richard Henderson
On 02/20/2018 10:03 AM, Peter Maydell wrote: > Add a Cortex-M33 definition. The M33 is an M profile CPU > which implements the ARM v8M architecture, including the > M profile Security Extension. > > Signed-off-by: Peter Maydell > --- > target/arm/cpu.c | 31 +++ > 1 f

Re: [Qemu-devel] [RFC v4 15/21] blockjobs: add prepare callback

2018-02-27 Thread John Snow
On 02/27/2018 02:56 PM, Eric Blake wrote: > On 02/23/2018 05:51 PM, John Snow wrote: >> Some jobs upon finalization may need to perform some work that can >> still fail. If these jobs are part of a transaction, it's important >> that these callbacks fail the entire transaction. >> >> We allow for

Re: [Qemu-devel] [RFC v4 20/21] iotests: test manual job dismissal

2018-02-27 Thread John Snow
On 02/27/2018 03:21 PM, Eric Blake wrote: > On 02/23/2018 05:51 PM, John Snow wrote: >> Signed-off-by: John Snow >> --- >>   tests/qemu-iotests/056 | 195 >> + >>   tests/qemu-iotests/056.out |   4 +- >>   2 files changed, 197 insertions(+), 2 delet

Re: [Qemu-devel] [RFC v4 19/21] blockjobs: Expose manual property

2018-02-27 Thread John Snow
On 02/27/2018 03:16 PM, Eric Blake wrote: > On 02/23/2018 05:51 PM, John Snow wrote: >> Expose the "manual" property via QAPI for the backup-related jobs. >> As of this commit, this allows the management API to request the >> "concluded" and "dismiss" semantics for backup jobs. >> >> Signed-off-b

Re: [Qemu-devel] [PATCH v3 3/9] CLI: add -preconfig option

2018-02-27 Thread Eric Blake
On 02/16/2018 06:37 AM, Igor Mammedov wrote: Option allows to pause QEMU at new RUN_STATE_PRECONFIG time, which would allow to configure QEMU from QMP before machine jumps into board initialization code machine_run_board_init(). Grammar suggestion: This option allows pausing QEMU in the new RU

Re: [Qemu-devel] [PATCH v3 0/9] enable numa configuration before machine_init() from QMP

2018-02-27 Thread Eric Blake
On 02/27/2018 10:36 AM, Igor Mammedov wrote: On Fri, 16 Feb 2018 13:37:12 +0100 Igor Mammedov wrote: Eric, Adding you to CC list (git send-mail somehow haven't noticed you in cover letter). Actually, I did get CC'd on the original cover letter, but you are reading the copy that hit the lis

Re: [Qemu-devel] [PATCH 07/19] armv7m: Forward init-svtor property to CPU object

2018-02-27 Thread Richard Henderson
On 02/20/2018 10:03 AM, Peter Maydell wrote: > Create an "init-svtor" property on the armv7m container > object which we can forward to the CPU object. > > Signed-off-by: Peter Maydell > --- > include/hw/arm/armv7m.h | 2 ++ > hw/arm/armv7m.c | 6 ++ > 2 files changed, 8 insertions(+

Re: [Qemu-devel] [PATCH v3 15/29] vhost+postcopy: Send address back to qemu

2018-02-27 Thread Michael S. Tsirkin
On Tue, Feb 27, 2018 at 07:54:18PM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Fri, Feb 16, 2018 at 01:16:11PM +, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > We need a better way, but at the moment w

Re: [Qemu-devel] [RFC v4 21/21] blockjobs: add manual_mgmt option to transactions

2018-02-27 Thread Eric Blake
On 02/23/2018 05:51 PM, John Snow wrote: This allows us to easily force the option for all jobs belonging to a transaction to ensure consistency with how all those jobs will be handled. This is purely a convenience. Signed-off-by: John Snow --- +++ b/qapi/transaction.json @@ -79,7 +79,8 @@

Re: [Qemu-devel] [PATCH v3 00/29] postcopy+vhost-user/shared ram

2018-02-27 Thread Michael S. Tsirkin
On Tue, Feb 27, 2018 at 08:05:25PM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Fri, Feb 16, 2018 at 01:15:56PM +, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > Hi, > > > This is the first non-RFC ver

Re: [Qemu-devel] [RFC v4 20/21] iotests: test manual job dismissal

2018-02-27 Thread Eric Blake
On 02/23/2018 05:51 PM, John Snow wrote: Signed-off-by: John Snow --- tests/qemu-iotests/056 | 195 + tests/qemu-iotests/056.out | 4 +- 2 files changed, 197 insertions(+), 2 deletions(-) I'm not sure if this covers everything in the serie

  1   2   3   4   5   >