Re: [Qemu-devel] [RFC 2/3] pci: Link pci_host_bridges with QTAILQ

2018-05-21 Thread Marcel Apfelbaum
On 05/20/2018 10:28 AM, Zihan Yang wrote: QLIST will place the original q35 host bridge at the end of list because it is added first. Replace it with QTAILQ to make q35 at the first of queue, which makes it convinient and compatible when there are pxb hosts other than q35 hosts I have no

[Qemu-devel] [PATCH 1/2] lm32: take BQL before writing IP/IM register

2018-05-21 Thread Michael Walle
Writing to these registers may raise an interrupt request. Actually, this prevents the milkymist board from starting. Cc: qemu-sta...@nongnu.org Signed-off-by: Michael Walle Tested-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée

[Qemu-devel] [PULL 1/1] lm32: take BQL before writing IP/IM register

2018-05-21 Thread Michael Walle
Writing to these registers may raise an interrupt request. Actually, this prevents the milkymist board from starting. Cc: qemu-sta...@nongnu.org Signed-off-by: Michael Walle Tested-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée

[Qemu-devel] [PULL 0/1] target/lm32 BQL patch

2018-05-21 Thread Michael Walle
The following changes since commit 81e9cbd0ca1131012b058df6804b1f626a6b730c: lm32: take BQL before writing IP/IM register (2018-05-21 13:37:12 +0200) are available in the git repository at: git://github.com/mwalle/qemu.git tags/lm32-queue/20180521 for you to fetch changes up

[Qemu-devel] [PATCH 17/27] exec.c: Handle IOMMUs in address_space_translate_for_iotlb()

2018-05-21 Thread Peter Maydell
Currently we don't support board configurations that put an IOMMU in the path of the CPU's memory transactions, and instead just assert() if the memory region fonud in address_space_translate_for_iotlb() is an IOMMUMemoryRegion. Remove this limitation by having the function handle IOMMUs. This is

[Qemu-devel] [PATCH 21/27] hw/misc/tz_mpc.c: Honour the BLK_LUT settings in translate

2018-05-21 Thread Peter Maydell
The final part of the Memory Protection Controller we need to implement is actually using the BLK_LUT data programmed by the guest to determine whether to block the transaction or not. Since this means we now change transaction mappings when the guest writes to BLK_LUT, we must also call the

[Qemu-devel] [PATCH 27/27] hw/arm/mps2-tz.c: Instantiate MPCs

2018-05-21 Thread Peter Maydell
Instantiate and wire up the Memory Protection Controllers in the MPS2 board itself. Signed-off-by: Peter Maydell --- hw/arm/mps2-tz.c | 71 ++-- 1 file changed, 44 insertions(+), 27 deletions(-) diff --git a/hw/arm/mps2-tz.c

[Qemu-devel] [PATCH 00/27] iommu: support txattrs, support TCG execution, implement TZ MPC

2018-05-21 Thread Peter Maydell
This patchset is a rather large one, but the first half is all fairly simple plumbing. It does four things: * support IOMMUs that are aware of memory transaction attributes and may generate different translations for different attributes * support TCG execution out of memory which is behind

Re: [Qemu-devel] [RFC 0/3] pci_expander_brdige: Put pxb host bridge into separate pci domain

2018-05-21 Thread Marcel Apfelbaum
Hi Zihan On 05/20/2018 10:28 AM, Zihan Yang wrote: You do have patch 0, sorry for not seeing it, please disregard my prev comment. Currently only q35 host bridge is allocated an item in MCFG table, all pxb host bridges stay within pci domain 0. This series of patches put each pxb host

[Qemu-devel] [PATCH v3 0/5] qmp: add pmemload command

2018-05-21 Thread Simon Ruderich
Hello, This is third version of this patch set, rebased on current master. As I've received no answers to [1] (and I'd prefer to keep the patch as is for now if possible) this doesn't include any changes to address the comments to [2]. If there's anything else I can do to get these patches

Re: [Qemu-devel] [qemu PATCH v2 3/4] nvdimm, acpi: support NFIT platform capabilities

2018-05-21 Thread Ross Zwisler
On Fri, May 18, 2018 at 04:37:10PM +, Elliott, Robert (Persistent Memory) wrote: > > > ... > > Would it help to show them in hex? > > > > As of ACPI 6.2 Errata A, the following values are valid for the bottom > > two bits: > > > > 0x2 - Memory Controller Flush to NVDIMM Durability

[Qemu-devel] [PATCH 12/27] Make flatview_do_translate() take a MemTxAttrs argument

2018-05-21 Thread Peter Maydell
As part of plumbing MemTxAttrs down to the IOMMU translate method, add MemTxAttrs as an argument to flatview_do_translate(). Signed-off-by: Peter Maydell --- exec.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/exec.c b/exec.c index

Re: [Qemu-devel] [PATCH 23/27] hw/core/or-irq: Support more than 16 inputs to an OR gate

2018-05-21 Thread Peter Maydell
On 21 May 2018 at 15:34, Paolo Bonzini wrote: > Why do the levels have to be migrated at all? It should be enough if > the IRQ level is either migrated manually, or restored (e.g. in > post_save callbacks) through other data that is migrated. This is standard behaviour for

