[PATCH] target/riscv: Pass the same value to oprsz and maxsz.

2021-05-20 Thread LIU Zhiwei
Since commit e2e7168a214b0ed98dc357bba96816486a289762, if oprsz is still zero(as we don't use this field), simd_desc will trigger an assert. Besides, tcg_gen_gvec_*_ptr calls simd_desc in it's implementation. Here we pass the value to maxsz and oprsz to bypass the assert. Signed-off-by: LIU

Re: [PATCH 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-05-20 Thread Markus Armbruster
John Snow writes: > On 5/20/21 10:42 AM, Markus Armbruster wrote: >> First step is to find out how _end_section() can be called twice in a >> row. It isn't in all of "make check". Hmm. > > Ah, maybe not twice in a *row*. It does seem to be called when we have > an "empty section" sometimes,

[PATCH v4] i386: Add ratelimit for bus locks acquired in guest

2021-05-20 Thread Chenyi Qiang
A bus lock is acquired through either split locked access to writeback (WB) memory or any locked access to non-WB memory. It is typically >1000 cycles slower than an atomic operation within a cache and can also disrupts performance on other cores. Virtual Machines can exploit bus locks to degrade

Re: [PATCH v6 04/25] python: add qemu package installer

2021-05-20 Thread Cleber Rosa
On Wed, May 12, 2021 at 07:12:20PM -0400, John Snow wrote: > Add setup.cfg and setup.py, necessary for installing a package via > pip. Add a ReST document (PACKAGE.rst) explaining the basics of what > this package is for and who to contact for more information. This > document will be used as the

Re: [PATCH v2] hw/display/qxl: Set pci rom address aligned with page size

2021-05-20 Thread maobibo
ping. or there is other suggestion so that qxl can be used on system with 16K pagesize. regards bibo, mao 在 2021年05月18日 20:20, Bibo Mao 写道: > From: maobibo > > On some MIPS system, page size is 16K, and qxl vga device can > be used for VM in kvm mode. Qxl pci rom size is set 8K fixed, >

Re: [PATCH 0/2] Fix SIGILL psw.addr reporting

2021-05-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210521030146.2831663-1-...@linux.ibm.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210521030146.2831663-1-...@linux.ibm.com Subject: [PATCH 0/2] Fix SIGILL psw.addr

Re: [PATCH] linux-user: Handle EXCP10_COPR properly for i386

2021-05-20 Thread 邹旭
ping 邹旭 于2021年5月14日周五 下午5:23写道: > From e805b793f7d4b3e8c37d540b7d6cc0c6ac682311 Mon Sep 17 00:00:00 2001 > From: Xu Zou > Date: Fri, 14 May 2021 15:55:07 +0800 > Subject: [PATCH] linux-user: Handle EXCP10_COPR properly for i386 > > Handle EXCP10_COPR properly for i386 in cpu loop. > > NE flag

[PATCH 1/2] target/s390x: Fix SIGILL psw.addr reporting

2021-05-20 Thread Ilya Leoshkevich
When a s390x CPU attempts to execute an illegal instruction, an operation exception is recognized. This is a suppressing exception, which means that the PSW is advanced by the length of the illegal instruction. On the real hardware or in qemu-system-s390x the kernel then raises SIGILL with

[PATCH 0/2] Fix SIGILL psw.addr reporting

2021-05-20 Thread Ilya Leoshkevich
qemu-s390x puts a wrong value into SIGILL's siginfo_t's psw.addr: it should be a pointer to the instruction following the illegal instruction, but at the moment it is a pointer to the illegal instruction itself. This breaks OpenJDK, which relies on this value. Patch 1 fixes the issue, patch 2

[PATCH 2/2] tests/tcg/s390x: Test SIGILL handling

2021-05-20 Thread Ilya Leoshkevich
Verify that s390x-specific uc_mcontext.psw.addr is reported correctly. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/sigill.c| 41 + 2 files changed, 42 insertions(+) create mode 100644

[PATCH 2/2] hw/usb: hcd-xhci-pci: Fix spec violation of IP flag for MSI/MSI-X

2021-05-20 Thread Bin Meng
From: Ruimei Yan Per xHCI spec v1.2 chapter 4.17.5 page 296: If MSI or MSI-X interrupts are enabled, Interrupt Pending (IP) shall be cleared automatically when the PCI dword write generated by the interrupt assertion is complete. Currently QEMU does not clear the IP flag in the MSI /

[PATCH 1/2] hw/usb: hcd-xhci-pci: Raise MSI/MSI-X interrupts only when told to

2021-05-20 Thread Bin Meng
From: Ruimei Yan At present MSI / MSI-X interrupts are triggered regardless of the irq level. We should have checked the level to determine whether the interrupt needs to be delivered. The level check logic was present in early versions of the xhci model, but got dropped later by a rework of

Re: [PATCH v1 1/1] target/riscv/pmp: Add assert for ePMP operations

2021-05-20 Thread LIU Zhiwei
Reviewed-by: LIU Zhiwei On 5/21/21 6:55 AM, Alistair Francis wrote: Although we construct epmp_operation in such a way that it can only be between 0 and 15 Coverity complains that we don't handle the other possible cases. To fix Coverity and make it easier for humans to read add a default case

Re: [PATCH v1 1/1] target/riscv/pmp: Add assert for ePMP operations

2021-05-20 Thread Bin Meng
On Fri, May 21, 2021 at 6:56 AM Alistair Francis wrote: > > Although we construct epmp_operation in such a way that it can only be > between 0 and 15 Coverity complains that we don't handle the other > possible cases. To fix Coverity and make it easier for humans to read > add a default case to

Re: [PULL v3 36/42] target/riscv: Remove the hardcoded MSTATUS_SD macro

2021-05-20 Thread LIU Zhiwei
On 5/21/21 6:55 AM, Alistair Francis wrote: On Thu, May 20, 2021 at 11:55 PM Peter Maydell wrote: On Tue, 11 May 2021 at 11:22, Alistair Francis wrote: Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Message-id:

[Bug 1749393] Re: sbrk() not working under qemu-user with a PIE-compiled binary?

2021-05-20 Thread Yasuhiro Horimoto
Thank you for fixing the problem. I confirmed that https://bugs.launchpad.net/bugs/1924231 is fixed with https://launchpad.net/~ci-train-ppa- service/+archive/ubuntu/4535/+packages. Thank you. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed

Re: [PATCH qemu v20] spapr: Implement Open Firmware client interface

2021-05-20 Thread Alexey Kardashevskiy
On 21/05/2021 07:59, BALATON Zoltan wrote: On Thu, 20 May 2021, Alexey Kardashevskiy wrote: The PAPR platform describes an OS environment that's presented by a combination of a hypervisor and firmware. The features it specifies require collaboration between the firmware and the hypervisor.

[PATCH v2 1/6] qapi/parser: fix unused check_args_section arguments

2021-05-20 Thread John Snow
Pylint informs us we're not using these arguments. Oops, it's right. Correct the error message and remove the remaining unused parameter. Fix test output now that the error message is improved. Fixes: e151941d1b Signed-off-by: John Snow --- scripts/qapi/parser.py| 16

[PATCH v2 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-05-20 Thread John Snow
It simplifies the typing to say that _section is always a QAPIDoc.Section(). To accommodate this change, we must allow for this object to evaluate to False for functions like _end_section which behave differently based on whether or not a Section has been started. Signed-off-by: John Snow ---

[PATCH v2 5/6] qapi/parser: Silence too-few-public-methods warning

2021-05-20 Thread John Snow
Eh. Two properties, a bool method and a public method are non-trivial enough for me. (Especially in typed python!) Signed-off-by: John Snow --- scripts/qapi/parser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index

[PATCH v2 6/6] qapi/parser: enable pylint checks

2021-05-20 Thread John Snow
Signed-off-by: John Snow --- This can be merged with the previous commit, if desired. Signed-off-by: John Snow --- scripts/qapi/pylintrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc index c5275d5f59b..1a633b2b88e 100644

[PATCH v2 3/6] qapi/parser: add type hint annotations (QAPIDoc)

2021-05-20 Thread John Snow
Annotations do not change runtime behavior. This commit adds mostly annotations, but uses a TYPE_CHECKING runtime check to conditionally import dependencies, which only triggers during runs of mypy. Signed-off-by: John Snow --- TopLevelExpr, an idea from previous drafts, makes a return here

[PATCH v2 0/6] qapi: static typing conversion, pt5b

2021-05-20 Thread John Snow
This is part five (b), and focuses on QAPIDoc in parser.py. gitlab: https://gitlab.com/jsnow/qemu/-/commits/python-qapi-cleanup-pt5b Requirements: - Python 3.6+ - mypy >= 0.770 - pylint >= 2.6.0 (2.7.0+ when using Python 3.9+) Every commit should pass with: - `isort -c qapi/` - `flake8 qapi/`

[PATCH v2 4/6] qapi/parser: enable mypy checks

2021-05-20 Thread John Snow
Signed-off-by: John Snow --- As always, this can be merged with the previous commit. Signed-off-by: John Snow --- scripts/qapi/mypy.ini | 5 - 1 file changed, 5 deletions(-) diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index 54ca4483d6d..66253564297 100644 ---

[PATCH v1 1/1] target/riscv/pmp: Add assert for ePMP operations

2021-05-20 Thread Alistair Francis
Although we construct epmp_operation in such a way that it can only be between 0 and 15 Coverity complains that we don't handle the other possible cases. To fix Coverity and make it easier for humans to read add a default case to the switch statement that calls g_assert_not_reached(). Fixes: CID

Re: [PULL v3 36/42] target/riscv: Remove the hardcoded MSTATUS_SD macro

2021-05-20 Thread Alistair Francis
On Thu, May 20, 2021 at 11:55 PM Peter Maydell wrote: > > On Tue, 11 May 2021 at 11:22, Alistair Francis > wrote: > > > > Signed-off-by: Alistair Francis > > Reviewed-by: Richard Henderson > > Message-id: > > fcc125d96da941b56c817c9dd6068dc36478fc53.1619234854.git.alistair.fran...@wdc.com >

Re: [PATCH 3/6] qapi/parser.py: add type hint annotations (QAPIDoc)

2021-05-20 Thread John Snow
On 5/20/21 11:05 AM, Markus Armbruster wrote: John Snow writes: Annotations do not change runtime behavior. This commit adds mostly annotations, but uses a TYPE_CHECKING runtime check to conditionally import dependencies, which only triggers during runs of mypy. Signed-off-by: John Snow

Re: [PULL v3 24/42] target/riscv: Implementation of enhanced PMP (ePMP)

2021-05-20 Thread Alistair Francis
On Thu, May 20, 2021 at 11:51 PM Peter Maydell wrote: > > On Tue, 11 May 2021 at 11:21, Alistair Francis > wrote: > > > > From: Hou Weiying > > > > This commit adds support for ePMP v0.9.1. > > > > The ePMP spec can be found in: > >

Re: [PATCH 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-05-20 Thread John Snow
On 5/20/21 10:42 AM, Markus Armbruster wrote: First step is to find out how _end_section() can be called twice in a row. It isn't in all of "make check". Hmm. Ah, maybe not twice in a *row*. It does seem to be called when we have an "empty section" sometimes, which arises from stuff like

Re: [PULL 02/19] sev: update sev-inject-launch-secret to make gpa optional

2021-05-20 Thread James Bottomley
On Thu, 2021-05-20 at 23:36 +0200, Philippe Mathieu-Daudé wrote: > On 2/15/21 2:16 PM, Paolo Bonzini wrote: > > From: James Bottomley > > > > If the gpa isn't specified, it's value is extracted from the OVMF > > properties table located below the reset vector (and if this > > doesn't > > exist,

Re: [PATCH qemu v20] spapr: Implement Open Firmware client interface

2021-05-20 Thread BALATON Zoltan
On Thu, 20 May 2021, Alexey Kardashevskiy wrote: The PAPR platform describes an OS environment that's presented by a combination of a hypervisor and firmware. The features it specifies require collaboration between the firmware and the hypervisor. Since the beginning, the runtime component of

Re: [PULL 02/19] sev: update sev-inject-launch-secret to make gpa optional

2021-05-20 Thread Philippe Mathieu-Daudé
On 2/15/21 2:16 PM, Paolo Bonzini wrote: > From: James Bottomley > > If the gpa isn't specified, it's value is extracted from the OVMF > properties table located below the reset vector (and if this doesn't > exist, an error is returned). OVMF has defined the GUID for the SEV > secret area as

Re: [PATCH v6 09/19] i386: split hyperv_handle_properties() into hyperv_expand_features()/hyperv_fill_cpuids()

2021-05-20 Thread Eduardo Habkost
On Thu, Apr 22, 2021 at 06:11:20PM +0200, Vitaly Kuznetsov wrote: > The intention is to call hyperv_expand_features() early, before vCPUs > are created and use the acquired data later when we set guest visible > CPUID data. > > Signed-off-by: Vitaly Kuznetsov Reviewed-by: Eduardo Habkost --

Re: [RFC 0/1] acceptance tests: bump Avocado version to 88.1

2021-05-20 Thread Willian Rampazzo
It was not supposed to be an RFC, resending as PATCH. On Thu, May 20, 2021 at 5:51 PM Willian Rampazzo wrote: > > CI pipeline: https://gitlab.com/willianrampazzo/qemu/-/pipelines/306904401 > > Besides some internal changes, new features, and bug fixes, on the QEMU side, > this version fixes the

[PATCH 0/1] acceptance tests: bump Avocado version to 88.1

2021-05-20 Thread Willian Rampazzo
CI pipeline: https://gitlab.com/willianrampazzo/qemu/-/pipelines/306904401 Besides some internal changes, new features, and bug fixes, on the QEMU side, this version fixes the following message seen when running the acceptance tests: "Error running method "pre_tests" of plugin "fetchasset":

[PATCH 1/1] acceptance tests: bump Avocado version to 88.1

2021-05-20 Thread Willian Rampazzo
Besides some internal changes, new features, and bug fixes, on the QEMU side, this version fixes the following message seen when running the acceptance tests: "Error running method "pre_tests" of plugin "fetchasset": 'bytes' object has no attribute 'encode'". The release notes are available at

[RFC 1/1] acceptance tests: bump Avocado version to 88.1

2021-05-20 Thread Willian Rampazzo
Besides some internal changes, new features, and bug fixes, on the QEMU side, this version fixes the following message seen when running the acceptance tests: "Error running method "pre_tests" of plugin "fetchasset": 'bytes' object has no attribute 'encode'". The release notes are available at

[RFC 0/1] acceptance tests: bump Avocado version to 88.1

2021-05-20 Thread Willian Rampazzo
CI pipeline: https://gitlab.com/willianrampazzo/qemu/-/pipelines/306904401 Besides some internal changes, new features, and bug fixes, on the QEMU side, this version fixes the following message seen when running the acceptance tests: "Error running method "pre_tests" of plugin "fetchasset":

Re: [RFC 1/1] acceptance tests: rename acceptance to system

2021-05-20 Thread Philippe Mathieu-Daudé
On 5/20/21 9:53 PM, Willian Rampazzo wrote: > Conceptually speaking, acceptance tests "are a series of specific tests > conducted by the customer in an attempt to uncover product errors before > accepting the software from the developer. Conducted by the end-user rather > than software engineers,

Re: [PATCH v6 08/19] i386: introduce hv_cpuid_cache

2021-05-20 Thread Eduardo Habkost
On Thu, Apr 22, 2021 at 06:11:19PM +0200, Vitaly Kuznetsov wrote: > Just like with cpuid_cache, it makes no sense to call > KVM_GET_SUPPORTED_HV_CPUID more than once and instead of (ab)using > env->features[] and/or trying to keep all the code in one place, it is > better to introduce persistent

Re: [PATCH v6 07/19] i386: drop FEAT_HYPERV feature leaves

2021-05-20 Thread Eduardo Habkost
On Thu, Apr 22, 2021 at 06:11:18PM +0200, Vitaly Kuznetsov wrote: > Hyper-V feature leaves are weird. We have some of them in > feature_word_info[] array but we don't use feature_word_info > magic to enable them. Neither do we use feature_dependencies[] > mechanism to validate the configuration as

Re: [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source

2021-05-20 Thread Bruno Piazera Larsen
On 20/05/2021 16:51, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst Change the regex used to determine whether a file should be processed as C source to include .c.inc and .h.inc extensions. Signed-off-by: Matheus Ferst --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2

Re: [PATCH v3 02/10] gitlab-ci: Rename acceptance_test_job -> integration_test_job

2021-05-20 Thread Willian Rampazzo
On Wed, May 19, 2021 at 4:38 PM Philippe Mathieu-Daudé wrote: > > On 5/19/21 9:26 PM, Willian Rampazzo wrote: > > On Wed, May 19, 2021 at 3:55 PM Philippe Mathieu-Daudé > > wrote: > >> > >> From: Philippe Mathieu-Daudé > >> > >> The acceptance tests aren't accepting anything, > >> rename them

Re: [PATCH v3 2/6] gitlab-ci: Adapt JOBS variable for FreeBSD runners

2021-05-20 Thread Warner Losh
On Thu, May 20, 2021 at 12:18 PM Wainer dos Santos Moschetta < waine...@redhat.com> wrote: > Hi, > > On 5/19/21 3:45 PM, Philippe Mathieu-Daudé wrote: > > 'nproc' is not available on FreeBSD: > > > >$ JOBS=$(expr $(nproc) + 1) > >bash: line 119: nproc: command not found > >expr:

Re: [PATCH v6 06/19] i386: introduce hv_cpuid_get_host()

2021-05-20 Thread Eduardo Habkost
On Thu, Apr 22, 2021 at 06:11:17PM +0200, Vitaly Kuznetsov wrote: > As a preparation to implementing hv_cpuid_cache intro introduce > hv_cpuid_get_host(). No functional change intended. > > Signed-off-by: Vitaly Kuznetsov > --- > target/i386/kvm/kvm.c | 102

Re: [PATCH v6 05/19] i386: introduce hyperv_feature_supported()

2021-05-20 Thread Eduardo Habkost
On Thu, Apr 22, 2021 at 06:11:16PM +0200, Vitaly Kuznetsov wrote: > Clean up hv_cpuid_check_and_set() by separating hyperv_feature_supported() > off it. No functional change intended. > > Signed-off-by: Vitaly Kuznetsov > --- > target/i386/kvm/kvm.c | 49

[RFC 1/1] acceptance tests: rename acceptance to system

2021-05-20 Thread Willian Rampazzo
Conceptually speaking, acceptance tests "are a series of specific tests conducted by the customer in an attempt to uncover product errors before accepting the software from the developer. Conducted by the end-user rather than software engineers, acceptance testing can range from an informal “test

[RFC 0/1] acceptance tests: rename acceptance to system

2021-05-20 Thread Willian Rampazzo
CI pipeline: https://gitlab.com/willianrampazzo/qemu/-/pipelines/306850452 Conceptually speaking, acceptance tests "are a series of specific tests conducted by the customer in an attempt to uncover product errors before accepting the software from the developer. Conducted by the end-user rather

Re: [PATCH v6 04/19] i386: stop using env->features[] for filling Hyper-V CPUIDs

2021-05-20 Thread Eduardo Habkost
On Fri, Apr 30, 2021 at 08:34:40PM -0400, Eduardo Habkost wrote: > On Thu, Apr 22, 2021 at 06:11:15PM +0200, Vitaly Kuznetsov wrote: > > As a preparatory patch to dropping Hyper-V CPUID leaves from > > feature_word_info[] stop using env->features[] as a temporary > > storage of Hyper-V CPUIDs,

[PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source

2021-05-20 Thread matheus . ferst
From: Matheus Ferst Change the regex used to determine whether a file should be processed as C source to include .c.inc and .h.inc extensions. Signed-off-by: Matheus Ferst --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl

Re: [PULL 0/9] scripts/simplebench patches

2021-05-20 Thread Vladimir Sementsov-Ogievskiy
20.05.2021 22:17, Peter Maydell wrote: On Tue, 4 May 2021 at 10:01, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit 53c5433e84e8935abed8e91d4a2eb813168a0ecf: Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210501' into staging (2021-05-02 12:02:46

Re: [PULL 0/9] scripts/simplebench patches

2021-05-20 Thread Peter Maydell
On Tue, 4 May 2021 at 10:01, Vladimir Sementsov-Ogievskiy wrote: > > The following changes since commit 53c5433e84e8935abed8e91d4a2eb813168a0ecf: > > Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210501' > into staging (2021-05-02 12:02:46 +0100) > > are available in the Git

Re: [RFC PATCH 17/25] hw/virtio: Use correct type sizes

2021-05-20 Thread Philippe Mathieu-Daudé
On 5/20/21 6:27 PM, Richard Henderson wrote: > On 5/18/21 1:36 PM, Philippe Mathieu-Daudé wrote: >> -static inline int virtio_lduw_p(VirtIODevice *vdev, const void *ptr) >> +static inline uint16_t virtio_lduw_p(VirtIODevice *vdev, const void >> *ptr) > > While this one looks obviously correct, >

Re: [PULL v2 0/9] s390x update

2021-05-20 Thread Peter Maydell
gt; Merge remote-tracking branch > 'remotes/stsquad/tags/pull-testing-and-plugin-updates-180521-2' into staging > (2021-05-20 10:00:58 +0100) > > are available in the Git repository at: > > https://gitlab.com/cohuck/qemu.git tags/s390x-20210520-v2 > > for you to fetch cha

Re: [PATCH v3 3/6] gitlab-ci: Run GNU make via the $MAKE variable

2021-05-20 Thread Wainer dos Santos Moschetta
On 5/19/21 3:45 PM, Philippe Mathieu-Daudé wrote: Add the $MAKE variable to call GNU make, and set it to 'gmake' on FreeBSD to avoid: $ make -j"$JOBS" make: Unknown modifier ',' make: "/builds/dTyar424/0/qemu/build/Makefile" line 3: Need an operator make:

Re: [PATCH v3 2/6] gitlab-ci: Adapt JOBS variable for FreeBSD runners

2021-05-20 Thread Wainer dos Santos Moschetta
Hi, On 5/19/21 3:45 PM, Philippe Mathieu-Daudé wrote: 'nproc' is not available on FreeBSD: $ JOBS=$(expr $(nproc) + 1) bash: line 119: nproc: command not found expr: syntax error Instead, use 'sysctl -n hw.ncpu'. Signed-off-by: Philippe Mathieu-Daudé ---

[PULL 04/15] qapi/parser: factor parsing routine into method

2021-05-20 Thread Markus Armbruster
From: John Snow For the sake of keeping __init__ smaller (and treating it more like a gallery of what state variables we can expect to see), put the actual parsing action into a parse method. It remains invoked from the init method to reduce churn. To accomplish this, @previously_included

[PULL 08/15] qapi/parser: Use @staticmethod where appropriate

2021-05-20 Thread Markus Armbruster
From: John Snow No self, no thank you! (Quiets pylint warnings.) Signed-off-by: John Snow Message-Id: <20210519183951.3946870-9-js...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- scripts/qapi/parser.py | 6 -- 1 file changed, 4 insertions(+), 2

[PULL 11/15] qapi/parser: Rework _check_pragma_list_of_str as a TypeGuard

2021-05-20 Thread Markus Armbruster
From: John Snow TypeGuards wont exist in Python proper until 3.10. Ah well. We can hack up our own by declaring this function to return the type we claim it checks for and using this to safely downcast object -> List[str]. In so doing, I bring this function under _pragma so it can use the

[PULL 06/15] qapi/parser: enforce all top-level expressions must be dict in _parse()

2021-05-20 Thread Markus Armbruster
From: John Snow Instead of using get_expr nested=False, allow get_expr to always return any expression. In exchange, add a new error message to the top-level parser that explains the semantic error: Top-level expressions must always be JSON objects. This helps mypy understand the rest of this

Re: [PATCH v3 1/6] gitlab-ci: Extract _variables template

2021-05-20 Thread Wainer dos Santos Moschetta
Hi, On 5/19/21 3:45 PM, Philippe Mathieu-Daudé wrote: To be able to set the same environment variables to multiple jobs, extract what we currently have as a template. Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/buildtest-template.yml | 7 +-- 1 file changed, 5 insertions(+),

[PULL 05/15] qapi/parser: Assert lexer value is a string

2021-05-20 Thread Markus Armbruster
From: John Snow The type checker can't narrow the type of the token value to string, because it's only loosely correlated with the return token. We know that a token of '#' should always have a "str" value. Add an assertion. Signed-off-by: John Snow Message-Id:

[PULL 10/15] qapi/parser: Fix token membership tests when token can be None

2021-05-20 Thread Markus Armbruster
From: John Snow When the token can be None (EOF), we can't use 'x in "abc"' style membership tests to group types of tokens together, because 'None in "abc"' is a TypeError. Easy enough to fix. (Use a tuple: It's neither a static typing error nor a runtime error to check for None in Tuple[str,

[PULL 12/15] qapi/parser: add type hint annotations

2021-05-20 Thread Markus Armbruster
From: John Snow Annotations do not change runtime behavior. This commit *only* adds annotations. (Annotations for QAPIDoc are in a forthcoming commit.) Signed-off-by: John Snow Message-Id: <20210519183951.3946870-13-js...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus

[PULL 13/15] qapi/parser: Remove superfluous list comprehension

2021-05-20 Thread Markus Armbruster
From: John Snow A generator suffices (and quiets a pylint warning). Signed-off-by: John Snow Message-Id: <20210519183951.3946870-14-js...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- scripts/qapi/parser.py | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v12 4/8] arm64: kvm: Introduce MTE VM feature

2021-05-20 Thread Catalin Marinas
On Thu, May 20, 2021 at 04:05:46PM +0100, Steven Price wrote: > On 20/05/2021 12:54, Catalin Marinas wrote: > > On Mon, May 17, 2021 at 01:32:35PM +0100, Steven Price wrote: > >> diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > >> index c5d1f3c87dbd..8660f6a03f51 100644 > >> ---

[PULL 14/15] qapi/parser: allow 'ch' variable name

2021-05-20 Thread Markus Armbruster
From: John Snow We can have a two-letter variable name, as a treat. Signed-off-by: John Snow Message-Id: <20210519183951.3946870-15-js...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- scripts/qapi/pylintrc | 1 + 1 file changed, 1 insertion(+) diff --git

[PULL 15/15] qapi/parser: add docstrings

2021-05-20 Thread Markus Armbruster
From: John Snow Signed-off-by: John Snow Message-Id: <20210519183951.3946870-16-js...@redhat.com> Reviewed-by: Markus Armbruster [Doc string spacing tweaked slightly] Signed-off-by: Markus Armbruster --- scripts/qapi/parser.py | 69 ++ 1 file changed,

[PULL 01/15] qapi/parser: Don't try to handle file errors

2021-05-20 Thread Markus Armbruster
From: John Snow Fixes: f5d4361cda Fixes: 52a474180a Fixes: 46f49468c6 Remove the try/except block that handles file-opening errors in QAPISchemaParser.__init__() and add one each to QAPISchemaParser._include() and QAPISchema.__init__() respectively. This simultaneously fixes the typing of

[PULL 02/15] qapi: Add test for nonexistent schema file

2021-05-20 Thread Markus Armbruster
From: John Snow This tests the error-return pathway introduced in the previous commit. (Thanks to Paolo for the help with the Meson magic.) Signed-off-by: John Snow Message-Id: <20210519183951.3946870-3-js...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster ---

[PULL 07/15] qapi/parser: assert object keys are strings

2021-05-20 Thread Markus Armbruster
From: John Snow The single quote token implies the value is a string. Assert this to be the case, to allow us to write an accurate return type for get_members. Signed-off-by: John Snow Message-Id: <20210519183951.3946870-8-js...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus

[PULL 09/15] qapi: add must_match helper

2021-05-20 Thread Markus Armbruster
From: John Snow Mypy cannot generally understand that these regex functions cannot possibly fail. Add a "must_match" helper that makes this clear for mypy. Signed-off-by: John Snow Message-Id: <20210519183951.3946870-10-js...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus

[PULL 00/15] QAPI patches patches for 2021-05-20

2021-05-20 Thread Markus Armbruster
The following changes since commit d874bc081600528f0400977460b4f98f21e156a1: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2021-05-19 16:10:35 +0100) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qapi-2021-05-20 for you

[PULL 03/15] qapi/source: Remove line number from QAPISourceInfo initializer

2021-05-20 Thread Markus Armbruster
From: John Snow With the QAPISourceInfo(None, None, None) construct gone, there's no longer any reason to have to specify that a file starts on the first line. Remove it from the initializer and default it to 1. Remove the last vestiges where we check for 'line' being unset, that can't happen,

[PATCH v1 6/8] hmp-commands: expand type of icount to "l" in replay commands

2021-05-20 Thread Alex Bennée
This is not a 32 bit number, it can (and most likely will) be quite a big one. Signed-off-by: Alex Bennée Reviewed-by: Pavel Dovgalyuk --- hmp-commands.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 435c591a1c..5ee9cfd520

[PATCH v1 3/8] gitlab: add special rule for the hexagon container

2021-05-20 Thread Alex Bennée
The hexagon container is always manually built but of course not everyone will be building it themselves and pushing to their registries. We still need to create a "local" registry copy for the actual gitlab tests to run. We don't build it in this case, just pull it across from the upstream

[PATCH v1 5/8] gdbstub: Replace GdbCmdContext with plain g_array()

2021-05-20 Thread Alex Bennée
From: Philippe Mathieu-Daudé Instead of jumping through hoops let glib deal with both tracking the number of elements and auto freeing the memory once we are done. This allows is to drop the usage of ALLOCA(3) which the man-page mentions its "use is discouraged". Signed-off-by: Alex Bennée

[PATCH v1 7/8] gdbstub: tidy away reverse debugging check into function

2021-05-20 Thread Alex Bennée
In theory we don't need an actual record/replay to enact reverse debugging on a purely deterministic system (i.e one with no external inputs running under icount). Tidy away the logic into a little function. Signed-off-by: Alex Bennée --- gdbstub.c | 13 +++-- 1 file changed, 11

[PATCH v1 1/8] tests/tcg: add a multiarch signals test to stress test signal delivery

2021-05-20 Thread Alex Bennée
This adds a simple signal test that combines the POSIX timer_create with signal delivery across multiple threads. The aim is to provide a bit more of a stress test to flush out signal handling issues for easily than the occasional random crash we sometimes see in linux-test or threadcount.

[PATCH v1 2/8] gitlab: explicitly reference the upstream registry

2021-05-20 Thread Alex Bennée
Since c8e6793903 ("containers.yml: build with docker.py tooling") we don't need to manually pull stuff from the upstream repository. Just set the -r field to explicitly use that rather than the current registry. Signed-off-by: Alex Bennée --- .gitlab-ci.d/containers.yml | 3 +-- 1 file changed,

[PATCH v1 8/8] plugins/syscall: Added a table-like summary output

2021-05-20 Thread Alex Bennée
From: Mahmoud Mandour Added a table-like output which contains the total number of calls for each used syscall along with the number of errors that occurred. Per-call tracing is still available through supplying the argument ``print`` to the plugin. Signed-off-by: Mahmoud Mandour

[PATCH v1 0/8] various misc fixes (gitlab, gdbstub, plugins)

2021-05-20 Thread Alex Bennée
Hi, My various maintenance trees each had a few fixes that are fairly uncontroversial and ready to go, including a recently baked fix for hexagon-user tests. I thought I'd better collect them together and get ready for a fairly quick merge so they don't get held up behind other stuff that's still

[PATCH v1 4/8] gdbstub: Constify GdbCmdParseEntry

2021-05-20 Thread Alex Bennée
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20210505170055.1415360-3-phi...@redhat.com> --- gdbstub.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 9103ffc902..83d47c6732

Re: [PULL 00/20] bsd-user style tweaks and start cleanup

2021-05-20 Thread Peter Maydell
On Wed, 12 May 2021 at 18:26, Warner Losh wrote: > > The following changes since commit f9a576a818044133f8564e0d243ebd97df0b3280: > > Merge remote-tracking branch > 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20210506' into staging > (2021-05-11 13:03:44 +0100) > > are available in the Git

Re: [PATCH 2/2] target/i386: fix IEEE x87 floating-point exception raising

2021-05-20 Thread Peter Maydell
On Fri, 15 May 2020 at 22:23, Joseph Myers wrote: > > Most x87 instruction implementations fail to raise the expected IEEE > floating-point exceptions because they do nothing to convert the > exception state from the softfloat machinery into the exception flags > in the x87 status word. There is

Re: [PATCH v12 7/8] KVM: arm64: ioctl to fetch/store tags in a guest

2021-05-20 Thread Catalin Marinas
On Thu, May 20, 2021 at 04:58:01PM +0100, Steven Price wrote: > On 20/05/2021 13:05, Catalin Marinas wrote: > > On Mon, May 17, 2021 at 01:32:38PM +0100, Steven Price wrote: > >> diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c > >> index e89a5e275e25..4b6c83beb75d 100644 > >> ---

[PULL v2 8/9] target/i386: Make sure that vsyscall's tb->size != 0

2021-05-20 Thread Cornelia Huck
From: Ilya Leoshkevich tb_gen_code() assumes that tb->size must never be zero, otherwise it may produce spurious exceptions. For x86_64 this may happen when creating a translation block for the vsyscall page. Fix by pretending that vsyscall translation blocks have at least one instruction.

[PULL v2 9/9] tests/tcg/x86_64: add vsyscall smoke test

2021-05-20 Thread Cornelia Huck
From: Ilya Leoshkevich Having a small test will prevent trivial regressions in the future. Signed-off-by: Ilya Leoshkevich Message-Id: <20210519045738.1335210-3-...@linux.ibm.com> Reviewed-by: Richard Henderson Signed-off-by: Cornelia Huck --- tests/tcg/x86_64/Makefile.target | 6 +-

Re: [PATCH 24/24] target/ppc: Restrict ppc_cpu_tlb_fill to TCG

2021-05-20 Thread Bruno Piazera Larsen
On 20/05/2021 11:52, Richard Henderson wrote: On 5/20/21 8:18 AM, Bruno Piazera Larsen wrote: +#ifdef CONFIG_TCG   bool ppc_cpu_tlb_fill(CPUState *cs, vaddr eaddr, int size,     MMUAccessType access_type, int mmu_idx,     bool probe, uintptr_t retaddr)

[PULL v2 7/9] vfio-ccw: Attempt to clean up all IRQs on error

2021-05-20 Thread Cornelia Huck
From: Eric Farman The vfio_ccw_unrealize() routine makes an unconditional attempt to unregister every IRQ notifier, though they may not have been registered in the first place (when running on an older kernel, for example). Let's mirror this behavior in the error cleanups in vfio_ccw_realize()

[PULL v2 5/9] vfio-ccw: Permit missing IRQs

2021-05-20 Thread Cornelia Huck
From: Eric Farman Commit 690e29b91102 ("vfio-ccw: Refactor ccw irq handler") changed one of the checks for the IRQ notifier registration from saying "the host needs to recognize the only IRQ that exists" to saying "the host needs to recognize ANY IRQ that exists." And this worked fine, because

[PULL v2 6/9] hw/s390x/ccw: Register qbus type in abstract TYPE_CCW_DEVICE parent

2021-05-20 Thread Cornelia Huck
From: Philippe Mathieu-Daudé Instead of having all TYPE_CCW_DEVICE children set the bus type to TYPE_VIRTUAL_CSS_BUS, do it once in the abstract parent. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Eric Farman Message-Id: <20210424145313.3287400-1-f4...@amsat.org> Signed-off-by: Cornelia

[PULL v2 2/9] target/arm: Make sure that commpage's tb->size != 0

2021-05-20 Thread Cornelia Huck
From: Ilya Leoshkevich tb_gen_code() assumes that tb->size must never be zero, otherwise it may produce spurious exceptions. For ARM this may happen when creating a translation block for the commpage. Fix by pretending that commpage translation blocks have at least one instruction.

[PULL v2 1/9] target/s390x: Fix translation exception on illegal instruction

2021-05-20 Thread Cornelia Huck
From: Ilya Leoshkevich Hitting an uretprobe in a s390x TCG guest causes a SIGSEGV. What happens is: * uretprobe maps a userspace page containing an invalid instruction. * uretprobe replaces the target function's return address with the address of that page. * When tb_gen_code() is called on

[PULL v2 3/9] target/xtensa: Make sure that tb->size != 0

2021-05-20 Thread Cornelia Huck
From: Ilya Leoshkevich tb_gen_code() assumes that tb->size must never be zero, otherwise it may produce spurious exceptions. For xtensa this may happen when decoding an unknown instruction, when handling a write into the CCOUNT or CCOMPARE special register and when single-stepping the first

[PULL v2 4/9] accel/tcg: Assert that tb->size != 0 after translation

2021-05-20 Thread Cornelia Huck
From: Ilya Leoshkevich If arch-specific code generates a translation block of size 0, tb_gen_code() may generate a spurious exception. Add an assertion in order to catch such situations early. Signed-off-by: Ilya Leoshkevich Reviewed-by: David Hildenbrand Message-Id:

[PULL v2 0/9] s390x update

2021-05-20 Thread Cornelia Huck
180521-2' into staging (2021-05-20 10:00:58 +0100) are available in the Git repository at: https://gitlab.com/cohuck/qemu.git tags/s390x-20210520-v2 for you to fetch changes up to f66487756b0553b156d8e3e81bc6411cfc38176e: tests/tcg/x86_64: add vsyscall smoke test (2021-05-20 14:19:30

Re: [PULL 42/46] softfloat: Move div_floats to softfloat-parts.c.inc

2021-05-20 Thread Peter Maydell
On Thu, 20 May 2021 at 17:15, Richard Henderson wrote: > > On 5/20/21 8:40 AM, Peter Maydell wrote: > > On Sun, 16 May 2021 at 13:38, Richard Henderson > > Hi -- Coverity is suspicious about this line (CID 1453209), > > because udiv_qrrnd()'s prototype is > > static inline uint64_t

Re: [RFC PATCH v2] gitlab: add special rule for the hexagon container

2021-05-20 Thread Willian Rampazzo
On Thu, May 20, 2021 at 12:38 PM Alex Bennée wrote: > > The hexagon container is always manually built but of course not > everyone will be building it themselves and pushing to their > registries. We still need to create a "local" registry copy for the > actual gitlab tests to run. We don't

Re: [RFC PATCH v2] gitlab: add special rule for the hexagon container

2021-05-20 Thread Cornelia Huck
On Thu, 20 May 2021 16:38:31 +0100 Alex Bennée wrote: > The hexagon container is always manually built but of course not > everyone will be building it themselves and pushing to their > registries. We still need to create a "local" registry copy for the > actual gitlab tests to run. We don't

  1   2   3   4   >