Re: Rust in Qemu BoF followup: Rust vs. qemu platform support

2021-09-17 Thread David Gibson
On Fri, Sep 17, 2021 at 04:59:09PM +0100, Stefan Hajnoczi wrote: 65;6402;1c> On Fri, Sep 17, 2021 at 12:34:29PM +0100, Daniel P. Berrangé wrote: > > On Fri, Sep 17, 2021 at 06:58:37PM +1000, David Gibson wrote: > > > Hi all, > > > > > > At the qemu-in-rust BoF at KVM Forum, I volunteered to look i

Re: Rust in Qemu BoF followup: Rust vs. qemu platform support

2021-09-17 Thread David Gibson
On Fri, Sep 17, 2021 at 04:56:02PM +0100, Stefan Hajnoczi wrote: > On Fri, Sep 17, 2021 at 01:11:56PM +0200, Philippe Mathieu-Daudé wrote: > > Le ven. 17 sept. 2021 10:58, David Gibson a > > écrit : > > > > > Hi all, > > > > > > At the qemu-in-rust BoF at KVM Forum, I volunteered to look into > >

Re: [PATCH v11 5/7] [RISCV_PM] Support pointer masking for RISC-V for i/c/f/d/a types of instructions

2021-09-17 Thread Alexey Baturo
Hi Richard, Thanks for noticing that. Do you think it would be an ok solution to pass dst as a pointer into gen_pm_adjust_address, so in case pm is enabled, it'd allocate the temp and update the dst afterwards? Thanks пт, 10 сент. 2021 г. в 00:00, Richard Henderson < richard.hender...@linaro.org>

Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling

2021-09-17 Thread Guenter Roeck
On 9/17/21 8:09 PM, Cheng, Xuzhou wrote: I got some free time in the past days to investigate this issue. Guenter is right, the Linux imx-spi driver does not work on QEMU. The reason is that the state of m25p80 machine loops in STATE_READING_DATA state after receiving RDSR command, the new com

[RESEND PATCH 2/3] hw/intc: openpic: Drop Raven related codes

2021-09-17 Thread Bin Meng
There is no machine that uses Motorola MCP750 (aka Raven) model. Drop the related codes. While we are here, drop the mentioning of Intel GW80314 I/O companion chip in the comments as it has been obsolete for years, and correct a typo too. Signed-off-by: Bin Meng --- include/hw/ppc/openpic.h |

[RESEND PATCH 3/3] hw/intc: openpic: Clean up the styles

2021-09-17 Thread Bin Meng
Correct the multi-line comment format. No functional changes. Signed-off-by: Bin Meng --- include/hw/ppc/openpic.h | 9 --- hw/intc/openpic.c| 55 +--- 2 files changed, 40 insertions(+), 24 deletions(-) diff --git a/include/hw/ppc/openpic.h b/i

[RESEND PATCH 1/3] hw/intc: openpic: Correct the reset value of IPIDR for FSL chipset

