Re: [PATCH v2 1/5] qemu-iotests: do not buffer the test output

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 21:54, Vladimir Sementsov-Ogievskiy wrote: +class ReproducibleTestRunner(unittest.TextTestRunner): +    def __init__(self, stream: Optional[io.TextIOBase] = None, + resultclass: Type = ReproducibleTestResult, *args, **kwargs): actually, neither stream nor resultclass

Re: [RFC v10 39/49] target/arm: add tcg cpu accel class

2021-03-23 Thread Claudio Fontana
On 3/23/21 8:26 PM, Alex Bennée wrote: > > Claudio Fontana writes: > >> move init, realizefn and reset code into it. > > w.r.t my testing this is fingered by bisect for causing: > > Running test qtest-aarch64/migration-test > ERROR qtest-aarch64/migration-test - Bail out! > ERROR:../../ta

Re: [PATCH v2 1/2] virtio-pci: add check for vdev in virtio_pci_isr_read

2021-03-23 Thread Yuri Benditovich
Ping On Mon, Mar 15, 2021 at 1:59 PM Yuri Benditovich wrote: > > https://bugzilla.redhat.com/show_bug.cgi?id=1743098 > This commit completes the solution of segfault in hot unplug flow > (by commit ccec7e9603f446fe75c6c563ba335c00cfda6a06). > Added missing check for vdev in virtio_pci_isr_read.

Re: [RFC v10 00/49] arm cleanup experiment for kvm-only build

2021-03-23 Thread Richard Henderson
On 3/23/21 1:20 PM, Claudio Fontana wrote: Also I did a number of different builds: fdfind -0 -t x qemu-system-aarch64 | xargs -0 ls -lh -rwxrwxr-x 1 alex alex 129M Mar 23 18:09 all/qemu-system-aarch64 -rwxrwxr-x 1 alex alex 64M Mar 23 18:16 disable.all/qemu-system-aarch64 -rwxrwxr

Re: [PATCH V4 1/7] qapi/net.json: Add IP_PROTOCOL definition

2021-03-23 Thread Dr. David Alan Gilbert
* Zhang Chen (chen.zh...@intel.com) wrote: > Add IP_PROTOCOL as enum include TCP,UDP, ICMP... for other QMP commands. > > Signed-off-by: Zhang Chen > --- > qapi/net.json | 31 +++ > 1 file changed, 31 insertions(+) > > diff --git a/qapi/net.json b/qapi/net.json > ind

Re: [PATCH 1/1] Set TARGET_PAGE_BITS to be 10 instead of 8 bits

2021-03-23 Thread Michael Rolnik
how long? On Tue, Mar 23, 2021 at 2:46 PM Dr. David Alan Gilbert wrote: > * Michael Rolnik (mrol...@gmail.com) wrote: > > Signed-off-by: Michael Rolnik > > --- > > target/avr/cpu-param.h | 8 +--- > > target/avr/helper.c| 2 -- > > 2 files changed, 1 insertion(+), 9 deletions(-) > > >

Re: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition

2021-03-23 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Zhang, Chen" writes: > > >> -Original Message- > >> From: Markus Armbruster > [...] > >> Naming the argument type L4_Connection is misleading. > >> > >> Even naming the match arguments L4_Connection would be misleading. > >> "Connection"

Re: [PATCH 1/1] Set TARGET_PAGE_BITS to be 10 instead of 8 bits

2021-03-23 Thread Michael Rolnik
If I set TARGET_PAGE_BITS to 12 this *assert assert(v_l2_levels >= 0);* will fail (page_table_config_init function) because TARGET_PHYS_ADDR_SPACE_BITS is 24 bits, because AVR has 24 is the longest pointer AVR has. I can set TARGET_PHYS_ADDR_SPACE_BITS to 32 and TARGET_PAGE_BITS to 12 and everythin

[PATCH 1/4] docs/devel: add 9p.rst

2021-03-23 Thread Christian Schoenebeck
This page has been auto converted from: https://wiki.qemu.org/Documentation/9p by manually grabbing the page's mediawiki source from: https://wiki.qemu.org/index.php?title=Documentation/9p&action=edit and by using 'pandoc' for the actual conversion: pandoc -f mediawiki -t rst foo.txt > d

[PATCH 2/4] docs/devel: add directory for pictures

