Re: [PATCH 0/3] Disable vhost device IOTLB is IOMMU is not enabled

2021-08-03 Thread Chao Gao
On Wed, Aug 04, 2021 at 11:48:00AM +0800, Jason Wang wrote: >Hi: > >We currently try to enable device IOTLB when iommu_platform is >set. This may lead unnecessary trasnsactions between qemu and vhost >when vIOMMU is not used (which is the typical case for the encrypted >VM). > >So patch tries to

Re: [Question] Reduce the msix_load cost for VFIO device

2021-08-03 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
在 2021/8/3 22:19, Alex Williamson 写道: > On Tue, 3 Aug 2021 16:43:07 +0800 > "Longpeng (Mike, Cloud Infrastructure Service Product Dept.)" > wrote: > >> Hi Alex, >> >> We found that the msix_load() will cost 40~50ms if the VF has 60+ interrupts, >> the following code cost too much for each

[PATCH 3/3] vhost: correctly detect the enabling IOMMU

2021-08-03 Thread Jason Wang
Vhost used to compare the dma_as against the address_space_memory to detect whether the IOMMU is enabled or not. This might not work well since the virito-bus may call get_dma_as if VIRTIO_F_IOMMU_PLATFORM is set without an actual IOMMU enabled when device is plugged. In the case of PCI where

[PATCH 2/3] virtio-pci: implement iommu_enabled()

2021-08-03 Thread Jason Wang
This patch implements the PCI transport version of iommu_enabled. This is done by comparing the address space returned by pci_device_iommu_address_space() against address_space_memory. Note that an ideal approach is to use pci_device_iommu_address_space() in get_dma_as(), but it might not work

[PATCH 1/3] virtio-bus: introduce iommu_enabled()

2021-08-03 Thread Jason Wang
This patch introduce a new method for the virtio-bus for the transport to report whether or not the IOMMU is enabled for the device. Signed-off-by: Jason Wang --- hw/virtio/virtio-bus.c | 14 ++ include/hw/virtio/virtio-bus.h | 4 +++- 2 files changed, 17 insertions(+), 1

[PATCH 0/3] Disable vhost device IOTLB is IOMMU is not enabled

2021-08-03 Thread Jason Wang
Hi: We currently try to enable device IOTLB when iommu_platform is set. This may lead unnecessary trasnsactions between qemu and vhost when vIOMMU is not used (which is the typical case for the encrypted VM). So patch tries to use transport specific method to detect the enalbing of vIOMMU and

Re: [PATCH] vhost: use large iotlb entry if no IOMMU translation is needed

2021-08-03 Thread Jason Wang
On Wed, Aug 4, 2021 at 5:11 AM Peter Xu wrote: > > On Tue, Aug 03, 2021 at 04:14:57PM +0800, Jason Wang wrote: > > > > 在 2021/8/3 下午1:51, Chao Gao 写道: > > > On Tue, Aug 03, 2021 at 12:43:58PM +0800, Jason Wang wrote: > > > > 在 2021/8/3 下午12:29, Chao Gao 写道: > > > > > Ping. Could someone help to

RE: Question about delaying dirty log stop to next vm_start

2021-08-03 Thread Zhoujian (jay)
Hi Yi, > -Original Message- > From: Yi Sun [mailto:yi.y@linux.intel.com] > Sent: Monday, August 2, 2021 3:54 PM > To: Zhoujian (jay) > Cc: qemu-devel@nongnu.org; pbonz...@redhat.com; sanjay.k.ku...@intel.com; > yi.l@intel.com; yi.y@linux.intel.com > Subject: Question about

Re: [PATCH] hw/net: Discard overly fragmented packets

2021-08-03 Thread Jason Wang
在 2021/8/3 下午5:51, Philippe Mathieu-Daudé 写道: On 8/3/21 11:33 AM, Thomas Huth wrote: On 05/07/2021 10.40, Philippe Mathieu-Daudé wrote: Our infrastructure can handle fragmented packets up to NET_MAX_FRAG_SG_LIST (64) pieces. This hard limit has been proven enough in production for years. If

[PATCH 6/6] docs/devel: create "Miscellaneous Topics" subsection

2021-08-03 Thread John Snow
The hallmark of any truly great taxonomical reorganization: the bin of leftover bits and pieces that didn't neatly fit elsewhere. Signed-off-by: John Snow --- docs/devel/index.rst| 9 + docs/devel/section-misc.rst | 15 +++ 2 files changed, 16 insertions(+), 8

[PATCH 5/6] docs/devel: create "Subsystem APIs" subsection

