Re: [Qemu-devel] [PATCH v2 0/2] Add dbus-vmstate

2019-08-23 Thread Daniel P . Berrangé
On Fri, Aug 23, 2019 at 05:48:37PM +0400, Marc-André Lureau wrote: > Hi > > On Fri, Aug 23, 2019 at 5:00 PM Dr. David Alan Gilbert > wrote: > > > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > > > > > > > This means QEMU still has to iterate over every single client > > > on the bus t

Re: [Qemu-devel] [PATCH v2 0/2] Add dbus-vmstate

2019-08-23 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@gmail.com) wrote: > Hi > > On Fri, Aug 23, 2019 at 5:00 PM Dr. David Alan Gilbert > wrote: > > > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > > > > > > > This means QEMU still has to iterate over every single client > > > on the bus to identify

Re: [Qemu-devel] [PATCH] modules-test: ui-spice-app is not built as module

2019-08-23 Thread Peter Maydell
On Thu, 22 Aug 2019 at 18:42, Paolo Bonzini wrote: > > $(call land, $(CONFIG_SPICE), $(CONFIG_GIO)) will never return "m" so > ui-spice-app is always linked into QEMU. > > Signed-off-by: Paolo Bonzini > --- > tests/modules-test.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/tests/m

Re: [Qemu-devel] [PATCH] modules-test: fix const cast

2019-08-23 Thread Peter Maydell
On Thu, 22 Aug 2019 at 18:42, Paolo Bonzini wrote: > > Signed-off-by: Paolo Bonzini > --- > tests/modules-test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/modules-test.c b/tests/modules-test.c > index 3aef0e5..a8118e9 100644 > --- a/tests/modules-test.c > +++

[Qemu-devel] [Bug 1724590] Re: Usermode networking hostfwd only listens on IPv4

2019-08-23 Thread Bilal Wasim
Hi Guys - I'm currently trying to use IPv6 with QEMU on ARM / AARCH64 Models (Sabre-Lite / Zync SOCs) and I see this problem. The system gets an IPv6 address from the QEMU in-built router which can be used to ping the default gateway (the dhcp router itself). All this is good but not really usef

Re: [Qemu-devel] [PULL 0/6] Podman patches

2019-08-23 Thread Peter Maydell
On Thu, 22 Aug 2019 at 14:47, Marc-André Lureau wrote: > > The following changes since commit 810923480863c43ecb22ae124156298385439339: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2019-08-22 13:13:35 +0100) > > are available in the Git repository at: > >

Re: [Qemu-devel] [PATCH v2 15/68] target/arm: Convert BX, BXJ, BLX (register)

2019-08-23 Thread Richard Henderson
On 8/23/19 4:49 AM, Peter Maydell wrote: > On Mon, 19 Aug 2019 at 22:38, Richard Henderson > wrote: >> >> Signed-off-by: Richard Henderson >> --- >> target/arm/translate.c | 78 -- >> target/arm/a32.decode | 7 >> target/arm/t32.decode | 2 ++ >>

Re: [Qemu-devel] [PATCH v2 0/2] Add dbus-vmstate

2019-08-23 Thread Daniel P . Berrangé
On Fri, Aug 23, 2019 at 03:09:48PM +0100, Dr. David Alan Gilbert wrote: > * Marc-André Lureau (marcandre.lur...@gmail.com) wrote: > > Hi > > > > On Fri, Aug 23, 2019 at 5:00 PM Dr. David Alan Gilbert > > wrote: > > > > > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > > > > > > > > > >

[Qemu-devel] [PATCH v2] trace: Clarify DTrace/SystemTap help message

2019-08-23 Thread Philippe Mathieu-Daudé
Most tracing backends are implemented within QEMU, except the DTrace/SystemTap backends. One side effect is when running 'qemu -trace help', an incomplete list of trace events is displayed when using the DTrace/SystemTap backends. This is partly due to trace events registered as modules with trac

Re: [Qemu-devel] [PATCH v2 0/2] Add dbus-vmstate

2019-08-23 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Fri, Aug 23, 2019 at 03:09:48PM +0100, Dr. David Alan Gilbert wrote: > > * Marc-André Lureau (marcandre.lur...@gmail.com) wrote: > > > Hi > > > > > > On Fri, Aug 23, 2019 at 5:00 PM Dr. David Alan Gilbert > > > wrote: > > > > > > > > * Daniel

Re: [Qemu-devel] [PATCH 3/4] RFC target/arm: Do not build pre-ARMv7 cpus when using KVM

2019-08-23 Thread Thomas Huth
On 8/23/19 3:58 PM, Philippe Mathieu-Daudé wrote: > A KVM-only build won't be able to run pre-ARMv7 cpus, disable them. > > If KVM is not enabled, they are enabled by default. [...] > config CHEETAH > bool > +select ARM_V4 > select OMAP > select TSC210X Are you sure about the

[Qemu-devel] cross-project patches: Add NBD Fast Zero support

2019-08-23 Thread Eric Blake
This is a cover letter to a series of patches being proposed in tandem to four different projects: - nbd: Document a new NBD_CMD_FLAG_FAST_ZERO command flag - qemu: Implement the flag for both clients and server - libnbd: Implement the flag for clients - nbdkit: Implement the flag for servers, incl

[Qemu-devel] [PATCH v2] job: drop job_drain

2019-08-23 Thread Vladimir Sementsov-Ogievskiy
In job_finish_sync job_enter should be enough for a job to make some progress and draining is a wrong tool for it. So use job_enter directly here and drop job_drain with all related staff not used more. Suggested-by: Kevin Wolf Signed-off-by: Vladimir Sementsov-Ogievskiy --- v2: drop drain from