2021-03-23 Thread Christian Schoenebeck
Add a new subdirectory 'img' and add the (currently) 3 pictures from https://wiki.qemu.org/Documentation/9p into that new directory. Signed-off-by: Christian Schoenebeck --- docs/devel/img/9pfs_control_flow.png | Bin 0 -> 156560 bytes docs/devel/img/9pfs_topology.png | Bin 0 -> 51529 by

[PATCH 3/4] docs/devel/9p: fix references to pictures

2021-03-23 Thread Christian Schoenebeck
The original source https://wiki.qemu.org/Documentation/9p does not use a prefixed path for pictures. The (auto converted) in-tree .rst version of the 9p documentation though uses pictures that are placed into the subdirectory 'img' for not mixing them with .rst files within the same directory, so

[PATCH 0/4] add in-tree 9pfs developers documentation

2021-03-23 Thread Christian Schoenebeck
The original source for the QEMU 9p developers documentation is: https://wiki.qemu.org/Documentation/9p This patch set adds it as in-tree .rst file along with its pictures to the QEMU source tree. The 9p.rst file has been auto generated by 'pandoc'. Preview of generated 9p.rst file with pictur

[PATCH 4/4] MAINTAINERS: add responsibility for docs/devel/9p.rst

2021-03-23 Thread Christian Schoenebeck
Add recently added file docs/devel/9p.rst into responsibility of 9p maintainers. Signed-off-by: Christian Schoenebeck --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9147e9a429..62b1928a38 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1885,6 +

Re: [PATCH v4 03/14] softmmu/physmem: Fix qemu_ram_remap() to handle shared anonymous memory

2021-03-23 Thread Peter Xu
On Fri, Mar 19, 2021 at 11:12:19AM +0100, David Hildenbrand wrote: > RAM_SHARED now also properly indicates shared anonymous memory. Let's check > that flag for anonymous memory as well, to restore the proper mapping. > > Fixes: 06329ccecfa0 ("mem: add share parameter to memory-backend-ram") > Sig

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

2021-03-23 Thread Markus Armbruster
John Snow writes: > On 3/23/21 11:44 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> 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 reserv

Re: [PATCH] hw/pci/pci.c: Assert that pci_irq_handler() inputs are valid

2021-03-23 Thread Philippe Mathieu-Daudé
On 3/23/21 5:46 PM, Peter Maydell wrote: > pci_irq_handler documents that it must be called with 0 <= irq_num <= > 3 and level either 0 or 1. Add assertions that the caller has passed > us in valid arguments. > > In particular, if a device model fails to set the PCI_INTERRUPT_PIN > field in its c

Re: [PATCH v4 09/14] util/mmap-alloc: Pass flags instead of separate bools to qemu_ram_mmap()

2021-03-23 Thread Peter Xu
On Fri, Mar 19, 2021 at 11:12:25AM +0100, David Hildenbrand wrote: > Let's pass flags instead of bools to prepare for passing other flags and > update the documentation of qemu_ram_mmap(). Introduce new QEMU_MAP_ > flags that abstract the mmap() PROT_ and MAP_ flag handling and simplify > it. > >

usb-audio and Mac OS 9.x guests on qemu-system-ppc

2021-03-23 Thread Howard Spoelstra
Hi Gerd, I'm having issues with -device usb-audio and Mac OS 9.x guests on qemu-system-ppc. Command line used: ./qemu-system-ppc -M mac99 -L pc-bios \ -m 512 -boot c \ -device usb-audio \ -drive file=MacOS9.0.img,format=raw,media=disk \ -trace "usb*" Some logging below from Mac OS 9.0 and Fedora

Re: [PATCH v4 10/14] memory: Introduce RAM_NORESERVE and wire it up in qemu_ram_mmap()

2021-03-23 Thread Peter Xu
On Fri, Mar 19, 2021 at 11:12:26AM +0100, David Hildenbrand wrote: > Let's introduce RAM_NORESERVE, allowing mmap'ing with MAP_NORESERVE. The > new flag has the following semantics: > > " > RAM is mmap-ed with MAP_NORESERVE. When set, reserving swap space (or huge > pages if applicable) is skipped

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

2021-03-23 Thread Frank Heimes
Thx Laurent, I took the hirsute master-next source and cherry-picked the patch and it applied cleanly. Now I kicked off a kernel build of this patched kernel in the following PPA: https://launchpad.net/~fheimes/+archive/ubuntu/lp1920784 (however, the builds will take some time to complete) If it

[PATCH v3 4/4] pci: sprinkle assert in PCI pin number

