Re: [PATCH v2 4/8] qapi/error: Change assertion

2021-04-15 Thread Markus Armbruster
John Snow writes: > On 3/30/21 1:18 PM, John Snow wrote: > > Realizing now that this commit topic is wrong :) > > A prior version modified the assertion, I decided it was less churn to > simply add one. > > I think ideally we'd have no assertions here and we'd rely on the type > hints, but I do

Re: [PATCH v2 7/8] qapi/error: Add type hints

2021-04-15 Thread Markus Armbruster
John Snow writes: > No functional change. > > Signed-off-by: John Snow > --- > scripts/qapi/error.py | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/scripts/qapi/error.py b/scripts/qapi/error.py > index 2183b8c6b7..6ba54821c9 100644 > --- a/scripts/qapi/erro

[Bug 1924231] [NEW] Getting "qemu: uncaught target signal 11 (Segmentation fault)" when the installing "libc-bin" which "wget" depends on.

2021-04-15 Thread Yasuhiro Horimoto
Public bug reported: the QEMU release version where the bug was found. apt list --installed | grep qemu qemu-user-static/focal-updates,focal-security,now 1:4.2-3ubuntu6.14 amd64 [installed] The installing "libc-bin" which "wget" depends on crashes as below when we execute docker image of Debi

[Bug 1923629] Re: RISC-V Vector Instruction vssub.vv not saturating

2021-04-15 Thread Frank Chang
This should be a quick fix, we will run couple tests again to ensure the fix doesn't break anything. Thanks~ ** Changed in: qemu Assignee: (unassigned) => Frank Chang (frankchang0125) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QE

Re: [PATCH 00/11] Add support for Blob resources feature

2021-04-15 Thread Gerd Hoffmann
Hi, > But I get a feeling that it is inadequate as GTK/GLArea does not manage the > wl_buffers > submitted to the compositor -- EGL does. I suspect we either need to use a > new GTK > mechanism -- that perhaps does not exist yet -- or not use GTK at all for > this. > > I do understand that a

Re: [EXTERNAL] [PATCH v2 2/4] target/ppc: POWER10 supports scv

2021-04-15 Thread Cédric Le Goater
On 4/15/21 7:42 AM, Nicholas Piggin wrote: > This must have slipped through the cracks between adding POWER10 support > and scv support. > > Signed-off-by: Nicholas Piggin Reviewed-by: Cédric Le Goater > --- > target/ppc/translate_init.c.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deleti

Re: [PATCH for-6.1 3/4] qapi/qom.json: Do not use CONFIG_VIRTIO_CRYPTO in common code

2021-04-15 Thread Markus Armbruster
Thomas Huth writes: > On 14/04/2021 15.55, Markus Armbruster wrote: >> Thomas Huth writes: >> >>> The ObjectType enum and ObjectOptions are included from qapi-types-qom.h >>> into common code. We should not use target-specific config switches like >>> CONFIG_VIRTIO_CRYPTO here, since this is no

[RFC-PATCH] ppc/spapr: Add support for H_SCM_PERFORMANCE_STATS hcall

2021-04-15 Thread Vaibhav Jain
Add support for H_SCM_PERFORMANCE_STATS described at [1] for spapr nvdimms. This enables guest to fetch performance stats[2] like expected life of an nvdimm ('MemLife ') etc and display them to the user. Linux kernel support for fetching these performance stats and exposing them to the user-space w

Re: [PATCH for-6.1 3/4] qapi/qom.json: Do not use CONFIG_VIRTIO_CRYPTO in common code

2021-04-15 Thread Thomas Huth
On 15/04/2021 09.44, Markus Armbruster wrote: Thomas Huth writes: On 14/04/2021 15.55, Markus Armbruster wrote: Thomas Huth writes: The ObjectType enum and ObjectOptions are included from qapi-types-qom.h into common code. We should not use target-specific config switches like CONFIG_VIRTI

[PATCH 0/2] vhost-vDPA: doorbell mapping support

2021-04-15 Thread Jason Wang
Hi All: This series tries to implement doorbell mapping support for vhost-vDPA. Tested with virtio-pci vDPA driver. Please review. Jason Wang (2): vhost-vdpa: skip ram device from the IOTLB mapping vhost-vdpa: doorbell mapping support hw/virtio/vhost-vdpa.c | 97 +++

[PATCH 2/2] vhost-vdpa: doorbell mapping support

2021-04-15 Thread Jason Wang
This patch implements the doorbell mapping support for vhost-vDPA. This is simply done by using mmap()/munmap() for the vhost-vDPA fd during device start/stop. For the device without doorbell support, we fall back to eventfd based notification gracefully. Signed-off-by: Jason Wang --- hw/virtio/

[PATCH 1/2] vhost-vdpa: skip ram device from the IOTLB mapping

2021-04-15 Thread Jason Wang
vDPA is not tie to any specific hardware, for safety and simplicity, vhost-vDPA doesn't allow MMIO area to be mapped via IOTLB. Only the doorbell could be mapped via mmap(). So this patch exclude skip the ram device from the IOTLB mapping. Signed-off-by: Jason Wang --- hw/virtio/vhost-vdpa.c | 1

Re: [PATCH 0/2] util/async: print leaked BH name when AioContext finalizes