[Qemu-devel] [PATCH v3 3/5] cpus: use size_t in qmp_memsave/qmp_pmemsave

2018-05-21 Thread Simon Ruderich
It's the natural type for object sizes and matches the return value of sizeof(buf). Signed-off-by: Simon Ruderich Reviewed-by: Eric Blake --- cpus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index

[Qemu-devel] [PATCH v3 1/5] cpus: correct coding style in qmp_memsave/qmp_pmemsave

2018-05-21 Thread Simon Ruderich
Signed-off-by: Simon Ruderich Reviewed-by: Eric Blake --- cpus.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index d1f16296de..4b1609fe90 100644 --- a/cpus.c +++ b/cpus.c @@ -2316,8 +2316,9 @@ void

[Qemu-devel] [PATCH v3 4/5] hmp: don't truncate size in hmp_memsave/hmp_pmemsave

2018-05-21 Thread Simon Ruderich
The called function takes an uint64_t as size parameter and qdict_get_int() returns an uint64_t. Don't truncate it needlessly to an uint32_t. Signed-off-by: Simon Ruderich Reviewed-by: Eric Blake --- hmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [Qemu-devel] [PATCH v2 2/2] target/lm32: hold BQL in gdbstub

2018-05-21 Thread Michael Walle
Am 2018-05-21 14:25, schrieb Peter Maydell: On 21 May 2018 at 13:21, Michael Walle wrote: Changing the IP/IM registers may cause interrupts, so hold the BQL. Cc: qemu-sta...@nongnu.org Signed-off-by: Michael Walle --- target/lm32/gdbstub.c | 5 + 1

Re: [Qemu-devel] [qemu PATCH v4 2/4] tests/.gitignore: add entry for generated file

2018-05-21 Thread Eric Blake
On 05/21/2018 11:32 AM, Ross Zwisler wrote: After a "make check" we end up with the following: $ git status On branch master Your branch is up-to-date with 'origin/master'. Untracked files: (use "git add ..." to include in what will be committed) tests/test-block-backend nothing

[Qemu-devel] Ping [PATCH RFC v2 0/2] Fix UART serial implementation

2018-05-21 Thread Calvin Lee
Hello, It's been about a week since the last email to my patches, in case anyone would like to review but missed them. Patches are the following on patchwork: http://patchwork.ozlabs.org/patch/912281/ http://patchwork.ozlabs.org/patch/912282/ And the following on patchew:

[Qemu-devel] [PATCH 15/27] iommu: Add IOMMU index argument to notifier APIs

2018-05-21 Thread Peter Maydell
Add support for multiple IOMMU indexes to the IOMMU notifier APIs. When initializing a notifier with iommu_notifier_init(), the caller must pass the IOMMU index that it is interested in. When a change happens, the IOMMU implementation must pass memory_region_notify_iommu() the IOMMU index that has

Re: [Qemu-devel] [RFC] monitor: turn on Out-Of-Band by default again

2018-05-21 Thread Eric Blake
On 05/21/2018 03:42 AM, Peter Xu wrote: We turned Out-Of-Band feature of monitors off for 2.12 release. Now we try to turn that on again. "try to turn" sounds weak, like you aren't sure of this patch. If you aren't sure, then why should we feel safe in applying it? This text is going in

[Qemu-devel] [PATCH v2] Delete AF_UNIX socket after close

2018-05-21 Thread Pavel Balaev
This is a second attempt at sending this patch: http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg04697.html Signed-off-by: Pavel Balaev --- io/channel-socket.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/io/channel-socket.c

[Qemu-devel] [qemu PATCH v4 2/4] tests/.gitignore: add entry for generated file

2018-05-21 Thread Ross Zwisler
After a "make check" we end up with the following: $ git status On branch master Your branch is up-to-date with 'origin/master'. Untracked files: (use "git add ..." to include in what will be committed) tests/test-block-backend nothing added to commit but untracked files present (use

[Qemu-devel] [qemu PATCH v4 1/4] nvdimm: fix typo in label-size definition

2018-05-21 Thread Ross Zwisler
Signed-off-by: Ross Zwisler Fixes: commit da6789c27c2e ("nvdimm: add a macro for property "label-size"") Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov Cc: Haozhong Zhang Cc: Michael S.

[Qemu-devel] [PATCH 20/27] hw/misc/tz-mpc.c: Implement correct blocked-access behaviour

2018-05-21 Thread Peter Maydell
The MPC is guest-configurable for whether blocked accesses: * should be RAZ/WI or cause a bus error * should generate an interrupt or not Implement this behaviour in the blocked-access handlers. Signed-off-by: Peter Maydell --- hw/misc/tz-mpc.c | 50

[Qemu-devel] [PATCH 22/27] vmstate.h: Provide VMSTATE_BOOL_SUB_ARRAY

2018-05-21 Thread Peter Maydell
Provide a VMSTATE_BOOL_SUB_ARRAY to go with VMSTATE_UINT8_SUB_ARRAY and friends. Signed-off-by: Peter Maydell --- include/migration/vmstate.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index

[Qemu-devel] [PATCH 03/27] Make address_space_translate{, _cached}() take a MemTxAttrs argument

2018-05-21 Thread Peter Maydell
As part of plumbing MemTxAttrs down to the IOMMU translate method, add MemTxAttrs as an argument to address_space_translate() and address_space_translate_cached(). Callers either have an attrs value to hand, or don't care and can use MEMTXATTRS_UNSPECIFIED. Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH 09/27] Make flatview_access_valid() take a MemTxAttrs argument

2018-05-21 Thread Peter Maydell
As part of plumbing MemTxAttrs down to the IOMMU translate method, add MemTxAttrs as an argument to flatview_access_valid(). Its callers now all have an attrs value to hand, so we can correct our earlier temporary use of MEMTXATTRS_UNSPECIFIED. Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH 18/27] hw/misc/tz-mpc.c: Implement the Arm TrustZone Memory Protection Controller