2021-03-23 Thread Isaku Yamahata
If a device model (a) doesn't set the value to a correct interrupt number and then (b) triggers an interrupt for itself, it's device model bug. Add assert on interrupt pin number to catch this kind of bug more obviously. Suggested-by: Peter Maydell Signed-off-by: Isaku Yamahata --- hw/pci/pci.c

[PATCH v3 0/4] Reinitialize ACPI PM device on reset

2021-03-23 Thread Isaku Yamahata
Reinitialize ACPI PM device on reset to get preper device state. Oppertunistically add assert on PCI interrupt pin logic to detect device model issues and workaround for found one. Changes from v2: - reorder patches - split piix4 and v582c686 changes - drop redundant assert in pcic Changes from v

[PATCH v3 2/4] vt82c686.c: don't raise SCI when PCI_INTERRUPT_PIN isn't setup

2021-03-23 Thread Isaku Yamahata
Without this patch, the following patch will triger clan runtime sanitizer warnings as follows. This patch proactively works around it. I leave a correct fix to v582c686.c maintainerfix as I'm not sure about fuloong2e device model. > MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}

Re: [PATCH v4 11/14] util/mmap-alloc: Support RAM_NORESERVE via MAP_NORESERVE under Linux

2021-03-23 Thread Peter Xu
On Fri, Mar 19, 2021 at 11:12:27AM +0100, David Hildenbrand wrote: > Let's support RAM_NORESERVE via MAP_NORESERVE on Linux. The flag has no > effect on most shared mappings - except for hugetlbfs and anonymous memory. > > Linux man page: > "MAP_NORESERVE: Do not reserve swap space for this mapp

[PATCH v3 1/4] acpi/piix4: reinitialize acpi PM device on reset

2021-03-23 Thread Isaku Yamahata
Commit 6be8cf56bc8b made sure that SCI is enabled in PM1.CNT on reset in acpi_only mode by modifying acpi_pm1_cnt_reset() and that worked for q35 as expected. The function was introduced by commit eaba51c573a (acpi, acpi_piix, vt82c686: factor out PM1_CNT logic) that forgot to actually call it a

[PATCH v3 3/4] isa/v582c686: Reinitialize ACPI PM device on reset

2021-03-23 Thread Isaku Yamahata
Commit 6be8cf56bc8b made sure that SCI is enabled in PM1.CNT on reset in acpi_only mode by modifying acpi_pm1_cnt_reset() and that worked for q35 as expected. This patch adds reset ACPI PM related registers on vt82c686 reset time and de-assert sci. via_pm_realize() initializes acpi pm tmr, evt, cn

Re: [PATCH 0/3] tests/acceptance: Handle tests with "cpu" tag

2021-03-23 Thread John Snow
On 3/17/21 3:16 PM, Wainer dos Santos Moschetta wrote: Added John and Eduardo, On 3/9/21 3:52 PM, Cleber Rosa wrote: On Wed, Feb 24, 2021 at 06:26:51PM -0300, Wainer dos Santos Moschetta wrote: Currently the acceptance tests tagged with "machine" have the "-M TYPE" automatically added to the l

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

2021-03-23 Thread Markus Armbruster
Markus Armbruster writes: > John Snow writes: > >> 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

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

2021-03-23 Thread Markus Armbruster
Markus Armbruster writes: > Eric Blake writes: > >> 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, t

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

2021-03-23 Thread Peter Maydell
ilable in the Git repository at: > > https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git > tags/pull-xen-20210323 > > for you to fetch changes up to b807ca3fa0ca29ec015adcf4045e716337cd3635: > > xen-block: Fix removal of backend

Re: Crashes with qemu-system-ppc64

2021-03-23 Thread Mark Cave-Ayland
On 23/03/2021 16:48, Thomas Huth wrote: (adding Markus on CC for comment) In case anyone is interested in fixing those, there are two regressions with qemu-system-ppc64 in the current master branch: $ ./qemu-system-ppc64 -M ppce500 -device macio-oldworld qemu-system-ppc64: ../../devel/qemu/so

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

2021-03-23 Thread Paolo Bonzini
On 23/03/21 20:12, Vladimir Sementsov-Ogievskiy wrote: Move the trailing empty line to print_env(), since it always looks better and one caller was not adding it. Seems you've moved this fix from one unrelated commit to another.. And it touches two extra files. I'd just make it a separate co

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

2021-03-23 Thread Markus Armbruster
Eric Blake writes: > 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

