[PATCH] hw/virtio/vhost-shadow-virtqueue: Silence GCC error "maybe-uninitialized"

2022-09-06 Thread Bernhard Beschow
GCC issues a false positive warning, resulting in build failure with -Werror: In file included from /usr/include/glib-2.0/glib.h:114, from /home/zcone-pisint/Projects/qemu/src/include/glib-compat.h:32, from

[PATCH 2/3] vdpa: load vlan configuration at NIC startup

2022-09-06 Thread Eugenio Pérez
To have enabled vlans at device startup may happen in the destination of a live migration, so this configuration must be restored. At this moment the code is not accessible, since SVQ refuses to start if vlan feature is exposed by the device. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c |

[PATCH 0/3] Vhost-vdpa Shadow Virtqueue VLAN support

2022-09-06 Thread Eugenio Pérez
This series enables shadowed CVQ to intercept VLAN commands through shadowed CVQ, update the virtio NIC device model so qemu send it in a migration, and the restore of that VLAN state in the destination. It's based on the multiqueue series [1], but it's easy to reorder in case vlan feature is

[PATCH 1/3] virtio-net: do not reset vlan filtering at set_features

2022-09-06 Thread Eugenio Pérez
This function is called after virtio_load, so all vlan configuration is lost in migration case. Just allow all the vlan-tagged packets if vlan is not configured, and trust device reset to clear all filtered vlans. Fixes: 0b1eaa8803 ("virtio-net: Do not filter VLANs without F_CTRL_VLAN")

[PATCH 3/4] usbnet: Detect short packets as sent by the xHCI controller

2022-09-06 Thread Michael Brown
The xHCI controller will ignore the endpoint MTU and so may deliver packets of any length. Detect short packets as being any packet that has a length of zero or a length that is not a multiple of the MTU. Signed-off-by: Michael Brown --- hw/usb/dev-network.c | 2 +- 1 file changed, 1

[PATCH 1/4] usbnet: Add missing usb_wakeup() call in usbnet_receive()

2022-09-06 Thread Michael Brown
usbnet_receive() does not currently wake up the USB endpoint, leading to a dead RX datapath when used with a host controller such as xHCI that relies on being woken up. Fix by adding a call to usb_wakeup() at the end of usbnet_receive(). Signed-off-by: Michael Brown --- hw/usb/dev-network.c |

[PATCH 0/4] Fix USB network CDC-ECM mode support

2022-09-06 Thread Michael Brown
From: Michael Brown Fix some minor violations of the CDC-ECM specification and some interoperability issues with the emulated xHCI controller. This patch series has been working out-of-tree since 2015; my apologies for not getting around to upstreaming it sooner. Michael Brown (4): usbnet:

Re: [PATCH v1 4/8] migration: Implement dirty-limit convergence algo

2022-09-06 Thread Peter Xu
On Fri, Sep 02, 2022 at 01:22:32AM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Implement dirty-limit convergence algo for live migration, > which is kind of like auto-converge algo but using dirty-limit > instead of cpu throttle to make migration convergent. > >

Re: [RFC PATCH] target/arm: update the cortex-a15 MIDR to latest rev

2022-09-06 Thread Philippe Mathieu-Daudé via
On Tue, Sep 6, 2022 at 7:23 PM Alex Bennée wrote: > > QEMU doesn't model micro-architectural details which includes most > chip errata. The ARM_ERRATA_798181 work around in the Linux > kernel (see erratum_a15_798181_init) currently detects QEMU's > cortex-a15 as broken and triggers additional

Maximum QMP reply size

2022-09-06 Thread John Snow
Hi, I suspect I have asked this before, but I didn't write it down in a comment, so I forget my justification... In the QMP lib, we need to set a buffering limit for how big a QMP message can be -- In practice, I found that the largest possible response was the QAPI schema reply, and I set the

[PATCH] tests/qtest: npcm7xx-emc-test: Skip checking MAC

2022-09-06 Thread Patrick Venture
The register tests walks all the registers to verify they are initially 0 when appropriate. However, if the MAC address is set in the register space, this should not be checked against 0. Reviewed-by: Hao Wu Change-Id: I02426e39bdab33ceedd42c49d233e8680d4ec058 Signed-off-by: Patrick Venture

Re: [PATCH v4 0/3] Implement Power ISA 3.1B hash insns

2022-09-06 Thread Daniel Henrique Barboza
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel On 7/15/22 17:54, Víctor Colombo wrote: This patch series implements the 4 instructions added in Power ISA 3.1B: - hashchk - hashst - hashchkp - hashstp It's built on top of ppc-next. Working branch for ease of use can be

Re: [PATCH v2 0/8] Multiple ppc instructions fixes

2022-09-06 Thread Daniel Henrique Barboza
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel On 9/6/22 09:55, Víctor Colombo wrote: This patch set fixes multiple instructions for PPC targets that were producing incorrect results, or setting the wrong bits in FPSCR. Patch 1 is just a style fix, trivial. Patch 8 adds