2018-05-21 Thread Peter Maydell
Implement the Arm TrustZone Memory Protection Controller, which sits in front of RAM and allows secure software to configure it to either pass through or reject transactions. We implement the MPC as a QEMU IOMMU, which will direct transactions either through to the devices and memory behind it or

Re: [Qemu-devel] [PATCH] Delete AF_UNIX socket after close

2018-05-21 Thread Daniel P . Berrangé
On Mon, May 21, 2018 at 02:10:18PM +0300, Pavel Balaev wrote: > Hello, > > Since version 2.12.0 AF_UNIX socket created for QMP exchange is not > deleted on instance shutdown. > > This is due to the fact that function qio_channel_socket_finalize() is > called after qio_channel_socket_close().

[Qemu-devel] [PATCH v3 5/5] qmp: add pmemload command

2018-05-21 Thread Simon Ruderich
Adapted patch from Baojun Wang [1] with the following commit message: I found this could be useful to have qemu-softmmu as a cross debugger (launch with -s -S command line option), then if we can have a command to load guest physical memory, we can use cross gdb to do some target

[Qemu-devel] [PATCH v3 2/5] cpus: convert qmp_memsave/qmp_pmemsave to use qemu_open

2018-05-21 Thread Simon Ruderich
qemu_open() allows passing file descriptors to qemu which is used in restricted environments like libvirt where open() is prohibited. Suggested-by: Eric Blake Signed-off-by: Simon Ruderich Reviewed-by: Eric Blake --- cpus.c | 20

[Qemu-devel] [qemu PATCH v4 3/4] nvdimm, acpi: support NFIT platform capabilities

2018-05-21 Thread Ross Zwisler
Add a machine command line option to allow the user to control the Platform Capabilities Structure in the virtualized NFIT. This Platform Capabilities Structure was added in ACPI 6.2 Errata A. Signed-off-by: Ross Zwisler --- docs/nvdimm.txt | 27

[Qemu-devel] [PATCH 08/27] Make MemoryRegion valid.accepts callback take a MemTxAttrs argument

2018-05-21 Thread Peter Maydell
As part of plumbing MemTxAttrs down to the IOMMU translate method, add MemTxAttrs as an argument to the MemoryRegion valid.accepts callback. We'll need this for subpage_accepts(). We could take the approach we used with the read and write callbacks and add new a new _with_attrs version, but since

Re: [Qemu-devel] [PATCH 00/27] iommu: support txattrs, support TCG execution, implement TZ MPC

2018-05-21 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180521140402.23318-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PATCH 00/27] iommu: support txattrs, support TCG execution, implement TZ MPC === TEST SCRIPT BEGIN

[Qemu-devel] [qemu PATCH v4 4/4] ACPI testing: test NFIT platform capabilities

2018-05-21 Thread Ross Zwisler
Add testing for the newly added NFIT Platform Capabilities Structure. Signed-off-by: Ross Zwisler Suggested-by: Igor Mammedov --- tests/acpi-test-data/pc/NFIT.dimmpxm | Bin 224 -> 240 bytes tests/acpi-test-data/q35/NFIT.dimmpxm | Bin 224 ->

[Qemu-devel] [PATCH 05/27] Make address_space_access_valid() take a MemTxAttrs argument

2018-05-21 Thread Peter Maydell
As part of plumbing MemTxAttrs down to the IOMMU translate method, add MemTxAttrs as an argument to address_space_access_valid(). Its callers either have an attrs value to hand, or don't care and can use MEMTXATTRS_UNSPECIFIED. Signed-off-by: Peter Maydell ---

[Qemu-devel] [PATCH 16/27] iommu: Add IOMMU index argument to translate method

2018-05-21 Thread Peter Maydell
Add an IOMMU index argument to the translate method of IOMMUs. Since all of our current IOMMU implementations support only a single IOMMU index, this has no effect on the behaviour. Signed-off-by: Peter Maydell --- include/exec/memory.h| 3 ++- exec.c

[Qemu-devel] [PATCH 25/27] hw/arm/iotkit: Instantiate MPC