Re: [PATCH v2 2/5] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Paolo Bonzini
On 23/03/21 20:17, Vladimir Sementsov-Ogievskiy wrote: +    unittest.main(argv=argv, +  testRunner=ReproducibleTestRunner, +  verbosity=2 if debug else 1, +  warnings=None if sys.warnoptions else 'ignore')   def execute_setup_common(supported_fmts:

Re: [PATCH 26/28] qapi: Enforce struct member naming rules

2021-03-23 Thread Markus Armbruster
Eric Blake writes: > On 3/23/21 4:40 AM, Markus Armbruster wrote: >> Struct members, including command arguments, event data, and union >> inline base members, should use '-', not '_'. Enforce this. Fix the >> fixable offenders (all in tests/), and add the remainder to pragma >> member-name-exc

Re: [PATCH 28/28] qapi: Enforce union and alternate branch naming rules

2021-03-23 Thread Markus Armbruster
Eric Blake writes: > On 3/23/21 4:40 AM, Markus Armbruster wrote: >> Union branche names should use '-', not '_'. Enforce this. The only > > branch Fixing... >> offenders are in tests/. Fix them. >> >> Signed-off-by: Markus Armbruster >> --- > > Reviewed-by: Eric Blake Thanks!

Re: [RFC PATCH 09/13] blobs: Only install firmware blobs if riscv system targets are built

2021-03-23 Thread Alistair Francis
On Tue, Mar 23, 2021 at 12:41 PM Philippe Mathieu-Daudé wrote: > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > Cc: Palmer Dabbelt > Cc: Alistair Francis > Cc: Sagar Karandikar > Cc: Bastian Koppelmann > Cc: qemu-ri...@nongnu.org > --- > meson.buil

Re: [PATCH v2 08/22] linux-user/riscv: initialise the TaskState heap/stack info

2021-03-23 Thread Alistair Francis
On Tue, Mar 23, 2021 at 1:07 PM Alex Bennée wrote: > > Arguably the target_cpu_copy_regs function for each architecture is > misnamed as a number of the architectures also take the opportunity to > fill out the TaskState structure. This could arguably be factored out > into common code but that wo

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

2021-03-23 Thread John Snow
On 3/23/21 5: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 Sure. Reviewed-by: John Snow --- scripts/qapi/expr.py | 23 ++---

Re: [PATCH 10/22] Python: add utility function for retrieving port redirection

2021-03-23 Thread Cleber Rosa
On Thu, Feb 04, 2021 at 07:25:52PM -0500, John Snow wrote: > On 2/3/21 12:23 PM, Cleber Rosa wrote: > > Slightly different versions for the same utility code are currently > > present on different locations. This unifies them all, giving > > preference to the version from virtiofs_submounts.py, be

Re: [PATCH 19/22] Acceptance Tests: add port redirection for ssh by default

2021-03-23 Thread Cleber Rosa
On Wed, Feb 03, 2021 at 06:51:42PM +0100, Philippe Mathieu-Daudé wrote: > On 2/3/21 6:46 PM, Philippe Mathieu-Daudé wrote: > > On 2/3/21 6:23 PM, Cleber Rosa wrote: > >> For users of the LinuxTest class, let's set up the VM with the port > >> redirection for SSH, instead of requiring each test to s

[PULL 00/29] QAPI patches patches for 2021-03-23

2021-03-23 Thread Markus Armbruster
The following changes since commit 9950da284fa5e2ea9ab57d87e05b693fb60c79ce: Merge remote-tracking branch 'remotes/alistair/tags/pull-riscv-to-apply-20210322-2' into staging (2021-03-23 15:30:46 +) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qapi-

[PULL 01/29] qapi/pragma: Tidy up after removal of deprecated commands

2021-03-23 Thread Markus Armbruster
Commit cbde7be900 "migrate: remove QMP/HMP commands for speed, downtime and cache size" neglected to remove query-migrate-cache-size from pragma returns-whitelist. Commit 8af54b9172 "machine: remove 'query-cpus' QMP command" neglected to remove CpuInfo & friends from pragma name-case-exceptions.

[PULL 05/29] tests/qapi-schema: Drop TODO comment on simple unions

2021-03-23 Thread Markus Armbruster
Simple unions don't need more features, they need to die. Signed-off-by: Markus Armbruster Message-Id: <20210323094025.3569441-6-arm...@redhat.com> Reviewed-by: John Snow --- tests/qapi-schema/flat-union-no-base.err | 2 +- tests/qapi-schema/flat-union-no-base.json | 1 - 2 files changed, 1 in

[PULL 07/29] qapi: Fix to reject optional members with reserved names

2021-03-23 Thread Markus Armbruster
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.match() ensures it can't fail. Fixes: 9fb081e0b984

[PULL 06/29] tests/qapi-schema: Tweak to demonstrate buggy member name check

2021-03-23 Thread Markus Armbruster
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 '*'. Tweak reserved-member-u to fix that. Te

[PULL 13/29] qapi: Enforce event naming rules

2021-03-23 Thread Markus Armbruster
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 Message-Id: <20210323094025.3569441-14-arm...@redhat.com> Reviewed-by: Eric Blake --- t

[PULL 03/29] tests/qapi-schema: Rework comments on longhand member definitions

2021-03-23 Thread Markus Armbruster
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-off-by: Markus Armbruster Message-Id: <2021032

[PULL 09/29] qapi: Lift enum-specific code out of check_name_str()

2021-03-23 Thread Markus Armbruster
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 Message-Id: <20210323094025.3569441-10-arm...@redhat.com> Reviewed-by: Eric Blake --- scripts/qapi/expr.py | 23 ++---

[PULL 25/29] tests/qapi-schema: Switch member name clash test to struct

2021-03-23 Thread Markus Armbruster
Test args-name-clash covers command parameter name clash. This effectively covers struct member name clash as well. The next commit will make parameter name clash impossible. Convert args-name-clash from testing command to testing a struct, and rename it to struct-member-name-clash. Signed-off-

[PULL 14/29] qapi: Enforce type naming rules

2021-03-23 Thread Markus Armbruster
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 Message-Id: <20210323094025.3569441-15-arm...@redhat.com> Reviewed-by: Eric Blake [Regexp simplified, new test made more robus

[PULL 02/29] tests/qapi-schema: Drop redundant flat-union-inline test

2021-03-23 Thread Markus Armbruster
flat-union-inline.json covers longhand branch definition with an invalid type value. It's redundant: longhand branch definition is covered by flat-union-inline-invalid-dict.json, and invalid type value is covered by nested-struct-data.json. Drop the test. Signed-off-by: Markus Armbruster Messag

[PULL 23/29] qapi: Enforce feature naming rules

2021-03-23 Thread Markus Armbruster
Feature names should use '-', not '_'. Enforce this. Signed-off-by: Markus Armbruster Message-Id: <20210323094025.3569441-24-arm...@redhat.com> Reviewed-by: Eric Blake --- scripts/qapi/expr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi/expr.py b/scripts/qa

[PULL 18/29] tests/qapi-schema: Rename returns-whitelist to returns-bad-type

2021-03-23 Thread Markus Armbruster
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 Message-Id: <20210323094025.3569441-19-arm...@redhat.com> Reviewed-by: Eric Blake --- tests/qapi-schema

[PULL 04/29] tests/qapi-schema: Belatedly update comment on alternate clash

2021-03-23 Thread Markus Armbruster
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 Message-Id: <20210323094025.3569441-5-arm...@redhat.com> Reviewed-by: John Snow --- tests/q

[PULL 21/29] tests-qmp-cmds: Drop unused and incorrect qmp_TestIfCmd()

2021-03-23 Thread Markus Armbruster
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 members" changed the command, but not the function. C

[PULL 24/29] qapi: Enforce command naming rules

2021-03-23 Thread Markus Armbruster
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 Message-Id: <20210323094025.3569441-25-arm...@redhat.com> Reviewed-by: Eric Blake --- docs/devel/qapi-code-gen

[PULL 12/29] qapi: Consistently permit any case in downstream prefixes

2021-03-23 Thread Markus Armbruster
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 Message-Id: <20210323094025.3569441-13-arm...@redhat.com> Reviewed-by: Eric Blake --- scripts/qapi/e

[PULL 29/29] block: Remove monitor command block_passwd

2021-03-23 Thread Markus Armbruster
Command block_passwd always fails since Commit c01c214b69 "block: remove all encryption handling APIs" (v2.10.0) turned block_passwd into a stub that always fails, and hardcoded encryption_key_missing to false in query-named-block-nodes and query-block. Commit ad1324e044 "block: remove 'encryptio

[PULL 08/29] qapi: Permit flat union members for any tag value

2021-03-23 Thread Markus Armbruster
Flat union branch names match the tag enum's member names. Omitted branches default to "no members for this tag value". Branch names starting with a digit get rejected like "'data' member '0' has an invalid name". However, omitting the branch works. This is because flat union tag values get che

[PULL 16/29] qapi: Factor out QAPISchemaParser._check_pragma_list_of_str()

2021-03-23 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20210323094025.3569441-17-arm...@redhat.com> Reviewed-by: Eric Blake --- scripts/qapi/parser.py | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index 116afe549a.

[PULL 20/29] qapi/pragma: Streamline comments on member-name-exceptions

2021-03-23 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20210323094025.3569441-21-arm...@redhat.com> Reviewed-by: Eric Blake --- qapi/pragma.json | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/qapi/pragma.json b/qapi/pragma.json index 4895848c5e..4c47c802d1 100644 ---

[PULL 15/29] tests/qapi-schema: Rename redefined-builtin to redefined-predefined

2021-03-23 Thread Markus Armbruster
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 Message-Id: <20210323094025.3569441-16-arm...@redhat.com> Reviewed-by: Eric Blake --- tests/qapi-schema/meson.build

[PULL 27/29] qapi: Enforce enum member naming rules

2021-03-23 Thread Markus Armbruster
Enum members should use '-', not '_'. Enforce this. Fix the fixable offenders (all in tests/), and add the remainder to pragma member-name-exceptions. Signed-off-by: Markus Armbruster Message-Id: <20210323094025.3569441-28-arm...@redhat.com> Reviewed-by: Eric Blake --- qapi/pragma.json

[PULL 11/29] qapi: Move uppercase rejection to check_name_lower()

2021-03-23 Thread Markus Armbruster
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 Message-Id: <20210323094025.3569441-12-arm...@redhat.com> Reviewed-by: Eric Blake ---

[PULL 22/29] qapi: Prepare for rejecting underscore in command and member names

2021-03-23 Thread Markus Armbruster
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 test output for the changed error message. Signed-off-by

[PULL 10/29] qapi: Rework name checking in preparation of stricter checking

2021-03-23 Thread Markus Armbruster
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 change shortly. Replace the other uses of check_name_st

[PULL 28/29] qapi: Enforce union and alternate branch naming rules

2021-03-23 Thread Markus Armbruster
Union branch names should use '-', not '_'. Enforce this. The only offenders are in tests/. Fix them. Signed-off-by: Markus Armbruster Message-Id: <20210323094025.3569441-29-arm...@redhat.com> Reviewed-by: Eric Blake [Commit message typo fixed] --- scripts/qapi/expr.py

[Bug 1915027] Re: RISC-V 64, CPUs do ilegal 0x00 write with SMP

2021-03-23 Thread Alistair Francis
Even with -smp 1 you will see the same errors. The problem is because there is nothing to run after OpenSBI jumps to the next stage. If you load a kernel you will not see the error messages. ** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are

[PULL 17/29] tests/qapi-schema: Rename pragma-*-crap to pragma-value-not-*

2021-03-23 Thread Markus Armbruster
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 Message-Id: <20210323094025.3569441-18-arm...@redhat.com> Reviewed-by: Eric Blake ---

[PATCH v2 02/10] tests/acceptance/virtiofs_submounts.py: evaluate string not length

2021-03-23 Thread Cleber Rosa
If the vmlinuz variable is set to anything that evaluates to True, then the respective arguments should be set. If the variable contains an empty string, than it will evaluate to False, and the extra arguments will not be set. This keeps the same logic, but improves readability a bit. Signed-off

[PATCH v2 01/10] tests/acceptance/virtiofs_submounts.py: add missing accel tag

2021-03-23 Thread Cleber Rosa
The tag is useful to select tests that depend/use a particular feature. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo --- tests/acceptance/virtiofs_submounts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/acceptance/virtiofs_sub

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

2021-03-23 Thread John Snow
On 3/23/21 5: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 insertions(

[PULL 26/29] qapi: Enforce struct member naming rules

2021-03-23 Thread Markus Armbruster
Struct members, including command arguments, event data, and union inline base members, should use '-', not '_'. Enforce this. Fix the fixable offenders (all in tests/), and add the remainder to pragma member-name-exceptions. Signed-off-by: Markus Armbruster Message-Id: <20210323094025.3569441-

[PATCH v2 06/10] Acceptance Tests: make username/password configurable

2021-03-23 Thread Cleber Rosa
This makes the username/password used for authentication configurable, because some guest operating systems may have restrictions on accounts to be used for logins, and it just makes it better documented. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 6 -- 1 file

[PULL 19/29] qapi: Rename pragma *-whitelist to *-exceptions

2021-03-23 Thread Markus Armbruster
Rename pragma returns-whitelist to command-returns-exceptions, and name-case-whitelist to member-name-case-exceptions. Signed-off-by: Markus Armbruster Message-Id: <20210323094025.3569441-20-arm...@redhat.com> Reviewed-by: Eric Blake --- docs/devel/qapi-code-gen.txt | 21 ++

[PATCH v2 09/10] Acceptance Tests: add basic documentation on LinuxTest base class

2021-03-23 Thread Cleber Rosa
Signed-off-by: Cleber Rosa Reviewed-by: Marc-André Lureau Reviewed-by: Willian Rampazzo --- docs/devel/testing.rst | 25 + 1 file changed, 25 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 1da4c4e4c4..ed2a06db28 100644 --- a/docs/devel/

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

2021-03-23 Thread John Snow
On 3/23/21 5: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 change sh

[PATCH v2 05/10] Acceptance Tests: add port redirection for ssh by default

2021-03-23 Thread Cleber Rosa
For users of the LinuxTest class, let's set up the VM with the port redirection for SSH, instead of requiring each test to set the same arguments. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 4 +++- tests/acceptance/virtiofs_submounts.py| 4 2 files change

[PATCH v2 10/10] Acceptance Tests: introduce CPU hotplug test

2021-03-23 Thread Cleber Rosa
Even though there are qtest based tests for hotplugging CPUs (from which this test took some inspiration from), this one adds checks from a Linux guest point of view. It should also serve as an example for tests that follow a similar pattern and need to interact with QEMU (via qmp) and with the Li

[PATCH v2 00/10] Acceptance Test: introduce base class for Linux based tests

2021-03-23 Thread Cleber Rosa
This introduces a base class for tests that need to interact with a Linux guest. It generalizes the "boot_linux.py" code, already been used by the "virtiofs_submounts.py" and also SSH related code being used by that and "linux_ssh_mips_malta.py". While at it, a number of fixes on hopeful improvem

Re: [PATCH v1 0/3] migration: Fixes to the 'background-snapshot' code

2021-03-23 Thread Peter Xu
On Fri, Mar 19, 2021 at 05:52:46PM +0300, Andrey Gruzdev wrote: > Changes v0->v1: > * Using qemu_real_host_page_size instead of TARGET_PAGE_SIZE for host >page size in ram_block_populate_pages() > * More elegant implementation of ram_block_populate_pages() > > This patch series contains: >

Re: [PATCH v7 1/8] vt82c686: Implement control of serial port io ranges via config regs

2021-03-23 Thread Mark Cave-Ayland
On 23/03/2021 12:54, BALATON Zoltan wrote: On Wed, 10 Mar 2021, BALATON Zoltan wrote: In VIA super south bridge the io ranges of superio components (parallel and serial ports and FDC) can be controlled by superio config registers to set their base address and enable/disable them. This is not ea

[PATCH v2 03/10] Python: add utility function for retrieving port redirection

2021-03-23 Thread Cleber Rosa
Slightly different versions for the same utility code are currently present on different locations. This unifies them all, giving preference to the version from virtiofs_submounts.py, because of the last tweaks added to it. While at it, this adds a "qemu.utils" module to host the utility function

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

2021-03-23 Thread John Snow
On 3/23/21 5: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 Reviewed-by: John Snow --- script

[PATCH v2 04/10] Acceptance Tests: move useful ssh methods to base class

2021-03-23 Thread Cleber Rosa
Both the virtiofs submounts and the linux ssh mips malta tests contains useful methods related to ssh that deserve to be made available to other tests. Let's move them to the base LinuxTest class. The method that helps with setting up an ssh connection will now support both key and password based

[PATCH v2 08/10] tests/acceptance/virtiofs_submounts.py: remove launch_vm()

2021-03-23 Thread Cleber Rosa
The LinuxTest class' launch_and_wait() method now behaves the same way as this test's custom launch_vm(), so let's just use the upper layer (common) method. Signed-off-by: Cleber Rosa --- tests/acceptance/virtiofs_submounts.py | 13 + 1 file changed, 5 insertions(+), 8 deletions(-)

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

2021-03-23 Thread John Snow
On 3/23/21 5: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 --- tests/unit/test-qmp-event.c

[PATCH v2 07/10] Acceptance Tests: set up SSH connection by default after boot for LinuxTest

2021-03-23 Thread Cleber Rosa
The LinuxTest specifically targets users that need to interact with Linux guests. So, it makes sense to give a connection by default, and avoid requiring it as boiler-plate code. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 5 - tests/acceptance/virtiofs_submou

Re: [PATCH v2 1/3] vt82c686.c: don't raise SCI when PCI_INTERRUPT_PIN isn't setup

2021-03-23 Thread BALATON Zoltan
On Tue, 23 Mar 2021, Philippe Mathieu-Daudé wrote: Hi Isaku, On 3/23/21 6:24 PM, Isaku Yamahata wrote: Without this patch, the following patch will triger clan runtime sanitizer warnings as follows. This patch proactively works around it. I let v582c686.c maintainer address a correct fix as I'm

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

2021-03-23 Thread John Snow
On 3/23/21 5: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 Reviewed-by: John Snow --- scripts/qapi/expr.py

Re: [PULL 0/7] target-arm queue

2021-03-23 Thread Peter Maydell
' into > staging (2021-03-22 18:50:25 +) > > are available in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20210323 > > for you to fetch changes up to dad90de78e9e9d47cefcbcd30115706b98e6ec87

Re: [PATCH v3 1/1] acpi: Consolidate the handling of OEM ID and OEM Table ID fields

2021-03-23 Thread Marian Postevca
"Michael S. Tsirkin" writes: >> +#include "qemu/cutils.h" >> + >> +#define ACPI_BUILD_APPNAME6 "BOCHS " >> +#define ACPI_BUILD_APPNAME8 "BXPC" > > A single user for each of these now ... drop the defines? > Unfortunately ACPI_BUILD_APPNAME8 is still used in build_header() in aml-build.c, and

Re: [PATCH v2] docs/devel/testing.rst: Fix references to unit tests

2021-03-23 Thread John Snow
On 3/18/21 1:44 PM, Wainer dos Santos Moschetta wrote: With the recent move of the unit tests to tests/unit directory some instructions under the "Unit tests" section became imprecise, which are fixed by this change. Fixes: da668aa15b99 ("tests: Move unit tests into a separate directory") Signed

Re: [RFC v11 30/55] target/arm: wrap call to aarch64_sve_change_el in tcg_enabled()

2021-03-23 Thread Alex Bennée
Claudio Fontana writes: > After this patch it is possible to build only kvm: > > ./configure --disable-tcg --enable-kvm FWIW at this point we get a different failure than later on: 21:10:25 [alex@aarch64-new:~/l/q/b/disable.tcg] (94e2abe0…)|… + make check-qtest GIT ui/keycodemapdb

Re: Crashes with qemu-system-ppc64

2021-03-23 Thread Peter Maydell
On Tue, 23 Mar 2021 at 21:21, Mark Cave-Ayland wrote: > I'm not sure what the right solution is here. In my mind there hasn't really > been any > difference between TYPE_DEVICE and TYPE_SYS_BUS_DEVICE other than the APIs > that > expose the memory regions and IRQs are different, but clearly plat

Re: Crashes with qemu-system-ppc64

2021-03-23 Thread Greg Kurz
Cc'ing David On Tue, 23 Mar 2021 17:48:36 +0100 Thomas Huth wrote: > > In case anyone is interested in fixing those, there are two regressions with > qemu-system-ppc64 in the current master branch: > > $ ./qemu-system-ppc64 -M ppce500 -device macio-oldworld > qemu-system-ppc64: ../../devel/qe

Re: [RFC PATCH 06/13] blobs: Only install PA-RISC SeaBIOS if hppa system target is built

2021-03-23 Thread Helge Deller
On 3/23/21 4:51 PM, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- Cc: Richard Henderson Cc: Helge Deller Acked-by: Helge Deller --- meson.build | 2 ++ pc-bios/meson.build | 7 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mes

[PATCH 0/6] hw/isa: Remove unuseful qemu_allocate_irqs() call

2021-03-23 Thread Philippe Mathieu-Daudé
I started to fix the LeakSanitizer error in piix4_realize(), then looked for similar pattern and found 2 other places. The older is i82378 (historically the first one) which then spread. Philippe Mathieu-Daudé (6): hw/isa/i82378: Name output IRQ as 'intr' hw/isa/i82378: Simplify removing unuse

Re: [PATCH v7 1/8] vt82c686: Implement control of serial port io ranges via config regs

2021-03-23 Thread BALATON Zoltan
On Tue, 23 Mar 2021, Mark Cave-Ayland wrote: On 23/03/2021 12:54, BALATON Zoltan wrote: On Wed, 10 Mar 2021, BALATON Zoltan wrote: In VIA super south bridge the io ranges of superio components (parallel and serial ports and FDC) can be controlled by superio config registers to set their base ad

<    1   2   3   4   5   6   >