Re: [PATCH v1 0/8] migration: introduce dirtylimit capability

2022-09-06 Thread Peter Xu
On Fri, Sep 02, 2022 at 01:22:28AM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > v1: > - make parameter vcpu-dirty-limit experimental > - switch dirty limit off when cancel migrate > - add cancel logic in migration test > > Please review, thanks, > > Yong > > Abstract

Re: [RFC PATCH] target/arm: update the cortex-a15 MIDR to latest rev

2022-09-06 Thread Arnd Bergmann
On Tue, Sep 6, 2022, at 7:22 PM, Alex Bennée wrote: > > index 3099b38e32..59d5278868 100644 > --- a/target/arm/cpu_tcg.c > +++ b/target/arm/cpu_tcg.c > @@ -588,7 +588,9 @@ static void cortex_a15_initfn(Object *obj) > set_feature(>env, ARM_FEATURE_EL3); > set_feature(>env,

Re: [PATCH 0/8] Patch series to set up a ppc64le CI

2022-09-06 Thread Daniel Henrique Barboza
Lucas, If you're still interested, patches 1-4 are worth re-sending in separate. You'll need to address Daniel's comments on patch 1. The other 3 patches LGTM. Patches 5-8 can wait. We're not certain about Unicamp's Minicloud availability in the future, so there's no point in setting up our CI

Re: [PATCH v2 8/8] target/ppc: Clear fpstatus flags on helpers missing it

2022-09-06 Thread Daniel Henrique Barboza
On 9/6/22 09:55, Víctor Colombo wrote: In ppc emulation, exception flags are not cleared at the end of an instruction. Instead, the next instruction is responsible to clear it before its emulation. However, some helpers are not doing it, causing an issue where the previously set exception

[PATCH 2/4] usbnet: Accept mandatory USB_CDC_SET_ETHERNET_PACKET_FILTER request

2022-09-06 Thread Michael Brown
The USB_CDC_SET_ETHERNET_PACKET_FILTER request is mandatory for CDC-ECM devices. Accept this request, ignoring the actual filter value (to match the existing behaviour for RNDIS). Signed-off-by: Michael Brown --- hw/usb/dev-network.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH 4/4] usbnet: Report link-up via interrupt endpoint in CDC-ECM mode

2022-09-06 Thread Michael Brown
Signed-off-by: Michael Brown --- hw/usb/dev-network.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c index 9d83974ec9..ac1adca543 100644 --- a/hw/usb/dev-network.c +++ b/hw/usb/dev-network.c @@ -91,6

Re: [RFC PATCH] target/arm: update the cortex-a15 MIDR to latest rev

2022-09-06 Thread Anders Roxell
On Tue, 6 Sept 2022 at 19:23, Alex Bennée wrote: > > QEMU doesn't model micro-architectural details which includes most > chip errata. The ARM_ERRATA_798181 work around in the Linux > kernel (see erratum_a15_798181_init) currently detects QEMU's > cortex-a15 as broken and triggers additional

Re: Maximum QMP reply size

2022-09-06 Thread Peter Maydell
On Tue, 6 Sept 2022 at 20:41, John Snow wrote: > Hi, I suspect I have asked this before, but I didn't write it down in > a comment, so I forget my justification... > > In the QMP lib, we need to set a buffering limit for how big a QMP > message can be -- In practice, I found that the largest

[PATCH 3/3] vdpa: Support VLAN on nic control shadow virtqueue

2022-09-06 Thread Eugenio Pérez
Update the virtio-net device model with each guest's update of vlan through control virtqueue, and accept creating a SVQ with a device exposing vlan feature bit. Done in the same commit since a malicious guest could send vlan commands otherwise. Signed-off-by: Eugenio Pérez ---

[RFC PATCH] target/arm: update the cortex-a15 MIDR to latest rev

2022-09-06 Thread Alex Bennée
QEMU doesn't model micro-architectural details which includes most chip errata. The ARM_ERRATA_798181 work around in the Linux kernel (see erratum_a15_798181_init) currently detects QEMU's cortex-a15 as broken and triggers additional expensive TLB flushes as a result. Change the MIDR to report

Re: [PATCH] hw/virtio/vhost-shadow-virtqueue: Silence GCC error "maybe-uninitialized"

2022-09-06 Thread Philippe Mathieu-Daudé via
On Tue, Sep 6, 2022 at 7:12 PM Bernhard Beschow wrote: > > GCC issues a false positive warning, resulting in build failure with -Werror: > > In file included from /usr/include/glib-2.0/glib.h:114, >from > /home/zcone-pisint/Projects/qemu/src/include/glib-compat.h:32, >

Re: [PATCH 0/3] target/ppc: Move fsqrt[s] to decodetree