2021-04-15 Thread Fam Zheng
On 2021-04-14 21:02, Stefan Hajnoczi wrote: > Eric Ernst and I debugged a BH leak and it was more involved than it should > be. > The problem is that BHs don't have a human-readable identifier, so low-level > debugging techniques and inferences about the code are required to figure out > which BH

Re: [PATCH 1/2] qdev: Separate implementations of qdev_get_machine() for user and system

2021-04-15 Thread Greg Kurz
On Sat, 10 Apr 2021 10:59:25 +0200 Markus Armbruster wrote: > Greg Kurz writes: > > > Despite its simple name and common usage of "getting a pointer to > > the machine" in system-mode emulation, qdev_get_machine() has some > > subtilities. > > > > First, it can be called when running user-mode

Re: [PATCH for-6.1 4/4] configure: Poison all current target-specific #defines

2021-04-15 Thread Philippe Mathieu-Daudé
+Richard/Claudio On 4/14/21 1:20 PM, Thomas Huth wrote: > We are generating a lot of target-specific defines in the *-config-devices.h > and *-config-target.h files. Using them in common code is wrong and leads > to very subtle bugs since a "#ifdef CONFIG_SOMETHING" is not working there > as expec

Re: [PATCH] hw/elf_ops: clear uninitialized segment space

2021-04-15 Thread Philippe Mathieu-Daudé
On 4/14/21 2:41 PM, Laurent Vivier wrote: > Le 14/04/2021 à 14:16, Philippe Mathieu-Daudé a écrit : >> On 4/14/21 12:58 PM, Laurent Vivier wrote: >>> When the mem_size of the segment is bigger than the file_size, >>> and if this space doesn't overlap another segment, it needs >>> to be cleared. >>>

Re: [PATCH] include/qemu/osdep.h: Move system includes to top

2021-04-15 Thread Philippe Mathieu-Daudé
On 4/14/21 8:43 PM, Peter Maydell wrote: > Mostly osdep.h puts the system includes at the top of the file; but > there are a couple of exceptions where we include a system header > halfway through the file. Move these up to the top with the rest > so that all the system headers we include are incl

Re: tidying up osdep.h

2021-04-15 Thread Philippe Mathieu-Daudé
On 4/14/21 9:17 PM, Peter Maydell wrote: > (cc'ing people related to the recent 'extern "C"' patches and also > randomly Markus as somebody who's had opinions on header cleanups > in the past...) > > osdep.h as it stands today is a mix of two things: > (1) it has the "must be included by everybod

Re: [PATCH 1/2] util/async: add a human-readable name to BHs for debugging

2021-04-15 Thread Philippe Mathieu-Daudé
On 4/14/21 10:02 PM, Stefan Hajnoczi wrote: > It can be difficult to debug issues with BHs in production environments. > Although BHs can usually be identified by looking up their ->cb() > function pointer, this requires debug information for the program. It is > also not possible to print human-re

Re: tidying up osdep.h

2021-04-15 Thread Markus Armbruster
Peter Maydell writes: > (cc'ing people related to the recent 'extern "C"' patches and also > randomly Markus as somebody who's had opinions on header cleanups > in the past...) > > osdep.h as it stands today is a mix of two things: > (1) it has the "must be included by everybody" items: >(a)

Re: [PATCH 0/3] Acceptance Tests: support choosing specific distro and version

2021-04-15 Thread Philippe Mathieu-Daudé
On 4/15/21 12:14 AM, Cleber Rosa wrote: > Cleber Rosa (3): > Acceptance Tests: rename attribute holding the distro image checksum > Acceptance Tests: move definition of distro checksums to the framework > Acceptance Tests: support choosing specific distro and version > > docs/devel/testing.

Re: [PATCH RFC 3/7] protocol: generic async message-based protocol loop

2021-04-15 Thread Stefan Hajnoczi
On Wed, Apr 14, 2021 at 01:29:40PM -0400, John Snow wrote: > On 4/13/21 4:00 PM, Stefan Hajnoczi wrote: > > On Tue, Apr 13, 2021 at 11:55:49AM -0400, John Snow wrote: > One of the reasons it's split out here like this is because I also wrote a > qtest protocol that uses the same infrastructure. I t

[Bug 1923663] Re: Can't(?) disable default floppy drive any more in qemu 6.0

2021-04-15 Thread Kashyap Chamarthy
I see that Markus Armbruster has responded to the bug on 'qemu-devel' list here: https://lists.nongnu.org/archive/html/qemu-devel/2021-04/msg02177.html Not sure if you (Adam) have noticed, as I don't expect you to subscribe to 'qemu-devel'. So I'm copy/pasting the full comment from Markus here:

Re: [PULL v2 2/3] osdep: protect qemu/osdep.h with extern "C"

2021-04-15 Thread Daniel P . Berrangé
On Wed, Apr 14, 2021 at 07:50:41PM +0100, Peter Maydell wrote: > On Wed, 14 Apr 2021 at 18:26, Daniel P. Berrangé wrote: > > > > On Tue, Apr 13, 2021 at 06:08:49PM +0200, Paolo Bonzini wrote: > > > #ifdef _WIN32 > > > #include "sysemu/os-win32.h" > > > > This and os-posix.h both include other sy