2018-05-21 Thread Peter Maydell
Wire up the one MPC that is part of the IoTKit itself. For the moment we don't wire up its interrupt line. Signed-off-by: Peter Maydell --- include/hw/arm/iotkit.h | 2 ++ hw/arm/iotkit.c | 38 +++--- 2 files changed, 29

[Qemu-devel] [PATCH 26/27] hw/arm/iotkit: Wire up MPC interrupt lines

2018-05-21 Thread Peter Maydell
The interrupt outputs from the MPC in the IoTKit and the expansion MPCs in the board must be wired up to the security controller, and also all ORed together to produce a single line to the NVIC. Signed-off-by: Peter Maydell --- include/hw/arm/iotkit.h | 6

[Qemu-devel] [PATCH 10/27] Make flatview_translate() take a MemTxAttrs argument

2018-05-21 Thread Peter Maydell
As part of plumbing MemTxAttrs down to the IOMMU translate method, add MemTxAttrs as an argument to flatview_translate(); all its callers now have attrs available. Signed-off-by: Peter Maydell --- include/exec/memory.h | 7 --- exec.c| 17

[Qemu-devel] [PATCH 24/27] hw/misc/iotkit-secctl.c: Implement SECMPCINTSTATUS

2018-05-21 Thread Peter Maydell
Implement the SECMPCINTSTATUS register. This is the only register in the security controller that deals with Memory Protection Controllers, and it simply provides a read-only view of the interrupt lines from the various MPCs in the system. Signed-off-by: Peter Maydell

Re: [Qemu-devel] [PATCH 23/27] hw/core/or-irq: Support more than 16 inputs to an OR gate

2018-05-21 Thread Paolo Bonzini
On 21/05/2018 16:03, Peter Maydell wrote: > + * VMState array; devices with more inputs than this need to > + * migrate the extra lines via a subsection. > + * The subsection migrates as much of the levels[] array as is needed > + * (including repeating the first 16 elements), to avoid the

[Qemu-devel] [qemu PATCH v4 0/4] support NFIT platform capabilities

2018-05-21 Thread Ross Zwisler
Changes since v3: * Updated the text in docs/nvdimm.txt to make it clear that the value being passed in on the command line in an integer made up of various bit fields. (Rob Elliott) * Updated the "Highest Valid Capability" byte to be dynamic based on the highest valid bit in the

Re: [Qemu-devel] [PATCH v3 5/6] migration: implement bi-directional RDMA QIOChannel