2021-09-17 Thread Bin Meng
The reset value of IPIDR should be zero for Freescale chipset, per the following 2 manuals I checked: - P2020RM (https://www.nxp.com/webapp/Download?colCode=P2020RM) - P4080RM (https://www.nxp.com/webapp/Download?colCode=P4080RM) Currently it is set to 1, which leaves the IPI enabled on core 0 af

Re: [PATCH 2/3] hw/intc: openpic: Drop Raven related codes

2021-09-17 Thread Bin Meng
On Sat, Sep 18, 2021 at 11:02 AM Bin Meng wrote: > > From: Bin Meng > > There is no machine that uses Motorola MCP750 (aka Raven) model. > Drop the related codes. > > While we are here, drop the mentioning of Intel GW80314 I/O > companion chip in the comments as it has been obsolete for years, >

RE: [PATCH] hw/ssi: imx_spi: Improve chip select handling

2021-09-17 Thread Cheng, Xuzhou
> > I got some free time in the past days to investigate this issue. Guenter is > > right, the Linux imx-spi driver does not work on QEMU. > > > > The reason is that the state of m25p80 machine loops in STATE_READING_DATA > > state after receiving RDSR command, the new command is ignored. Before

[PATCH 3/3] hw/intc: openpic: Clean up the styles

2021-09-17 Thread Bin Meng
From: Bin Meng Correct the multi-line comment format. No functional changes. Signed-off-by: Bin Meng --- include/hw/ppc/openpic.h | 9 --- hw/intc/openpic.c| 55 +--- 2 files changed, 40 insertions(+), 24 deletions(-) diff --git a/include/hw/p

[PATCH 1/3] hw/intc: openpic: Correct the reset value of IPIDR for FSL chipset

2021-09-17 Thread Bin Meng
From: Bin Meng The reset value of IPIDR should be zero for Freescale chipset, per the following 2 manuals I checked: - P2020RM (https://www.nxp.com/webapp/Download?colCode=P2020RM) - P4080RM (https://www.nxp.com/webapp/Download?colCode=P4080RM) Currently it is set to 1, which leaves the IPI ena

[PATCH 2/3] hw/intc: openpic: Drop Raven related codes

2021-09-17 Thread Bin Meng
From: Bin Meng There is no machine that uses Motorola MCP750 (aka Raven) model. Drop the related codes. While we are here, drop the mentioning of Intel GW80314 I/O companion chip in the comments as it has been obsolete for years, and correct a typo too. Signed-off-by: Bin Meng --- include/hw

How to fill a memory region with specific bytes?

2021-09-17 Thread Duo jia
Many SOCs have unique id, which is a fixed string of bytes. I use "memory_region_init_ram" and "memory_region_add_subregion" to simulate this region, how can I initialize specific bytes to fill? thks~~~

Re: [PATCH 12/15] iotests: Disable AQMP logging under non-debug modes

2021-09-17 Thread John Snow
On Fri, Sep 17, 2021 at 8:58 PM John Snow wrote: > > > On Fri, Sep 17, 2021 at 10:30 AM Hanna Reitz wrote: > >> On 17.09.21 07:40, John Snow wrote: >> > Disable the aqmp logger, which likes to (at the moment) print out >> > intermediate warnings and errors that cause session termination; disable

[PATCH V3] net/colo: check vnet_hdr_support flag when using virtio-net

2021-09-17 Thread Zhang Chen
When COLO use only one vnet_hdr_support parameter between COLO network filter(filter-mirror, filter-redirector or filter-rewriter and colo-compare, packet will not be parsed correctly. Acquire network driver related to COLO, if it is nirtio-net, check vnet_hdr_support flag of COLO network filter an

Re: [PATCH 13/15] iotests: Accommodate async QMP Exception classes

2021-09-17 Thread John Snow
On Fri, Sep 17, 2021 at 10:35 AM Hanna Reitz wrote: > On 17.09.21 07:40, John Snow wrote: > > (But continue to support the old ones for now, too.) > > > > There are very few cases of any user of QEMUMachine or a subclass > > thereof relying on a QMP Exception type. If you'd like to check for > >

Re: [PATCH 12/15] iotests: Disable AQMP logging under non-debug modes

2021-09-17 Thread John Snow
On Fri, Sep 17, 2021 at 10:30 AM Hanna Reitz wrote: > On 17.09.21 07:40, John Snow wrote: > > Disable the aqmp logger, which likes to (at the moment) print out > > intermediate warnings and errors that cause session termination; disable > > them so they don't interfere with the job output. > > >

Re: [PATCH 11/15] python/aqmp: Create sync QMP wrapper for iotests

2021-09-17 Thread John Snow
On Fri, Sep 17, 2021 at 10:23 AM Hanna Reitz wrote: > On 17.09.21 07:40, John Snow wrote: > > This is a wrapper around the async QMPClient that mimics the old, > > synchronous QEMUMonitorProtocol class. It is designed to be > > interchangeable with the old implementation. > > > > It does not, how

Re: [PATCH 10/15] python/machine: Add support for AQMP backend

2021-09-17 Thread John Snow
On Fri, Sep 17, 2021 at 10:16 AM Hanna Reitz wrote: > On 17.09.21 07:40, John Snow wrote: > > To use the AQMP backend, Machine just needs to be a little more diligent > > about what happens when closing a QMP connection. The operation is no > > longer a freebie in the async world. > > > > Because

Re: [PATCH] qemu-img: Add -F shorthand to convert

2021-09-17 Thread Vladimir Sementsov-Ogievskiy
17.09.2021 23:13, Eric Blake wrote: On Mon, Sep 13, 2021 at 08:17:35AM -0500, Eric Blake wrote: Although we have long supported 'qemu-img convert -o backing_file=foo,backing_fmt=bar', the fact that we have a shortcut -B for backing_file but none for backing_fmt has made it more likely that users

Re: [PATCH 09/15] python/machine: remove has_quit argument

2021-09-17 Thread John Snow
On Fri, Sep 17, 2021 at 9:59 AM Hanna Reitz wrote: > On 17.09.21 07:40, John Snow wrote: > > If we spy on the QMP commands instead, we don't need callers to remember > > to pass it. Seems like a fair trade-off. > > > > The one slightly weird bit is overloading this instance variable for > > wait(

[PATCH v8 5/7] spapr: move FORM1 verifications to post CAS

2021-09-17 Thread Daniel Henrique Barboza
FORM2 NUMA affinity is prepared to deal with empty (memory/cpu less) NUMA nodes. This is used by the DAX KMEM driver to locate a PAPR SCM device that has a different latency than the original NUMA node from the regular memory. FORM2 is also able to deal with asymmetric NUMA distances gracefully, s

[PATCH v8 7/7] spapr_numa.c: handle auto NUMA node with no distance info

2021-09-17 Thread Daniel Henrique Barboza
numa_complete_configuration() in hw/core/numa.c always adds a NUMA node for the pSeries machine if none was specified, but without node distance information for the single node created. NUMA FORM1 affinity code didn't rely on numa_state information to do its job, but FORM2 does. As is now, this is

[PATCH v8 3/7] spapr_numa.c: parametrize FORM1 macros

2021-09-17 Thread Daniel Henrique Barboza
The next preliminary step to introduce NUMA FORM2 affinity is to make the existing code independent of FORM1 macros and values, i.e. MAX_DISTANCE_REF_POINTS, NUMA_ASSOC_SIZE and VCPU_ASSOC_SIZE. This patch accomplishes that by doing the following: - move the NUMA related macros from spapr.h to spa

[PATCH v8 6/7] spapr_numa.c: FORM2 NUMA affinity support

2021-09-17 Thread Daniel Henrique Barboza
The main feature of FORM2 affinity support is the separation of NUMA distances from ibm,associativity information. This allows for a more flexible and straightforward NUMA distance assignment without relying on complex associations between several levels of NUMA via ibm,associativity matches. Anoth

[PATCH v8 1/7] spapr_numa.c: split FORM1 code into helpers

2021-09-17 Thread Daniel Henrique Barboza
The upcoming FORM2 NUMA affinity will support asymmetric NUMA topologies and doesn't need be concerned with all the legacy support for older pseries FORM1 guests. We're also not going to calculate associativity domains based on numa distance (via spapr_numa_define_associativity_domains) since the

[PATCH v8 4/7] spapr_numa.c: rename numa_assoc_array to FORM1_assoc_array

2021-09-17 Thread Daniel Henrique Barboza
Introducing a new NUMA affinity, FORM2, requires a new mechanism to switch between affinity modes after CAS. Also, we want FORM2 data structures and functions to be completely separated from the existing FORM1 code, allowing us to avoid adding new code that inherits the existing complexity of FORM1

[PATCH v8 0/7] pSeries FORM2 affinity support

2021-09-17 Thread Daniel Henrique Barboza
Hi, This new version contains changes made in patch 7 after looking more carefully in the auto-generated NUMA node issue. I also took the opportunity to make a change that Greg requested in an earlier review that didn't make to v7. Changes from v7: - patch 3: * removed redundant 'no FORM2 avai

[PATCH v8 2/7] spapr_numa.c: scrap 'legacy_numa' concept

2021-09-17 Thread Daniel Henrique Barboza
When first introduced, 'legacy_numa' was a way to refer to guests that either wouldn't be affected by associativity domain calculations, namely the ones with only 1 NUMA node, and pre 5.2 guests that shouldn't be affected by it because it would be an userspace change. Calling these cases 'legacy_nu

Re: [PATCH v7 7/7] spapr_numa.c: handle auto NUMA node with no distance info

2021-09-17 Thread Daniel Henrique Barboza
On 9/17/21 05:25, Igor Mammedov wrote: On Wed, 15 Sep 2021 22:30:04 -0300 Daniel Henrique Barboza wrote: numa_complete_configuration() in hw/core/numa.c always adds a NUMA node for the pSeries machine if none was specified, but without node distance information for the single node created.

Re: [PATCH v1 03/11] tests/tcg: move some multiarch files and make conditional

2021-09-17 Thread Philippe Mathieu-Daudé
On 9/17/21 18:23, Alex Bennée wrote: > We had some messy code to filter out stuff we can't build. Lets junk > that and simplify the logic by pushing some stuff into subdirs. In > particular we move: > > float_helpers into libs - not a standalone test > linux-test into linux - so we only build

Re: [PATCH] qemu-img: Add -F shorthand to convert

2021-09-17 Thread Eric Blake
On Mon, Sep 13, 2021 at 08:17:35AM -0500, Eric Blake wrote: > Although we have long supported 'qemu-img convert -o > backing_file=foo,backing_fmt=bar', the fact that we have a shortcut -B > for backing_file but none for backing_fmt has made it more likely that > users accidentally run into: > > qe

Re: [PATCH 08/15] python/aqmp: Create MessageModel and StandaloneModel classes

2021-09-17 Thread John Snow
On Fri, Sep 17, 2021, 9:39 AM Hanna Reitz wrote: > On 17.09.21 07:40, John Snow wrote: > > This allows 'Greeting' to be subclass of 'Message'. We need the adapter > > classes to avoid some typing problems that occur if we try to put too > > much into the 'Model' class itself; the exact details of

Re: Rust in Qemu BoF followup: Rust vs. qemu platform support

2021-09-17 Thread Warner Losh
On Fri, Sep 17, 2021, 12:39 PM Philippe Mathieu-Daudé wrote: > On 9/17/21 6:04 PM, Warner Losh wrote:> wrt FreeBSD: > > > > The main focus of the project is on AMD64 (x86_64) and ARM64 (aarc64). > With > > ricsv64 being ascendant as well. i386 and armv7 are fading. ppc64 has > > strong, > > but e

[PATCH] hw/loader: Restrict PC_ROM_* definitions to hw/i386/pc

2021-09-17 Thread Philippe Mathieu-Daudé
The PC_ROM_* definitions are only used by the PC machine, and are irrelevant to the other architectures / machines. Reduce their scope by moving them to hw/i386/pc.c. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/loader.h | 6 -- hw/i386/pc.c| 6 ++ 2 files changed, 6 inse

[PATCH] hw/loader: Remove unused rom_add_file_as() definition

2021-09-17 Thread Philippe Mathieu-Daudé
rom_add_file_as() is not used anywhere, remove it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/loader.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/loader.h b/include/hw/loader.h index cbfc1848737..c52a1df8b68 100644 --- a/include/hw/loader.h +++ b/include/hw/loader.

Re: Rust in Qemu BoF followup: Rust vs. qemu platform support

2021-09-17 Thread Philippe Mathieu-Daudé
On 9/17/21 6:04 PM, Warner Losh wrote:> wrt FreeBSD: > > The main focus of the project is on AMD64 (x86_64) and ARM64 (aarc64). With > ricsv64 being ascendant as well. i386 and armv7 are fading. ppc64 has > strong, > but episodic, interest as well. The rest are bit players. > > i386 (i686 really)

Re: [PATCH v1 05/11] gitlab: Add cross-riscv64-system, cross-riscv64-user

2021-09-17 Thread Philippe Mathieu-Daudé
On 9/17/21 6:23 PM, Alex Bennée wrote: > From: Richard Henderson > > Signed-off-by: Richard Henderson > Message-Id: <20210914185830.1378771-3-richard.hender...@linaro.org> > [AJB: add allow_failure] > Signed-off-by: Alex Bennée > Reviewed-by: Philippe Mathieu-Daudé This was a Nacked-by... but

[PATCH 1/2] virtio-gpu: splitting one extended mode guest fb into n-scanouts

2021-09-17 Thread Dongwon Kim
When guest is running Linux/X11 with extended multiple displays mode enabled, the guest shares one scanout resource each time containing whole surface rather than sharing individual display output separately. This extended frame is properly splited and rendered on the corresponding scanout surfaces

[PATCH 2/2] ui/gtk-egl: blitting partial guest fb to the proper scanout surface

2021-09-17 Thread Dongwon Kim
eb_fb_blit should be able to blit partial image of guest display (blob res) in case multiple displays are configured for the guest and they are set as extended- desktop mode. v2: egl_fb includes dmabuf info then make egl_fb_blit position and size parameters programmed in dmabuf structure (pre

Re: [PATCH 2/2] gitlab: Add cross-riscv64-system, cross-riscv64-user

2021-09-17 Thread Philippe Mathieu-Daudé
On 9/15/21 6:32 PM, Richard Henderson wrote: > On 9/15/21 8:03 AM, Philippe Mathieu-Daudé wrote: >> On 9/14/21 8:58 PM, Richard Henderson wrote: >>> Signed-off-by: Richard Henderson >>> --- >>>   .gitlab-ci.d/crossbuilds.yml | 14 ++ >>>   1 file changed, 14 insertions(+) >>> >>> diff -

Re: [PATCH v3 00/17] iotests: support zstd

2021-09-17 Thread Vladimir Sementsov-Ogievskiy
17.09.2021 17:49, Hanna Reitz wrote: On 15.09.21 16:45, Hanna Reitz wrote: On 14.09.21 12:25, Vladimir Sementsov-Ogievskiy wrote: These series makes tests pass with     IMGOPTS='compression_type=zstd' Also, python iotests start to support IMGOPTS (they didn't before). Unfortunately, the pro

Re: [PATCH 07/15] python/aqmp: add send_fd_scm

2021-09-17 Thread John Snow
On Fri, Sep 17, 2021 at 9:34 AM Hanna Reitz wrote: > On 17.09.21 07:40, John Snow wrote: > > The single space is indeed required to successfully transmit the file > > descriptor to QEMU. > > Yeah, socket_scm_helper.c said “Send a blank to notify qemu”. > > > Signed-off-by: John Snow > > --- > >

Re: [PATCH 05/15] python/qmp: add send_fd_scm directly to QEMUMonitorProtocol

2021-09-17 Thread John Snow
On Fri, Sep 17, 2021 at 9:21 AM Hanna Reitz wrote: > On 17.09.21 07:40, John Snow wrote: > > It turns out you can do this directly from Python ... and because of > > this, you don't need to worry about setting the inheritability of the > > fds or spawning another process. > > > > Doing this is he

Re: [PATCH 04/15] python/qmp: clear events on get_events() call

2021-09-17 Thread John Snow
On Fri, Sep 17, 2021 at 8:51 AM Hanna Reitz wrote: > On 17.09.21 07:40, John Snow wrote: > > All callers in the tree *already* clear the events after a call to > > get_events(). Do it automatically instead and update callsites to remove > > the manual clear call. > > > > These semantics are quite

Re: [RFC PATCH 3/3] tests/tcg: commit Makefile atrocities in the name of portability

2021-09-17 Thread Warner Losh
On Fri, Sep 17, 2021 at 10:45 AM Alex Bennée wrote: > > Warner Losh writes: > > > On Fri, Sep 17, 2021 at 8:39 AM Alex Bennée > wrote: > > > > Warner Losh writes: > > > > > On Tue, Aug 3, 2021 at 5:02 AM Alex Bennée > wrote: > > > > > > Not all of the multiarch tests are pure POSIX so el

Re: [PATCH 03/15] python/aqmp: Return cleared events from EventListener.clear()

2021-09-17 Thread John Snow
On Fri, Sep 17, 2021 at 8:36 AM Hanna Reitz wrote: > On 17.09.21 07:40, John Snow wrote: > > This serves two purposes: > > > > (1) It is now possible to discern whether or not clear() removed any > > event(s) from the queue with absolute certainty, and > > > > (2) It is now very easy to get a Lis

Re: [PATCH v3] target/ppc: Fix 64-bit decrementer

2021-09-17 Thread Cédric Le Goater
So use PRIx64, as you're supposed to do. Or, in fact, change this to a tracepoint. yes. I will change all of them. It should be useful for everyone. C.

Re: [PATCH v2 4/4] ui/console: prevent use after free error

2021-09-17 Thread Marc-André Lureau
Hi On Thu, Sep 16, 2021 at 11:29 PM Volker Rümelin wrote: > Make chr in the QemuConsole object a strong reference to the > referenced chardev device. This prevents a use after free error > if the chardev device goes away unexpectedly. > > To reproduce the error start qemu-system built with addre

Re: [PATCH v1 03/11] tests/tcg: move some multiarch files and make conditional

2021-09-17 Thread Warner Losh
On Fri, Sep 17, 2021 at 10:23 AM Alex Bennée wrote: > We had some messy code to filter out stuff we can't build. Lets junk > that and simplify the logic by pushing some stuff into subdirs. In > particular we move: > > float_helpers into libs - not a standalone test > linux-test into linux - s

Re: [PATCH v1 01/11] configure: don't override the selected host test compiler if defined

2021-09-17 Thread Warner Losh
On Fri, Sep 17, 2021 at 10:23 AM Alex Bennée wrote: > There are not many cases you would want to do this but one is if you > want to use a test friendly compiler like gcc instead of a system > compiler like clang. Either way we should honour the users choice if > they have made it. > > Signed-off

Re: [PATCH v2 1/4] ui/console: replace QEMUFIFO with Fifo8

2021-09-17 Thread Marc-André Lureau
On Thu, Sep 16, 2021 at 11:22 PM Volker Rümelin wrote: > One of the two FIFO implementations QEMUFIFO and Fifo8 is > redundant. Replace QEMUFIFO with Fifo8. > > Signed-off-by: Volker Rümelin > Reviewed-by: Marc-André Lureau --- > ui/console.c | 86

Re: Problem with init debugging under QEMU ARM

2021-09-17 Thread Alex Bennée
Lukasz Majewski writes: > [[PGP Signed Part:Undecided]] > Dear QEMU community, > > I'm now trying to fix bug in glibc which became apparent on qemu 6.0.0. > > The error is caused by glibc commit: > bca0f5cbc9257c13322b99e55235c4f21ba0bd82 > https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=s

Re: [RFC PATCH 3/3] tests/tcg: commit Makefile atrocities in the name of portability

2021-09-17 Thread Alex Bennée
Warner Losh writes: > On Fri, Sep 17, 2021 at 8:39 AM Alex Bennée wrote: > > Warner Losh writes: > > > On Tue, Aug 3, 2021 at 5:02 AM Alex Bennée wrote: > > > > Not all of the multiarch tests are pure POSIX so elide over those > > tests on a non-Linux system. This allows for at least

Re: [PATCH v1 06/11] python: Update for pylint 2.10

2021-09-17 Thread John Snow
Hi, I sent a PR for this (and an additional fix that is needed as of yesterday): https://lists.gnu.org/archive/html/qemu-devel/2021-09/msg04477.html Please drop this patch and prefer that series. --js On Fri, Sep 17, 2021 at 12:23 PM Alex Bennée wrote: > From: John Snow > > A few new annoyan

[PATCH v1 10/11] plugins/: Add missing functions to symbol list

2021-09-17 Thread Alex Bennée
From: Lukas Jünger Some functions of the plugin API were missing in the symbol list. However, they are all used by the contributed example plugins. QEMU fails to load the plugin if the function symbol is not exported. Signed-off-by: Lukas Jünger Message-Id: <20210905140939.638928-2-lukas.jun...

[PATCH v1 09/11] gitlab: fix passing of TEST_TARGETS env to cirrus

2021-09-17 Thread Alex Bennée
From: Daniel P. Berrangé A typo meant the substitution would not work, and the placeholder in the target file didn't even exist. The result was that tests were never run on the FreeBSD and macOS jobs, only a basic build. Signed-off-by: Daniel P. Berrangé Acked-by: Thomas Huth Reviewed-by: Wil

[PATCH v1 05/11] gitlab: Add cross-riscv64-system, cross-riscv64-user

2021-09-17 Thread Alex Bennée
From: Richard Henderson Signed-off-by: Richard Henderson Message-Id: <20210914185830.1378771-3-richard.hender...@linaro.org> [AJB: add allow_failure] Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Willian Rampazzo --- v2 - allow_failure: true --- .gitlab-ci.d/c

[PATCH v1 11/11] accel/tcg: re-factor plugin_inject_cb so we can assert insn_idx is valid

2021-09-17 Thread Alex Bennée
Coverity doesn't know enough about how we have arranged our plugin TCG ops to know we will always have incremented insn_idx before injecting the callback. Let us assert it for the benefit of Coverity and protect ourselves from accidentally breaking the assumption and triggering harder to grok error

[PATCH v1 08/11] gitlab: skip the check-patch job on the upstream repo

2021-09-17 Thread Alex Bennée
From: Daniel P. Berrangé The check-patch job is intended to be used by contributors or subsystem maintainers to see if there are style mistakes. The false positive rate is too high to be used in a gating scenario so should not run it on the upstream repo ever. Signed-off-by: Daniel P. Berrangé

Re: [PATCH] ui/gtk: skip any extra draw of same guest scanout blob res

2021-09-17 Thread Dongwon Kim
On Fri, Sep 17, 2021 at 12:02:02PM +0200, Gerd Hoffmann wrote: > Hi, > > > +bool draw_submitted; > > +QemuMutex mutex; > > Why the mutex? I think all the code runs while holding the BQL so it > should be serialized. Guest drawing process using blob is serialized (gd_egl_flush->sc

[PATCH v1 04/11] tests/docker: promote debian-riscv64-cross to a full image

2021-09-17 Thread Alex Bennée
To be able to cross build QEMU itself we need to include a few more libraries. These are only available in Debian's unstable ports repo for now so we need to base the riscv64 image on sid with the the minimal libs needed to build QEMU (glib/pixman). The result works but is not as clean as using bu

[PATCH v1 07/11] travis.yml: Remove the "Release tarball" job

2021-09-17 Thread Alex Bennée
From: Thomas Huth This is a leftover from the days when we were using Travis excessively, but since x86 jobs are not really usable there anymore, this job has likely never been used since many months. Let's simply remove it now. Signed-off-by: Thomas Huth Reviewed-by: Daniel P. Berrangé Messag

[PATCH v1 02/11] tests/tcg/sha1: remove endian include

2021-09-17 Thread Alex Bennée
This doesn't exist in BSD world and doesn't seem to be needed by either. Signed-off-by: Alex Bennée Reviewed-by: Warner Losh --- tests/tcg/multiarch/sha1.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/tcg/multiarch/sha1.c b/tests/tcg/multiarch/sha1.c index 87bfbcdf52..0081bd7657 100

[PATCH v1 00/11] testing and plugin pre-PR (configure, gitlab, plugins)

2021-09-17 Thread Alex Bennée
Hi, This is mostly a collection of updates for testing plus a few minor plugin tweaks that didn't seem worth stuffing in a separate series. I think most of this is ready so I'll likely cut a PR from it next week. The following still need review: - tests/tcg: move some multiarch files and make c

[PATCH v1 06/11] python: Update for pylint 2.10

2021-09-17 Thread Alex Bennée
From: John Snow A few new annoyances. Of note is the new warning for an unspecified encoding when opening a text file, which actually does indicate a potentially real problem; see https://www.python.org/dev/peps/pep-0597/#motivation Use LC_CTYPE to determine an encoding to use for interpreting Q

[PATCH v4 0/8] qapi: Add support for aliases

2021-09-17 Thread Kevin Wolf
This series introduces alias definitions for QAPI object types (structs and unions). This allows using the same QAPI type and visitor even when the syntax has some variations between different external interfaces such as QMP and the command line. It also provides a new tool for evolving the schem

[PATCH v1 03/11] tests/tcg: move some multiarch files and make conditional

2021-09-17 Thread Alex Bennée
We had some messy code to filter out stuff we can't build. Lets junk that and simplify the logic by pushing some stuff into subdirs. In particular we move: float_helpers into libs - not a standalone test linux-test into linux - so we only build on Linux hosts This allows for at least some of

[PATCH v4 8/8] tests/qapi-schema: Test cases for aliases

2021-09-17 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/unit/test-qmp-cmds.c| 10 + tests/unit/test-qobject-input-visitor.c | 271 ++ tests/qapi-schema/alias-bad-type.err | 2 + tests/qapi-schema/alias-bad-type.json | 3 + tests/qapi-schema/alias-bad-ty

[PATCH v1 01/11] configure: don't override the selected host test compiler if defined

2021-09-17 Thread Alex Bennée
There are not many cases you would want to do this but one is if you want to use a test friendly compiler like gcc instead of a system compiler like clang. Either way we should honour the users choice if they have made it. Signed-off-by: Alex Bennée Cc: Warner Losh --- configure | 7 +-- 1

[PATCH v4 1/8] qapi: Add interfaces for alias support to Visitor

2021-09-17 Thread Kevin Wolf
This adds functions to the Visitor interface that can be used to define aliases and alias scopes. Signed-off-by: Kevin Wolf --- include/qapi/visitor-impl.h | 12 include/qapi/visitor.h | 59 ++--- qapi/qapi-visit-core.c | 22 ++ 3 fi

[PATCH v4 5/8] qapi: Apply aliases in qobject-input-visitor

2021-09-17 Thread Kevin Wolf
When looking for an object in a struct in the external representation, check not only the currently visited struct, but also whether an alias in the current StackObject matches and try to fetch the value from the alias then. Providing two values for the same object through different aliases is an e

[PATCH v4 6/8] qapi: Revert an accidental change from list to view object

2021-09-17 Thread Kevin Wolf
From: Markus Armbruster A long time ago, commit 23a4b2c6f1 "qapi: Eliminate QAPISchemaObjectType.check() variable members" replaced the manual building of the list of members by seen.values(), where @seen is an OrderedDict mapping names to members. The list is then stored in self.members. With

[PATCH v4 2/8] qapi: Remember alias definitions in qobject-input-visitor

2021-09-17 Thread Kevin Wolf
This makes qobject-input-visitor remember the currently valid aliases in each StackObject. It doesn't actually allow using the aliases yet. Signed-off-by: Kevin Wolf --- qapi/qobject-input-visitor.c | 153 +++ 1 file changed, 153 insertions(+) diff --git a/qapi/q

[PATCH v4 7/8] qapi: Add support for aliases

2021-09-17 Thread Kevin Wolf
Introduce alias definitions for object types (structs and unions). This allows using the same QAPI type and visitor for many syntax variations that exist in the external representation, like between QMP and the command line. It also provides a new tool for evolving the schema while maintaining back

Re: [PATCH v2] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-09-17 Thread Eric Blake
On Wed, Sep 15, 2021 at 12:11:35PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > > >There are two methods of terminating the transmission phase: > > > >... > > > >"The client or the server drops the TCP session (in which case it > > > >SHOULD shut down the TLS session first). This

Re: Rust in Qemu BoF followup: Rust vs. qemu platform support

2021-09-17 Thread Warner Losh
On Fri, Sep 17, 2021 at 5:35 AM Daniel P. Berrangé wrote: > On Fri, Sep 17, 2021 at 06:58:37PM +1000, David Gibson wrote: > > Hi all, > > > > At the qemu-in-rust BoF at KVM Forum, I volunteered to look into > > whether Rust supported all the host/build platforms that qemu does, > > which is obvio

[PATCH v4 3/8] qapi: Simplify full_name_nth() in qobject-input-visitor

2021-09-17 Thread Kevin Wolf
Instead of counting how many elements from the top of the stack we need to ignore until we find the thing we're interested in, we can just directly pass the StackObject pointer because all callers already know it. We only need a different way now to tell if we want to know the name of something co

[PATCH v4 4/8] qapi: Store Error in StackObject.h for qobject-input-visitor

2021-09-17 Thread Kevin Wolf
StackObject.h is a GHashTable that stores all keys in the input that haven't been consumed yet. If qobject_input_check_struct() still finds any entry, an error is returned because the input was unexpected. The value of hash table entries is currently unused (always NULL). The next patch implements

Re: [PATCH v2] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-09-17 Thread Eric Blake
On Wed, Sep 15, 2021 at 10:00:25AM +0100, Richard W.M. Jones wrote: > > >I would say the spec is at best contradictory, but if you read other > > >parts of the spec, then it's pretty clear that we're allowed to drop > > >the connection whenever we like. This section says as much: > > > > > >https:

Re: Rust in Qemu BoF followup: Rust vs. qemu platform support

2021-09-17 Thread Stefan Hajnoczi
On Fri, Sep 17, 2021 at 12:34:29PM +0100, Daniel P. Berrangé wrote: > On Fri, Sep 17, 2021 at 06:58:37PM +1000, David Gibson wrote: > > Hi all, > > > > At the qemu-in-rust BoF at KVM Forum, I volunteered to look into > > whether Rust supported all the host/build platforms that qemu does, > > which

Re: Rust in Qemu BoF followup: Rust vs. qemu platform support

2021-09-17 Thread Stefan Hajnoczi
On Fri, Sep 17, 2021 at 01:11:56PM +0200, Philippe Mathieu-Daudé wrote: > Le ven. 17 sept. 2021 10:58, David Gibson a > écrit : > > > Hi all, > > > > At the qemu-in-rust BoF at KVM Forum, I volunteered to look into > > whether Rust supported all the host/build platforms that qemu does, > > which

Re: [PATCH 14/15] python/aqmp: Remove scary message

2021-09-17 Thread John Snow
On Fri, Sep 17, 2021 at 10:39 AM Hanna Reitz wrote: > On 17.09.21 07:40, John Snow wrote: > > The scary message interferes with the iotests output. Coincidentally, if > > iotests works by removing this, then it's good evidence that we don't > > really need to scare people away from using it. > >

Re: [PATCH v3] target/ppc: Fix 64-bit decrementer

2021-09-17 Thread Richard Henderson
On 9/17/21 7:10 AM, Cédric Le Goater wrote: On 9/17/21 16:00, Luis Fernando Fujita Pires wrote: From: Cédric Le Goater +    target_long signed_value; +    target_long signed_decr; Since these values will be the results of sextract64, it's probably better to define them as int64_t. but then

Re: [PATCH 1/9] bsd-user: Apply e6deac9cf99 from linux-user (zero anonymous memory)

2021-09-17 Thread Warner Losh
On Fri, Sep 17, 2021 at 9:02 AM Philippe Mathieu-Daudé wrote: > On 9/17/21 4:56 AM, Warner Losh wrote: > > From: Mikaël Urankar > > > > linux-user/mmap.c: Always zero MAP_ANONYMOUS memory in mmap_frag() > > Please use it as subject, "bsd-user/mmap: Always zero MAP_ANONYMOUS > memory in mmap_frag

Re: [RFC PATCH 3/3] tests/tcg: commit Makefile atrocities in the name of portability

2021-09-17 Thread Warner Losh
On Fri, Sep 17, 2021 at 8:39 AM Alex Bennée wrote: > > Warner Losh writes: > > > On Tue, Aug 3, 2021 at 5:02 AM Alex Bennée > wrote: > > > > Not all of the multiarch tests are pure POSIX so elide over those > > tests on a non-Linux system. This allows for at least some of the > > tests to be

Re: [PATCH 5/9] bsd-user: mmap prefer MAP_ANON for BSD

2021-09-17 Thread Philippe Mathieu-Daudé
On 9/17/21 4:56 AM, Warner Losh wrote: > MAP_ANON and MAP_ANONYMOUS are identical. Prefer MAP_ANON for BSD since > the file is now a confusing mix of the two. > > Signed-off-by: Warner Losh > --- > bsd-user/mmap.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) Reviewed-by:

Re: [PATCH 3/9] bsd-user: MAP_ symbols are defined, so no need for ifdefs

2021-09-17 Thread Philippe Mathieu-Daudé
On 9/17/21 4:56 AM, Warner Losh wrote: > All these MAP_ symbols are always defined on supported FreeBSD versions > (12.2 and newer), so remove the #ifdefs since they aren't needed. > > Signed-off-by: Warner Losh > --- > bsd-user/mmap.c | 14 -- > 1 file changed, 14 deletions(-) Revi

Re: [PATCH v3 6/6] tests/qapi-schema: Test cases for aliases

2021-09-17 Thread Kevin Wolf
Am 17.09.2021 um 10:26 hat Markus Armbruster geschrieben: > >> When exactly are collisions an error? How exactly are non-erroneous > >> collisions resolved? qapi-code-gen.rst needs to answer this. > > > > The strategy implemented in this version is: Collisions are generally an > > error, except f

Re: [PATCH 1/9] bsd-user: Apply e6deac9cf99 from linux-user (zero anonymous memory)

2021-09-17 Thread Philippe Mathieu-Daudé
On 9/17/21 4:56 AM, Warner Losh wrote: > From: Mikaël Urankar > > linux-user/mmap.c: Always zero MAP_ANONYMOUS memory in mmap_frag() Please use it as subject, "bsd-user/mmap: Always zero MAP_ANONYMOUS memory in mmap_frag()" Then describe: Similar to the equivalent linux-user commit e6deac9cf99

Re: [PATCH RFC 3/5] qapi: Move compat policy from QObject to generic visitor

2021-09-17 Thread Eric Blake
On Wed, Sep 15, 2021 at 09:24:23PM +0200, Markus Armbruster wrote: > The next commit needs to access compat policy from the generic visitor > core. Move it there from qobject input and output visitor. > > Signed-off-by: Markus Armbruster > --- Reviewed-by: Eric Blake -- Eric Blake, Principal

Re: [PATCH RFC 2/5] qapi: Add feature flags to enum members

2021-09-17 Thread Peter Krempa
On Wed, Sep 15, 2021 at 21:24:22 +0200, Markus Armbruster wrote: > This is quite similar to commit 84ab008687 "qapi: Add feature flags to > struct members", only for enums instead of structs. For now in libvirt I've implemented the validator for the 'deprecated' flag: https://gitlab.com/pipo.sk/l

Re: plugins: Missing Store Exclusive Memory Accesses

2021-09-17 Thread Aaron Lindsay via
On Sep 17 12:05, Alex Bennée wrote: > Aaron Lindsay writes: > > In looking at QEMU's source, I *think* this is because the > > `gen_store_exclusive` function in translate-a64.c is not making the same > > calls to `plugin_gen_mem_callbacks` & company that are being made by > > "normal" stores handl

Re: [PATCH RFC 2/5] qapi: Add feature flags to enum members

2021-09-17 Thread Eric Blake
On Wed, Sep 15, 2021 at 09:24:22PM +0200, Markus Armbruster wrote: > This is quite similar to commit 84ab008687 "qapi: Add feature flags to > struct members", only for enums instead of structs. > > Signed-off-by: Markus Armbruster > --- Reviewed-by: Eric Blake -- Eric Blake, Principal Softwar

Re: [PATCH 15/15] python, iotests: replace qmp with aqmp

2021-09-17 Thread John Snow
On Fri, Sep 17, 2021 at 10:40 AM Hanna Reitz wrote: > On 17.09.21 07:40, John Snow wrote: > > Swap out the synchronous QEMUMonitorProtocol from qemu.qmp with the sync > > wrapper from qemu.aqmp instead. > > > > Add an escape hatch in the form of the environment variable > > QEMU_PYTHON_LEGACY_QMP

Re: [PATCH RFC 1/5] qapi: Enable enum member introspection to show more than name

2021-09-17 Thread Peter Krempa
On Wed, Sep 15, 2021 at 21:24:21 +0200, Markus Armbruster wrote: > The next commit will add feature flags to enum members. There's a > problem, though: query-qmp-schema shows an enum type's members as an > array of member names (SchemaInfoEnum member @values). If it showed > an array of objects w

Re: [RFC PATCH 3/3] tests/tcg: commit Makefile atrocities in the name of portability

2021-09-17 Thread Alex Bennée
Warner Losh writes: > On Tue, Aug 3, 2021 at 5:02 AM Alex Bennée wrote: > > Not all of the multiarch tests are pure POSIX so elide over those > tests on a non-Linux system. This allows for at least some of the > tests to be nominally usable by *BSD user builds. > > Signed-off-by: Alex Benn

Re: [PATCH 13/15] iotests: Accommodate async QMP Exception classes

2021-09-17 Thread Hanna Reitz
On 17.09.21 07:40, John Snow wrote: (But continue to support the old ones for now, too.) There are very few cases of any user of QEMUMachine or a subclass thereof relying on a QMP Exception type. If you'd like to check for yourself, you want to grep for all of the derivatives of QMPError, exclud

Re: [PATCH v3 00/17] iotests: support zstd

2021-09-17 Thread Hanna Reitz
On 15.09.21 16:45, Hanna Reitz wrote: On 14.09.21 12:25, Vladimir Sementsov-Ogievskiy wrote: These series makes tests pass with     IMGOPTS='compression_type=zstd' Also, python iotests start to support IMGOPTS (they didn't before). Unfortunately, the problem I have now is that it makes the t

[PATCH v2 04/23] qapi: Convert simple union InputEvent to flat one

2021-09-17 Thread Markus Armbruster
Simple unions predate flat unions. Having both complicates the QAPI schema language and the QAPI generator. We haven't been using simple unions in new code for a long time, because they are less flexible and somewhat awkward on the wire. To prepare for their removal, convert simple union InputEv

  1   2   3   >