2021-08-03 Thread John Snow
Signed-off-by: John Snow --- I tried to grab documents that appeared to document literal internal interfaces of QEMU (that weren't better described by some other subsection) and put them here in this section. Name isn't perfect, feel free to suggest alternatives. Signed-off-by: John Snow ---

Re: [PATCH v2 1/4] hw/intc: Rename sifive_clint sources to riscv_aclint sources

2021-08-03 Thread Alistair Francis
On Sat, Jul 24, 2021 at 10:24 PM Anup Patel wrote: > > We will be upgrading SiFive CLINT implementation into RISC-V ACLINT > implementation so let's first rename the sources. > > Signed-off-by: Anup Patel Reviewed-by: Alistair Francis Alistair > --- > hw/intc/Kconfig

[PATCH 3/6] docs/devel: create "Testing & Debugging" subsection

2021-08-03 Thread John Snow
Signed-off-by: John Snow --- docs/devel/index.rst | 6 +- docs/devel/section-testing-debugging.rst | 12 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 docs/devel/section-testing-debugging.rst diff --git a/docs/devel/index.rst

[PATCH 4/6] docs/devel: create TCG subsection

2021-08-03 Thread John Snow
Signed-off-by: John Snow --- docs/devel/index.rst | 5 + docs/devel/section-tcg.rst | 11 +++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 docs/devel/section-tcg.rst diff --git a/docs/devel/index.rst b/docs/devel/index.rst index

[PATCH 0/6] docs/devel: Organize devel manual into further subsections

2021-08-03 Thread John Snow
It's a bit cluttered. On my way to converting the QAPI/QMP documents to ReST I thought it could do with another organizational level to help make sense of things a bit more quickly. John Snow (6): docs/devel: create "Community & Governance" subsection docs/devel: create "Developing QEMU"

[PATCH 1/6] docs/devel: create "Community & Governance" subsection

2021-08-03 Thread John Snow
Plonk the Code of Conduct and Conflict Resolution Policy guides into a new "Community & Governance" subsection. Signed-off-by: John Snow --- docs/devel/index.rst| 3 +-- docs/devel/section-community-governance.rst | 9 + 2 files changed, 10 insertions(+), 2

[PATCH 2/6] docs/devel: create "Developing QEMU" subsection

2021-08-03 Thread John Snow
Signed-off-by: John Snow --- docs/devel/index.rst | 6 +- docs/devel/section-development.rst | 12 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 docs/devel/section-development.rst diff --git a/docs/devel/index.rst b/docs/devel/index.rst

Re: [PATCH] Makefile: Fix cscope issues on MacOS and soft links

2021-08-03 Thread Peter Xu
Hi, Alex, On Tue, Aug 03, 2021 at 11:18:36PM +0100, Alex Bennée wrote: > > Peter Xu writes: > > > This patch fixes actually two issues with 'make cscope'. > > > > Firstly, it fixes the command for MacOS "find" command as MacOS will append > > the > > full path of "$(SRC_PATH)/" before each

Re: [PATCH v2] accel/tcg/user-exec: Fix read-modify-write of code on s390 hosts

2021-08-03 Thread Richard Henderson
On 8/3/21 12:16 PM, Ilya Leoshkevich wrote: x86_64 dotnet/runtime uses cmpxchg for code patching. When running it under s390x qemu-linux user, cpu_signal_handler() does not recognize this as a write and does not restore PAGE_WRITE cleared by tb_page_add(), incorrectly forwarding the signal to

[PATCH v4] virtio/vsock: add two more queues for datagram types

2021-08-03 Thread Jiang Wang
Datagram sockets are connectionless and unreliable. The sender does not know the capacity of the receiver and may send more packets than the receiver can handle. Add two more dedicate virtqueues for datagram sockets, so that it will not unfairly steal resources from stream and future

Re: [PATCH] Makefile: Fix cscope issues on MacOS and soft links

2021-08-03 Thread Alex Bennée
Peter Xu writes: > This patch fixes actually two issues with 'make cscope'. > > Firstly, it fixes the command for MacOS "find" command as MacOS will append > the > full path of "$(SRC_PATH)/" before each found entry, then after the final "./" > replacement trick it'll look like (e.g.,

[PATCH v2] accel/tcg/user-exec: Fix read-modify-write of code on s390 hosts

2021-08-03 Thread Ilya Leoshkevich
x86_64 dotnet/runtime uses cmpxchg for code patching. When running it under s390x qemu-linux user, cpu_signal_handler() does not recognize this as a write and does not restore PAGE_WRITE cleared by tb_page_add(), incorrectly forwarding the signal to the guest code. Signed-off-by: Ilya Leoshkevich

Re: [PATCH 0/3] Gitlab-CI improvements

2021-08-03 Thread Alex Bennée
Thomas Huth writes: > Here are three patches for some small issues that I noticed in our > gitlab-CI files recently... Queued to for-6.1/misc-fixes-for-rc2, thanks. > > Thomas Huth (3): > gitlab-ci: Merge "build-disabled" with "build-without-default-features" > gitlab-ci: Remove

[PATCH for-6.1?] util: Suppress -Wstringop-overflow in qemu_thread_start

2021-08-03 Thread Richard Henderson
This seems to be either a glibc or gcc bug, but the code appears to be fine with the warning suppressed. Signed-off-by: Richard Henderson --- The host is running Centos 7.9, so technically, this is out-of-support. But this is a gcc compile farm machine, so I'm stuck with it. The rest of qemu

Re: [PATCH] accel/tcg/user-exec: Fix read-modify-write of code on s390 hosts

2021-08-03 Thread Richard Henderson
On 8/3/21 9:54 AM, Ilya Leoshkevich wrote: /* ??? On linux, the non-rt signal handler has 4 (!) arguments instead - of the normal 2 arguments. The 3rd argument contains the "int_code" - from the hardware which does in fact contain the is_write value. + of the normal 2

Re: [PATCH v1] softmmu/physmem: fix wrong assertion in qemu_ram_alloc_internal()

2021-08-03 Thread Peter Xu
On Mon, Aug 02, 2021 at 05:22:38PM +0200, David Hildenbrand wrote: > When adding RAM_NORESERVE, we forgot to remove the old assertion when > adding the updated one, most probably when reworking the patches or > rebasing. We can easily crash QEMU by adding > -object

Re: [PATCH] vhost: use large iotlb entry if no IOMMU translation is needed

2021-08-03 Thread Peter Xu
On Tue, Aug 03, 2021 at 04:14:57PM +0800, Jason Wang wrote: > > 在 2021/8/3 下午1:51, Chao Gao 写道: > > On Tue, Aug 03, 2021 at 12:43:58PM +0800, Jason Wang wrote: > > > 在 2021/8/3 下午12:29, Chao Gao 写道: > > > > Ping. Could someone help to review this patch? > > > > > > > > Thanks > > > > Chao > > >

Re: [PATCH v5 0/2] plugins/cache: multicore cache modelling

2021-08-03 Thread Alex Bennée
Mahmoud Mandour writes: > Hello, > > This series introduce multicore cache modelling in contrib/plugins/cache.c > > Multi-core cache modelling is handled such that for full-system > emulation, a private L1 cache is maintained to each core available to > the system. For multi-threaded userspace

Re: [PATCH] linux-user: fix guest/host address mixup in i386 setup_rt_frame()

2021-08-03 Thread Richard Henderson
On 8/3/21 7:18 AM, Ilya Leoshkevich wrote: setup_rt_frame() passes siginfo and ucontext host addresses to guest signal handlers, causing problems when e.g. emulating x86_64 on s390x. Signed-off-by: Ilya Leoshkevich --- linux-user/i386/signal.c | 8 1 file changed, 4 insertions(+), 4

[PULL 1/5] hw/pcie-root-port: Fix hotplug for PCI devices requiring IO

2021-08-03 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Q35 has now ACPI hotplug enabled by default for PCI(e) devices. As opposed to native PCIe hotplug, guests like Fedora 34 will not assign IO range to pcie-root-ports not supporting native hotplug, resulting into a regression. Reproduce by: qemu-bin -M q35 -device

[PULL 5/5] Drop _DSM 5 from expected DSDTs on ARM

2021-08-03 Thread Michael S. Tsirkin
diff -rup /tmp/old/tests/data/acpi/microvm/DSDT.pcie.dsl /tmp/new/tests/data/acpi/microvm/DSDT.pcie.dsl --- /tmp/old/tests/data/acpi/microvm/DSDT.pcie.dsl 2021-08-03 16:22:52.289295442 -0400 +++ /tmp/new/tests/data/acpi/microvm/DSDT.pcie.dsl 2021-08-03 16:22:40.102286317 -0400 @@

[PULL 3/5] arm/acpi: allow DSDT changes

2021-08-03 Thread Michael S. Tsirkin
We are going to commit ccee1a8140 ("acpi: Update _DSM method in expected files"). Allow changes to DSDT on ARM. Only configs with pci are affected thus all virt variants but for microvm only the pcie variant. Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 5

Re: migration-test hang, s390x host, aarch64 guest

2021-08-03 Thread Peter Xu
On Mon, Aug 02, 2021 at 09:55:55AM +0100, Dr. David Alan Gilbert wrote: > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > migration-test hung again during 'make check'. > > ccing in Peter Xu > > > Process tree: > > > > ubuntu 42067 0.0 0.0 5460 3156 ?S13:55 0:00 > >

[PULL 4/5] Revert "acpi/gpex: Inform os to keep firmware resource map"

2021-08-03 Thread Michael S. Tsirkin
This reverts commit 0cf8882fd06ba0aeb1e90fa6f23fce85504d7e14. Which this commit, with aarch64 when using efi PCI devices with IO ports do not work. The reason is that EFI creates I/O port mappings below 0x1000 (in fact, at 0). However Linux, for legacy reasons, does not support I/O ports <=

[PULL 2/5] acpi: x86: pcihp: add support hotplug on multifunction bridges

2021-08-03 Thread Michael S. Tsirkin
From: Igor Mammedov Commit [1] switched PCI hotplug from native to ACPI one by default. That however breaks hotplug on following CLI that used to work: -nodefaults -machine q35 \ -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \ -device

[PULL 0/5] pc,pci: bugfixes

2021-08-03 Thread Michael S. Tsirkin
The following changes since commit f2da205cb4142259d9bc6b9d4596ebbe2426fe49: Update version for v6.1.0-rc1 release (2021-07-27 18:07:52 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to

Re: [PATCH 2/2] Acceptance Tests: updates to the MAINTAINERS file

2021-08-03 Thread Willian Rampazzo
On Tue, Aug 3, 2021 at 4:35 PM Cleber Rosa wrote: > > The tests/acceptance directory is currently lacking a maintainer > entry, even though I've been performing that role (of course with help > from many others). Thus, its status is, even more now, Maintained. > > This also removes the currently

Re: [PATCH 1/2] Acceptance Tests: add standard clean up at test tearDown()

2021-08-03 Thread Willian Rampazzo
On Tue, Aug 3, 2021 at 4:35 PM Cleber Rosa wrote: > > The avocado.Test class, used as the basis of the avocado_qemu.Test > class, performs a clean of temporary directories up as part of its own > tearDown() implementation. > > But the avocado_qemu.Test class is currently missing the same clean >

[PATCH] accel/tcg/user-exec: Fix read-modify-write of code on s390 hosts

2021-08-03 Thread Ilya Leoshkevich
x86_64 dotnet/runtime uses cmpxchg for code patching. When running it under s390x qemu-linux user, cpu_signal_handler() does not recognize this as a write and does not restore PAGE_WRITE cleared by tb_page_add(), incorrectly forwarding the signal to the guest code. Signed-off-by: Ilya Leoshkevich

[PATCH v7] tests/tcg/s390x: Test SIGILL and SIGSEGV handling

2021-08-03 Thread Ilya Leoshkevich
Verify that s390x-specific uc_mcontext.psw.addr is reported correctly and that signal handling interacts properly with debugging. Signed-off-by: Ilya Leoshkevich --- v6: https://lists.nongnu.org/archive/html/qemu-devel/2021-07/msg00873.html v6 -> v7: Rebased. tests/tcg/s390x/Makefile.target

[PATCH 2/2] Acceptance Tests: updates to the MAINTAINERS file

2021-08-03 Thread Cleber Rosa
The tests/acceptance directory is currently lacking a maintainer entry, even though I've been performing that role (of course with help from many others). Thus, its status is, even more now, Maintained. This also removes the currently broken Trello board link, which was make unavailable

[PATCH 0/2] Acceptance Tests: clean up of temporary dirs and MAINTAINERS entry

2021-08-03 Thread Cleber Rosa
This is a reply to an issue[1] reported by Peter, and while at it, an update of the MAINTAINERS entry so other people now the status and where to go for help with regards to the acceptance tests' infrastructure. [1] https://lists.gnu.org/archive/html/qemu-devel/2021-08/msg00349.html Cleber Rosa

[PATCH 1/2] Acceptance Tests: add standard clean up at test tearDown()

2021-08-03 Thread Cleber Rosa
The avocado.Test class, used as the basis of the avocado_qemu.Test class, performs a clean of temporary directories up as part of its own tearDown() implementation. But the avocado_qemu.Test class is currently missing the same clean up, as it implemented its own tearDown() method without

Re: [PATCH v2 0/1] Add remote I2C device to support external I2C device

2021-08-03 Thread Corey Minyard
On Mon, Aug 02, 2021 at 11:03:22PM +, Shengtan Mao wrote: > This patch implements the remote I2C device. > The remote I2C device allows an external I2C device to communicate with the > I2C controller in QEMU through the remote I2C protocol. > Users no longer have to directly modify QEMU to

Re: Re: [RFC v3] virtio/vsock: add two more queues for datagram types

2021-08-03 Thread Jiang Wang .
On Wed, Jul 7, 2021 at 10:27 AM Stefano Garzarella wrote: > > On Wed, Jul 07, 2021 at 09:52:46AM -0700, Jiang Wang . wrote: > >On Wed, Jul 7, 2021 at 1:33 AM Stefano Garzarella > >wrote: > >> > >> On Tue, Jul 06, 2021 at 10:26:07PM +, Jiang Wang wrote: > >> >Datagram sockets are

Re: [PULL v4 0/1] Libslirp patches

2021-08-03 Thread Peter Maydell
On Tue, 3 Aug 2021 at 15:18, wrote: > > From: Marc-André Lureau > > The following changes since commit 7f1cab9c628a798ae2607940993771e6300e9e00: > > Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' > into staging (2021-08-02 17:21:50 +0100) > > are available in the Git

[PATCH v3 24/25] python: bump avocado to v90.0

2021-08-03 Thread John Snow
Avocado v90 includes improved support for running async unit tests. The workaround that existed prior to v90 causes the unit tests to fail afterwards, however, so upgrade our minimum version pin to the very latest and greatest. Signed-off-by: John Snow --- python/Pipfile.lock | 8

[PATCH v3 23/25] python/aqmp: add scary message

2021-08-03 Thread John Snow
Add a warning whenever AQMP is used to steer people gently away from using it for the time-being. Signed-off-by: John Snow --- python/qemu/aqmp/__init__.py | 14 ++ 1 file changed, 14 insertions(+) diff --git a/python/qemu/aqmp/__init__.py b/python/qemu/aqmp/__init__.py index

[PATCH v3 22/25] python/aqmp: add asyncio_run compatibility wrapper

2021-08-03 Thread John Snow
As a convenience. It isn't used by the library itself, but it is used by the test suite. It will also come in handy for users of the library still on Python 3.6. Signed-off-by: John Snow --- python/qemu/aqmp/util.py | 19 +++ 1 file changed, 19 insertions(+) diff --git

[PATCH v3 21/25] python/aqmp: add _raw() execution interface

2021-08-03 Thread John Snow
This is added in anticipation of wanting it for a synchronous wrapper for the iotest interface. Normally, execute() and execute_msg() both raise QMP errors in the form of Python exceptions. Many iotests expect the entire reply as-is. To reduce churn there, add a private execution interface that

[PATCH v3 14/25] python/aqmp: add well-known QMP object models

2021-08-03 Thread John Snow
The QMP spec doesn't define very many objects that are iron-clad in their format, but there are a few. This module makes it trivial to validate them without relying on an external third-party library. Signed-off-by: John Snow --- python/qemu/aqmp/models.py | 133

[PATCH v3 20/25] python/aqmp: add execute() interfaces

2021-08-03 Thread John Snow
Add execute() and execute_msg(). _execute() is split into _issue() and _reply() halves so that hypothetical subclasses of QMP that want to support different execution paradigms can do so. I anticipate a synchronous interface may have need of separating the send/reply phases. However, I do not

[PATCH v3 16/25] python/pylint: disable too-many-function-args

2021-08-03 Thread John Snow
too-many-function-args seems prone to failure when considering things like Method Resolution Order, which mypy gets correct. When dealing with multiple inheritance, pylint doesn't seem to understand which method will actually get called, while mypy does. Remove the less powerful, redundant check.

[PATCH v3 13/25] python/aqmp: add QMP Message format

2021-08-03 Thread John Snow
The Message class is here primarily to serve as a solid type to use for mypy static typing for unambiguous annotation and documentation. We can also stuff JSON serialization and deserialization into this class itself so it can be re-used even outside this infrastructure. Signed-off-by: John Snow

[PATCH v3 17/25] python/aqmp: add QMP protocol support

2021-08-03 Thread John Snow
The star of our show! Add most of the QMP protocol, sans support for actually executing commands. No problem, that happens in the next several commits. Signed-off-by: John Snow --- python/qemu/aqmp/__init__.py | 2 + python/qemu/aqmp/qmp_client.py | 264 + 2

[PATCH v3 12/25] python/aqmp: add AsyncProtocol._readline() method

2021-08-03 Thread John Snow
This is added as a courtesy: many protocols are line-based, including QMP. Putting it in AsyncProtocol lets us keep the QMP class implementation just a pinch more abstract. (And, if we decide to add a QTEST implementation later, it will need this, too. (Yes, I have a QTEST implementation.))

[PATCH v3 15/25] python/aqmp: add QMP event support

2021-08-03 Thread John Snow
This class was designed as a "mix-in" primarily so that the feature could be given its own treatment in its own python module. It gets quite a bit too long otherwise. Signed-off-by: John Snow --- python/qemu/aqmp/__init__.py | 2 + python/qemu/aqmp/events.py | 706

[PATCH v3 11/25] python/aqmp: add _cb_inbound and _cb_outbound logging hooks

2021-08-03 Thread John Snow
Add hooks designed to log/filter incoming/outgoing messages. The primary intent for these is to be able to support iotests which may want to log messages with specific filters for reproducible output. Another use is for plugging into Urwid frameworks; all messages in/out can be automatically

[PATCH v3 25/25] python/aqmp: add AsyncProtocol unit tests

2021-08-03 Thread John Snow
This tests most of protocol.py -- From a hacked up Coverage.py run, it's at about 86%. There's a few error cases that aren't very well tested yet, they're hard to induce artificially so far. I'm working on it. Signed-off-by: John Snow --- python/tests/null_proto.py | 70 +

[PATCH v3 07/25] python/aqmp: Add logging utility helpers

2021-08-03 Thread John Snow
Signed-off-by: John Snow --- python/qemu/aqmp/util.py | 56 1 file changed, 56 insertions(+) diff --git a/python/qemu/aqmp/util.py b/python/qemu/aqmp/util.py index 5b8f968969d..52a15321889 100644 --- a/python/qemu/aqmp/util.py +++

[PATCH v3 04/25] python/aqmp: add asyncio compatibility wrappers

2021-08-03 Thread John Snow
Python 3.6 does not have all of the goodies that Python 3.7 does, and we need to support both. Add some compatibility wrappers needed for this purpose. (Note: Python 3.6 is EOL December 2021.) Signed-off-by: John Snow --- python/qemu/aqmp/util.py | 89

Re: [PATCH] linux-user/elfload: byteswap i386 registers when dumping core

2021-08-03 Thread Peter Maydell
On Tue, 3 Aug 2021 at 18:21, Ilya Leoshkevich wrote: > > Core dumps from emulating x86_64 on big-endian hosts contain incorrect > register values. > > Signed-off-by: Ilya Leoshkevich Looks like these two were the only two guest arch versions of this function that were missing the tswapreg

[PATCH v3 09/25] python/aqmp: add AsyncProtocol.accept() method

2021-08-03 Thread John Snow
It's a little messier than connect, because it wasn't designed to accept *precisely one* connection. Such is life. Signed-off-by: John Snow --- python/qemu/aqmp/protocol.py | 89 ++-- 1 file changed, 85 insertions(+), 4 deletions(-) diff --git

[PATCH v3 10/25] python/aqmp: add configurable read buffer limit

2021-08-03 Thread John Snow
QMP can transmit some pretty big messages, and the default limit of 64KB isn't sufficient. Make sure that we can configure it. Reported-by: G S Niteesh Babu Signed-off-by: John Snow --- python/qemu/aqmp/protocol.py | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff

[PATCH v3 06/25] python/aqmp: add runstate state machine to AsyncProtocol

2021-08-03 Thread John Snow
This serves a few purposes: 1. Protect interfaces when it's not safe to call them (via @require) 2. Add an interface by which an async client can determine if the state has changed, for the purposes of connection management. Signed-off-by: John Snow --- python/qemu/aqmp/__init__.py | 6 +-

[PATCH v3 19/25] python/aqmp: Add message routing to QMP protocol

2021-08-03 Thread John Snow
Add the ability to handle and route messages in qmp_protocol.py. The interface for actually sending anything still isn't added until next commit. Signed-off-by: John Snow --- python/qemu/aqmp/qmp_client.py | 122 - 1 file changed, 120 insertions(+), 2

[PATCH v3 00/25] python: introduce Asynchronous QMP package

2021-08-03 Thread John Snow
GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-async-qmp-aqmp CI: https://gitlab.com/jsnow/qemu/-/pipelines/347375602 Docs: https://people.redhat.com/~jsnow/sphinx/html/qemu.aqmp.html Hi! This patch series adds an Asynchronous QMP package to the Python library. It offers a few

[PATCH v3 05/25] python/aqmp: add generic async message-based protocol support

2021-08-03 Thread John Snow
This is the bare minimum that you need to establish a full-duplex async message-based protocol with Python's asyncio. The features to be added in forthcoming commits are: - Runstate tracking - Logging - Support for incoming connections via accept() - _cb_outbound, _cb_inbound message hooks -

[PATCH v3 08/25] python/aqmp: add logging to AsyncProtocol

2021-08-03 Thread John Snow
Give the connection and the reader/writer tasks nicknames, and add logging statements throughout. Signed-off-by: John Snow --- python/qemu/aqmp/protocol.py | 82 1 file changed, 73 insertions(+), 9 deletions(-) diff --git a/python/qemu/aqmp/protocol.py

[PATCH v3 18/25] python/pylint: disable no-member check

2021-08-03 Thread John Snow
mypy handles this better -- but we only need the workaround because pylint under Python 3.6 does not understand that a MutableMapping really does have a .get() method attached. We could remove this again once 3.7 is our minimum. Signed-off-by: John Snow --- python/setup.cfg | 1 + 1 file

[PATCH v3 01/25] python/aqmp: add asynchronous QMP (AQMP) subpackage

2021-08-03 Thread John Snow
For now, it's empty! Soon, it won't be. Signed-off-by: John Snow Reviewed-by: Eric Blake --- python/qemu/aqmp/__init__.py | 27 +++ python/qemu/aqmp/py.typed| 0 python/setup.cfg | 1 + 3 files changed, 28 insertions(+) create mode 100644

[PATCH v3 03/25] python/pylint: Add exception for TypeVar names ('T')

2021-08-03 Thread John Snow
'T' is a common TypeVar name, allow its use. See also https://github.com/PyCQA/pylint/issues/3401 -- In the future, we might be able to have a separate list of acceptable names for TypeVars exclusively. Signed-off-by: John Snow Reviewed-by: Eric Blake --- python/setup.cfg | 1 + 1 file

[PATCH v3 02/25] python/aqmp: add error classes

2021-08-03 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Eric Blake --- python/qemu/aqmp/__init__.py | 4 +++ python/qemu/aqmp/error.py| 50 2 files changed, 54 insertions(+) create mode 100644 python/qemu/aqmp/error.py diff --git a/python/qemu/aqmp/__init__.py

Re: [PATCH v2 01/55] hw/core: Make do_unaligned_access noreturn

2021-08-03 Thread Richard Henderson
On 8/3/21 5:47 AM, Alex Bennée wrote: These trailing QEMU_NORETURN's seem to be fairly uncommon in the existing code. Showing my age, I suppose. Once upon a time it was the only place you *could* put it in a declaration (as opposed to definition). r~

Re: [PATCH v2 02/24] python/aqmp: add error classes

2021-08-03 Thread John Snow
On Tue, Aug 3, 2021 at 1:40 PM Eric Blake wrote: > On Tue, Aug 03, 2021 at 01:34:32PM -0400, John Snow wrote: > > Got it. I was *just* about to send a refreshed version of this patchset > > because I found a new bug while on my way to making a sync compatibility > > shim for iotests -- Do you

Re: [PATCH v6 02/11] qapi: wrap Sequence[str] in an object

2021-08-03 Thread John Snow
On Mon, Aug 2, 2021 at 5:21 AM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Except for the special casing assert in _make_implicit_object_type(), > > which needs to handle schema objects, it's a mechanical change. > > > > Signed-off-by:

[PULL 2/2] hw/sd/sdcard: Fix assertion accessing out-of-range addresses with CMD30

2021-08-03 Thread Philippe Mathieu-Daudé
OSS-Fuzz found sending illegal addresses when querying the write protection bits triggers the assertion added in commit 84816fb63e5 ("hw/sd/sdcard: Assert if accessing an illegal group"): qemu-fuzz-i386-target-generic-fuzz-sdhci-v3: ../hw/sd/sd.c:824: uint32_t sd_wpbits(SDState *, uint64_t):

[PULL 1/2] hw/sd/sdcard: Document out-of-range addresses for SEND_WRITE_PROT

2021-08-03 Thread Philippe Mathieu-Daudé
Per the 'Physical Layer Simplified Specification Version 3.01', Table 4-22: 'Block Oriented Write Protection Commands' SEND_WRITE_PROT (CMD30) If the card provides write protection features, this command asks the card to send the status of the write protection bits [1]. [1] 32 write

Re: [PATCH v2 02/24] python/aqmp: add error classes

2021-08-03 Thread Eric Blake
On Tue, Aug 03, 2021 at 01:34:32PM -0400, John Snow wrote: > Got it. I was *just* about to send a refreshed version of this patchset > because I found a new bug while on my way to making a sync compatibility > shim for iotests -- Do you have more feedback cooking, or should I hit the > send

[PULL 0/2] SD/MMC patches for 2021-08-03

2021-08-03 Thread Philippe Mathieu-Daudé
-20210803 for you to fetch changes up to 4ac0b72bae85cf94ae0e5153b9c2c288c71667d4: hw/sd/sdcard: Fix assertion accessing out-of-range addresses with CMD30 (2021-08-03 19:34:51 +0200) SD/MMC patches queue - sdcard: Fix assertion

Re: [PATCH v2 02/24] python/aqmp: add error classes

2021-08-03 Thread John Snow
Got it. I was *just* about to send a refreshed version of this patchset because I found a new bug while on my way to making a sync compatibility shim for iotests -- Do you have more feedback cooking, or should I hit the send button? --js On Tue, Aug 3, 2021 at 12:02 PM Eric Blake wrote: > On

Re: [PATCH-for-6.1 v2 0/2] hw/sd/sdcard: Fix assertion accessing out-of-range addresses with CMD30

2021-08-03 Thread Philippe Mathieu-Daudé
On 8/3/21 3:46 PM, Alexander Bulekov wrote: > On 210803 0155, Philippe Mathieu-Daudé wrote: >> Fix an assertion reported by OSS-Fuzz, add corresponding qtest. >> >> The change is (now) simple enough for the next rc. >> >> Since v1: >> - Simplified/corrected following Peter's suggestion >> >>

[PATCH] linux-user/elfload: byteswap i386 registers when dumping core

2021-08-03 Thread Ilya Leoshkevich
Core dumps from emulating x86_64 on big-endian hosts contain incorrect register values. Signed-off-by: Ilya Leoshkevich --- linux-user/elfload.c | 88 ++-- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/linux-user/elfload.c

[PATCH] linux-user: fix guest/host address mixup in i386 setup_rt_frame()

2021-08-03 Thread Ilya Leoshkevich
setup_rt_frame() passes siginfo and ucontext host addresses to guest signal handlers, causing problems when e.g. emulating x86_64 on s390x. Signed-off-by: Ilya Leoshkevich --- linux-user/i386/signal.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

Re: Failing iotest 206

2021-08-03 Thread Kevin Wolf
Am 20.07.2021 um 10:32 hat Daniel P. Berrangé geschrieben: > On Mon, Jul 19, 2021 at 08:12:58PM -0500, Eric Blake wrote: > > On Mon, Jul 19, 2021 at 10:06:01AM +0200, Thomas Huth wrote: > > > Hi, > > > > > > iotest 206 fails for me with: > > > > > > > > --- 206.out > > > +++ 206.out.bad > > >

Re: [PULL for-6.1 0/6] qemu-ga patch queue for hard-freeze

2021-08-03 Thread Peter Maydell
On Tue, 3 Aug 2021 at 14:26, Michael Roth wrote: > > Hi Peter, > > Sorry for the late submission. These patches affect only the w32 build of > qemu-ga. A number of these patches I've had queued for some time, but a bug > in the MSI installer that was just fixed was blocking testing. Now that that

[PATCH v3 1/1] hw/i2c: add remote I2C device

2021-08-03 Thread Shengtan Mao
This patch adds the remote I2C device, which supports the usage of external I2C devices. Signed-off-by: Shengtan Mao --- hw/arm/Kconfig| 1 + hw/i2c/Kconfig| 4 + hw/i2c/meson.build| 1 + hw/i2c/remote-i2c.c | 117 ++

[PATCH v3 0/1] Add remote I2C device to support external I2C device

2021-08-03 Thread Shengtan Mao
This patch implements the remote I2C device. The remote I2C device allows an external I2C device to communicate with the I2C controller in QEMU through the remote I2C protocol. Users no longer have to directly modify QEMU to add new I2C devices and can instead implement the emulated device

Re: [PATCH v2 02/24] python/aqmp: add error classes

2021-08-03 Thread Eric Blake
On Fri, Jul 16, 2021 at 08:32:31PM -0400, John Snow wrote: > Signed-off-by: John Snow > --- > python/qemu/aqmp/__init__.py | 4 +++ > python/qemu/aqmp/error.py| 50 > 2 files changed, 54 insertions(+) > create mode 100644 python/qemu/aqmp/error.py >

Re: [PATCH v2 21/55] accel/tcg: Drop signness in tracing in cputlb.c

2021-08-03 Thread Alex Bennée
Richard Henderson writes: > We are already inconsistent about whether or not > MO_SIGN is set in trace_mem_get_info. Dropping it > entirely allows some simplification. I think once 6.2 opens up we should just drop all the trace_mem stuff: Subject: [PATCH v1 5/7] docs: mark intention to

Re: [PATCH v2 20/55] accel/tcg: Report unaligned atomics for user-only

2021-08-03 Thread Alex Bennée
Richard Henderson writes: > Use the newly exposed cpu_unaligned_access for atomic_mmu_lookup, > which has access to complete alignment info from the TCGMemOpIdx arg. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > -void *ret = g2h(env_cpu(env), addr); > + > +ret =

Re: [PATCH v2 02/55] hw/core: Make do_unaligned_access available to user-only

2021-08-03 Thread Alex Bennée
Richard Henderson writes: > We shouldn't be ignoring SIGBUS for user-only. > > Move our existing TCGCPUOps hook out from CONFIG_SOFTMMU. > Move the wrapper, cpu_unaligned_access, to cpu-exec-common.c. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 2/2] doc: Remove trailing spaces

2021-08-03 Thread Peter Maydell
On Tue, 3 Aug 2021 at 16:24, Axel Heider wrote: > Then please drop the patch 2/2 for now and just keep 1/2. I will run > more tests about this and see if I can find a way to avoid the need > for having traling spaces in the file. They are a bit dangerous as > most editors are set up to remove

Re: [PATCH v2 01/55] hw/core: Make do_unaligned_access noreturn

2021-08-03 Thread Alex Bennée
Richard Henderson writes: > While we may have had some thought of allowing system-mode > to return from this hook, we have no guests that require this. > > Signed-off-by: Richard Henderson > --- > include/hw/core/tcg-cpu-ops.h | 3 ++- > target/alpha/cpu.h | 4 ++-- >

Re: [PATCH] plugins/execlog: removed unintended "s" at the end of log lines.

2021-08-03 Thread Alex Bennée
Mahmoud Mandour writes: > Signed-off-by: Mahmoud Mandour Queued to for-6.1/misc-fixes-for-rc2, thanks. -- Alex Bennée

Re: [PATCH for-6.1] hw/arm/boot: Report error if there is no fw_cfg device in the machine

2021-08-03 Thread Peter Maydell
On Tue, 3 Aug 2021 at 15:29, Leif Lindholm wrote: > > On Mon, Jul 26, 2021 at 17:33:51 +0100, Peter Maydell wrote: > > If the user provides both a BIOS/firmware image and also a guest > > kernel filename, arm_setup_firmware_boot() will pass the > > kernel image to the firmware via the fw_cfg

Re: [PULL 0/1] Libslirp update

2021-08-03 Thread Paolo Bonzini
Considering that I am planning the update to 0.58.2 in a couple weeks after release, either -lresolv is fixed for 6.1, or the update should be delayed to 6.2. Paolo Il mar 3 ago 2021, 13:52 Marc-André Lureau ha scritto: > Hi > > On Tue, Aug 3, 2021 at 1:50 PM Peter Maydell > wrote: > >> On

Re: [PATCH 2/2] doc: Remove trailing spaces

2021-08-03 Thread Axel Heider
Peter, Also, did you check that the docs still build without warnings from a range of Sphinx versions and that the rendered HTML still looks the same ? These trailing spaces were largely added deliberately in commit 09ce5f2d6bd6739144, with the comment * rST does not like definition list

[PATCH] plugins/execlog: removed unintended "s" at the end of log lines.

2021-08-03 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/execlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 2de9f0d7d4..a5275dcc15 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -67,7

[PATCH v5 2/2] docs/devel/tcg-plugins: added cores arg to cache plugin

2021-08-03 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/devel/tcg-plugins.rst | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 7e54f12837..863828809d 100644 --- a/docs/devel/tcg-plugins.rst +++

  1   2   3   >