[Qemu-devel] [PATCH v2 0/6] hw/arm: Use ARM_CPU_TYPE_NAME() and object_initialize_child()

2019-08-23 Thread Philippe Mathieu-Daudé
First we use ARM_CPU_TYPE_NAME() when we should. Then is follow up of [1]: This series looks at Eduardo suggestions from [2] and Thomas commit aff39be0ed97 to replace various object_initialize + qdev_set_parent_bus calls by sysbus_init_child_obj(). Finally, some devices are declared orph

Re: [Qemu-devel] [PATCH v2 18/68] target/arm: Convert the rest of A32 Miscelaneous instructions

2019-08-23 Thread Richard Henderson
On 8/23/19 5:03 AM, Peter Maydell wrote: > On Mon, 19 Aug 2019 at 22:38, Richard Henderson > wrote: > > In subject, typo: "Miscellaneous". > >> This fixes an exiting bug with the T5 encoding of SUBS PC, LR, #IMM, > > "existing" > >> in that it may be executed from user mode as with any other e

[Qemu-devel] [PATCH v2 4/6] hw/arm/fsl-imx: Add the cpu as child of the SoC object

2019-08-23 Thread Philippe Mathieu-Daudé
Child properties form the composition tree. All objects need to be a child of another object. Objects can only be a child of one object. Respect this with the i.MX SoC, to get a cleaner composition tree. Signed-off-by: Philippe Mathieu-Daudé --- v2: reworded commit description with Markus sugges

[Qemu-devel] [PATCH v2 1/6] hw/arm: Use ARM_CPU_TYPE_NAME() macro when appropriate

2019-08-23 Thread Philippe Mathieu-Daudé
Commit ba1ba5cca introduce the ARM_CPU_TYPE_NAME() macro. Unify the code base by use it in all places. Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daudé --- v2: rebased, use in imx25/31 (pm215) --- hw/arm/allwinner-a10.c | 3 ++- hw/arm/cubieboard.c| 3 ++- hw/arm/digic.c

[Qemu-devel] [libnbd PATCH 0/1] libnbd support for new fast zero

2019-08-23 Thread Eric Blake
See the cross-post cover letter for details: https://www.redhat.com/archives/libguestfs/2019-August/msg00322.html Eric Blake (1): api: Add support for FAST_ZERO flag lib/nbd-protocol.h | 2 ++ generator/generator| 29 +++-- lib/flags.c| 12 +

[Qemu-devel] [PATCH v2 6/6] hw/net/xilinx_axi: Use object_initialize_child for correct ref. counting

2019-08-23 Thread Philippe Mathieu-Daudé
As explained in commit aff39be0ed97: Both functions, object_initialize() and object_property_add_child() increase the reference counter of the new object, so one of the references has to be dropped afterwards to get the reference counting right. Otherwise the child object will not be prope

[Qemu-devel] [PATCH v2 5/6] hw/dma/xilinx_axi: Use object_initialize_child for correct ref. counting

2019-08-23 Thread Philippe Mathieu-Daudé
As explained in commit aff39be0ed97: Both functions, object_initialize() and object_property_add_child() increase the reference counter of the new object, so one of the references has to be dropped afterwards to get the reference counting right. Otherwise the child object will not be prope

[Qemu-devel] [PATCH v2 2/6] hw/arm: Use object_initialize_child for correct reference counting

2019-08-23 Thread Philippe Mathieu-Daudé
As explained in commit aff39be0ed97: Both functions, object_initialize() and object_property_add_child() increase the reference counter of the new object, so one of the references has to be dropped afterwards to get the reference counting right. Otherwise the child object will not be prope

[Qemu-devel] [PATCH 0/1] NBD protocol change to add fast zero support

2019-08-23 Thread Eric Blake
See the cross-post cover letter for details: https://www.redhat.com/archives/libguestfs/2019-August/msg00322.html Eric Blake (1): protocol: Add NBD_CMD_FLAG_FAST_ZERO doc/proto.md | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) -- 2.21

[Qemu-devel] [PATCH 1/1] protocol: Add NBD_CMD_FLAG_FAST_ZERO

2019-08-23 Thread Eric Blake
While it may be counterintuitive at first, the introduction of NBD_CMD_WRITE_ZEROES and NBD_CMD_BLOCK_STATUS has caused a performance regression in qemu [1], when copying a sparse file. When the destination file must contain the same contents as the source, but it is not known in advance whether th

[Qemu-devel] [PATCH v2 3/6] hw/arm: Use sysbus_init_child_obj for correct reference counting

2019-08-23 Thread Philippe Mathieu-Daudé
As explained in commit aff39be0ed97: Both functions, object_initialize() and qdev_set_parent_bus() increase the reference counter of the new object, so one of the references has to be dropped afterwards to get the reference counting right. Otherwise the child object will not be properly

[Qemu-devel] [nbdkit PATCH 3/3] plugins: Add .can_fast_zero hook

2019-08-23 Thread Eric Blake
Allow plugins to affect the handling of the new NBD_CMD_FLAG_FAST_ZERO flag, then update affected plugins. In particular, in-memory plugins are always fast; the full plugin is better served by omitting .zero and relying on .pwrite fallback; nbd takes advantage of libnbd extensions proposed in para

[Qemu-devel] [PATCH 4/5] nbd: Implement server use of NBD FAST_ZERO