2022-09-06 Thread Daniel Henrique Barboza
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel On 9/5/22 09:37, Víctor Colombo wrote: Move fsqrt and fsqrts instructions from decode legacy to decodetree. Víctor Colombo (3): target/ppc: Move fsqrt to decodetree target/ppc: Move fsqrts to decodetree target/ppc:

Re: [PATCH v2 2/2] dump: fix kdump to work over non-aligned blocks

2022-09-06 Thread Stefan Berger
On 9/5/22 08:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Rewrite get_next_page() to work over non-aligned blocks. When it encounters non aligned addresses, it will try to fill a page provided by the caller. This solves a kdump crash with "tpm-crb-cmd" RAM memory region,

Re: [PATCH v3 0/5] vhost-user-blk: dynamically resize config space based on features

2022-09-06 Thread Raphael Norwitz
Thanks for the changes. For the whole series: Reviewed-by: Raphael Norwitz On Tue, Sep 06, 2022 at 10:31:06AM +0300, Daniil Tatianin wrote: > This patch set attempts to align vhost-user-blk with virtio-blk in > terms of backward compatibility and flexibility. It also improves > the virtio core

[PATCH 1/4] msmouse: Handle mouse reset

2022-09-06 Thread Arwed Meyer
Detect mouse reset via RTS or DTR line: Don't send or process anything while in reset. When coming out of reset, send ID sequence first thing. This allows msmouse to be detected by common mouse drivers. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/77 Signed-off-by: Arwed Meyer ---

[PATCH 4/4] serial: Allow unaligned i/o access

2022-09-06 Thread Arwed Meyer
Unaligned i/o access on serial UART works on real PCs. This is used for example by FreeDOS CTMouse driver. Without this it can't reset and detect serial mice. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/77 Signed-off-by: Arwed Meyer --- hw/char/serial.c | 3 +++ 1 file changed, 3

RE: [PATCH] hw/xen: set pci Atomic Ops requests for passthrough device

2022-09-06 Thread Ji, Ruili
[AMD Official Use Only - General] FYI From: Ji, Ruili Sent: 2022年9月6日 15:40 To: qemu-devel@nongnu.org Cc: Liu, Aaron Subject: [PATCH] hw/xen: set pci Atomic Ops requests for passthrough device >From c54e0714a1e1cac7dc416bd843b9ec7162bcfc47 Mon Sep 17 00:00:00 2001 From: Ruili Ji

[RFC PATCH 3/3] hw/peci: add support for EndPointConfig reads

2022-09-06 Thread Titus Rwantare
Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu --- hw/peci/peci-client.c | 63 ++ hw/peci/peci-core.c| 44 +++-- include/hw/peci/peci.h | 23 +++ 3 files changed, 128 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 49/51] io/channel-watch: Fix socket watch on Windows

2022-09-06 Thread Bin Meng
Hi Clément, On Tue, Sep 6, 2022 at 8:06 PM Clément Chigot wrote: > > > > > I checked your patch, what you did seems to be something one would > > > > naturally write, but what is currently in the QEMU sources seems to be > > > > written intentionally. > > > > > > > > +Paolo Bonzini , you are the

[PATCH 3/4] msmouse: Add pnp data

2022-09-06 Thread Arwed Meyer
Make msmouse send serial pnp data. Enables you to see nice qemu device name in Win9x. Signed-off-by: Arwed Meyer --- chardev/msmouse.c | 101 +++--- 1 file changed, 68 insertions(+), 33 deletions(-) diff --git a/chardev/msmouse.c b/chardev/msmouse.c

Re: [PATCH] KVM: use store-release to mark dirty pages as harvested

2022-09-06 Thread Gavin Shan
On 9/2/22 10:19 AM, Paolo Bonzini wrote: The following scenario can happen if QEMU sets more RESET flags while the KVM_RESET_DIRTY_RINGS ioctl is ongoing on another host CPU: CPU0 CPU1 CPU2 --

[RFC PATCH 0/3] Initial PECI bus support

2022-09-06 Thread Titus Rwantare
The Platform Environment Control Interface (PECI), is a way for Intel processors to communicate with management controllers. This series of patches simulate some PECI subsystem functionality. This work is currently used against Nuvoton 7xx BMC, but it can easily be extended to support Aspeed

PING: Re: [PATCH v4 1/1] monitor: Support specified vCPU registers

2022-09-06 Thread zhenwei pi
PING! On 8/15/22 20:00, Dr. David Alan Gilbert wrote: * zhenwei pi (pizhen...@bytedance.com) wrote: Originally we have to get all the vCPU registers and parse the specified one. To improve the performance of this usage, allow user specified vCPU id to query registers. Run a VM with 16 vCPU,

[PATCH 0/4] Make serial msmouse work

2022-09-06 Thread Arwed Meyer
This series of patches makes `-serial msmouse` work in practice. I tested with FreeDOS/CTMouse driver `ctmouse /V` which identifies a Logitech compatible 3 button mouse. It will probably run as well with any other compatible serial mouse driver on Windows 9x etc. Arwed Meyer (4): msmouse:

[RFC PATCH 2/3] hw/peci: add PECI support for NPCM7xx BMCs

2022-09-06 Thread Titus Rwantare
This allows BMC firmware for npcm7xx BMCs to talk to a PECI client in qemu. Signed-off-by: Titus Rwantare Reviewed-by: Patrick Venture --- MAINTAINERS| 3 +- hw/arm/Kconfig | 1 + hw/arm/npcm7xx.c | 9 ++ hw/peci/meson.build|

Re: [PATCH v2] KVM: dirty ring: add missing memory barrier

2022-09-06 Thread Gavin Shan
On 8/27/22 6:22 PM, Paolo Bonzini wrote: The KVM_DIRTY_GFN_F_DIRTY flag ensures that the entry is valid. If the read of the fields are not ordered after the read of the flag, QEMU might see stale values. Cc: Peter Xu Cc: Gavin Shan Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 6

[RFC PATCH 1/3] hw/peci: add initial support for PECI

2022-09-06 Thread Titus Rwantare
PECI - Platform Environment Control Interface This commit adds support for reading basic sensor values from a client on the PECI bus. BMCs can use the PECI wire to get thermal information out of an Intel cpu. Additionally, on hardware, various MSRs are exposed over the PECI bus. Part of PCI

Re: [PATCH 2/4] chardev: src buffer const for write functions

2022-09-06 Thread Philippe Mathieu-Daudé via
On Wed, Sep 7, 2022 at 12:07 AM Arwed Meyer wrote: > > Make source buffers const for char be write functions. > This allows using buffers returned by fifo as buf parameter and source buffer > should not be changed by write functions anyway. > > Signed-off-by: Arwed Meyer > --- > chardev/char.c

[PATCH 2/4] chardev: src buffer const for write functions

2022-09-06 Thread Arwed Meyer
Make source buffers const for char be write functions. This allows using buffers returned by fifo as buf parameter and source buffer should not be changed by write functions anyway. Signed-off-by: Arwed Meyer --- chardev/char.c | 4 ++-- include/chardev/char.h | 4 ++--

RE: [PATCH] Hexagon (target/hexagon) implement mutability mask for GPRs

2022-09-06 Thread Taylor Simpson
> -Original Message- > From: Brian Cain > Sent: Thursday, September 1, 2022 4:30 PM > To: qemu-devel@nongnu.org; Taylor Simpson > Cc: Richard Henderson ; Brian Cain > > Subject: [PATCH] Hexagon (target/hexagon) implement mutability mask for > GPRs > > Some registers are defined to

Re: [PATCH] tests: unit: add NULL-pointer check

2022-09-06 Thread Paolo Bonzini
Il mar 6 set 2022, 07:01 Markus Armbruster ha scritto: > Next, permit me a few words on writing tests. For me, a unit test fails > by crashing. Crashing with a nice message is optional. The more likely > the failure, the more useful is niceness. Complete niceness is > impossible --- if we

Re: [PATCH V3 3/3] hw/riscv: virt: Enable booting S-mode firmware from pflash

2022-09-06 Thread Andrew Jones
On Tue, Sep 06, 2022 at 09:54:51AM +0530, Sunil V L wrote: > To boot S-mode firmware payload like EDK2 from persistent > flash storage, qemu needs to pass the flash address as the > next_addr in fw_dynamic_info to the opensbi. > > When both -kernel and -pflash options are provided in command

Re: [PATCH V3 2/3] hw/riscv: virt: Move create_fw_cfg() prior to loading kernel

2022-09-06 Thread Andrew Jones
On Tue, Sep 06, 2022 at 09:54:50AM +0530, Sunil V L wrote: > To enable both -kernel and -pflash options, the fw_cfg needs to be > created prior to loading the kernel. > > Signed-off-by: Sunil V L > --- > hw/riscv/virt.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > >

[PATCH v3 1/5] virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size

2022-09-06 Thread Daniil Tatianin
This is the first step towards moving all device config size calculation logic into the virtio core code. In particular, this adds a struct that contains all the necessary information for common virtio code to be able to calculate the final config size for a device. This is expected to be used

Re: [PATCH v2 0/7] Allow semihosting from user mode