Re: [PATCH RFC 6/7] qmp_protocol: add QMP client implementation

2021-04-15 Thread Stefan Hajnoczi
On Wed, Apr 14, 2021 at 01:50:37PM -0400, John Snow wrote: > On 4/14/21 1:44 AM, Stefan Hajnoczi wrote: > > On Tue, Apr 13, 2021 at 11:55:52AM -0400, John Snow wrote: > > > +async def _execute(self, msg: Message) -> object: > > > +""" > > > +The same as `execute_msg()`, but with

Re: [PATCH v2] i386: Make 'hv-reenlightenment' require explicit 'tsc-frequency' setting

2021-04-15 Thread Vitaly Kuznetsov
Eduardo Habkost writes: > On Wed, Apr 14, 2021 at 03:51:37PM +0200, Vitaly Kuznetsov wrote: >> Eduardo Habkost writes: >> >> > My apologies, this was lost under the noise in my mail inbox. >> > (I promise I'm trying to improve) >> > >> > On Wed, Mar 31, 2021 at 01:39:48PM +0200, Vitaly Kuznetso

Re: [PATCH] include/qemu/osdep.h: Move system includes to top

2021-04-15 Thread Daniel P . Berrangé
On Wed, Apr 14, 2021 at 07:43:43PM +0100, Peter Maydell wrote: > Mostly osdep.h puts the system includes at the top of the file; but > there are a couple of exceptions where we include a system header > halfway through the file. Move these up to the top with the rest > so that all the system heade

Upstream bug comments on the mailing list and Launchpad

2021-04-15 Thread Kashyap Chamarthy
Hi, folks — Many here know that upstream bugs from launchpad get replicated to 'qemu-devel'. But the catch is that it only happens if you _also_ have an account on Launchpad with the same email address with which you're replying on the list. This is easy to forget. So a QEMU developer without a

Re: [PATCH RFC 0/7] RFC: Asynchronous QMP Draft

2021-04-15 Thread Stefan Hajnoczi
On Wed, Apr 14, 2021 at 03:17:48PM -0400, John Snow wrote: > First and foremost, thank you for reviewing this! It is very helpful to me > to see what others think of this pet project I've been growing in the > privacy of my own mind. > > On 4/14/21 2:38 AM, Stefan Hajnoczi wrote: > > Below are the

Re: [PATCH] hw/elf_ops: clear uninitialized segment space

2021-04-15 Thread Philippe Mathieu-Daudé
On 4/15/21 10:44 AM, Philippe Mathieu-Daudé wrote: > On 4/14/21 2:41 PM, Laurent Vivier wrote: >> Le 14/04/2021 à 14:16, Philippe Mathieu-Daudé a écrit : >>> On 4/14/21 12:58 PM, Laurent Vivier wrote: When the mem_size of the segment is bigger than the file_size, and if this space doesn't

[PATCH v2 0/2] hw/elf_ops: clear uninitialized segment space

2021-04-15 Thread Philippe Mathieu-Daudé
Respining Laurent's patch, but extracting the address_space_set() helper. Laurent Vivier (1): hw/elf_ops: clear uninitialized segment space Philippe Mathieu-Daudé (1): exec/memory: Extract address_space_set() from dma_memory_set() include/exec/memory.h | 16 include/hw/elf_

[PATCH v2 2/2] hw/elf_ops: clear uninitialized segment space

2021-04-15 Thread Philippe Mathieu-Daudé
From: Laurent Vivier When the mem_size of the segment is bigger than the file_size, and if this space doesn't overlap another segment, it needs to be cleared. This bug is very similar to the one we had for linux-user, 22d113b52f41 ("linux-user: Fix loading of BSS segments"), where .bss section i

[PATCH v2 1/2] exec/memory: Extract address_space_set() from dma_memory_set()

2021-04-15 Thread Philippe Mathieu-Daudé
dma_memory_set() does a DMA barrier, set the address space with a constant value. The constant value filling code is not specific to DMA and can be used for AddressSpace. Extract it as a new helper: address_space_set(). Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 16 +++

[Bug 1924231] Re: Getting "qemu: uncaught target signal 11 (Segmentation fault)" when the installing "libc-bin" which "wget" depends on.

2021-04-15 Thread Peter Maydell
This is the bug tracker for upstream QEMU. If you'd like to request Ubuntu to backport some fix into their packages of QEMU, you'll need to file it against the Ubuntu QEMU package bug tracker. Since those bugs are also tracked in Launchpad, I'll try re-componenting this bug report to the Ubuntu QEM

[PATCH 0/4] hw/block/fdc: Allow Kconfig-selecting ISA bus/SysBus floppy controllers

2021-04-15 Thread Philippe Mathieu-Daudé
Hi, The floppy disc controllers pulls in irrelevant devices (sysbus in an ISA-only machine, ISA bus + isa devices on a sysbus-only machine). This series clean that by extracting each device in its own file, adding the corresponding Kconfig symbols: FDC_ISA and FDC_SYSBUS. Regards, Phil. Philip

[PATCH 3/4] hw/block/fdc: Extract ISA floppy controllers to fdc-isa.c

2021-04-15 Thread Philippe Mathieu-Daudé
Some machines use floppy controllers via the SysBus interface, and don't need to pull in all the ISA code. Extract the ISA specific code to a new unit: fdc-isa.c, and add a new Kconfig symbol: "FDC_ISA". Signed-off-by: Philippe Mathieu-Daudé --- hw/block/fdc-isa.c | 313 +++

[PATCH 4/4] hw/block/fdc: Extract SysBus floppy controllers to fdc-sysbus.c

2021-04-15 Thread Philippe Mathieu-Daudé
Some machines use floppy controllers via the SysBus interface, and don't need to pull in all the SysBus code. Extract the SysBus specific code to a new unit: fdc-sysbus.c, and add a new Kconfig symbol: "FDC_SYSBUS". Signed-off-by: Philippe Mathieu-Daudé --- hw/block/fdc-sysbus.c | 252 ++

[PATCH 1/4] hw/block/fdc: Replace disabled fprintf() by trace event

2021-04-15 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/block/fdc.c| 7 +-- hw/block/trace-events | 1 + 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index a825c2acbae..1d3a0473678 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -1242,12 +124

Re: [PATCH-for-6.1] hw/isa/piix4: Use qdev_get_gpio_in_named() to get ISA IRQ

2021-04-15 Thread Philippe Mathieu-Daudé
On 3/24/21 7:29 PM, Philippe Mathieu-Daudé wrote: > Since commit 078778c5a55 ("piix4: Add an i8259 Interrupt Controller") > the TYPE_PIIX4_PCI_DEVICE exposes the ISA input IRQs as "isa" alias. > > Use this alias to get IRQ for the power management PCI function. > > Signed-off-by: Philippe Mathieu

[PATCH 2/4] hw/block/fdc: Declare shared prototypes in fdc-internal.h

2021-04-15 Thread Philippe Mathieu-Daudé
We want to extract ISA/SysBus code from the generic fdc.c file. First, declare the prototypes we will access from the new units into a new local header: "fdc-internal.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/block/fdc-internal.h | 155 hw/block/fd

Re: [PATCH 6/6] hw/isa/piix4: Fix leak removing unuseful qemu_allocate_irqs() call

2021-04-15 Thread Philippe Mathieu-Daudé
ping for review? On 3/24/21 12:13 AM, Philippe Mathieu-Daudé wrote: > We locally create an input IRQ with qemu_allocate_irqs() to > pass it as output IRQ of the PIC, but its handler simply dispatch > into another of our output IRQ ("intr" output). > > Simplify by directly connecting the PIC outpu

[PATCH V5 1/6] qapi/net: Add IPFlowSpec and QMP command for COLO passthrough

2021-04-15 Thread Zhang Chen
Since the real user scenario does not need COLO to monitor all traffic. Add colo-passthrough-add and colo-passthrough-del to maintain a COLO network passthrough list. Add IPFlowSpec struct for all QMP commands. Except protocol field is necessary, other fields are optional. Signed-off-by: Zhang Che

[PATCH V5 2/6] util/qemu-sockets.c: Add inet_parse_base to handle InetSocketAddressBase

2021-04-15 Thread Zhang Chen
No need to carry the flag all the time in many scenarios. Signed-off-by: Zhang Chen --- include/qemu/sockets.h | 1 + util/qemu-sockets.c| 14 ++ 2 files changed, 15 insertions(+) diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 7d1f813576..d5abc227eb 100644 -

[PATCH V5 4/6] net/colo-compare: Move data structure and define to .h file.

2021-04-15 Thread Zhang Chen
Rename structure with COLO index and move it to .h file, It make other modules can reuse COLO code. Signed-off-by: Zhang Chen --- net/colo-compare.c | 134 + net/colo-compare.h | 106 +++ 2 files changed, 120 insertions(

[PATCH V5 6/6] net/net.c: Add handler for COLO passthrough connection

2021-04-15 Thread Zhang Chen
Use connection protocol,src port,dst port,src ip,dst ip as the key to bypass certain network traffic in COLO compare. Signed-off-by: Zhang Chen --- net/net.c | 158 +- 1 file changed, 156 insertions(+), 2 deletions(-) diff --git a/net/net.c b/

[PATCH V5 0/6] Passthrough specific network traffic in COLO

2021-04-15 Thread Zhang Chen
Due to some real user scenarios don't need to monitor all traffic. And qemu net-filter also need function to more detailed flow control. This series give user ability to passthrough kinds of COLO network stream. For example, windows guest user want to enable windows remote desktop to touch guest(U

[PATCH V5 3/6] hmp-commands: Add new HMP command for COLO passthrough

2021-04-15 Thread Zhang Chen
Add hmp_colo_passthrough_add and hmp_colo_passthrough_del make user can maintain COLO network passthrough list in human monitor Signed-off-by: Zhang Chen --- hmp-commands.hx | 26 ++ include/monitor/hmp.h | 2 ++ monitor/hmp-cmds.c| 84 +

[PATCH V5 5/6] net/colo-compare: Add passthrough list to CompareState

2021-04-15 Thread Zhang Chen
Add passthrough list for each CompareState. Signed-off-by: Zhang Chen --- net/colo-compare.c | 29 + net/colo-compare.h | 11 +++ 2 files changed, 40 insertions(+) diff --git a/net/colo-compare.c b/net/colo-compare.c index b51b1437ef..fa5a0834b2 100644 --- a/

Re: [PATCH v2 1/2] exec/memory: Extract address_space_set() from dma_memory_set()

2021-04-15 Thread Laurent Vivier
Le 15/04/2021 à 12:04, Philippe Mathieu-Daudé a écrit : > dma_memory_set() does a DMA barrier, set the address space with > a constant value. The constant value filling code is not specific > to DMA and can be used for AddressSpace. Extract it as a new > helper: address_space_set(). > > Signed-off

Re: [PULL v2 0/3] osdep.h + QOM changes for QEMU 6.0-rc3

2021-04-15 Thread Peter Maydell
On Thu, 15 Apr 2021 at 06:57, Markus Armbruster wrote: > > Peter Maydell writes: > > > On Tue, 13 Apr 2021 at 17:18, Paolo Bonzini wrote: > >> Paolo Bonzini (2): > >> osdep: include glib-compat.h before other QEMU headers > >> osdep: protect qemu/osdep.h with extern "C" > >> > >> Tho

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

2021-04-15 Thread Zhang, Chen
> -Original Message- > From: Qemu-devel bounces+chen.zhang=intel@nongnu.org> On Behalf Of Dr. David Alan > Gilbert > Sent: Wednesday, March 24, 2021 4:01 AM > To: Zhang, Chen > Cc: Lukas Straub ; Li Zhijian > ; Jason Wang ; qemu- > dev ; Markus Armbruster > ; Zhang Chen > Subject:

RE: [PATCH V4 4/7] hmp-commands: Add new HMP command for COLO passthrough

2021-04-15 Thread Zhang, Chen
> -Original Message- > From: Dr. David Alan Gilbert > Sent: Wednesday, March 24, 2021 6:40 PM > To: Zhang, Chen > Cc: Jason Wang ; qemu-dev de...@nongnu.org>; Eric Blake ; Markus Armbruster > ; Li Zhijian ; Zhang Chen > ; Lukas Straub > Subject: Re: [PATCH V4 4/7] hmp-commands: Add n

Re: [PATCH 1/2] qdev: Separate implementations of qdev_get_machine() for user and system

2021-04-15 Thread Greg Kurz
On Tue, 13 Apr 2021 18:25:42 -0400 Eduardo Habkost wrote: > On Fri, Apr 09, 2021 at 06:03:38PM +0200, Greg Kurz wrote: > > Despite its simple name and common usage of "getting a pointer to > > the machine" in system-mode emulation, qdev_get_machine() has some > > subtilities. > > > > First, it c

Re: [PATCH v2 1/2] exec/memory: Extract address_space_set() from dma_memory_set()

2021-04-15 Thread Stefano Garzarella
On Thu, Apr 15, 2021 at 12:04:08PM +0200, Philippe Mathieu-Daudé wrote: dma_memory_set() does a DMA barrier, set the address space with a constant value. The constant value filling code is not specific to DMA and can be used for AddressSpace. Extract it as a new helper: address_space_set(). Sign

Re: [PATCH v2 2/2] hw/elf_ops: clear uninitialized segment space

2021-04-15 Thread Stefano Garzarella
On Thu, Apr 15, 2021 at 12:04:09PM +0200, Philippe Mathieu-Daudé wrote: From: Laurent Vivier When the mem_size of the segment is bigger than the file_size, and if this space doesn't overlap another segment, it needs to be cleared. This bug is very similar to the one we had for linux-user, 22d1

[PATCH v4] qapi: introduce 'query-cpu-model-cpuid' action

2021-04-15 Thread Valeriy Vdovin
Introducing new qapi method 'query-cpu-model-cpuid'. This method can be used to get virtualized cpu model info generated by QEMU during VM initialization in the form of cpuid representation. Diving into more details about virtual cpu generation: QEMU first parses '-cpu' command line option. From t

Re: [PATCH v2 1/2] exec/memory: Extract address_space_set() from dma_memory_set()

2021-04-15 Thread Peter Maydell
On Thu, 15 Apr 2021 at 12:00, Stefano Garzarella wrote: > > On Thu, Apr 15, 2021 at 12:04:08PM +0200, Philippe Mathieu-Daudé wrote: > >dma_memory_set() does a DMA barrier, set the address space with > >a constant value. The constant value filling code is not specific > >to DMA and can be used for

Re: [PATCH v3 3/3] accel/tcg: Assert that tb->size != 0 after translation

2021-04-15 Thread Ilya Leoshkevich
On Wed, 2021-04-14 at 18:23 -0700, Max Filippov wrote: > On Wed, Apr 14, 2021 at 12:43 PM Richard Henderson > wrote: > > > > On 4/14/21 11:03 AM, Max Filippov wrote: > > > On Wed, Apr 14, 2021 at 9:51 AM Ilya Leoshkevich < > > > i...@linux.ibm.com> wrote: > > > > On Wed, 2021-04-14 at 16:48 +0200

Re: [PATCH v2 1/2] exec/memory: Extract address_space_set() from dma_memory_set()

2021-04-15 Thread Stefano Garzarella
On Thu, Apr 15, 2021 at 12:05:07PM +0100, Peter Maydell wrote: On Thu, 15 Apr 2021 at 12:00, Stefano Garzarella wrote: On Thu, Apr 15, 2021 at 12:04:08PM +0200, Philippe Mathieu-Daudé wrote: >dma_memory_set() does a DMA barrier, set the address space with >a constant value. The constant value

Re: [PATCH for-6.1 4/4] configure: Poison all current target-specific #defines

2021-04-15 Thread Thomas Huth
On 15/04/2021 10.34, Philippe Mathieu-Daudé wrote: +Richard/Claudio On 4/14/21 1:20 PM, Thomas Huth wrote: We are generating a lot of target-specific defines in the *-config-devices.h and *-config-target.h files. Using them in common code is wrong and leads to very subtle bugs since a "#ifdef C

[Bug 1893040] Re: External modules retreval using Go1.15 on s390x appears to have checksum and ECDSA verification issues

2021-04-15 Thread Nayana
Any update? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1893040 Title: External modules retreval using Go1.15 on s390x appears to have checksum and ECDSA verification issues Status in QEMU:

Re: [PATCH v2 1/4] target/ppc: Fix POWER9 radix guest HV interrupt AIL behaviour

2021-04-15 Thread Fabiano Rosas
Nicholas Piggin writes: > ISA v3.0 radix guest execution has a quirk in AIL behaviour such that > the LPCR[AIL] value can apply to hypervisor interrupts. > > This affects machines that emulate HV=1 mode (i.e., powernv9). > > Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas > --- > t

Re: [PATCH v4 0/4] hw/i2c: Adds pca954x i2c mux switch device

2021-04-15 Thread Corey Minyard
On Mon, Apr 12, 2021 at 12:45:18PM -0700, Patrick Venture wrote: > The i2c mux device pca954x implements two devices: > - the pca9546 and pca9548. This looks good, I have pulled it into my queue. 6.0 is about to be released, I'll try to remember to request a pull after that. Thanks, -corey >

[PATCH v3 2/6] tests/qtest: Add qtest_has_accel() method

2021-04-15 Thread Philippe Mathieu-Daudé
Introduce the qtest_has_accel() method which allows a runtime query on whether a QEMU instance has an accelerator built-in. Reviewed-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé --- Since v2: - reworded (Eric) Since v1: - rename qtest_probe_accel() -> qtest_has_accel() - run with -machin

[PATCH v3 0/6] qtests: Check accelerator available at runtime via QMP 'query-accels'

2021-04-15 Thread Philippe Mathieu-Daudé
Hi, This series aims at having accelerator-independent qtests by querying a QEMU instance at runtime to check the list of built-in accelerators. First we add the 'query-accels' QMP command, then we add the qtest_has_accel() method to libqtest, finally we use this new method to allow running bios-

[PATCH v3 1/6] accel: Introduce 'query-accels' QMP command

2021-04-15 Thread Philippe Mathieu-Daudé
Introduce the 'query-accels' QMP command which returns a list of built-in accelerator names. - Accelerator is a QAPI enum of all existing accelerators, - AcceleratorInfo is a QAPI structure providing accelerator specific information. Currently the common structure base provides the name of th

[PATCH v3 5/6] tests/qtest: Do not restrict bios-tables-test to Aarch64 hosts anymore

2021-04-15 Thread Philippe Mathieu-Daudé
Since commit 82bf7ae84ce ("target/arm: Remove KVM support for 32-bit Arm hosts") we can remove the comment / check added in commit ab6b6a4 and directly run the bios-tables-test. Reviewed-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/meson.build | 3 +-- 1 file changed

meson incorrectly detects libcurl as present even if it spots that its dependencies are missing

2021-04-15 Thread Peter Maydell
My build of system-emulation with --enable-static seems to have broken at some point since the last time I had cause to run it. Looking at the meson-log the cause seems to be that meson enables libcurl support even though it has found that libcurl's dependencies aren't present as static libs: Dete

[PATCH v3 3/6] qtest/bios-tables-test: Make test build-independent from accelerator

2021-04-15 Thread Philippe Mathieu-Daudé
Now than we can probe if the TCG accelerator is available at runtime with a QMP command, do it once at the beginning and only register the tests we can run. We can then replace the #ifdef'ry by an assertion. Reviewed-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé --- Since v1: use global t

[PATCH v3 6/6] tests/meson: Only build softfloat objects if TCG is selected

2021-04-15 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé The previous attempt (commit f77147cd4de) doesn't work as expected, as we still have CONFIG_TCG=1 when using: configure --disable-system --disable-user Now than we have removed the use of CONFIG_TCG from target-dependent files in tests/qtest/, we can remove the un

[PATCH v3 4/6] qtest/qmp-cmd-test: Make test build-independent from accelerator

2021-04-15 Thread Philippe Mathieu-Daudé
Now than we can probe if the TCG accelerator is available at runtime with a QMP command, do it once at the beginning and only register the tests we can run. We can then replace the #ifdef'ry by a runtime check. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/qm

Re: [PATCH v3 0/6] qtests: Check accelerator available at runtime via QMP 'query-accels'

2021-04-15 Thread Claudio Fontana
Hi Philippe, does the tests/qtest/arm-cpu-features.c kvm_enabled() function need to be replaced by the use of this new command? Maybe something to add to the series? The use of "kvm_enabled()" in this function is particularly confused, because it matches the sysemu/kvm.h function name with com

Re: [Bug 1923663] [NEW] Can't(?) disable default floppy drive any more in qemu 6.0

2021-04-15 Thread Peter Maydell
On Wed, 14 Apr 2021 at 08:07, Markus Armbruster wrote: > In my opinion, management applications are better off with -nodefaults. > It's easier to understand than the complicated mess I'm going to > describe under "Long answer" below. Is there a mechanism to get QEMU to tell me "what are all the l

Re: [PATCH 1/2] qdev: Separate implementations of qdev_get_machine() for user and system

2021-04-15 Thread Philippe Mathieu-Daudé
On 4/9/21 6:03 PM, Greg Kurz wrote: > Despite its simple name and common usage of "getting a pointer to > the machine" in system-mode emulation, qdev_get_machine() has some > subtilities. > > First, it can be called when running user-mode emulation : this is > because user-mode partly relies on qd

[PATCH 0/3] file-posix: fix refresh_limits for SCSI devices

2021-04-15 Thread Paolo Bonzini
refresh_limits is not doing anything for block devices, and is retrieving the maximum number of s/g list entries incorrectly for character devices. Patches 2-3 fix these problems, while patch 1 is a small improvement to avoid making the BlockLimits unnecessarily restrictive when SG_IO is not in us

[PATCH 3/3] file-posix: fix max_iov for /dev/sg devices

2021-04-15 Thread Paolo Bonzini
Even though it was only called for devices that have bs->sg set (which must be character devices), sg_get_max_segments looked at /sys/dev/block which only works for block devices. On Linux the sg driver has its own way to provide the maximum number of iovecs in a scatter/gather list. --- block/fi

[PATCH 2/3] file-posix: try BLKSECTGET on block devices too, do not round to power of 2

2021-04-15 Thread Paolo Bonzini
bs->sg is only true for character devices, but block devices can also be used with scsi-block and scsi-generic. Unfortunately BLKSECTGET returns bytes for /dev/sgN devices and sectors for block devices, so account for that in the code. The maximum transfer also need not be a power of 2 (for examp

[PATCH 1/3] scsi-generic: pass max_segments via max_iov field in BlockLimits

2021-04-15 Thread Paolo Bonzini
I/O to a disk via read/write is not limited by the number of segments allowed by the host adapter; the kernel can split requests if needed, and the limit imposed by the host adapter can be very low (256k or so) to avoid that SG_IO returns EINVAL if memory is heavily fragmented. Since this value is

Re: [PATCH v3 0/6] qtests: Check accelerator available at runtime via QMP 'query-accels'

2021-04-15 Thread Philippe Mathieu-Daudé
On 4/15/21 2:30 PM, Claudio Fontana wrote: > Hi Philippe, > > does the tests/qtest/arm-cpu-features.c kvm_enabled() function need to be > replaced by the use of this new command? > > Maybe something to add to the series? > > The use of "kvm_enabled()" in this function is particularly confused,

Re: [PATCH 0/3] file-posix: fix refresh_limits for SCSI devices

2021-04-15 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210415124307.428203-1-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210415124307.428203-1-pbonz...@redhat.com Subject: [PATCH 0/3] file-posix: fix refresh

[PATCH v3 7/6] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for KVM

2021-04-15 Thread Philippe Mathieu-Daudé
Use the recently added generic qtest_has_accel() method to check if KVM is available. Suggested-by: Claudio Fontana Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/arm-cpu-features.c | 25 + 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/tests/qtest/

[PATCH] MAINTAINERS: Add qtest/arm-cpu-features.c to ARM TCG CPUs section

2021-04-15 Thread Philippe Mathieu-Daudé
We want the ARM maintainers and the qemu-arm@ list to be notified when this file is modified. Add an entry to the 'ARM TCG CPUs' section in the MAINTAINERS file. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS in

[PATCH v4 1/4] target/s390x: Fix translation exception on illegal instruction

2021-04-15 Thread 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 that page, tb->size ends up

[PATCH v2] hw/block/nvme: align with existing style

2021-04-15 Thread Gollu Appalanaidu
Make uniform hexadecimal numbers format. Signed-off-by: Gollu Appalanaidu --- -v2: Address review comments (Klaus) use lower case hexa format for the code and in comments use the same format as used in Spec. ("h") hw/block/nvme-ns.c | 2 +- hw/block/nvme.c | 40 +++

[PATCH v4 0/4] accel/tcg: Make sure that tb->size != 0 after translation

2021-04-15 Thread Ilya Leoshkevich
If arch-specific code generates a translation block of size 0, tb_gen_code() may generate a spurious exception. Fix s390x (patch 1), ARM (patch 2) and xtensa (patch 3) and add an assertion in order to catch such situations earlier (patch 4). v1: https://lists.nongnu.org/archive/html/qemu-devel/20

[PATCH v4 3/4] target/xtensa: Make sure that tb->size != 0

2021-04-15 Thread 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 instruction of an exception ha

[PATCH v4 4/4] accel/tcg: Assert that tb->size != 0 after translation

2021-04-15 Thread 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 --- accel/tcg/translate-all.c | 1 + 1 file changed, 1 inserti

Re: meson incorrectly detects libcurl as present even if it spots that its dependencies are missing

2021-04-15 Thread Philippe Mathieu-Daudé
On 4/15/21 2:29 PM, Peter Maydell wrote: > My build of system-emulation with --enable-static seems to have > broken at some point since the last time I had cause to run it. Maybe a side-effect of commit d7dedf428fe tri-state? ("meson: accept either shared or static libraries if --disable-static")

[PATCH v4 2/4] target/arm: Make sure that commpage's tb->size != 0

2021-04-15 Thread 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. Signed-off-by: Ilya Leoshkevich ---

Re: [PATCH v3 0/8] [RfC] fix tracing for modules

2021-04-15 Thread Daniel P . Berrangé
On Mon, Apr 12, 2021 at 03:07:59PM +0200, Gerd Hoffmann wrote: > On Fri, Apr 09, 2021 at 02:17:13PM +0100, Daniel P. Berrangé wrote: > > On Fri, Apr 09, 2021 at 03:12:45PM +0200, Gerd Hoffmann wrote: > > > Hi, > > > > > > > eg a trace point "dma_map_wait" gets mapped to probes in many > > > > .s

Re: [PATCH v2] hw/block/nvme: align with existing style

2021-04-15 Thread Philippe Mathieu-Daudé
On 4/15/21 2:00 PM, Gollu Appalanaidu wrote: > Make uniform hexadecimal numbers format. > > Signed-off-by: Gollu Appalanaidu > --- > -v2: Address review comments (Klaus) > use lower case hexa format for the code and in comments > use the same format as used in Spec. ("h") ^ This comment

Re: [PULL 18/23] accel/tcg: re-factor non-RAM execution code

2021-04-15 Thread Peter Maydell
On Thu, 18 Feb 2021 at 09:47, Alex Bennée wrote: > > There is no real need to use CF_NOCACHE here. As long as the TB isn't > linked to other TBs or included in the QHT or jump cache then it will > only get executed once. > > Signed-off-by: Alex Bennée > Reviewed-by: Richard Henderson > Message-I

Re: [PATCH v3 7/6] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for KVM

2021-04-15 Thread Andrew Jones
On Thu, Apr 15, 2021 at 02:57:37PM +0200, Philippe Mathieu-Daudé wrote: > Use the recently added generic qtest_has_accel() method to > check if KVM is available. > > Suggested-by: Claudio Fontana > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/qtest/arm-cpu-features.c | 25 +--

Re: [PATCH 1/2] qdev: Separate implementations of qdev_get_machine() for user and system

2021-04-15 Thread Greg Kurz
On Thu, 15 Apr 2021 14:39:55 +0200 Philippe Mathieu-Daudé wrote: > On 4/9/21 6:03 PM, Greg Kurz wrote: > > Despite its simple name and common usage of "getting a pointer to > > the machine" in system-mode emulation, qdev_get_machine() has some > > subtilities. > > > > First, it can be called whe

Re: [PULL 18/23] accel/tcg: re-factor non-RAM execution code

2021-04-15 Thread Peter Maydell
On Thu, 15 Apr 2021 at 14:18, Peter Maydell wrote: > > On Thu, 18 Feb 2021 at 09:47, Alex Bennée wrote: > > > > There is no real need to use CF_NOCACHE here. As long as the TB isn't > > linked to other TBs or included in the QHT or jump cache then it will > > only get executed once. > > > > Signe

Re: [PATCH v2 2/2] hw/elf_ops: clear uninitialized segment space

2021-04-15 Thread Laurent Vivier
Le 15/04/2021 à 12:04, Philippe Mathieu-Daudé a écrit : > From: Laurent Vivier > > When the mem_size of the segment is bigger than the file_size, > and if this space doesn't overlap another segment, it needs > to be cleared. > > This bug is very similar to the one we had for linux-user, > 22d113

[PATCH 1/5] migration: add trace point when vm_stop_force_state fails

2021-04-15 Thread Daniel P . Berrangé
This is a critical failure scenario for migration that is hard to diagnose from existing probes. Most likely it is caused by an error from bdrv_flush(), but we're not logging the errno anywhere, hence this new probe. Signed-off-by: Daniel P. Berrangé --- migration/migration.c | 1 + migration/t

[PATCH 4/5] block: add trace point when fdatasync fails

2021-04-15 Thread Daniel P . Berrangé
A flush failure is a critical failure scenario for some operations. For example, it will prevent migration from completing, as it will make vm_stop() report an error. Thus it is important to have a trace point present for debugging. Signed-off-by: Daniel P. Berrangé --- block/file-posix.c | 2 ++

[PATCH 5/5] block: remove duplicate trace.h include

2021-04-15 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- block/file-posix.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 6aafeda44f..2538e43299 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -106,8 +106,6 @@ #include #endif -#include "trace.h"

[PATCH 0/5] block, migration: improve debugging of migration bdrv_flush failure

2021-04-15 Thread Daniel P . Berrangé
I spent a while debugging a tricky migration failure today which was ultimately caused by fdatasync() getting EACCESS. The existing probes were not sufficient to diagnose this, so I had to resort to GDB. This improves probes and block error reporting to make future diagnosis possible without GDB.

  1   2   3   >