2019-08-23 Thread Eric Blake
The server side is fairly straightforward: we can always advertise support for detection of fast zero, and implement it by mapping the request to the block layer BDRV_REQ_NO_FALLBACK. Signed-off-by: Eric Blake --- Again, this may be worth merging with the previous patch. --- nbd/server.c | 8 +

[Qemu-devel] [PATCH 3/5] nbd: Implement client use of NBD FAST_ZERO

2019-08-23 Thread Eric Blake
The client side is fairly straightforward: if the server advertised fast zero support, then we can map that to BDRV_REQ_NO_FALLBACK support. A server that advertises FAST_ZERO but not WRITE_ZEROES is technically broken, but we can ignore that situation as it does not change our behavior. Signed-o

[Qemu-devel] [PATCH 0/5] Add NBD fast zero support to qemu client and server

2019-08-23 Thread Eric Blake
See the cross-post cover letter for more details: https://www.redhat.com/archives/libguestfs/2019-August/msg00322.html Based-on: https://lists.gnu.org/archive/html/qemu-devel/2019-08/msg04805.html [Andrey Shinkevich block: workaround for unaligned byte range in fallocate()] Eric Blake (5): nbd:

[Qemu-devel] [PATCH 5/5] nbd: Tolerate more errors to structured reply request

2019-08-23 Thread Eric Blake
A server may have a reason to reject a request for structured replies, beyond just not recognizing them as a valid request. It doesn't hurt us to continue talking to such a server; otherwise 'qemu-nbd --list' of such a server fails to display all possible details about the export. Encountered whe

[Qemu-devel] [PATCH 2/5] nbd: Prepare for NBD_CMD_FLAG_FAST_ZERO

2019-08-23 Thread Eric Blake
Commit fe0480d6 and friends added BDRV_REQ_NO_FALLBACK as a way to avoid wasting time on a preliminary write-zero request that will later be rewritten by actual data, if it is known that the write-zero request will use a slow fallback; but in doing so, could not optimize for NBD. The NBD specifica

[Qemu-devel] [PATCH 1/5] nbd: Improve per-export flag handling in server

2019-08-23 Thread Eric Blake
When creating a read-only image, we are still advertising support for TRIM and WRITE_ZEROES to the client, even though the client should not be issuing those commands. But seeing this requires looking across multiple functions: All callers to nbd_export_new() passed a single flag based solely on

[Qemu-devel] [nbdkit PATCH 1/3] server: Add internal support for NBDKIT_FLAG_FAST_ZERO

2019-08-23 Thread Eric Blake
Qemu was able to demonstrate that knowing whether a zero operation is fast is useful when copying from one image to another: there is a choice between bulk pre-zeroing and then revisiting the data sections (fewer transactions, but depends on the zeroing to be fast), vs. visiting every portion of th

Re: [Qemu-devel] [PATCH v2 0/2] Add dbus-vmstate

2019-08-23 Thread Daniel P . Berrangé
On Fri, Aug 23, 2019 at 03:26:02PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Fri, Aug 23, 2019 at 03:09:48PM +0100, Dr. David Alan Gilbert wrote: > > > * Marc-André Lureau (marcandre.lur...@gmail.com) wrote: > > > > Hi > > > > > > > > On Fri, A

[Qemu-devel] [libnbd PATCH 1/1] api: Add support for FAST_ZERO flag

2019-08-23 Thread Eric Blake
Qemu was able to demonstrate that knowing whether a zero operation is fast is useful when copying from one image to another: there is a choice between bulk pre-zeroing and then revisiting the data sections (fewer transactions, but depends on the zeroing to be fast), vs. visiting every portion of th

[Qemu-devel] [nbdkit PATCH 2/3] filters: Add .can_fast_zero hook

2019-08-23 Thread Eric Blake
Allow filters to affect the handling of the new NBD_CMD_FLAG_FAST_ZERO flag, then update affected filters. In particular, the log filter logs the state of the new flag (requires a tweak to expected output in test-fua.sh), the delay filter gains a bool parameter delay-fast-zero, several filters rej

Re: [Qemu-devel] [PATCH v2 19/68] target/arm: Convert T32 ADDW/SUBW

2019-08-23 Thread Peter Maydell
On Fri, 23 Aug 2019 at 15:45, Richard Henderson wrote: > > On 8/23/19 6:04 AM, Peter Maydell wrote: > >> +&ri rd imm > >> &r rm > >> &i imm > >> &msr_reg rn r mask > > > > Should this change be in some other patch ? > > No, it's used by ADR. > >

[Qemu-devel] [nbdkit PATCH 0/3] nbdkit support for new NBD fast zero

2019-08-23 Thread Eric Blake
See the cross-post cover letter for details: https://www.redhat.com/archives/libguestfs/2019-August/msg00322.html Notably, this series did NOT add fast zero support to the file plugin yet; there, I probably need to do more testing and/or kernel source code reading to learn whether to mark fallocat

Re: [Qemu-devel] [PATCH v2 0/2] Add dbus-vmstate

