[PATCH 3/4] qemu-iotests: let "check" spawn an arbitrary test command

2021-03-23 Thread Paolo Bonzini
Right now there is no easy way for "check" to print a reproducer command. Because such a reproducer command line would be huge, we can instead teach check to start a command of our choice. This can be for example a Python unit test with arguments to only run a specific subtest. Signed-off-by: Pao

[PATCH 2/4] qemu-iotests: move command line and environment handling from TestRunner to TestEnv

2021-03-23 Thread Paolo Bonzini
In the next patch, "check" will learn how to execute a test script without going through TestRunner. To enable this, keep only the text output and subprocess handling in the TestRunner; move into TestEnv the logic to prepare for running a subprocess. Signed-off-by: Paolo Bonzini --- tests/qemu-

Re: [RFC] adding a generic QAPI event for failed device hotunplug

2021-03-23 Thread Igor Mammedov
On Tue, 23 Mar 2021 14:33:28 +1100 David Gibson wrote: > On Mon, Mar 22, 2021 at 01:06:53PM +0100, Paolo Bonzini wrote: > > On 22/03/21 07:39, David Gibson wrote: > > > > QEMU doesn't really keep track of "in flight" unplug requests, and as > > > > long as that's the case, its timeout even will

Re: [PATCH 04/28] tests/qapi-schema: Belatedly update comment on alternate clash

2021-03-23 Thread John Snow
On 3/23/21 5:40 AM, Markus Armbruster wrote: Commit 0426d53c65 "qapi: Simplify visiting of alternate types" eliminated the implicit alternate enum, but neglected to update a comment about it in a test. Do that now. Signed-off-by: Markus Armbruster Reviewed-by: John Snow --- tests/qapi-s

Re: [PATCH 2/2] Support monitor chardev hotswap with QMP

2021-03-23 Thread Li Zhang
Hi, Any comments about this patch? Thanks Li On Mon, Mar 15, 2021 at 6:07 PM Li Zhang wrote: > From: Li Zhang > > For some scenarios, it needs to hot-add a monitor device. > But QEMU doesn't support hotplug yet. It also works by adding > a monitor with null backend by default and then change

Re: [PATCH 05/28] tests/qapi-schema: Drop TODO comment on simple unions