2022-09-06 Thread Richard Henderson
On 8/22/22 15:12, Peter Maydell wrote: Currently our semihosting implementations usually prohibit use of semihosting calls in system emulation from the guest userspace. This is a very long standing behaviour justified originally "to provide some semblance of security" (since code with access to

[PULL v3 10/20] accel/tcg: Make tb_htable_lookup static

2022-09-06 Thread Richard Henderson
The function is not used outside of cpu-exec.c. Move it and its subroutines up in the file, before the first use. Reviewed-by: Alistair Francis Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 3 - accel/tcg/cpu-exec.c

[PULL v3 18/20] target/i386: Make translator stop before the end of a page

2022-09-06 Thread Richard Henderson
From: Ilya Leoshkevich Right now translator stops right *after* the end of a page, which breaks reporting of fault locations when the last instruction of a multi-insn translation block crosses a page boundary. An implementation, like the one arm and s390x have, would require an i386 length

[PULL v3 12/20] accel/tcg: Use probe_access_internal for softmmu get_page_addr_code_hostp

2022-09-06 Thread Richard Henderson
Simplify the implementation of get_page_addr_code_hostp by reusing the existing probe_access infrastructure. Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 76 -- 1 file changed, 26

Re: [RFC PATCH] hw/acpi: do not let OSPM set pcie native hotplug when acpi hotplug is enabled

2022-09-06 Thread Igor Mammedov
On Mon, 5 Sep 2022 22:25:25 +0530 (IST) Ani Sinha wrote: > On Mon, 5 Sep 2022, Ani Sinha wrote: > > > > > > > > > > > > > > diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c > > > > index 0355bd3dda..3dc9379f27 100644 > > > > --- a/hw/i386/acpi-build.c > > > > +++

Re: [PATCH 49/51] io/channel-watch: Fix socket watch on Windows

2022-09-06 Thread Bin Meng
Hi Clément, On Tue, Sep 6, 2022 at 3:41 PM Clément Chigot wrote: > > Hi Bin, > > > On Mon, Sep 5, 2022 at 4:10 PM Clément Chigot wrote: > > > > > > Hi all, > > > > > > I did reach the same issue while trying to connect a gdb to qemu on > > > Windows hosts. Some inputs send by gdb aren't getting

Re: [PATCH v9 03/10] s390x/cpu topology: reporting the CPU topology to the guest

2022-09-06 Thread Nico Boehr
Quoting Pierre Morel (2022-09-02 09:55:24) > The guest can use the STSI instruction to get a buffer filled > with the CPU topology description. > > Let us implement the STSI instruction for the basis CPU topology > level, level 2. I like this. It is so much simpler. Thanks. [...] > diff --git

[PULL v3 08/20] accel/tcg: Properly implement get_page_addr_code for user-only

2022-09-06 Thread Richard Henderson
The current implementation is a no-op, simply returning addr. This is incorrect, because we ought to be checking the page permissions for execution. Make get_page_addr_code inline for both implementations. Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Acked-by: Alistair Francis

[PULL v3 03/20] linux-user/x86_64: Allocate vsyscall page as a commpage

2022-09-06 Thread Richard Henderson
We're about to start validating PAGE_EXEC, which means that we've got to mark the vsyscall page executable. We had been special casing this entirely within translate. Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- linux-user/elfload.c | 23

Re: [PATCH v9 06/10] s390x/cpu_topology: resetting the Topology-Change-Report

2022-09-06 Thread Nico Boehr
Quoting Pierre Morel (2022-09-02 09:55:27) > During a subsystem reset the Topology-Change-Report is cleared > by the machine. > Let's ask KVM to clear the Modified Topology Change Report (MTCR) > bit of the SCA in the case of a subsystem reset. > > Signed-off-by: Pierre Morel Reviewed-by: Nico

[PULL v3 02/20] linux-user/hppa: Allocate page zero as a commpage

2022-09-06 Thread Richard Henderson
We're about to start validating PAGE_EXEC, which means that we've got to mark page zero executable. We had been special casing this entirely within translate. Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- linux-user/elfload.c | 34

[PULL v3 01/20] linux-user/arm: Mark the commpage executable

2022-09-06 Thread Richard Henderson
We're about to start validating PAGE_EXEC, which means that we've got to mark the commpage executable. We had been placing the commpage outside of reserved_va, which was incorrect and lead to an abort. Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Signed-off-by: Richard Henderson ---

[PULL v3 04/20] linux-user: Honor PT_GNU_STACK

2022-09-06 Thread Richard Henderson
Map the stack executable if required by default or on demand. Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- include/elf.h| 1 + linux-user/qemu.h| 1 + linux-user/elfload.c | 19 ++- 3 files changed, 20 insertions(+),

[PULL v3 19/20] target/riscv: Add MAX_INSN_LEN and insn_len

2022-09-06 Thread Richard Henderson
These will be useful in properly ending the TB. Reviewed-by: Alistair Francis Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- target/riscv/translate.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git

Re: [PATCH 49/51] io/channel-watch: Fix socket watch on Windows

2022-09-06 Thread Bin Meng
Hi Clément, On Mon, Sep 5, 2022 at 4:10 PM Clément Chigot wrote: > > Hi all, > > I did reach the same issue while trying to connect a gdb to qemu on > Windows hosts. Some inputs send by gdb aren't getting correctly pulled, > they will be retrieved only once g_poll times out. > > As you explained

[PATCH v3 3/5] vhost-user-blk: make it possible to disable write-zeroes/discard

2022-09-06 Thread Daniil Tatianin
It is useful to have the ability to disable these features for compatibility with older VMs that don't have these implemented. Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz --- hw/block/vhost-user-blk.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 49/51] io/channel-watch: Fix socket watch on Windows

2022-09-06 Thread Clément Chigot
Hi Bin, > On Mon, Sep 5, 2022 at 4:10 PM Clément Chigot wrote: > > > > Hi all, > > > > I did reach the same issue while trying to connect a gdb to qemu on > > Windows hosts. Some inputs send by gdb aren't getting correctly pulled, > > they will be retrieved only once g_poll times out. > > > > As

Re: sphinx-build is really slow, any way to improve that?

2022-09-06 Thread Daniel P . Berrangé
On Mon, Sep 05, 2022 at 10:21:55PM +0100, Peter Maydell wrote: > On Mon, 5 Sept 2022 at 20:51, Claudio Fontana wrote: > > when I build qemu, there is a lot of time spent at the end of the build > > where one cpu goes 100% on sphinx-build. > > > > Is there some way to parallelize that? It seems

Re: [PATCH v1 3/8] migration: Introduce dirty-limit capability

2022-09-06 Thread Markus Armbruster
Hyman Huang writes: > 在 2022/9/5 17:32, Markus Armbruster 写道: >> Hyman Huang writes: >> >>> 在 2022/9/2 16:07, Markus Armbruster 写道: huang...@chinatelecom.cn writes: > From: Hyman Huang(黄勇) > > Introduce migration dirty-limit capability, which can > be turned on

Re: sphinx-build is really slow, any way to improve that?

2022-09-06 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 5 Sept 2022 at 20:51, Claudio Fontana wrote: >> when I build qemu, there is a lot of time spent at the end of the build >> where one cpu goes 100% on sphinx-build. >> >> Is there some way to parallelize that? It seems it is the current bottleneck >> for

Re: [RFC] module: removed unused function argument "mayfail"

2022-09-06 Thread Claudio Fontana
On 9/5/22 22:55, Philippe Mathieu-Daudé wrote: > On 5/9/22 17:55, Claudio Fontana wrote: >> mayfail is always passed as false for every invocation throughout the >> program. >> It controls whether to printf or not to printf an error on >> g_module_open failure. >> >> Remove this unused argument.

[PULL v3 09/20] accel/tcg: Unlock mmap_lock after longjmp

2022-09-06 Thread Richard Henderson
The mmap_lock is held around tb_gen_code. While the comment is correct that the lock is dropped when tb_gen_code runs out of memory, the lock is *not* dropped when an exception is raised reading code for translation. Acked-by: Alistair Francis Acked-by: Ilya Leoshkevich Tested-by: Ilya

[PULL v3 16/20] accel/tcg: Add fast path for translator_ld*

2022-09-06 Thread Richard Henderson
Cache the translation from guest to host address, so we may use direct loads when we hit on the primary translation page. Look up the second translation page only once, during translation. This obviates another lookup of the second page within tb_gen_code after translation. Fixes a bug in that

[PULL v3 06/20] tests/tcg/i386: Move smc_code2 to an executable section

2022-09-06 Thread Richard Henderson
We're about to start validating PAGE_EXEC, which means that we've got to put this code into a section that is both writable and executable. Note that this test did not run on hardware beforehand either. Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Signed-off-by: Richard Henderson

[PULL v3 20/20] target/riscv: Make translator stop before the end of a page

2022-09-06 Thread Richard Henderson
Right now the translator stops right *after* the end of a page, which breaks reporting of fault locations when the last instruction of a multi-insn translation block crosses a page boundary. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1155 Reviewed-by: Alistair Francis Acked-by: Ilya

[PATCH 04/11] crypto: validate that LUKS payload doesn't overlap with header

2022-09-06 Thread Daniel P . Berrangé
We already validate that LUKS keyslots don't overlap with the header, or with each other. This closes the remain hole in validation of LUKS file regions. Signed-off-by: Daniel P. Berrangé --- crypto/block-luks.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/crypto/block-luks.c

Re: [PATCH V3 1/3] hw/arm,loongarch: Move load_image_to_fw_cfg() to common location

2022-09-06 Thread Andrew Jones
On Tue, Sep 06, 2022 at 09:54:49AM +0530, Sunil V L wrote: > load_image_to_fw_cfg() is duplicated by both arm and loongarch. The same > function will be required by riscv too. So, it's time to refactor and > move this function to a common path. > > Signed-off-by: Sunil V L > --- > hw/arm/boot.c

[PATCH v3 4/5] vhost-user-blk: make 'config_wce' part of 'host_features'

2022-09-06 Thread Daniil Tatianin
No reason to have this be a separate field. This also makes it more akin to what the virtio-blk device does. Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz --- hw/block/vhost-user-blk.c | 6 ++ include/hw/virtio/vhost-user-blk.h | 1 - 2 files changed, 2

[PATCH v3 0/5] vhost-user-blk: dynamically resize config space based on features

2022-09-06 Thread Daniil Tatianin
This patch set attempts to align vhost-user-blk with virtio-blk in terms of backward compatibility and flexibility. It also improves the virtio core by introducing new common code that can be used by a virtio device to calculate its config space size. In particular it adds the following things: -

Re: [PATCH v3 0/5] linux-user: Passthrough MADV_DONTNEED for certain file mappings

2022-09-06 Thread Richard Henderson
On 9/6/22 01:08, Ilya Leoshkevich wrote: Hi, This series is made of patches from [1]. I've added a test and noticed that madvise(MADV_DONTNEED) was broken on alpha, fixing which required adding per-arch MADV_* definitions. This in turn affected the strace patch, so it made sense to make a

[PULL v3 07/20] accel/tcg: Introduce is_same_page()

2022-09-06 Thread Richard Henderson
From: Ilya Leoshkevich Introduce a function that checks whether a given address is on the same page as where disassembly started. Having it improves readability of the following patches. Reviewed-by: Alistair Francis Signed-off-by: Ilya Leoshkevich Message-Id:

[PULL v3 13/20] accel/tcg: Document the faulting lookup in tb_lookup_cmp

2022-09-06 Thread Richard Henderson
It was non-obvious to me why we can raise an exception in the middle of a comparison function, but it works. While nearby, use TARGET_PAGE_ALIGN instead of open-coding. Acked-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 11 ++- 1 file changed, 10

[PULL v3 15/20] accel/tcg: Add pc and host_pc params to gen_intermediate_code

2022-09-06 Thread Richard Henderson
Pass these along to translator_loop -- pc may be used instead of tb->pc, and host_pc is currently unused. Adjust all targets at one time. Acked-by: Alistair Francis Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 1

Re: [PATCH v2 00/11] Introduce new acpi/smbios python tests using biosbits

2022-09-06 Thread Ani Sinha
On Thu, Jul 14, 2022 at 6:54 PM Peter Maydell wrote: > > On Mon, 11 Jul 2022 at 10:34, Michael S. Tsirkin wrote: > > > > On Sun, Jul 10, 2022 at 10:30:03PM +0530, Ani Sinha wrote: > > > Changelog: > > > v2: > > > - a new class of python based tests introduced that is separate from > > >

Re: [PULL v2 00/20] tcg patch queue

2022-09-06 Thread Richard Henderson
On 9/5/22 22:58, Stefan Hajnoczi wrote: The tsan (clang) build is broken: https://gitlab.com/qemu-project/qemu/-/jobs/2982480773 clang-10 -m64 -mcx16 -Ilibqemu-x86_64-linux-user.fa.p -I. -I.. -Itarget/i386 -I../target/i386 -I../common-user/host/x86_64 -I../linux-user/include/host/x86_64

[PATCH v3 5/5] vhost-user-blk: dynamically resize config space based on features

2022-09-06 Thread Daniil Tatianin
Make vhost-user-blk backwards compatible when migrating from older VMs running with modern features turned off, the same way it was done for virtio-blk in 20764be0421c ("virtio-blk: set config size depending on the features enabled") It's currently impossible to migrate from an older VM with

[PATCH v3 2/5] virtio-blk: move config size params to virtio-blk-common

2022-09-06 Thread Daniil Tatianin
This way we can reuse it for other virtio-blk devices, e.g vhost-user-blk, which currently does not control its config space size dynamically. Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz --- MAINTAINERS | 2 ++ hw/block/meson.build |

Re: [RFC PATCH] hw/acpi: do not let OSPM set pcie native hotplug when acpi hotplug is enabled

2022-09-06 Thread Ani Sinha
On Tue, 6 Sep 2022, Igor Mammedov wrote: > On Mon, 5 Sep 2022 22:25:25 +0530 (IST) > Ani Sinha wrote: > > > On Mon, 5 Sep 2022, Ani Sinha wrote: > > > > > > > > > > > > > > > > > > > > diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c > > > > > index 0355bd3dda..3dc9379f27 100644 > > >

Re: [PATCH v3 6/6] include/exec: Introduce TARGET_PAGE_ENTRY_EXTRA

2022-09-06 Thread Richard Henderson
On 9/5/22 22:28, Philippe Mathieu-Daudé wrote: +    /* + * Allow target-specific additions to this structure. + * This may be used to cache items from the guest cpu + * page tables for later use by the implementation. + */ +#ifdef TARGET_PAGE_ENTRY_EXTRA +   

Re: [PATCH v2 00/11] Introduce new acpi/smbios python tests using biosbits

2022-09-06 Thread Michael S. Tsirkin
On Tue, Sep 06, 2022 at 11:56:33AM +0530, Ani Sinha wrote: > On Thu, Jul 14, 2022 at 6:54 PM Peter Maydell > wrote: > > > > On Mon, 11 Jul 2022 at 10:34, Michael S. Tsirkin wrote: > > > > > > On Sun, Jul 10, 2022 at 10:30:03PM +0530, Ani Sinha wrote: > > > > Changelog: > > > > v2: > > > > - a

[PULL v3 00/20] tcg patch queue

2022-09-06 Thread Richard Henderson
-0400) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20220906 for you to fetch changes up to 00c07344fa245b22e895b363320ba4cd0ec1088a: target/riscv: Make translator stop before the end of a page (2022-09-06 08:04:26 +0100

[PULL v3 11/20] accel/tcg: Move qemu_ram_addr_from_host_nofail to physmem.c

2022-09-06 Thread Richard Henderson
The base qemu_ram_addr_from_host function is already in softmmu/physmem.c; move the nofail version to be adjacent. Reviewed-by: Alistair Francis Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- include/exec/cpu-common.h | 1 + accel/tcg/cputlb.c

[PULL v3 05/20] linux-user: Clear translations on mprotect()

2022-09-06 Thread Richard Henderson
From: Ilya Leoshkevich Currently it's possible to execute pages that do not have PAGE_EXEC if there is an existing translation block. Fix by invalidating TBs that touch the affected pages. Signed-off-by: Ilya Leoshkevich Message-Id: <20220817150506.592862-2-...@linux.ibm.com> Signed-off-by:

[PULL v3 14/20] accel/tcg: Remove translator_ldsw

2022-09-06 Thread Richard Henderson
The only user can easily use translator_lduw and adjust the type to signed during the return. Reviewed-by: Alistair Francis Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- include/exec/translator.h | 1 - target/i386/tcg/translate.c | 2 +- 2

[PULL v3 17/20] target/s390x: Make translator stop before the end of a page

2022-09-06 Thread Richard Henderson
From: Ilya Leoshkevich Right now translator stops right *after* the end of a page, which breaks reporting of fault locations when the last instruction of a multi-insn translation block crosses a page boundary. Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson Message-Id:

[PATCH 11/11] crypto: add test cases for many malformed LUKS header scenarios

2022-09-06 Thread Daniel P . Berrangé
Validate that we diagnose each malformed LUKS header scenario with a distinct error report. Signed-off-by: Daniel P. Berrangé --- tests/unit/test-crypto-block.c | 299 + 1 file changed, 299 insertions(+) diff --git a/tests/unit/test-crypto-block.c

[PATCH V4 1/3] hw/arm, loongarch: Move load_image_to_fw_cfg() to common location

2022-09-06 Thread Sunil V L
load_image_to_fw_cfg() is duplicated by both arm and loongarch. The same function will be required by riscv too. So, it's time to refactor and move this function to a common path. Signed-off-by: Sunil V L Reviewed-by: Andrew Jones --- hw/arm/boot.c | 49

[PATCH v4 1/7] accel/tcg: Use bool for page_find_alloc

2022-09-06 Thread Richard Henderson
Bool is more appropriate type for the alloc parameter. Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index f5e8592d4a..d2946f8e59 100644 ---

[PATCH v4 2/7] accel/tcg: Use DisasContextBase in plugin_gen_tb_start

2022-09-06 Thread Richard Henderson
Use the pc coming from db->pc_first rather than the TB. Use the cached host_addr rather than re-computing for the first page. We still need a separate lookup for the second page because it won't be computed for DisasContextBase until the translator actually performs a read from the page.

[PATCH v4 4/7] include/hw/core: Create struct CPUJumpCache

2022-09-06 Thread Richard Henderson
Wrap the bare TranslationBlock pointer into a structure. Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 8 ++-- accel/tcg/cpu-exec.c | 9 ++--- accel/tcg/cputlb.c| 2 +- accel/tcg/translate-all.c | 4 ++-- 4 files changed, 15 insertions(+), 8 deletions(-)

Re: [PATCH v4 0/7] tcg: pc-relative translation blocks

2022-09-06 Thread Richard Henderson
On 9/6/22 10:11, Richard Henderson wrote: The goal here is to reduce the amount of code generation when the guest kernel enables address space randomization. This requires extensive changes to each target, so opt-in with TARGET_TB_PCREL. This is split out of v3, which also contained target/arm

Re: [PATCH 04/11] crypto: validate that LUKS payload doesn't overlap with header

2022-09-06 Thread Richard W.M. Jones
On Tue, Sep 06, 2022 at 09:41:40AM +0100, Daniel P. Berrangé wrote: > We already validate that LUKS keyslots don't overlap with the > header, or with each other. This closes the remain hole in remain -> remaining > validation of LUKS file regions. > > Signed-off-by: Daniel P. Berrangé > --- >

[PATCH v4 6/9] target/arm: Change gen_jmp* to work on displacements

2022-09-06 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Signed-off-by: Richard Henderson --- target/arm/translate.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index

  1   2   3   >