2018-05-21 Thread 858585 jemmy
On Wed, May 16, 2018 at 5:36 PM, 858585 jemmy wrote: > On Tue, May 15, 2018 at 10:54 PM, Paolo Bonzini wrote: >> On 05/05/2018 16:35, Lidong Chen wrote: >>> @@ -2635,12 +2637,20 @@ static ssize_t qio_channel_rdma_writev(QIOChannel >>> *ioc, >>> { >>>

Re: [Qemu-devel] [PULL 00/22] Trivial patches for 2018-05-20

2018-05-21 Thread Peter Maydell
On 20 May 2018 at 07:14, Michael Tokarev wrote: > Hello! > > This is a next trivial-patches pull request. It's been a while > since the last pull, and quite some changes has been accumulated. > > Please consider pulling/applying. > > Thanks, > > /mjt > > The following changes

Re: [Qemu-devel] [PATCH v2 13/14] sdcard: Add a "validate-crc" property

2018-05-21 Thread Michael Walle
Am 2018-05-09 05:46, schrieb Philippe Mathieu-Daudé: Since not all modelled controllers use the CRC verification (which is somehow expensive), let the controller have a configurable property to enable verification. So far only the Milkymist controller uses it. This silent the Coverity warning:

[Qemu-devel] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API

2018-05-21 Thread Peter Maydell
If an IOMMU supports mappings that care about the memory transaction attributes, then it no longer has a unique address -> output mapping, but more than one. We can represent these using an IOMMU index, analogous to TCG's mmu indexes. Signed-off-by: Peter Maydell ---

[Qemu-devel] [PATCH 01/27] memory.h: Improve IOMMU related documentation

2018-05-21 Thread Peter Maydell
Add more detail to the documentation for memory_region_init_iommu() and other IOMMU-related functions and data structures. Signed-off-by: Peter Maydell --- v2->v3 changes: * minor wording tweaks per Eric's review * moved the bit about requirements to notify out from

[Qemu-devel] [PATCH 06/27] Make flatview_extend_translation() take a MemTxAttrs argument

2018-05-21 Thread Peter Maydell
As part of plumbing MemTxAttrs down to the IOMMU translate method, add MemTxAttrs as an argument to flatview_extend_translation(). Its callers either have an attrs value to hand, or don't care and can use MEMTXATTRS_UNSPECIFIED. Signed-off-by: Peter Maydell --- exec.c

[Qemu-devel] [PATCH 11/27] Make address_space_get_iotlb_entry() take a MemTxAttrs argument

2018-05-21 Thread Peter Maydell
As part of plumbing MemTxAttrs down to the IOMMU translate method, add MemTxAttrs as an argument to address_space_get_iotlb_entry(). Signed-off-by: Peter Maydell --- include/exec/memory.h | 2 +- exec.c| 2 +- hw/virtio/vhost.c | 3 ++- 3 files

Re: [Qemu-devel] [PATCH v3 5/8] linux-user: move ppc socket.h definitions to ppc/sockbits.h

2018-05-21 Thread Peter Maydell
On 19 May 2018 at 10:29, Laurent Vivier wrote: > Change conditional #ifdef part by #undef of the symbols > redefined for PPC relative to generic/socket.h > > Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH v3 1/2] Add generic Nios II board.

2018-05-21 Thread Andrew Jenner
On 18/05/2018 21:16, Julian Brown wrote: On Fri, 18 May 2018 21:50:55 +0200 Marek Vasut wrote: On 05/18/2018 09:23 PM, Julian Brown wrote: This patch adds support for a generic MMU-less Nios II board that can be used e.g. for bare-metal compiler testing. Nios II booting is

Re: [Qemu-devel] [RFC] monitor: turn on Out-Of-Band by default again

2018-05-21 Thread Peter Xu
On Mon, May 21, 2018 at 09:59:07AM +0100, Daniel P. Berrangé wrote: > On Mon, May 21, 2018 at 04:42:49PM +0800, Peter Xu wrote: > > We turned Out-Of-Band feature of monitors off for 2.12 release. Now we > > try to turn that on again. > > > > Signed-off-by: Peter Xu > > -- > >

Re: [Qemu-devel] [RFC 3/3] acpi-build: allocate mcfg for multiple host bridges

2018-05-21 Thread Marcel Apfelbaum
On 05/20/2018 10:28 AM, Zihan Yang wrote: Currently only q35 host bridge us allocated space in MCFG table. To put pxb host into sepratate pci domain, each of them should have its own configuration space int MCFG table Signed-off-by: Zihan Yang ---

Re: [Qemu-devel] [PATCH v2 2/2] target/lm32: hold BQL in gdbstub

2018-05-21 Thread Peter Maydell
On 21 May 2018 at 13:21, Michael Walle wrote: > Changing the IP/IM registers may cause interrupts, so hold the BQL. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Michael Walle > --- > target/lm32/gdbstub.c | 5 + > 1 file changed, 5 insertions(+) > >

[Qemu-devel] [PATCH 19/27] hw/misc/tz-mpc.c: Implement registers

2018-05-21 Thread Peter Maydell
Implement the missing registers for the TZ MPC. Signed-off-by: Peter Maydell --- include/hw/misc/tz-mpc.h | 10 +++ hw/misc/tz-mpc.c | 137 ++- 2 files changed, 144 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH 07/27] Make memory_region_access_valid() take a MemTxAttrs argument

2018-05-21 Thread Peter Maydell
As part of plumbing MemTxAttrs down to the IOMMU translate method, add MemTxAttrs as an argument to memory_region_access_valid(). Its callers either have an attrs value to hand, or don't care and can use MEMTXATTRS_UNSPECIFIED. The callsite in flatview_access_valid() is part of a recursive loop

[Qemu-devel] [PATCH 04/27] Make address_space_map() take a MemTxAttrs argument

2018-05-21 Thread Peter Maydell
As part of plumbing MemTxAttrs down to the IOMMU translate method, add MemTxAttrs as an argument to address_space_map(). Its callers either have an attrs value to hand, or don't care and can use MEMTXATTRS_UNSPECIFIED. Signed-off-by: Peter Maydell ---

Re: [Qemu-devel] [PATCH v3 6/8] linux-user: update ARCH_HAS_SOCKET_TYPES use

2018-05-21 Thread Peter Maydell
On 19 May 2018 at 10:29, Laurent Vivier wrote: > to be like in the kernel and rename it TARGET_ARCH_HAS_SOCKET_TYPES You could note in the commit message that this fixes our incorrect definition of TARGET_SOCK_CLOEXEC for SPARC. > Signed-off-by: Laurent Vivier

[Qemu-devel] [PATCH] Delete AF_UNIX socket after close

2018-05-21 Thread Pavel Balaev
Hello, Since version 2.12.0 AF_UNIX socket created for QMP exchange is not deleted on instance shutdown. This is due to the fact that function qio_channel_socket_finalize() is called after qio_channel_socket_close(). Signed-off-by: Pavel Balaev --- include/qemu/sockets.h | 1 -

[Qemu-devel] [PATCH v2 2/2] target/lm32: hold BQL in gdbstub

2018-05-21 Thread Michael Walle
Changing the IP/IM registers may cause interrupts, so hold the BQL. Cc: qemu-sta...@nongnu.org Signed-off-by: Michael Walle --- target/lm32/gdbstub.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/lm32/gdbstub.c b/target/lm32/gdbstub.c index

[Qemu-devel] [PATCH v2 1/2] lm32: take BQL before writing IP/IM register

2018-05-21 Thread Michael Walle
Writing to these registers may raise an interrupt request. Actually, this prevents the milkymist board from starting. Cc: qemu-sta...@nongnu.org Signed-off-by: Michael Walle Tested-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée

Re: [Qemu-devel] [RFC 1/3] pci_expander_bridge: reserve enough mcfg space for pxb host

2018-05-21 Thread Marcel Apfelbaum
Hi Zihan, On 05/20/2018 10:28 AM, Zihan Yang wrote: Thank you for posting the patches! For the next version please add a cover letter so we can discuss cross patchesideas. To put each pxb into separate pci domain, we need to reserve enough MCFG space for each pxb host in the main memory.

[Qemu-devel] [PATCH 0/2] BQL patches for the lm32 target

2018-05-21 Thread Michael Walle
I'll send a pull request next week if there are no comments on the patches. Michael Walle (2): lm32: take BQL before writing IP/IM register target/lm32: hold BQL in gdbstub target/lm32/gdbstub.c | 4 target/lm32/op_helper.c | 4 2 files changed, 8 insertions(+) -- 2.11.0

[Qemu-devel] [PATCH 2/2] target/lm32: hold BQL in gdbstub

2018-05-21 Thread Michael Walle
Changing the IP/IM registers may cause interrupts, so hold the BQL. Cc: qemu-sta...@nongnu.org Signed-off-by: Michael Walle --- target/lm32/gdbstub.c | 4 1 file changed, 4 insertions(+) diff --git a/target/lm32/gdbstub.c b/target/lm32/gdbstub.c index

[Qemu-devel] [PATCH 02/27] Make tb_invalidate_phys_addr() take a MemTxAttrs argument

2018-05-21 Thread Peter Maydell
As part of plumbing MemTxAttrs down to the IOMMU translate method, add MemTxAttrs as an argument to tb_invalidate_phys_addr(). Its callers either have an attrs value to hand, or don't care and can use MEMTXATTRS_UNSPECIFIED. Signed-off-by: Peter Maydell ---

Re: [Qemu-devel] [PULL 0/8] Honor CPU_DUMP_FPU

2018-05-21 Thread Peter Maydell
On 18 May 2018 at 22:57, Richard Henderson wrote: > With Peter's new patch for "-d fpu", it makes sense to honor > this setting in as many targets as currently dump the fpu. > > > r~ > > > The following changes since commit 5bcf917ee37a5efbef99f091a96db54a5276becb: >

Re: [Qemu-devel] [PATCH v2 2/2] target/lm32: hold BQL in gdbstub

2018-05-21 Thread Peter Maydell
On 21 May 2018 at 13:25, Peter Maydell wrote: > On 21 May 2018 at 13:21, Michael Walle wrote: >> Changing the IP/IM registers may cause interrupts, so hold the BQL. >> >> Cc: qemu-sta...@nongnu.org >> Signed-off-by: Michael Walle >>

[Qemu-devel] [PATCH v2] tests/docker/Makefile.include: handle empty TARGET_LIST

2018-05-21 Thread Alex Bennée
If the user doesn't specify a TARGET_LIST they get the current configuration but with spaces and hilarity ensues. This adds some make magic to turn the TARGET_LIST back into a comma separated list. Signed-off-by: Alex Bennée --- v2 - use common $(SPACE) and $(COMMA) in

[Qemu-devel] [PATCH v2 0/2] BQL patches for the lm32 target

2018-05-21 Thread Michael Walle
Whoops, forget the include patch chunk for the second patch. I'll send a pull request next week if there are no comments on the patches. since v1: add missing #include Michael Walle (2): lm32: take BQL before writing IP/IM register target/lm32: hold BQL in gdbstub target/lm32/gdbstub.c

[Qemu-devel] [PATCH 13/27] Make address_space_translate_iommu take a MemTxAttrs argument

2018-05-21 Thread Peter Maydell
As part of plumbing MemTxAttrs down to the IOMMU translate method, add MemTxAttrs as an argument to address_space_translate_iommu(). Signed-off-by: Peter Maydell --- exec.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/exec.c b/exec.c

[Qemu-devel] [PATCH 23/27] hw/core/or-irq: Support more than 16 inputs to an OR gate

2018-05-21 Thread Peter Maydell
For the IoTKit MPC support, we need to wire together the interrupt outputs of 17 MPCs; this exceeds the current value of MAX_OR_LINES. Increase MAX_OR_LINES to 32 (which should be enough for anyone). The tricky part is retaining the migration compatibility for existing OR gates; we add a

Re: [Qemu-devel] [qemu PATCH v4 2/4] tests/.gitignore: add entry for generated file

2018-05-21 Thread Philippe Mathieu-Daudé
On 05/21/2018 01:41 PM, Eric Blake wrote: > On 05/21/2018 11:32 AM, Ross Zwisler wrote: >> After a "make check" we end up with the following: >> >> $ git status >> On branch master >> Your branch is up-to-date with 'origin/master'. >> >> Untracked files: >>    (use "git add ..." to include in what

[Qemu-devel] [PULL 06/15] All the xen stable APIs define handle types of the form:

2018-05-21 Thread Stefano Stabellini
From: Paul Durrant xen_handle and some define additional handle types of the form: xen__handle Examples of these are xenforeignmemory_handle and xenforeignmemory_resource_handle. Both of these types will be misparsed by checkpatch if they appear as the first token in

Re: [Qemu-devel] [PATCH v7 1/3] qmp: adding 'wakeup-suspend-support' in query-target

2018-05-21 Thread Daniel Henrique Barboza
On 05/21/2018 03:14 PM, Eduardo Habkost wrote: Issue#2: the flag isn't a property of the target. Due to -no-acpi, it's not even a property of the machine type. If it was, query-machines would be the natural owner of the flag. Perhaps query-machines is still the proper owner. The value of

Re: [Qemu-devel] storing machine data in qcow images?

2018-05-21 Thread Daniel P . Berrangé
On Mon, May 21, 2018 at 03:29:28PM -0300, Eduardo Habkost wrote: > On Sat, May 19, 2018 at 08:05:06AM +0200, Markus Armbruster wrote: > > Eduardo Habkost writes: > > > > [...] > > > About being more expressive than just a single list of key,value > > > pairs, I don't see any

[Qemu-devel] [PULL 10/15] xen: remove other open-coded use of libxengnttab

2018-05-21 Thread Stefano Stabellini
From: Paul Durrant Now that helpers are available in xen_backend, use them throughout all Xen PV backends. Signed-off-by: Paul Durrant Acked-by: Anthony Perard Signed-off-by: Stefano Stabellini

[Qemu-devel] [PULL 12/15] xen_disk: remove use of grant map/unmap

2018-05-21 Thread Stefano Stabellini
From: Paul Durrant Now that the (native or emulated) xen_be_copy_grant_refs() helper is always available, the xen_disk code can be significantly simplified by removing direct use of grant map and unmap operations. Signed-off-by: Paul Durrant

Re: [Qemu-devel] [PATCH v3 0/8] linux-user: move socket.h definitions to CPU directories

2018-05-21 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180519092956.15134-1-laur...@vivier.eu Subject: [Qemu-devel] [PATCH v3 0/8] linux-user: move socket.h definitions to CPU directories === TEST SCRIPT BEGIN === #!/bin/bash

[Qemu-devel] [PULL 01/15] xen-pvdevice: Introduce a simplistic xen-pvdevice save state

2018-05-21 Thread Stefano Stabellini
From: Igor Druzhinin This should help to avoid problems with accessing the device after migration/resume without PV drivers by migrating its PCI configuration space state. Without an explicitly defined state record it resets every time a VM migrates which confuses the

[Qemu-devel] [PULL 08/15] xen_backend: add grant table helpers

2018-05-21 Thread Stefano Stabellini
From: Paul Durrant This patch adds grant table helper functions to the xen_backend code to localize error reporting and use of xen_domid. The patch also defers the call to xengnttab_open() until just before the initialise method in XenDevOps is invoked. This method is

Re: [Qemu-devel] storing machine data in qcow images?

2018-05-21 Thread Eduardo Habkost
On Sat, May 19, 2018 at 08:05:06AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > [...] > > About being more expressive than just a single list of key,value > > pairs, I don't see any evidence of that being necessary for the > > problems we're trying to

Re: [Qemu-devel] [qemu PATCH v4 2/4] tests/.gitignore: add entry for generated file

2018-05-21 Thread Eric Blake
On 05/21/2018 12:32 PM, Philippe Mathieu-Daudé wrote: tests/test-block-backend +test-block-backend   test-blockjob   test-blockjob-txn   test-bufferiszero What about using gitignore negated pattern in tests/? Or, what we've threatened to do in the past: rename all unit tests to

Re: [Qemu-devel] storing machine data in qcow images?

2018-05-21 Thread Eduardo Habkost
On Mon, May 21, 2018 at 07:44:40PM +0100, Daniel P. Berrangé wrote: > On Mon, May 21, 2018 at 03:29:28PM -0300, Eduardo Habkost wrote: > > On Sat, May 19, 2018 at 08:05:06AM +0200, Markus Armbruster wrote: > > > Eduardo Habkost writes: > > > > > > [...] > > > > About being

[Qemu-devel] [PULL 11/15] xen_backend: add an emulation of grant copy

2018-05-21 Thread Stefano Stabellini
From: Paul Durrant Not all Xen environments support the xengnttab_grant_copy() operation. E.g. where the OS is FreeBSD or Xen is older than 4.8.0. This patch introduces an emulation of that operation using xengnttab_map_domain_grant_refs() and memcpy() for those

[Qemu-devel] [PULL 15/15] xen_disk: be consistent with use of xendev and blkdev->xendev

2018-05-21 Thread Stefano Stabellini
From: Paul Durrant Certain functions in xen_disk are called with a pointer to xendev (struct XenDevice *). They then use container_of() to acces the surrounding blkdev (struct XenBlkDev) but then in various places use >xendev when use of the original xendev pointer is

Re: [Qemu-devel] storing machine data in qcow images?

2018-05-21 Thread Daniel P . Berrangé
On Fri, May 18, 2018 at 02:41:33PM -0300, Eduardo Habkost wrote: > On Fri, May 18, 2018 at 06:09:56PM +0100, Daniel P. Berrangé wrote: > > On Fri, May 18, 2018 at 06:30:38PM +0300, Michael S. Tsirkin wrote: > > > Hi! > > > Right now, QEMU supports multiple machine types within > > > a given

Re: [Qemu-devel] [PATCH v7 1/3] qmp: adding 'wakeup-suspend-support' in query-target

2018-05-21 Thread Eduardo Habkost
On Fri, May 18, 2018 at 10:48:31AM +0200, Markus Armbruster wrote: > Cc'ing a few more people. > > Daniel Henrique Barboza writes: > > > When issuing the qmp/hmp 'system_wakeup' command, what happens in a > > nutshell is: > > > > - qmp_system_wakeup_request set runstate

[Qemu-devel] [PULL 13/15] xen_backend: make the xen_feature_grant_copy flag private

2018-05-21 Thread Stefano Stabellini
From: Paul Durrant There is no longer any use of this flag outside of the xen_backend code. Signed-off-by: Paul Durrant Acked-by: Anthony Perard Signed-off-by: Stefano Stabellini ---

Re: [Qemu-devel] [PATCH v2 1/1] tests/docker: Add a Avocado Docker test

2018-05-21 Thread Philippe Mathieu-Daudé
Hi Alistair, Fam, On 05/21/2018 12:16 AM, Fam Zheng wrote: > On Fri, 05/18 11:34, Alistair Francis wrote: >> Avocado is not trivial to setup on non-Fedora systems. To simplfying >> future testing add a docker test image that runs Avocado tests. Can you add an entry in the "make docker" help

[Qemu-devel] [PATCH] target/arm: Honour FPCR.FZ in FRECPX

2018-05-21 Thread Peter Maydell
The FRECPX instructions should (like most other floating point operations) honour the FPCR.FZ bit which specifies whether input denormals should be flushed to zero (or FZ16 for the half-precision version). We forgot to implement this, which doesn't affect the results (since the calculation doesn't

[Qemu-devel] [PULL 05/15] xen-hvm: create separate function for ioreq server initialization

2018-05-21 Thread Stefano Stabellini
From: Paul Durrant The code is sufficiently substantial that it improves code readability to put it in a new function called by xen_hvm_init() rather than having it inline. Signed-off-by: Paul Durrant Reviewed-by: Anthony Perard

[Qemu-devel] [PULL 02/15] xen/pt: use address_space_memory object for memory region hooks

2018-05-21 Thread Stefano Stabellini
From: Igor Druzhinin Commit 99605175c (xen-pt: Fix PCI devices re-attach failed) introduced a subtle bug. As soon as the guest switches off Bus Mastering on the device it immediately causes all the BARs be unmapped due to the DMA address space of the device being

[Qemu-devel] [PULL 09/15] xen_disk: remove open-coded use of libxengnttab

2018-05-21 Thread Stefano Stabellini
From: Paul Durrant Now that helpers are present in xen_backend, this patch removes open-coded calls to libxengnttab from the xen_disk code. This patch also fixes one whitspace error in the assignment of the XenDevOps initialise method. Signed-off-by: Paul Durrant

[Qemu-devel] [PULL 03/15] configure: Add explanation for --enable-xen-pci-passthrough

2018-05-21 Thread Stefano Stabellini
From: Anthony PERARD Signed-off-by: Anthony PERARD Reviewed-by: Markus Armbruster Signed-off-by: Stefano Stabellini --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-devel] [PULL 04/15] xen_pt: Present the size of 64 bit BARs correctly

2018-05-21 Thread Stefano Stabellini
From: Ross Lagerwall The full size of the BAR is stored in the lower PCIIORegion.size. The upper PCIIORegion.size is 0. Calculate the size of the upper half correctly from the lower half otherwise the size read by the guest will be incorrect. Signed-off-by: Ross

[Qemu-devel] [PULL 00/15] xen-20180521-tag

2018-05-21 Thread Stefano Stabellini
/sstabellini/qemu-dm.git tags/xen-20180521-tag for you to fetch changes up to f03df99f09ee0ca27ea2298a1b77438e7999044d: xen_disk: be consistent with use of xendev and blkdev->xendev (2018-05-18 11:13:01 -0700) Xen 2018/05

[Qemu-devel] [PULL 14/15] xen_disk: use a single entry iovec

2018-05-21 Thread Stefano Stabellini
From: Paul Durrant Since xen_disk now always copies data to and from a guest there is no need to maintain a vector entry corresponding to every page of a request. This means there is less per-request state to maintain so the ioreq structure can shrink significantly.

[Qemu-devel] [PULL 07/15] xen: add a meaningful declaration of grant_copy_segment into xen_common.h

2018-05-21 Thread Stefano Stabellini
From: Paul Durrant Currently the xen_disk source has to carry #ifdef exclusions to compile against Xen older then 4.8. This is a bit messy so this patch lifts the definition of struct xengnttab_grant_copy_segment and adds it into the pre-4.8 compat area in xen_common.h,

  1   2   >