2021-03-23 Thread John Snow
On 3/23/21 5:40 AM, Markus Armbruster wrote: Simple unions don't need more features, they need to die. I'm willing to defer to your will here. (And I'm not willing to implement enum discriminators to spite you.) Signed-off-by: Markus Armbruster Reviewed-by: John Snow --- tests/qapi-

Re: [PATCH 06/28] tests/qapi-schema: Tweak to demonstrate buggy member name check

2021-03-23 Thread John Snow
On 3/23/21 5:40 AM, Markus Armbruster wrote: Member name 'u' and names starting with 'has-' or 'has_' are reserved for the generator. check_type() enforces this, covered by tests reserved-member-u and reserved-member-has. These tests neglect to cover optional members, where the name starts with

Re: [PATCH 07/28] qapi: Fix to reject optional members with reserved names

2021-03-23 Thread John Snow
On 3/23/21 5:40 AM, Markus Armbruster wrote: check_type() fails to reject optional members with reserved names, because it neglects to strip off the leading '*'. Fix that. The stripping in check_name_str() is now useless. Drop. Also drop the "no leading '*'" assertion, because valid_name.matc

Re: [PATCH v10 6/7] hw/pci-host: Add emulation of Marvell MV64361 PPC system controller

2021-03-23 Thread BALATON Zoltan
On Tue, 23 Mar 2021, David Gibson wrote: On Wed, Mar 17, 2021 at 02:17:51AM +0100, BALATON Zoltan wrote: The Marvell Discovery II aka. MV64361 is a PowerPC system controller chip that is used on the pegasos2 PPC board. This adds emulation of it that models the device enough to boot guests on thi

Re: [PATCH] [NFC] Mark locally used symbols as static.

2021-03-23 Thread Stefan Hajnoczi
On Mon, Mar 22, 2021 at 10:55:42PM +0300, Yuri Gribov wrote: > diff --git a/scripts/tracetool/format/c.py b/scripts/tracetool/format/c.py > index c390c18..7e89ba3 100644 > --- a/scripts/tracetool/format/c.py > +++ b/scripts/tracetool/format/c.py > @@ -49,7 +49,7 @@ def generate(events, backend, gro

Re: [PATCH] [NFC] Mark locally used symbols as static.

2021-03-23 Thread Stefan Hajnoczi
On Mon, Mar 22, 2021 at 10:55:42PM +0300, Yuri Gribov wrote: > scripts/tracetool/format/c.py | 2 +- My Reviewed-by is specifically for this tracetool file. Stefan signature.asc Description: PGP signature

Re: [Virtio-fs] [External] Re: [RFC PATCH 0/9] Support for Virtio-fs daemon crash reconnection

2021-03-23 Thread Stefan Hajnoczi
On Mon, Mar 22, 2021 at 04:13:26PM -0400, Vivek Goyal wrote: > On Mon, Mar 22, 2021 at 11:00:52AM +, Stefan Hajnoczi wrote: > > On Wed, Mar 17, 2021 at 08:32:31PM +0800, Jiachen Zhang wrote: > > > On Wed, Mar 17, 2021 at 6:05 PM Stefan Hajnoczi > > > wrote: > > > > On Fri, Dec 18, 2020 at 05:

[PATCH v3 0/3] spapr: nvdimm: Enable sync-dax property for nvdimm

2021-03-23 Thread Shivaprasad G Bhat
The nvdimm devices are expected to ensure write persistence during power failure kind of scenarios. The libpmem has architecture specific instructions like dcbf on power to flush the cache data to backend nvdimm device during normal writes. Qemu - virtual nvdimm devices are memory mapped. The dcb

[PATCH v3 1/3] spapr: nvdimm: Forward declare and move the definitions

2021-03-23 Thread Shivaprasad G Bhat
The subsequent patches add definitions which tend to get the compilation to cyclic dependency. So, prepare with forward declarations, move the defitions and clean up. Signed-off-by: Shivaprasad G Bhat --- hw/ppc/spapr_nvdimm.c | 12 include/hw/ppc/spapr_nvdimm.h | 21 +++

[PATCH v3 3/3] spapr: nvdimm: Enable sync-dax device property for nvdimm

2021-03-23 Thread Shivaprasad G Bhat
The patch adds the 'sync-dax' property to the nvdimm device. When the sync-dax is 'off', the device tree property "hcall-flush-required" is added to the nvdimm node which makes the guest to issue H_SCM_FLUSH hcalls to request for flushes explicitly. This would be the default behaviour without sync

[PATCH v3 0/9] simplebench improvements

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here are some improvements to simplebench lib, to support my "qcow2: compressed write cache" series. v3: 01: use simpler logic 02,04-06: add John's r-b 07: use BooleanOptionalAction and initial_run=args.initial_run 08: rewrite so that we have a new --drop-caches option Vladimir Semen

[PATCH v3 2/3] spapr: nvdimm: Implement H_SCM_FLUSH hcall

2021-03-23 Thread Shivaprasad G Bhat
The patch adds support for the SCM flush hcall for the nvdimm devices. To be available for exploitation by guest through the next patch. The hcall expects the semantics such that the flush to return with H_BUSY when the operation is expected to take longer time along with a continue_token. The hca

[PATCH v3 1/9] simplebench: bench_one(): add slow_limit argument

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Sometimes one of cells in a testing table runs too slow. And we really don't want to wait so long. Limit number of runs in this case. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/simplebench/simplebench.py | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --gi

[PATCH v3 2/9] simplebench: bench_one(): support count=1

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
statistics.stdev raises if sequence length is less than two. Support that case by hand. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- scripts/simplebench/simplebench.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/simplebench/simpleben

[PATCH v3 3/9] simplebench/bench-backup: add --compressed option

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Allow bench compressed backup. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/simplebench/bench-backup.py| 55 ++ scripts/simplebench/bench_block_job.py | 23 +++ 2 files changed, 62 insertions(+), 16 deletions(-) diff --git a/scripts/simplebench/ben

[PATCH v3 6/9] simplebench/bench-backup: support qcow2 source files

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Add support for qcow2 source. New option says to use test-source.qcow2 instead of test-source. Of course, test-source.qcow2 should be precreated. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- scripts/simplebench/bench-backup.py| 5 + scripts/simplebench/bench_bl

[PATCH v3 4/9] simplebench/bench-backup: add target-cache argument

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Allow benchmark with different kinds of target cache. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- scripts/simplebench/bench-backup.py| 33 -- scripts/simplebench/bench_block_job.py | 10 +--- 2 files changed, 33 insertions(+), 10 deleti

[PATCH v3 9/9] MAINTAINERS: update Benchmark util: add git tree

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9147e9a429..7d83d64d14 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2531,6 +2531,7 @@ Benchmark util M: Vladimir Sementsov-Ogievskiy S: Maintained

Re: [PATCH V13 2/9] meson.build: Re-enable KVM support for MIPS

2021-03-23 Thread Philippe Mathieu-Daudé
Hi Huacai, We are going to tag QEMU v6.0-rc0 today. I only have access to a 64-bit MIPS in little-endian to test KVM. Can you test the other configurations please? - 32-bit BE - 32-bit LE - 64-bit BE Thanks! Phil. On 11/22/20 4:31 AM, Huacai Chen wrote: > +CC Jiaxun > > Hi, Jiaxun, > > What

Re: [PATCH 1/8] virtiofsd: Changed allocations of fuse_req to GLib functions

2021-03-23 Thread Stefan Hajnoczi
On Fri, Mar 19, 2021 at 03:25:20PM +0200, Mahmoud Mandour wrote: > Replaced the allocation and deallocation of fuse_req structs > using calloc()/free() call pairs to a GLib's g_try_new0() > and g_free(). > > Signed-off-by: Mahmoud Mandour > --- > tools/virtiofsd/fuse_lowlevel.c | 6 +++--- > 1 f

[PATCH v3 5/9] simplebench/bench_block_job: handle error in BLOCK_JOB_COMPLETED

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
We should not report success if there is an error in final event. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- scripts/simplebench/bench_block_job.py | 4 1 file changed, 4 insertions(+) diff --git a/scripts/simplebench/bench_block_job.py b/scripts/simplebench/b

Re: [PATCH 03/28] tests/qapi-schema: Rework comments on longhand member definitions

2021-03-23 Thread Eric Blake
On 3/23/21 8:00 AM, John Snow wrote: > On 3/23/21 5:40 AM, Markus Armbruster wrote: >> +# event 'data' member with dict value is (longhand) argument >> +# definition, not inline complex type > > I have to be a weenie and say I don't know exactly what this comment is > telling me. > > (1) What's a

Re: [PATCH 03/28] tests/qapi-schema: Rework comments on longhand member definitions

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > A few old comments talk about "desired future use of defaults" and > "anonymous inline branch types". Kind of misleading since commit > 87adbbffd4 "qapi: add a dictionary form for TYPE" added longhand > member definitions. Talk about that instead. >

Re: [PULL 0/1] xen queue 2021-03-23

2021-03-23 Thread Anthony PERARD via
On Tue, Mar 23, 2021 at 05:09:45AM -0700, no-re...@patchew.org wrote: > ERROR: Author email address is mangled by the mailing list > #2: > Author: Anthony PERARD via The actual commit in the pull request is fine. I didn't work around the email issue when sending pull request, but I've worked ar

[PATCH v3 7/9] simplebench/bench-backup: add --count and --no-initial-run

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Add arguments to set number of test runs per table cell and to disable initial run that is not counted in results. It's convenient to set --count 1 --no-initial-run to fast run test onece, and to set --count to some large enough number for good precision of the results. Signed-off-by: Vladimir Se

[PATCH v3 8/9] simplebench/bench-backup: add --drop-caches argument

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
Add an option to drop caches before each test run. It may probably improve reliability of results when testing in cached mode. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/simplebench/bench-backup.py | 6 +- scripts/simplebench/simplebench.py | 11 ++- 2 files changed, 1

Re: [PATCH 2/8] virtiofds: Changed allocations of iovec to GLib's functions

2021-03-23 Thread Stefan Hajnoczi
On Fri, Mar 19, 2021 at 03:25:21PM +0200, Mahmoud Mandour wrote: > @@ -629,9 +628,6 @@ int fuse_reply_ioctl_retry(fuse_req_t req, const struct > iovec *in_iov, > > res = send_reply_iov(req, 0, iov, count); > out: > -free(in_fiov); > -free(out_fiov); > - > return res; > > en

Re: [PATCH 4/8] virtiofsd: Changed allocations of fuse_session to GLib's functions

2021-03-23 Thread Stefan Hajnoczi
On Fri, Mar 19, 2021 at 03:25:23PM +0200, Mahmoud Mandour wrote: > Replaced the allocation and deallocation of fuse_session structs > from calloc() and free() calls to g_new0() and g_free(). > > Removed the NULL-check and used g_new0() mainly because fuse_session > creation is critical and an exit

Re: [PATCH 6/8] virtiofsd: Changed allocations of fv_VuDev & its internals to GLib functions

2021-03-23 Thread Stefan Hajnoczi
On Fri, Mar 19, 2021 at 03:25:25PM +0200, Mahmoud Mandour wrote: > Changed the allocations of fv_VuDev structs, VuDev structs, and > fv_QueueInfo strcuts from using calloc()/realloc() & free() to using > the equivalent functions from GLib. > > In instances, removed the pair of allocation and asser

Re: [PATCH 3/8] virtiofsd: Changed fuse_pollhandle allocation to GLib's functions

2021-03-23 Thread Stefan Hajnoczi
On Fri, Mar 19, 2021 at 03:25:22PM +0200, Mahmoud Mandour wrote: > Changed allocation of fuse_pollhandle structs to GLib's g_new(). > > Removed the null checking as allocating such a small memory segment > should always succeed on a healthy system. Otherwise, the system > is already in a critical

Re: [PATCH 08/28] qapi: Support flat unions tag values with leading digit

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > Flat union tag values get checked twice: as enum member name, and as > union branch name. The former accepts leading digits, the latter > doesn't. The restriction feels arbitrary. Skip the latter check. > > This can expose c_name() to input it can'

Re: [PATCH 7/8] virtiofsd/passthrough_ll.c: Changed local allocations to GLib functions

2021-03-23 Thread Stefan Hajnoczi
On Fri, Mar 19, 2021 at 03:25:26PM +0200, Mahmoud Mandour wrote: > Changed the allocations of some local variables to GLib's allocation > functions, such as g_try_malloc0(), and annotated those variables > as g_autofree. Subsequently, I was able to remove the calls to free(). > > Signed-off-by: Ma

Re: [PATCH for-6.0] target/arm: Set ARMMMUFaultInfo.level in user-only arm_cpu_tlb_fill

2021-03-23 Thread Peter Maydell
On Mon, 22 Mar 2021 at 14:10, Peter Maydell wrote: > > On Sat, 20 Mar 2021 at 00:06, Richard Henderson > wrote: > > > > Pretend the fault always happens at page table level 3. > > > > Failure to set this leaves level = 0, which is impossible for > > ARMFault_Permission, and produces an invalid sy

Re: [PATCH 09/28] qapi: Lift enum-specific code out of check_name_str()

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > check_name_str() masks leading digits when passed enum_member=True. > Only check_enum() does. Lift the masking into check_enum(). > > Signed-off-by: Markus Armbruster > --- > scripts/qapi/expr.py | 23 ++- > 1 file changed, 10 i

Re: [PULL 00/20] pc,virtio,pci: fixes, features

2021-03-23 Thread Michael S. Tsirkin
On Tue, Mar 23, 2021 at 10:50:05AM +, Peter Maydell wrote: > On Mon, 22 Mar 2021 at 22:56, Michael S. Tsirkin wrote: > > On Mon, Mar 22, 2021 at 06:46:06PM +, Peter Maydell wrote: > > > This happens because pm_update_sci() calls pci_irq_handler(), > > > which calls pci_intx(pci_dev), which

Re: [PATCH 5/8] virtiofsd: Changed allocation of lo_map_elems to GLib's functions

2021-03-23 Thread Stefan Hajnoczi
On Fri, Mar 19, 2021 at 03:25:24PM +0200, Mahmoud Mandour wrote: > Replaced (re)allocation of lo_map_elem structs from realloc() to > GLib's g_try_realloc_n() and replaced the respective free() call > with a g_free(). > > Signed-off-by: Mahmoud Mandour > --- > tools/virtiofsd/passthrough_ll.c |

Re: [PATCH 8/8] virtiofsd/fuse_virtio.c: Changed allocations of locals to GLib

2021-03-23 Thread Stefan Hajnoczi
On Fri, Mar 19, 2021 at 03:25:27PM +0200, Mahmoud Mandour wrote: > @@ -588,7 +587,7 @@ out: > } > > pthread_mutex_destroy(&req->ch.lock); > -free(fbuf.mem); > +g_free(fbuf.mem); > free(req); ^--- was FVRequest allocation changed in a previous patch? Mayb

Re: [PATCH 10/28] qapi: Rework name checking in preparation of stricter checking

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > Naming rules differ for the various kinds of names. To prepare > enforcing them, define functions to check them: check_name_upper(), > check_name_lower(), and check_name_camel(). For now, these merely > wrap around check_name_str(), but that will cha

[PATCH v1] scripts: fix generation update-binfmts templates

2021-03-23 Thread Silvano Cirujano Cuesta
This patch fixes the update-binfmts templates being used in the script scripts/qemu-binfmt-conf.sh when the option --debian is used. Fixed issues are: - Typo in flag 'credentials' (previously 'credential'). - Missing flags 'preserve' and 'fix_binary'. Reference: https://manpages.debian.org/buste

Re: [PATCH 03/28] tests/qapi-schema: Rework comments on longhand member definitions

2021-03-23 Thread John Snow
On 3/23/21 9:58 AM, Eric Blake wrote: On 3/23/21 8:00 AM, John Snow wrote: On 3/23/21 5:40 AM, Markus Armbruster wrote: +# event 'data' member with dict value is (longhand) argument +# definition, not inline complex type I have to be a weenie and say I don't know exactly what this comment is

[PULL 4/7] memory: Add offset_in_region to flatview_cb arguments

2021-03-23 Thread Peter Maydell
The function flatview_for_each_range() calls a callback for each range in a FlatView. Currently the callback gets the start and length of the range and the MemoryRegion involved, but not the offset within the MemoryRegion. Add this to the callback's arguments; we're going to want it for a new use

[PULL 0/7] target-arm queue

2021-03-23 Thread Peter Maydell
: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20210323 for you to fetch changes up to dad90de78e9e9d47cefcbcd30115706b98e6ec87: target/arm: Set ARMMMUFaultInfo.level in user-only arm_cpu_tlb_fill (2021-03-23 14:0

[PULL 5/7] hw/core/loader: Add new function rom_ptr_for_as()

2021-03-23 Thread Peter Maydell
For accesses to rom blob data before or during reset, we have a function rom_ptr() which looks for a rom blob that would be loaded to the specified address, and returns a pointer into the rom blob data corresponding to that address. This allows board or CPU code to say "what is the data that is go

Re: [External] Re: [RFC PATCH 0/9] Support for Virtio-fs daemon crash reconnection

2021-03-23 Thread Stefan Hajnoczi
On Tue, Mar 23, 2021 at 01:54:46PM +0100, Christian Schoenebeck wrote: > On Montag, 22. März 2021 11:54:56 CET Stefan Hajnoczi wrote: > > > > Thanks, Christian. I am still trying to figure out the details of the > > > > ROP > > > > attacks. > > > > > > > > However, QEMU's vhost-user reconnection i

[PULL 6/7] target/arm: Make M-profile VTOR loads on reset handle memory aliasing

2021-03-23 Thread Peter Maydell
For Arm M-profile CPUs, on reset the CPU must load its initial PC and SP from a vector table in guest memory. Because we can't guarantee reset ordering, we have to handle the possibility that the ROM blob loader's reset function has not yet run when the CPU resets, in which case the data in an ELF

[PULL 1/7] hw/arm/virt: Disable pl011 clock migration if needed

2021-03-23 Thread Peter Maydell
From: Gavin Shan A clock is added by commit aac63e0e6ea3 ("hw/char/pl011: add a clock input") since v5.2.0 which corresponds to virt-5.2 machine type. It causes backwards migration failure from upstream to downstream (v5.1.0) when the machine type is specified with virt-5.1. This fixes the issue

[PULL 3/7] memory: Document flatview_for_each_range()

2021-03-23 Thread Peter Maydell
Add a documentation comment describing flatview_for_each_range(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210318174823.18066-3-peter.mayd...@linaro.org --- include/exec/memory.h | 26 -- 1 file change

[PULL 2/7] memory: Make flatview_cb return bool, not int

2021-03-23 Thread Peter Maydell
The return value of the flatview_cb callback passed to the flatview_for_each_range() function is zero if the iteration through the ranges should continue, or non-zero to break out of it. Use a bool for this rather than int. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by

Re: [PATCH v5 00/10] KVM: Dirty ring support (QEMU part)

2021-03-23 Thread Peter Xu
Keqian, On Tue, Mar 23, 2021 at 02:40:43PM +0800, Keqian Zhu wrote: > >> The second question is that you observed longer migration time (55s->73s) > >> when guest > >> has 24G ram and dirty rate is 800M/s. I am not clear about the reason. As > >> with dirty > >> ring enabled, Qemu can get dirty

[PULL 7/7] target/arm: Set ARMMMUFaultInfo.level in user-only arm_cpu_tlb_fill

2021-03-23 Thread Peter Maydell
From: Richard Henderson Pretend the fault always happens at page table level 3. Failure to set this leaves level = 0, which is impossible for ARMFault_Permission, and produces an invalid syndrome, which reaches g_assert_not_reached in cpu_loop. Fixes: 8db94ab4e5db ("linux-user/aarch64: Pass syn

Re: [PATCH 03/28] tests/qapi-schema: Rework comments on longhand member definitions

2021-03-23 Thread John Snow
On 3/23/21 5:40 AM, Markus Armbruster wrote: A few old comments talk about "desired future use of defaults" and "anonymous inline branch types". Kind of misleading since commit 87adbbffd4 "qapi: add a dictionary form for TYPE" added longhand member definitions. Talk about that instead. Signed-

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 16:06, Paolo Bonzini wrote: Python test scripts that use unittest consist of multiple tests. unittest.main allows selecting which tests to run, but currently this is not possible because the iotests wrapper ignores sys.argv. unittest.main command line options also allow the user to pi

Re: [PATCH 13/28] qapi: Enforce event naming rules

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > Event names should be ALL_CAPS with words separated by underscore. > Enforce this. The only offenders are in tests/. Fix them. Existing > test event-case covers the new error. > > Signed-off-by: Markus Armbruster > --- Reviewed-by: Eric Blake -

Re: [PATCH 11/28] qapi: Move uppercase rejection to check_name_lower()

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > check_name_lower() is the only user of check_name_str() using > permit_upper=False. Move the associated code from check_name_str() to > check_name_lower(), and drop the parameter. > > Signed-off-by: Markus Armbruster > --- > scripts/qapi/expr.py |

Re: [PATCH 10/28] qapi: Rework name checking in preparation of stricter checking

2021-03-23 Thread Eric Blake
On 3/23/21 9:30 AM, John Snow wrote: > On 3/23/21 10:20 AM, Eric Blake wrote: >>> -valid_name = re.compile(r'^(__[a-zA-Z0-9.-]+_)?' >>> -    '[a-zA-Z][a-zA-Z0-9_-]*$') >> I'm assuming python concatenates r'' with '' in the obvious manner... >> > > FWIW, I don't think it does, a

Re: [PATCH 10/28] qapi: Rework name checking in preparation of stricter checking

2021-03-23 Thread John Snow
On 3/23/21 10:20 AM, Eric Blake wrote: -valid_name = re.compile(r'^(__[a-zA-Z0-9.-]+_)?' -'[a-zA-Z][a-zA-Z0-9_-]*$') I'm assuming python concatenates r'' with '' in the obvious manner... FWIW, I don't think it does, actually. I believe you do need to spell out each in

Re: [PATCH 12/28] qapi: Consistently permit any case in downstream prefixes

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > We require lowercase __RFQDN_ downstream prefixes only where we > require the prefixed name to be lowercase. Don't; permit any case in > __RFQDN_ prefixes anywhere. > > Signed-off-by: Markus Armbruster > --- > scripts/qapi/expr.py | 2 +- > 1 file

Re: [PATCH] hw/display/bcm2835_fb: Remove DeviceReset() call in DeviceRealize()

2021-03-23 Thread Philippe Mathieu-Daudé
On 3/23/21 1:27 PM, Peter Maydell wrote: > On Sat, 13 Mar 2021 at 17:01, Philippe Mathieu-Daudé wrote: >> >> When QDev objects have their DeviceReset handler set, they >> shouldn't worry about calling it at realization stage (it >> is handled by hw/core/qdev.c::device_set_realized). >> >> Remove t

Re: [PATCH] i386/acpi: restore device paths for pre-5.1 vms

2021-03-23 Thread Michael S. Tsirkin
The issue is with people who installed a VM using 5.1 qemu, migrated to 5.2, booted there and set a config on a device e.g. IP on a NIC. They now have a 5.1 machine type but changing uid back like we do will break these VMs. Unlikley to be common but let's at least create a way for these people to

Re: [PATCH 08/28] qapi: Support flat unions tag values with leading digit

2021-03-23 Thread John Snow
On 3/23/21 5:40 AM, Markus Armbruster wrote: Flat union tag values get checked twice: as enum member name, and as union branch name. The former accepts leading digits, the latter doesn't. The restriction feels arbitrary. Skip the latter check. This can expose c_name() to input it can't handle

Re: [PATCH 14/28] qapi: Enforce type naming rules

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > Type names should be CamelCase. Enforce this. The only offenders are > in tests/. Fix them. Add test type-case to cover the new error. > > Signed-off-by: Markus Armbruster > --- > +++ b/scripts/qapi/expr.py > @@ -61,7 +61,8 @@ def check_name_low

[Bug 1920784] Re: qemu-system-ppc64le fails with kvm acceleration

2021-03-23 Thread Christian Ehrhardt 
I might be spoiled by the s390x-POP style to define instructions, but in the following doc about the PowerISA unfortunately there is no list of reasons-for-SIGILL. Therefore I'm out of options on this waiting for someone - most likely IBM - to chime in. https://wiki.raptorcs.com/w/images/f/f5/Powe

[Bug 1920934] [NEW] Heap-use-after-free in io_writex / cputlb.c results in Linux kernel crashes

2021-03-23 Thread Marco Elver
Public bug reported: qemu version: git 5ca634afcf83215a9a54ca6e66032325b5ffb5f6; 5.2.0 We've encountered that booting the Linux kernel in TCG mode, results in a racy heap-use-after-free. The bug can be detected by ASan [A], but in the majority of runs results in a crashing kernel [B]. To reprodu

Re: [PATCH 1/5] tests: Use the normal yank code instead of stubs in relevant tests

2021-03-23 Thread Lukas Straub
On Tue, 23 Mar 2021 05:46:24 +0100 Thomas Huth wrote: > On 22/03/2021 18.48, Lukas Straub wrote: > > On Mon, 22 Mar 2021 17:00:23 +0100 > > Thomas Huth wrote: > > > >> On 22/03/2021 08.35, Lukas Straub wrote: > >>> On Mon, 22 Mar 2021 06:20:50 +0100 > >>> Thomas Huth wrote: > >>> > >

Re: [PATCH] i386/acpi: restore device paths for pre-5.1 vms

2021-03-23 Thread Vitaly Cheptsov
They can simply set the 5.2 VM version in such a case. I do not want to let this legacy hack to be enabled in any modern QEMU VM version, as it violates ACPI specification and makes the life more difficult for various other software like bootloaders and operating systems. > 23 марта 2021 г., в

Re: [PATCH v1 1/3] migration: Fix missing qemu_fflush() on buffer file in bg_migration_thread

2021-03-23 Thread Peter Xu
On Tue, Mar 23, 2021 at 10:51:57AM +0300, Andrey Gruzdev wrote: > On 22.03.2021 23:17, Peter Xu wrote: > > On Fri, Mar 19, 2021 at 05:52:47PM +0300, Andrey Gruzdev wrote: > > > Added missing qemu_fflush() on buffer file holding precopy device state. > > > Increased initial QIOChannelBuffer allocati

Re: [PATCH 15/28] tests/qapi-schema: Rename redefined-builtin to redefined-predefined

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > The previous commit changed this test to clash with a predefined enum > type, not a built-in type. Adjust its name. > > Signed-off-by: Markus Armbruster > --- > tests/qapi-schema/meson.build | 2 +- > tests/qapi-sc

RE: [PATCH] [NFC] Mark locally used symbols as static.

2021-03-23 Thread Taylor Simpson
> -Original Message- > From: Yuri Gribov > Sent: Monday, March 22, 2021 2:56 PM > To: qemu-devel@nongnu.org > Cc: Richard Henderson ; Laurent Vivier > ; Philippe Mathieu-Daudé ; Chris > Wulff ; David Gibson ; > Palmer Dabbelt ; Taylor Simpson > ; Paolo Bonzini ; Cornelia > Huck ; Max Fil

Re: [PATCH 16/28] qapi: Factor out QAPISchemaParser._check_pragma_list_of_str()

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > scripts/qapi/parser.py | 19 +-- > 1 file changed, 9 insertions(+), 10 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-

Re: [PATCH 17/28] tests/qapi-schema: Rename pragma-*-crap to pragma-value-not-*

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > Rename pragma-doc-required-crap to pragma-not-bool, > pragma-returns-whitelist-crap to pragma-value-not-list, and > pragma-name-case-whitelist-crap to pragma-value-not-list-of-str. > > Signed-off-by: Markus Armbruster > --- Reviewed-by: Eric Blake

Re: [PATCH] i386/acpi: restore device paths for pre-5.1 vms

2021-03-23 Thread Thomas Lamprecht
On 23.03.21 15:55, Vitaly Cheptsov wrote: >> 23 марта 2021 г., в 17:48, Michael S. Tsirkin написал(а): >> >> The issue is with people who installed a VM using 5.1 qemu, >> migrated to 5.2, booted there and set a config on a device >> e.g. IP on a NIC. >> They now have a 5.1 machine type but changi

Re: [PATCH v2] meson: Propagate gnutls dependency to migration

2021-03-23 Thread Juan Quintela
Jessica Clarke wrote: > Commit 3eacf70bb5a83e4775ad8003cbca63a40f70c8c2 neglected to fix this > for softmmu configs, which pull in migration's use of gnutls. > > This fixes the following compilation failure on Arm-based Macs: > > In file included from migration/multifd.c:23: > In file included

Re: [PATCH 18/28] tests/qapi-schema: Rename returns-whitelist to returns-bad-type

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > This test covers returning "bad" types. Pragma returns-whitelist is > just one aspect. Naming it returns-whitelist is suboptimal. Rename > to returns-bad-type. > > Signed-off-by: Markus Armbruster > --- Reviewed-by: Eric Blake -- Eric Blake, P

Re: [PATCH 19/28] qapi: Rename pragma *-whitelist to *-exceptions

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > Rename pragma returns-whitelist to command-returns-exceptions, and > name-case-whitelist to member-name-case-exceptions. > > Signed-off-by: Markus Armbruster > --- Doesn't mention anything about the motivation for this including the desire to move aw

Re: [PATCH 20/28] qapi/pragma: Streamline comments on member-name-exceptions

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > qapi/pragma.json | 16 +--- > 1 file changed, 9 insertions(+), 7 deletions(-) > Reviewed-by: Eric Blake > diff --git a/qapi/pragma.json b/qapi/pragma.json > index 4895848c5e..4c47c802d1 100644

Re: [PATCH 21/28] tests-qmp-cmds: Drop unused and incorrect qmp_TestIfCmd()

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > Commit 967c885108 "qapi: add 'if' to top-level expressions" added > command TestIfCmd with an 'if' condition. It also added the > qmp_TestIfCmd() to go with it, guarded by the corresponding #if. > Commit ccadd6bcba "qapi: Add 'if' to implicit struct m

Re: [PATCH v2] meson: Propagate gnutls dependency to migration

2021-03-23 Thread Daniel P . Berrangé
On Tue, Mar 23, 2021 at 04:04:48PM +0100, Juan Quintela wrote: > Jessica Clarke wrote: > > Commit 3eacf70bb5a83e4775ad8003cbca63a40f70c8c2 neglected to fix this > > for softmmu configs, which pull in migration's use of gnutls. > > > > This fixes the following compilation failure on Arm-based Macs:

Re: [PATCH 22/28] qapi: Prepare for rejecting underscore in command and member names

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > Command names and member names within a type should be all lower case > with words separated by a hyphen. We also accept underscore. Rework > check_name_lower() to optionally reject underscores, but don't use > that option, yet. > > Update expected

Re: [PATCH 23/28] qapi: Enforce feature naming rules

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > Feature names should use '-', not '_'. Enforce this. > > Signed-off-by: Markus Armbruster > --- > scripts/qapi/expr.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thankfully no offenders ;) Reviewed-by: Eric Blake > > diff --git a/

[RFC v11 00/55] arm cleanup experiment for kvm-only build

2021-03-23 Thread Claudio Fontana
Here a new version of the series that enables kvm-only builds. The goal here is to enable the KVM-only build, but there is some additional cleanup too. In this iteration we split helpers in tcg/ into user and sysemu parts, to put into the respective directories. I also had to actually remove the

[RFC v11 01/55] target/arm: move translate modules to tcg/

2021-03-23 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- target/arm/{ => tcg}/translate-a64.h | 0 target/arm/{ => tcg}/translate.h | 0 target/arm/{ => tcg}/a32-uncond.decode| 0 target/arm/{ => tcg}/a32.decode | 0 target/arm/{

[RFC v11 02/55] target/arm: move helpers to tcg/

2021-03-23 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- meson.build | 1 + target/arm/{ => tcg}/op_addsub.h | 0 target/arm/tcg/trace.h | 1 + target/arm/{ => tcg}/vec_internal.h | 0 target/arm/{ => tcg}/crypto_

[RFC v11 04/55] target/arm: tcg: add sysemu and user subdirs

2021-03-23 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Alex Bennée --- target/arm/tcg/meson.build| 3 +++ target/arm/tcg/sysemu/meson.build | 3 +++ target/arm/tcg/user/meson.build | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 target/arm/tcg/sysemu/meson.build create mode 100644

[RFC v11 06/55] target/arm: tcg: move sysemu-only parts of debug_helper

2021-03-23 Thread Claudio Fontana
move sysemu-only parts of debug_helper to sysemu/ Signed-off-by: Claudio Fontana --- target/arm/tcg/debug_helper.c| 27 --- target/arm/tcg/sysemu/debug_helper.c | 33 target/arm/tcg/sysemu/meson.build| 1 + 3 files changed, 34 inserti

[RFC v11 03/55] arm: tcg: only build under CONFIG_TCG

2021-03-23 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- target/arm/tcg/meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build index 0bd4e9d954..3b4146d079 100644 --- a/targe

[RFC v11 07/55] target/arm: tcg: split tlb_helper user-only and sysemu-only parts

2021-03-23 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/arm/tcg/tlb_helper.h| 17 ++ target/arm/tcg/sysemu/tlb_helper.c | 83 ++ target/arm/tcg/tlb_helper.c| 96 ++ target/arm/tcg/user/tlb_helper.c | 31 ++ target/arm/tcg/sysemu/

'make check-acceptance' odd error: "'bytes' object has no attribute 'encode'"

2021-03-23 Thread Peter Maydell
I just got this running 'make check-acceptance': does it ring a bell with anybody? [etc] Fetching asset from tests/acceptance/replay_kernel.py:ReplayKernelSlow.test_mips64el_malta_5KEc_cpio Fetching asset from tests/acceptance/replay_kernel.py:ReplayKernelSlow.test_mips64el_malta_5KEc_cpio Fetchin

Re: [PATCH 24/28] qapi: Enforce command naming rules

2021-03-23 Thread Eric Blake
On 3/23/21 4:40 AM, Markus Armbruster wrote: > Command names should be lower-case. Enforce this. Fix the fixable > offenders (all in tests/), and add the remainder to pragma > command-name-exceptions. > > Signed-off-by: Markus Armbruster > --- > +++ b/qapi/pragma.json > @@ -4,6 +4,24 @@ > # a

[RFC v11 05/55] target/arm: tcg: split mte_helper user-only and sysemu code

2021-03-23 Thread Claudio Fontana
allocation_tag_mem has a different implementation for user-only and sysemu, so move the two implementations into the dedicated subdirs. Signed-off-by: Claudio Fontana --- target/arm/tcg/mte_helper.h| 52 target/arm/tcg/mte_helper.c| 191 + ta

[Bug 1920934] Re: Heap-use-after-free in io_writex / cputlb.c results in Linux kernel crashes

2021-03-23 Thread Peter Maydell
Does this repro with current-head-of-git QEMU ? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1920934 Title: Heap-use-after-free in io_writex / cputlb.c results in Linux kernel crashes Status in

Re: [PULL v2 00/19] pc,virtio,pci: fixes, features

2021-03-23 Thread Peter Maydell
On Mon, 22 Mar 2021 at 22:59, Michael S. Tsirkin wrote: > > Changes from v1: > dropped an acpi patch causing regressions reported by clang > > The following changes since commit f0f20022a0c744930935fdb7020a8c18347d391a: > > Merge remote-tracking branch > 'remotes/thuth-gitlab/tags/pull-requ

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Paolo Bonzini
On 23/03/21 15:34, Vladimir Sementsov-Ogievskiy wrote: +    def __init__(self, *args, **kwargs): +    super().__init__(stream=ReproducibleTextTestRunner.output, *args, **kwargs) over-79 line (PEP8) Ok, thanks. + +def execute_unittest(argv, debug=False): +    """Executes unittests withi

[PULL 0/5] Ui 20210323 patches

2021-03-23 Thread Gerd Hoffmann
The following changes since commit c95bd5ff1660883d15ad6e0005e4c8571604f51a: Merge remote-tracking branch 'remotes/philmd/tags/mips-fixes-20210322' into= staging (2021-03-22 14:26:13 +) are available in the Git repository at: git://git.kraxel.org/qemu tags/ui-20210323-pull-re

[PULL 4/5] include/ui/console.h: Delete is_surface_bgr()

2021-03-23 Thread Gerd Hoffmann
From: Peter Maydell The function is_surface_bgr() is no longer used anywhere, so we can delete it. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210314163927.1184-1-peter.mayd...@linaro.org> Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 10

[PULL 1/5] crypto: add reload for QCryptoTLSCredsClass

2021-03-23 Thread Gerd Hoffmann
From: Zihao Chang This patch adds reload interface for QCryptoTLSCredsClass and implements the interface for QCryptoTLSCredsX509. Signed-off-by: Zihao Chang Acked-by: Daniel P. Berrangé Message-Id: <20210316075845.1476-2-changzih...@huawei.com> Signed-off-by: Gerd Hoffmann --- include/crypto

<    1   2   3   4   5   6   >