2019-08-23 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Fri, Aug 23, 2019 at 03:26:02PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Fri, Aug 23, 2019 at 03:09:48PM +0100, Dr. David Alan Gilbert wrote: > > > > * Marc-André Lureau (marcandre.lur.

Re: [Qemu-devel] [PATCH v1 2/9] s390x/tcg: Fix length calculation in probe_write_access()

2019-08-23 Thread Richard Henderson
On 8/23/19 3:07 AM, David Hildenbrand wrote: > Hm,, how did that "-" slip in (-TAGRET_PAGE_SIZE would be correct). This > currently makes us exceed one page in a single probe_write() call, > essentially leaving some memory unchecked. > > Fixes: c5a7392cfb96 ("s390x/tcg: Provide probe_write_access

Re: [Qemu-devel] [PATCH v2 19/68] target/arm: Convert T32 ADDW/SUBW

2019-08-23 Thread Richard Henderson
On 8/23/19 6:04 AM, Peter Maydell wrote: >> +static bool trans_ADR(DisasContext *s, arg_ri *a) >> +{ >> +store_reg_bx(s, a->rd, add_reg_for_lit(s, 15, a->imm)); >> +return true; >> +} ... >> -if (rn == 13 && rd == 13) { >> -/* ADD SP, SP,

Re: [Qemu-devel] [PATCH v2 19/68] target/arm: Convert T32 ADDW/SUBW

2019-08-23 Thread Richard Henderson
On 8/23/19 7:47 AM, Peter Maydell wrote: > On Fri, 23 Aug 2019 at 15:45, Richard Henderson > wrote: >> >> On 8/23/19 6:04 AM, Peter Maydell wrote: +&ri rd imm &r rm &i imm &msr_reg rn r mask >>> >>> Should this change be in so

Re: [Qemu-devel] [Qemu-trivial] [PATCH] vfio: fix a typo

2019-08-23 Thread Laurent Vivier
Le 22/08/2019 à 08:49, Chen Zhang via Qemu-trivial a écrit : > Signed-off-by: Chen Zhang > --- > hw/vfio/pci.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c > index dc3479c..c5e6fe6 100644 > --- a/hw/vfio/pci.c > +++ b/hw/vfio/pci.c >

Re: [Qemu-devel] [PATCH v1 1/9] s390x/tcg: Use guest_addr_valid() instead of h2g_valid() in probe_write_access()

2019-08-23 Thread Richard Henderson
On 8/23/19 3:07 AM, David Hildenbrand wrote: > If I'm not completely wrong, we are dealing with guest addresses here > and not with host addresses. Use the right check. > > Fixes: c5a7392cfb96 ("s390x/tcg: Provide probe_write_access helper") > Signed-off-by: David Hildenbrand > --- > target/s390

Re: [Qemu-devel] [PATCH 1/4] configure: keep track of Python version

2019-08-23 Thread Eduardo Habkost
On Fri, Aug 23, 2019 at 09:40:54AM -0400, Cleber Rosa wrote: > On Thu, Aug 22, 2019 at 06:54:20PM -0300, Eduardo Habkost wrote: > > On Thu, Aug 22, 2019 at 05:19:26PM -0400, Cleber Rosa wrote: > > > On Thu, Aug 22, 2019 at 05:48:46PM +0100, Peter Maydell wrote: > > > > On Fri, 9 Nov 2018 at 15:09,

Re: [Qemu-devel] [PATCH v2 0/2] Add dbus-vmstate

2019-08-23 Thread Daniel P . Berrangé
On Fri, Aug 23, 2019 at 03:56:34PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Fri, Aug 23, 2019 at 03:26:02PM +0100, Dr. David Alan Gilbert wrote: > > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > > On Fri, Aug 23, 2019 at 03:09:48PM

Re: [Qemu-devel] [edk2-rfc] [edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-23 Thread Laszlo Ersek
On 08/22/19 20:51, Paolo Bonzini wrote: > On 22/08/19 20:29, Laszlo Ersek wrote: >> On 08/22/19 08:18, Paolo Bonzini wrote: >>> On 21/08/19 22:17, Kinney, Michael D wrote: DMA protection of memory ranges is a chipset feature. For the current QEMU implementation, what ranges of memory are

Re: [Qemu-devel] [PATCH v2 20/68] target/arm: Convert load/store (register, immediate, literal)

2019-08-23 Thread Peter Maydell
On Mon, 19 Aug 2019 at 22:38, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/arm/translate.c | 797 ++--- > target/arm/a32.decode | 120 +++ > target/arm/t32.decode | 141 > 3 files changed, 615 insertions(+), 443 d

Re: [Qemu-devel] cross-project patches: Add NBD Fast Zero support

2019-08-23 Thread Vladimir Sementsov-Ogievskiy
23.08.2019 17:30, Eric Blake wrote: > This is a cover letter to a series of patches being proposed in tandem > to four different projects: I always knew you were great, but that breaks all the records > - nbd: Document a new NBD_CMD_FLAG_FAST_ZERO command flag > - qemu: Implement the flag for bot

Re: [Qemu-devel] [PATCH 1/2] virtiofsd: replace warn(3) and warnx(3) with fuse_warning()

2019-08-23 Thread piaojun
On 2019/8/23 17:24, Stefan Hajnoczi wrote: > Do not use warn(3) and warnx(3) since they print to stderr. When > --syslog is used these messages must go to syslog(3) instead. > > Signed-off-by: Stefan Hajnoczi > --- > contrib/virtiofsd/passthrough_ll.c | 36 +++--- > 1

Re: [Qemu-devel] [PULL 0/7] First batch of s390x changes for 4.2

2019-08-23 Thread Peter Maydell
On Thu, 22 Aug 2019 at 14:58, Cornelia Huck wrote: > > The following changes since commit f3b8f18ebf344ab359e8f79f6ed777e740dae77c: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2019-08-21' > into staging (2019-08-22 10:31:21 +0100) > > are available in the Git repository a

Re: [Qemu-devel] [PATCH v2 0/2] Add dbus-vmstate

2019-08-23 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Fri, Aug 23, 2019 at 03:56:34PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Fri, Aug 23, 2019 at 03:26:02PM +0100, Dr. David Alan Gilbert wrote: > > > > * Daniel P. Berrangé (berra...@redh

Re: [Qemu-devel] [PATCH v2 2/6] hw/arm: Use object_initialize_child for correct reference counting

2019-08-23 Thread Thomas Huth
On 8/23/19 4:32 PM, Philippe Mathieu-Daudé wrote: > As explained in commit aff39be0ed97: > > Both functions, object_initialize() and object_property_add_child() > increase the reference counter of the new object, so one of the > references has to be dropped afterwards to get the reference >

Re: [Qemu-devel] [Slirp] [PATCH 1/2] Do not reassemble fragments pointing outside of the original payload

2019-08-23 Thread Philippe Mathieu-Daudé
On 8/22/19 8:33 PM, Samuel Thibault wrote: > Philippe Mathieu-Daudé, le jeu. 22 août 2019 16:41:33 +0200, a ecrit: >> Later the newly calculated pointer q is converted into ip structure >> and values are modified, Due to the wrong calculation of the delta, >> ip will be pointing to incorrect

Re: [Qemu-devel] [PATCH v1 3/9] tcg: Factor out CONFIG_USER_ONLY probe_write() from s390x code

2019-08-23 Thread Richard Henderson
On 8/23/19 3:07 AM, David Hildenbrand wrote: > Factor it out, we'll do some further changes/extensions to both > probe_write() implementations soon. Make sure to allow "size = 0". > > Signed-off-by: David Hildenbrand > --- > accel/tcg/user-exec.c | 16 > include/exec/exec-al

Re: [Qemu-devel] [PATCH v2 0/2] Add dbus-vmstate

2019-08-23 Thread Daniel P . Berrangé
On Fri, Aug 23, 2019 at 04:14:48PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Fri, Aug 23, 2019 at 03:56:34PM +0100, Dr. David Alan Gilbert wrote: > > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > > If two helpers are running as the s

Re: [Qemu-devel] [PATCH v1 3/9] tcg: Factor out CONFIG_USER_ONLY probe_write() from s390x code

2019-08-23 Thread Richard Henderson
On 8/23/19 3:07 AM, David Hildenbrand wrote: > +void probe_write(CPUArchState *env, target_ulong addr, int size, int mmu_idx, > + uintptr_t retaddr) > +{ > +CPUState *cpu = env_cpu(env); > +CPUClass *cc; > + > +if (!guest_addr_valid(addr) || > +(size > 0 && !gues

Re: [Qemu-devel] [PATCH v3 7/7] target/riscv: Convert mip to target_ulong

2019-08-23 Thread Alistair Francis
On Thu, Aug 15, 2019 at 2:38 PM Alistair Francis wrote: > > The mip register is an MXLEN-bit long register. Convert it to a > target_ulong type instead of uint32_t. > > Signed-off-by: Alistair Francis MIP is 32-bit to allow atomic access on 32-bit hosts, so I am going to send a v4 with this patc

[Qemu-devel] [PATCH v4 4/7] target/riscv: Update the Hypervisor CSRs to v0.4

2019-08-23 Thread Alistair Francis
Update the Hypervisor CSR addresses to match the v0.4 spec. Signed-off-by: Alistair Francis Reviewed-by: Chih-Min Chao Reviewed-by: Bin Meng --- target/riscv/cpu_bits.h | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/target/riscv/cpu_bi

[Qemu-devel] [PATCH v4 0/7] RISC-V: Hypervisor prep work part 2

2019-08-23 Thread Alistair Francis
The first three patches are ones that I have pulled out of my original Hypervisor series at an attempt to reduce the number of patches in the series. These three patches all make sense without the Hypervisor series so can be merged seperatley and will reduce the review burden of the next version

[Qemu-devel] [PATCH v4 5/7] target/riscv: Use both register name and ABI name

2019-08-23 Thread Alistair Francis
From: Atish Patra Use both the generic register name and ABI name for the general purpose registers and floating point registers. Signed-off-by: Atish Patra Signed-off-by: Alistair Francis Reviewed-by: Bin Meng --- target/riscv/cpu.c | 19 +++ 1 file changed, 11 insertions(+)

[Qemu-devel] [PATCH v4 1/7] target/riscv: Don't set write permissions on dirty PTEs

2019-08-23 Thread Alistair Francis
Setting write permission on dirty PTEs results in userspace inside a Hypervisor guest (VU) becoming corrupted. This appears to be because it ends up with write permission in the second stage translation in cases where we aren't doing a store. Signed-off-by: Alistair Francis Reviewed-by: Bin Meng

[Qemu-devel] [PATCH v4 2/7] riscv: plic: Remove unused interrupt functions

2019-08-23 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Jonathan Behrens Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Chih-Min Chao Reviewed-by: Bin Meng --- hw/riscv/sifive_plic.c | 12 include/hw/riscv/sifive_plic.h | 3 --- 2 files changed, 15 deletions(-) diff --git a/hw/r

Re: [Qemu-devel] [PATCH v2 0/2] Add dbus-vmstate

2019-08-23 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Fri, Aug 23, 2019 at 04:14:48PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Fri, Aug 23, 2019 at 03:56:34PM +0100, Dr. David Alan Gilbert wrote: > > > > * Daniel P. Berrangé (berra...@redh

[Qemu-devel] [PATCH v4 6/7] target/riscv: Fix mstatus dirty mask

2019-08-23 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Bin Meng --- target/riscv/csr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 2789215b5e..f767ad24be 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -335,7 +335,7 @@ stati

Re: [Qemu-devel] [PATCH v2 21/68] target/arm: Convert Synchronization primitives

2019-08-23 Thread Peter Maydell
On Mon, 19 Aug 2019 at 22:38, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/arm/translate.c | 560 ++--- > target/arm/a32.decode | 48 > target/arm/t32.decode | 46 > 3 files changed, 396 insertions(+), 258 deletion

Re: [Qemu-devel] [PATCH v2 3/6] hw/arm: Use sysbus_init_child_obj for correct reference counting

2019-08-23 Thread Thomas Huth
On 8/23/19 4:32 PM, Philippe Mathieu-Daudé wrote: > As explained in commit aff39be0ed97: > > Both functions, object_initialize() and qdev_set_parent_bus() Commit aff39be0ed97 was not about qdev_set_parent_bus(), so the first sentence sounds somewhat misleading here. Maybe rephrase the commit me

[Qemu-devel] [PATCH v4 3/7] target/riscv: Create function to test if FP is enabled

2019-08-23 Thread Alistair Francis
Let's create a function that tests if floating point support is enabled. We can then protect all floating point operations based on if they are enabled. This patch so far doesn't change anything, it's just preparing for the Hypervisor support for floating point operations. Signed-off-by: Alistair

Re: [Qemu-devel] [PATCH v1 6/9] hppa/tcg: Call probe_write() also for CONFIG_USER_ONLY

2019-08-23 Thread Richard Henderson
On 8/23/19 3:07 AM, David Hildenbrand wrote: > We now have a variant for CONFIG_USER_ONLY as well. > > Signed-off-by: David Hildenbrand > --- > target/hppa/op_helper.c | 2 -- > 1 file changed, 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v1 4/9] tcg: Enforce single page access in probe_write() for !CONFIG_USER_ONLY

2019-08-23 Thread Richard Henderson
On 8/23/19 3:07 AM, David Hildenbrand wrote: > While the CONFIG_USER_ONLY variant can handle multiple pages (no MMU), the > !CONFIG_USER_ONLY variant can't and won't. We'll want to convert > probe_write() to return a host address (similar to tlb_vaddr_to_host()) > soon. This only works on page gran

[Qemu-devel] [PATCH v4 7/7] target/riscv: Use TB_FLAGS_MSTATUS_FS for floating point

2019-08-23 Thread Alistair Francis
Use the TB_FLAGS_MSTATUS_FS macro when enabling floating point in the tb flags. Signed-off-by: Alistair Francis --- target/riscv/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index eb7b5b0af3..0347be453b 100644 --- a/target/risc

Re: [Qemu-devel] [PATCH] linux-user: Add AT_HWCAP2 for aarch64-linux-user

2019-08-23 Thread Laurent Vivier
Le 09/08/2019 à 19:11, Richard Henderson a écrit : > Add the HWCAP2_* bits from kernel version v5.3-rc3. > Enable the bits corresponding to ARMv8.5-CondM and ARMv8.5-FRINT. > > Signed-off-by: Richard Henderson > --- > linux-user/elfload.c | 31 +++ > 1 file changed, 2

Re: [Qemu-devel] [edk2-rfc] [edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-23 Thread Kinney, Michael D
Hi Jiewen, If a hot add CPU needs to run any code before the first SMI, I would recommend is only executes code from a write protected FLASH range without a stack and then wait for the first SMI. For this OVMF use case, is any CPU init required before the first SMI? From Paolo's list of steps ar

Re: [Qemu-devel] [Qemu-block] [PATCH v5 6/6] iotests: extend sleeping time under Valgrind

2019-08-23 Thread Vladimir Sementsov-Ogievskiy
16.08.2019 4:01, John Snow wrote: > > > On 7/19/19 12:30 PM, Andrey Shinkevich wrote: >> To synchronize the time when QEMU is running longer under the Valgrind, >> increase the sleeping time in the test 247. >> >> Signed-off-by: Andrey Shinkevich >> Reviewed-by: Vladimir Sementsov-Ogievskiy >>

Re: [Qemu-devel] [PATCH] migrtion: define MigrationState/MigrationIncomingState.state as MigrationStatus

2019-08-23 Thread Dr. David Alan Gilbert
* Wei Yang (richard.weiy...@gmail.com) wrote: > On Mon, Aug 19, 2019 at 12:26:32PM +0100, Dr. David Alan Gilbert wrote: > >* Wei Yang (richardw.y...@linux.intel.com) wrote: > >> No functional change. Add default case to fix warning. > > > >I think the problem with this is that migrate_set_state use

Re: [Qemu-devel] [PATCH v1 4/9] tcg: Enforce single page access in probe_write() for !CONFIG_USER_ONLY

2019-08-23 Thread Richard Henderson
On 8/23/19 8:28 AM, Richard Henderson wrote: > On 8/23/19 3:07 AM, David Hildenbrand wrote: >> While the CONFIG_USER_ONLY variant can handle multiple pages (no MMU), the >> !CONFIG_USER_ONLY variant can't and won't. We'll want to convert >> probe_write() to return a host address (similar to tlb_vad

Re: [Qemu-devel] [PATCH 1/2] linux-user: remove useless variable

2019-08-23 Thread Laurent Vivier
Le 14/07/2019 à 15:40, Laurent Vivier a écrit : > filename is only used to open the file if AT_EXECFD is not provided. > But exec_path already contains the path of the file to open. > Remove filename as it is only used in main.c whereas exec_path is > also used in syscall.c. > > Fixes: d088d664f20

Re: [Qemu-devel] [PATCH v4 7/7] target/riscv: Use TB_FLAGS_MSTATUS_FS for floating point

2019-08-23 Thread Peter Maydell
On Fri, 23 Aug 2019 at 16:37, Alistair Francis wrote: > > Use the TB_FLAGS_MSTATUS_FS macro when enabling floating point in the tb > flags. > > Signed-off-by: Alistair Francis > --- > target/riscv/cpu.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/riscv/cpu.h b

Re: [Qemu-devel] [PATCH v1 7/9] s390x/tcg: Pass a size to probe_write() in do_csst()

2019-08-23 Thread Richard Henderson
On 8/23/19 3:07 AM, David Hildenbrand wrote: > ... and also call it for CONFIG_USER_ONLY. This function probably will > also need some refactoring in regards to probing, however, we'll have to > come back to that later, once cleaning up the other mem helpers. > > The alignment check always makes s

Re: [Qemu-devel] [PATCH v2 22/68] target/arm: Convert USAD8, USADA8, SBFX, UBFX, BFC, BFI, UDF

2019-08-23 Thread Peter Maydell
On Mon, 19 Aug 2019 at 22:38, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/arm/translate.c | 200 + > target/arm/a32.decode | 20 + > target/arm/t32.decode | 19 > 3 files changed, 143 insertions(+), 96 deletion

Re: [Qemu-devel] [PATCH] contrib/gitdm: Add RT-RK to the domain-map

2019-08-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190822231231.1306-1-phi...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!

Re: [Qemu-devel] [PATCH v4 7/7] target/riscv: Use TB_FLAGS_MSTATUS_FS for floating point

2019-08-23 Thread Alistair Francis
On Fri, Aug 23, 2019 at 8:44 AM Peter Maydell wrote: > > On Fri, 23 Aug 2019 at 16:37, Alistair Francis > wrote: > > > > Use the TB_FLAGS_MSTATUS_FS macro when enabling floating point in the tb > > flags. > > > > Signed-off-by: Alistair Francis > > --- > > target/riscv/cpu.h | 2 +- > > 1 file

Re: [Qemu-devel] [PATCH v1 3/9] tcg: Factor out CONFIG_USER_ONLY probe_write() from s390x code

2019-08-23 Thread David Hildenbrand
On 23.08.19 17:22, Richard Henderson wrote: > On 8/23/19 3:07 AM, David Hildenbrand wrote: >> +void probe_write(CPUArchState *env, target_ulong addr, int size, int >> mmu_idx, >> + uintptr_t retaddr) >> +{ >> +CPUState *cpu = env_cpu(env); >> +CPUClass *cc; >> + >> +if

Re: [Qemu-devel] [PATCH v2] linux-user: Add support for SIOCETHTOOL ioctl

2019-08-23 Thread Laurent Vivier
Le 17/08/2019 à 02:07, Shu-Chun Weng via Qemu-devel a écrit : > The ioctl numeric values are platform-independent and determined by > the file include/uapi/linux/sockios.h in Linux kernel source code: > > #define SIOCETHTOOL 0x8946 > > These ioctls get (or set) the field ifr_data of type char

[Qemu-devel] Running u-boot on raspi2

2019-08-23 Thread Bonnans, Laurent
Hi, We (mostly Cheng Xiang's work) have been trying to use the raspi2 machine to boot an image through u-boot. It seems, however, that there are some missing pieces: The first problem is that it trips very early if we keep the cpus count at 4 but will continue if we hard-patch it to be a single

Re: [Qemu-devel] [PATCH v2 23/68] target/arm: Convert Parallel addition and subtraction

2019-08-23 Thread Peter Maydell
On Mon, 19 Aug 2019 at 22:38, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/arm/translate.c | 229 - > target/arm/a32.decode | 44 > target/arm/t32.decode | 44 > 3 files changed, 200 insertions(+), 117

Re: [Qemu-devel] [RFC PATCH] migration/postcopy: enable compress with postcopy

2019-08-23 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > This patch enable compress with postcopy. > > This is a RFC and based on some unmerged patch > > "migration: extract ram_load_precopy" > "migration/postcopy: skip compression when postcopy is active" > > Signed-off-by: Wei Yang > --- > mi

Re: [Qemu-devel] Running u-boot on raspi2

2019-08-23 Thread Peter Maydell
On Fri, 23 Aug 2019 at 16:54, Bonnans, Laurent wrote: > > Hi, > > We (mostly Cheng Xiang's work) have been trying to use the raspi2 > machine to boot an image through u-boot. > It seems, however, that there are some missing pieces: > > The first problem is that it trips very early if we keep the c

Re: [Qemu-devel] [PATCH v1 8/9] exec.c: Factor out core logic of check_watchpoint()

2019-08-23 Thread Richard Henderson
On 8/23/19 4:27 AM, David Hildenbrand wrote: > On 23.08.19 12:07, David Hildenbrand wrote: >> We want to perform the same checks in probe_write() to trigger a cpu >> exit before doing any modifications. We'll have to pass a PC. >> >> Signed-off-by: David Hildenbrand >> --- >> exec.c

Re: [Qemu-devel] [PATCH v1 9/9] tcg: Check for watchpoints in probe_write()

2019-08-23 Thread Richard Henderson
On 8/23/19 3:07 AM, David Hildenbrand wrote: > Let's check for write watchpoints. We'll want to do something similar > for probe_read() in the future (once we introduce that). > > Suggested-by: Richard Henderson > Signed-off-by: David Hildenbrand > --- > accel/tcg/cputlb.c | 16

Re: [Qemu-devel] [PATCH] migrtion: define MigrationState/MigrationIncomingState.state as MigrationStatus

2019-08-23 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Wei Yang (richard.weiy...@gmail.com) wrote: > > On Mon, Aug 19, 2019 at 12:26:32PM +0100, Dr. David Alan Gilbert wrote: > > >* Wei Yang (richardw.y...@linux.intel.com) wrote: > > >> No functional change. Add default case to fix warning. > >

Re: [Qemu-devel] [PATCH v2 00/12] block: qiov_offset parameter for io

2019-08-23 Thread Stefan Hajnoczi
On Thu, Aug 22, 2019 at 05:59:43PM +, Vladimir Sementsov-Ogievskiy wrote: > 22.08.2019 20:39, Vladimir Sementsov-Ogievskiy wrote: > > 22.08.2019 20:24, Vladimir Sementsov-Ogievskiy wrote: > >> 22.08.2019 18:50, Stefan Hajnoczi wrote: > >>> On Tue, Jun 04, 2019 at 07:15:02PM +0300, Vladimir Seme

Re: [Qemu-devel] [PATCH] migrtion: define MigrationState/MigrationIncomingState.state as MigrationStatus

2019-08-23 Thread Eric Blake
On 8/19/19 9:08 AM, Wei Yang wrote: > On Mon, Aug 19, 2019 at 12:26:32PM +0100, Dr. David Alan Gilbert wrote: >> * Wei Yang (richardw.y...@linux.intel.com) wrote: Typo in the subject line: migrtion should be migration >>> No functional change. Add default case to fix warning. >> >> I think the pr

Re: [Qemu-devel] [PATCH v2 20/68] target/arm: Convert load/store (register, immediate, literal)

2019-08-23 Thread Richard Henderson
On 8/23/19 7:54 AM, Peter Maydell wrote: > On Mon, 19 Aug 2019 at 22:38, Richard Henderson > wrote: >> >> Signed-off-by: Richard Henderson >> --- >> target/arm/translate.c | 797 ++--- >> target/arm/a32.decode | 120 +++ >> target/arm/t32.decode | 141 ++

Re: [Qemu-devel] [RFC PATCH] migration/postcopy: skip compression when postcopy is active

2019-08-23 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > Now postcopy is not compatible with compression. And we disable setting > these two capability at the same time. While we can still leverage > compress before postcopy is active, for example at the bulk stage. > > This patch skips compression whe

Re: [Qemu-devel] [PATCH] linux-user: erroneous fd_trans_unregister call

2019-08-23 Thread Laurent Vivier
Le 19/08/2019 à 20:53, Shu-Chun Weng via Qemu-devel a écrit : > timer_getoverrun returns the "overrun count" for the timer, which is not > a file descriptor and thus should not call fd_trans_unregister on it. > > Signed-off-by: Shu-Chun Weng > --- > linux-user/syscall.c | 1 - > 1 file changed,

Re: [Qemu-devel] [PATCH v2 21/68] target/arm: Convert Synchronization primitives

2019-08-23 Thread Richard Henderson
On 8/23/19 8:28 AM, Peter Maydell wrote: >> +gen_aa32_st_i32(s, tmp, addr, get_mem_index(s), mop | s->be_data); >> +disas_set_da_iss(s, mop, a->rt | ISSIsAcqRel | ISSIsWrite); ... >> -switch (op1) { >> -case 0: /* stl */ >> -

Re: [Qemu-devel] [PATCH v2 22/68] target/arm: Convert USAD8, USADA8, SBFX, UBFX, BFC, BFI, UDF

2019-08-23 Thread Richard Henderson
On 8/23/19 8:39 AM, Peter Maydell wrote: >> +static bool op_bfx(DisasContext *s, arg_UBFX *a, bool u) >> +{ >> +TCGv_i32 tmp; >> +int width = a->widthm1 + 1; >> +int shift = a->lsb; >> + >> +if (!ENABLE_ARCH_6T2) { >> +return false; >> +} >> + >> +tmp = load_reg(s, a

Re: [Qemu-devel] [PATCH] block: posix: Always allocate the first block

2019-08-23 Thread Nir Soffer
On Fri, Aug 23, 2019 at 4:58 PM Max Reitz wrote: > On 22.08.19 21:01, Nir Soffer wrote: > ... > > > > @@ -1794,6 +1815,8 @@ static int handle_aiocb_truncate(void > > *opaque) > > > > /* posix_fallocate() doesn't set errno. */ > > > >

Re: [Qemu-devel] libvhost-user: Fix the VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD check

2019-08-23 Thread Dr. David Alan Gilbert
* Boeuf, Sebastien (sebastien.bo...@intel.com) wrote: > From 734625fe0c031d26e612800cd9331235f58ae2e0 Mon Sep 17 00:00:00 2001 > From: Sebastien Boeuf > Date: Wed, 7 Aug 2019 07:15:32 -0700 > Subject: [PATCH] libvhost-user: Fix the VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD > check > > Vhost user proto

[Qemu-devel] [PATCH 0/4] docs: add docs about use of automatic cleanup functions

2019-08-23 Thread Daniel P . Berrangé
This is ostensibly about adding docs for the g_autofree/g_autoptr macros. As part of doing that, however, the existing HACKING doc is merged into the CODING_STYLE doc and the text is converted to markdown with a table of contents. Daniel P. Berrangé (4): docs: convert CODING_STYLE and HACKING to

<    1   2   3   4   >