Re: [PATCH v4 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse

2021-03-01 Thread Samuel Thibault
Samuel Thibault, le lun. 01 mars 2021 17:26:23 +0100, a ecrit: > We could make libslirp enable the IPV6ONLY flag to avoid that, and > make qemu pass an AF_UNSPEC address for the ipv4+ipv6 case, in which > case libslirp wouldn't set IPV6ONLY. Ah, no, AF_UNSPEC would not allow to specify the port. B

RE: [PATCH 1/4] docker: Add Hexagon image

2021-03-01 Thread Brian Cain
Reviewed-by: Brian Cain > -Original Message- > From: Philippe Mathieu-Daudé On > Behalf Of Philippe Mathieu-Daudé > Sent: Sunday, February 28, 2021 4:23 PM > To: qemu-devel@nongnu.org > Cc: Fam Zheng ; Taylor Simpson > ; Philippe Mathieu-Daudé ; > Alex Bennée ; Alessandro Di Federico > ;

Re: [PATCH v4 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse

2021-03-01 Thread Samuel Thibault
Samuel Thibault, le lun. 01 mars 2021 17:27:47 +0100, a ecrit: > Doug Evans, le lun. 01 mars 2021 08:23:03 -0800, a ecrit: > > On Sun, Feb 28, 2021 at 1:40 PM Samuel Thibault <[1]samuel.thiba...@gnu.org> > > wrote: > > > > [...] > > > Note that one issue I am leaving for later (i.e., I don

Re: [PATCH v2 08/42] esp: determine transfer direction directly from SCSI phase

2021-03-01 Thread Laurent Vivier
Le 09/02/2021 à 20:29, Mark Cave-Ayland a écrit : > The transfer direction is currently determined by checking the sign of ti_size > but as this series progresses ti_size can be zero at the end of the transfer. > > Use the SCSI phase to determine the transfer direction as used in other SCSI > cont

Re: [PATCH v2 09/42] esp: introduce esp_get_tc() and esp_set_tc()

2021-03-01 Thread Laurent Vivier
Le 09/02/2021 à 20:29, Mark Cave-Ayland a écrit : > This simplifies reading and writing the TC register value without having to > manually shift each individual 8-bit value. > > Signed-off-by: Mark Cave-Ayland > Reviewed-by: Philippe Mathieu-Daudé > --- > hw/scsi/esp.c | 38

Re: [PATCH v2 10/42] esp: introduce esp_get_stc()

2021-03-01 Thread Laurent Vivier
Le 09/02/2021 à 20:29, Mark Cave-Ayland a écrit : > This simplifies reading the STC register value without having to manually > shift > each individual 8-bit value. > > Signed-off-by: Mark Cave-Ayland > --- > hw/scsi/esp.c | 15 --- > 1 file changed, 12 insertions(+), 3 deletions(-)

Re: [PATCH v2 11/42] esp: apply transfer length adjustment when STC is zero at TC load time

2021-03-01 Thread Laurent Vivier
Le 09/02/2021 à 20:29, Mark Cave-Ayland a écrit : > Perform the length adjustment whereby a value of 0 in the STC represents > a transfer length of 0x1 at the point where the TC is loaded at the > start of a DMA command rather than just when a TI (Transfer Information) > command is executed. Th

[PATCH] i386/acpi: restore device paths for pre-5.1 vms

2021-03-01 Thread Vitaly Cheptsov
After fixing the _UID value for the primary PCI root bridge in af1b80ae it was discovered that this change updates Windows configuration in an incompatible way causing network configuration failure unless DHCP is used. More details provided on the list: https://lists.gnu.org/archive/html/qemu-deve

[PATCH] target/ppc: fix icount support on Book-e vms accessing SPRs

2021-03-01 Thread Vitaly Cheptsov
Failing to guard SPR access with gen_io_start/gen_stop_exception causes "Bad icount read" exceptions when running VMs with e500mc and e500v2 CPUs with an icount parameter. Cc: qemu-devel@nongnu.org Signed-off-by: Vitaly Cheptsov --- target/ppc/translate_init.c.inc | 36 ++

Re: [PATCH v2 12/42] esp: remove dma_counter from ESPState

2021-03-01 Thread Laurent Vivier
Le 09/02/2021 à 20:29, Mark Cave-Ayland a écrit : > The value of dma_counter is set once at the start of the transfer and remains > the same until the transfer is complete. This allows the check in > esp_transfer_data > to be simplified since dma_left will always be non-zero until the transfer is

Re: [PATCH v2 4/5] hw/misc: Add a basic Aspeed LPC controller model

2021-03-01 Thread Andrew Jeffery
On Mon, 1 Mar 2021, at 11:36, Andrew Jeffery wrote: > From: Cédric Le Goater > > This is a very minimal framework to access registers which are used to > configure the AHB memory mapping of the flash chips on the LPC HC > Firmware address space. > > Signed-off-by: Cédric Le Goater > Signed-o

Re: [PATCH v2 13/42] esp: remove dma_left from ESPState

2021-03-01 Thread Laurent Vivier
Le 09/02/2021 à 20:29, Mark Cave-Ayland a écrit : > The ESP device already keeps track of the remaining bytes left to transfer via > its TC (transfer counter) register which is decremented for each byte that > is transferred across the SCSI bus. > > Switch the transfer logic to use the value of TC

[PATCH v2 01/17] target: Set CPUClass::vmsd instead of DeviceClass::vmsd

2021-03-01 Thread Philippe Mathieu-Daudé
The cpu model is the single device available in user-mode. Since we want to restrict some fields to user-mode emulation, we prefer to set the vmsd field of CPUClass, rather than the DeviceClass one. Signed-off-by: Philippe Mathieu-Daudé --- target/alpha/cpu.c | 2 +- target/cris/cpu.c

[PATCH v2 00/17] cpu: Introduce SysemuCPUOps structure

2021-03-01 Thread Philippe Mathieu-Daudé
Hi, This series is inspired on Claudio TCG work. Instead of separate TCG from other accelerators, here we separate sysemu operations (system VS user). Patches 1-6 are generic cleanups. Patches 7-15 move from CPUClass to SysemuCPUOps Patches 16-17 restrict SysemuCPUOps to sysemu Since v1: - Name

[PATCH v2 02/17] cpu: Un-inline cpu_get_phys_page_debug and cpu_asidx_from_attrs

2021-03-01 Thread Philippe Mathieu-Daudé
To be able to later extract the cpu_get_phys_page_debug() and cpu_asidx_from_attrs() handlers from CPUClass, un-inline them from "hw/core/cpu.h". Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 33 - hw/core/cpu.c | 32 +++

[PATCH v2 04/17] cpu: Directly use cpu_write_elf*() fallback handlers in place

2021-03-01 Thread Philippe Mathieu-Daudé
No code directly accesses CPUClass::write_elf*() handlers out of hw/core/cpu.c (the rest are assignation in target/ code): $ git grep -F -- '->write_elf' hw/core/cpu.c:157:return (*cc->write_elf32_qemunote)(f, cpu, opaque); hw/core/cpu.c:171:return (*cc->write_elf32_note)(f, cpu, cpu

[PATCH v2 16/17] cpu: Restrict cpu_paging_enabled / cpu_get_memory_mapping to sysemu

2021-03-01 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 960846d2b64..d99d3c830dc 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -427,6 +427,8 @@ s

[PATCH v2 03/17] cpu: Introduce cpu_virtio_is_big_endian()

2021-03-01 Thread Philippe Mathieu-Daudé
Introduce the cpu_virtio_is_big_endian() generic helper to avoid calling CPUClass internal virtio_is_big_endian() one. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 9 + hw/core/cpu.c | 8 ++-- hw/virtio/virtio.c| 4 +--- 3 files changed, 16 insertions

[PATCH v2 06/17] cpu: Directly use get_memory_mapping() fallback handlers in place

2021-03-01 Thread Philippe Mathieu-Daudé
No code uses CPUClass::get_memory_mapping() outside of hw/core/cpu.c: $ git grep -F -- '->get_memory_mapping' hw/core/cpu.c:87:cc->get_memory_mapping(cpu, list, errp); hw/core/cpu.c:439:k->get_memory_mapping = cpu_common_get_memory_mapping; target/i386/cpu.c:7422:cc->get_memory

[PATCH v2 05/17] cpu: Directly use get_paging_enabled() fallback handlers in place

2021-03-01 Thread Philippe Mathieu-Daudé
No code uses CPUClass::get_paging_enabled() outside of hw/core/cpu.c: $ git grep -F -- '->get_paging_enabled' hw/core/cpu.c:74:return cc->get_paging_enabled(cpu); hw/core/cpu.c:438:k->get_paging_enabled = cpu_common_get_paging_enabled; target/i386/cpu.c:7418:cc->get_paging_enab

[PATCH v2 07/17] cpu: Introduce SysemuCPUOps structure

2021-03-01 Thread Philippe Mathieu-Daudé
Introduce a structure to hold handler specific to sysemu. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h| 5 + include/hw/core/sysemu-cpu-ops.h | 21 + target/alpha/cpu.c | 6 ++ target/arm/cpu.c | 6 ++

[PATCH v2 09/17] cpu: Move CPUClass::virtio_is_big_endian to SysemuCPUOps

2021-03-01 Thread Philippe Mathieu-Daudé
VirtIO devices are only meaningful with system emulation. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h| 5 - include/hw/core/sysemu-cpu-ops.h | 8 hw/core/cpu.c| 4 ++-- target/arm/cpu.c | 2 +- target/ppc/translate_

[PATCH v2 08/17] cpu: Move CPUClass::vmsd to SysemuCPUOps

2021-03-01 Thread Philippe Mathieu-Daudé
Migration is specific to system emulation. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h| 2 -- include/hw/core/sysemu-cpu-ops.h | 4 cpu.c| 18 -- target/alpha/cpu.c | 2 +- target/arm/cpu.c

[PATCH v2 11/17] cpu: Move CPUClass::write_elf* to SysemuCPUOps

2021-03-01 Thread Philippe Mathieu-Daudé
The write_elf*() handlers are used to dump vmcore images. This feature is only meaningful for system emulation. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h| 17 - include/hw/core/sysemu-cpu-ops.h | 24 hw/core/cpu.c

[PATCH v2 10/17] cpu: Move CPUClass::get_crash_info to SysemuCPUOps

2021-03-01 Thread Philippe Mathieu-Daudé
cpu_get_crash_info() is called on GUEST_PANICKED events, which only occur in system emulation. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h| 1 - include/hw/core/sysemu-cpu-ops.h | 5 + hw/core/cpu.c| 4 ++-- target/i386/cpu.c

[RFC PATCH v2 17/17] cpu: Restrict "hw/core/sysemu-cpu-ops.h" to target/cpu.c

2021-03-01 Thread Philippe Mathieu-Daudé
Somehow similar to commit 78271684719 ("cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass"): We cannot in principle make the SysEmu Operations field definitions conditional on CONFIG_SOFTMMU in code that is included by both common_ss and specific_ss modules. Therefore, what we can d

[PATCH v2 12/17] cpu: Move CPUClass::asidx_from_attrs to SysemuCPUOps

2021-03-01 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h| 3 --- include/hw/core/sysemu-cpu-ops.h | 5 + hw/core/cpu.c| 4 ++-- target/arm/cpu.c | 2 +- target/i386/cpu.c| 2 +- 5 files changed, 9 insertions(+), 7 deletion

[PATCH v2 13/17] cpu: Move CPUClass::get_phys_page_debug to SysemuCPUOps

2021-03-01 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h| 8 include/hw/core/sysemu-cpu-ops.h | 13 + hw/core/cpu.c| 6 +++--- target/alpha/cpu.c | 2 +- target/arm/cpu.c | 2 +- target/avr/cpu.c

[PATCH v2 14/17] cpu: Move CPUClass::get_memory_mapping to SysemuCPUOps

2021-03-01 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h| 3 --- include/hw/core/sysemu-cpu-ops.h | 5 + hw/core/cpu.c| 4 ++-- target/i386/cpu.c| 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/hw/core/cpu.h

Re: [PATCH v2 14/42] esp: remove minlen restriction in handle_ti

2021-03-01 Thread Laurent Vivier
Le 09/02/2021 à 20:29, Mark Cave-Ayland a écrit : > The limiting of DMA transfers to the maximum size of the available data is > already > handled by esp_do_dma() and do_dma_pdma_cb(). > > Signed-off-by: Mark Cave-Ayland > --- > hw/scsi/esp.c | 12 ++-- > 1 file changed, 2 insertions(+)

Re: [PATCH v2 17/42] esp: move pdma_len and TC logic into esp_pdma_read()/esp_pdma_write()

2021-03-01 Thread Laurent Vivier
Le 09/02/2021 à 20:29, Mark Cave-Ayland a écrit : > Signed-off-by: Mark Cave-Ayland > --- > hw/scsi/esp.c | 50 -- > 1 file changed, 32 insertions(+), 18 deletions(-) > > diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c > index cfeba2feb0..7134c0aff4 100

[PATCH v2 15/17] cpu: Move CPUClass::get_paging_enabled to SysemuCPUOps

2021-03-01 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h| 2 -- include/hw/core/sysemu-cpu-ops.h | 4 hw/core/cpu.c| 4 ++-- target/i386/cpu.c| 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/hw/core/cpu.h

Re: [PATCH v2 15/42] esp: introduce esp_pdma_read() and esp_pdma_write() functions

2021-03-01 Thread Laurent Vivier
Le 09/02/2021 à 20:29, Mark Cave-Ayland a écrit : > Signed-off-by: Mark Cave-Ayland > --- > hw/scsi/esp.c | 28 > 1 file changed, 20 insertions(+), 8 deletions(-) > > diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c > index e7cf36f4b8..b0cba889a9 100644 > --- a/hw/scsi/esp

Re: [PATCH v2 16/42] esp: use pdma_origin directly in esp_pdma_read()/esp_pdma_write()

2021-03-01 Thread Laurent Vivier
Le 09/02/2021 à 20:29, Mark Cave-Ayland a écrit : > This is the first step in removing get_pdma_buf() from esp.c. > > Signed-off-by: Mark Cave-Ayland > --- > hw/scsi/esp.c | 34 -- > 1 file changed, 28 insertions(+), 6 deletions(-) > > diff --git a/hw/scsi/esp.c

Re: [RFC v2 08/24] target/arm: split cpregs from tcg/helper.c

2021-03-01 Thread Richard Henderson
On 3/1/21 8:49 AM, Claudio Fontana wrote: +uint64_t raw_read(CPUARMState *env, const ARMCPRegInfo *ri); +void raw_write(CPUARMState *env, const ARMCPRegInfo *ri, + uint64_t value); These shouldn't go in cpu.h; the new cpregs.h seems reasonable. Otherwise, LGTM. r~

[PATCH 1/2] block: Clarify error messages pertaining to 'node-name'

2021-03-01 Thread Connor Kuehl
Reported-by: Tingting Mao Fixes: https://bugzilla.redhat.com/1651437 Signed-off-by: Connor Kuehl --- block.c| 8 tests/qemu-iotests/040 | 4 ++-- tests/qemu-iotests/249.out | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/block.c b/block.c i

[PATCH 0/2] Clarify error messages pertaining to 'node-name'

2021-03-01 Thread Connor Kuehl
Some error messages contain ambiguous representations of the 'node-name' parameter. This can be particularly confusing when exchanging QMP messages (C = client, S = server): C: {"execute": "block_resize", "arguments": { "device": "my_file", "size": 26843545600 }} S: {"error": {"class": "GenericEr

[PATCH 2/2] blockdev: Clarify error messages pertaining to 'node-name'

2021-03-01 Thread Connor Kuehl
Signed-off-by: Connor Kuehl --- blockdev.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c index cd438e60e3..7c7ab2b386 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1515,13 +1515,13 @@ static void external_snapshot_prepare(BlkActionState

[PATCH v3 0/5] aspeed: LPC peripheral controller devices

2021-03-01 Thread Andrew Jeffery
Hello, This series adds support for some of the LPC[1] peripherals found in Aspeed BMC SoCs. [1] https://www.intel.com/content/dam/www/program/design/us/en/documents/low-pin-count-interface-specification.pdf v3 fixes a copy/paste error hooking up the LPC IRQ for the AST2600, identified off-list

[PATCH v3 2/5] hw/arm: ast2600: Set AST2600_MAX_IRQ to value from datasheet

2021-03-01 Thread Andrew Jeffery
The datasheet says we have 197 IRQs allocated, and we need more than 128 to describe IRQs from LPC devices. Raise the value now to allow modelling of the LPC devices. Signed-off-by: Andrew Jeffery Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater --- hw/arm/aspeed_ast2600.c | 2

[PATCH v3 3/5] hw/arm: ast2600: Correct the iBT interrupt ID

2021-03-01 Thread Andrew Jeffery
The AST2600 allocates distinct GIC IRQs for the LPC subdevices such as the iBT device. Previously on the AST2400 and AST2500 the LPC subdevices shared a single LPC IRQ. Signed-off-by: Andrew Jeffery Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater --- hw/arm/aspeed_ast2600.c |

[PATCH v3 1/5] hw/arm: ast2600: Force a multiple of 32 of IRQs for the GIC

2021-03-01 Thread Andrew Jeffery
This appears to be a requirement of the GIC model. The AST2600 allocates 197 GIC IRQs, which we will adjust shortly. Signed-off-by: Andrew Jeffery Reviewed-by: Cédric Le Goater --- hw/arm/aspeed_ast2600.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/aspeed_ast2

[PATCH v3 4/5] hw/misc: Add a basic Aspeed LPC controller model

2021-03-01 Thread Andrew Jeffery
From: Cédric Le Goater This is a very minimal framework to access registers which are used to configure the AHB memory mapping of the flash chips on the LPC HC Firmware address space. Signed-off-by: Cédric Le Goater Signed-off-by: Andrew Jeffery --- docs/system/arm/aspeed.rst | 2 +- hw/a

[PATCH v3 5/5] hw/misc: Model KCS devices in the Aspeed LPC controller

2021-03-01 Thread Andrew Jeffery
Keyboard-Controller-Style devices for IPMI purposes are exposed via LPC IO cycles from the BMC to the host. Expose support on the BMC side by implementing the usual MMIO behaviours, and expose the ability to inspect the KCS registers in "host" style by accessing QOM properties associated with each

[PATCH] block: Change write_threshold to uint64 in BlockDeviceInfo

2021-03-01 Thread Yi Wang
From: renlei4 write_threshold is saved as uint64, but BlockDeviceInfo use int to describe it. normally it works well if threshold less than max int: # virsh domblkthreshold v6_163 sda 9223372036854775807 # virsh qemu-monitor-command v6_163 '{ "execute": "query-named-block-nodes" }' |grep thr

[PATCH] file-posix: allow -EBUSY errors during write zeros on block

2021-03-01 Thread ChangLimin
After Linux 5.10, write zeros to a multipath device using ioctl(fd, BLKZEROOUT, range) with cache none or directsync will return EBUSY. Similar to handle_aiocb_write_zeroes_unmap, handle_aiocb_write_zeroes_block allow -EBUSY errors during ioctl(fd, BLKZEROOUT, range). Reference commit in Linux 5.

Re: [PATCH 5/5] spapr.c: send QAPI event when memory hotunplug fails

2021-03-01 Thread David Gibson
On Fri, Feb 26, 2021 at 01:33:01PM -0300, Daniel Henrique Barboza wrote: > Recent changes allowed the pSeries machine to rollback the hotunplug > process for the DIMM when the guest kernel signals, via a > reconfiguration of the DR connector, that it's not going to release the > LMBs. > > Let's al

Re: [PATCH 3/5] spapr.c: add 'unplug already in progress' message for PHB unplug

2021-03-01 Thread David Gibson
On Fri, Feb 26, 2021 at 01:32:59PM -0300, Daniel Henrique Barboza wrote: > Both CPU hotunplug and PC_DIMM unplug reports an user warning, > mentioning that the hotunplug is in progress, if consecutive > 'device_del' are issued in quick succession. > > Do the same for PHBs in spapr_phb_unplug_reque

Re: [PATCH 4/5] spapr_pci.c: add 'unplug already in progress' message for PCI unplug

2021-03-01 Thread David Gibson
On Fri, Feb 26, 2021 at 01:33:00PM -0300, Daniel Henrique Barboza wrote: > Hotunplug for all other devices are warning the user when the hotunplug > is already in progress. Do the same for PCI devices in > spapr_pci_unplug_request(). > > Signed-off-by: Daniel Henrique Barboza Applied to ppc-for-

Re: [PATCH 2/5] spapr.c: check unplug_request flag in spapr_memory_unplug_request()

2021-03-01 Thread David Gibson
On Fri, Feb 26, 2021 at 01:32:58PM -0300, Daniel Henrique Barboza wrote: > Now that we're asserting the first DRC LMB earlier, use it to query if > the DRC is already pending unplug and, in this case, issue the same > error we already do. > > The previous check was introduced in commit 2a129767ebb

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

2021-03-01 Thread David Gibson
On Tue, Feb 23, 2021 at 11:19:38PM +1100, Alexey Kardashevskiy wrote: > > > On 23/02/2021 14:07, David Gibson wrote: > > On Tue, Feb 09, 2021 at 10:02:52PM +1100, Alexey Kardashevskiy wrote: > > > The PAPR platform which describes an OS environment that's presented by > > > a combination of a hyp

Re: [PATCH v2 1/1] qemu_timer.c: add timer_deadline_ms() helper

2021-03-01 Thread David Gibson
On Mon, Mar 01, 2021 at 09:41:33AM -0300, Daniel Henrique Barboza wrote: > The pSeries machine is using QEMUTimer internals to return the timeout > in seconds for a timer object, in hw/ppc/spapr.c, function > spapr_drc_unplug_timeout_remaining_sec(). > > Create a helper in qemu-timer.c to retrieve

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

2021-03-01 Thread David Gibson
On Tue, Feb 23, 2021 at 09:48:56PM -0800, no-re...@patchew.org wrote: > Patchew URL: https://patchew.org/QEMU/20210224054130.4540-1-...@ozlabs.ru/ > > > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Type: series > Message-id: 20210

m...@redhat.com

2021-03-01 Thread Sean Kuo
Hi Team, Sorry for the disturbance. I have to ask for your help since I can't solve the problem by googling. *Below is the problem:* I met a problem when I tried to use IVSHMEM. Command lspci does not show the IVSHMEM device. Below is the configuration from my side: *1. guest vm xml configura

[Bug 1917394] [NEW] command lspci does not show the IVSHMEM device

2021-03-01 Thread sean kuo
Public bug reported: qeum version: QEMU emulator version 4.2.1 I met a problem when I tried to use IVSHMEM. Command lspci does not show the IVSHMEM device. Below is the configuration from my side: 1. guest vm xml configuration. 2 2. after the booting up and I found

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

2021-03-01 Thread David Gibson
On Wed, Feb 24, 2021 at 04:41:30PM +1100, Alexey Kardashevskiy wrote: > The PAPR platform which describes an OS environment that's presented by > a combination of a hypervisor and firmware. The features it specifies > require collaboration between the firmware and the hypervisor. > > Since the beg

Re: [RFC v2 10/24] target/arm: only perform TCG cpu and machine inits if tcg enabled

2021-03-01 Thread Richard Henderson
On 3/1/21 8:49 AM, Claudio Fontana wrote: @@ -1321,6 +1323,7 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp) } } +#ifdef CONFIG_TCG { uint64_t scale; @@ -1346,7 +1349,8 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)

Re: [RFC v2 11/24] target/arm: kvm: add stubs for some helpers

2021-03-01 Thread Richard Henderson
On 3/1/21 8:49 AM, Claudio Fontana wrote: --- /dev/null +++ b/target/arm/kvm/helper-stubs.c @@ -0,0 +1,18 @@ +#include "qemu/osdep.h" +#include "cpu.h" Need license boilerplate. Otherwise looks fine. r~

Re: [PATCH v4 0/6] Pegasos2 emulation

2021-03-01 Thread David Gibson
On Thu, Feb 25, 2021 at 12:10:55PM -0800, no-re...@patchew.org wrote: > Patchew URL: https://patchew.org/QEMU/cover.1614282456.git.bala...@eik.bme.hu/ > > > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Type: series > Message-id: c

Re: [PATCH v4 0/6] Pegasos2 emulation

2021-03-01 Thread David Gibson
On Thu, Feb 25, 2021 at 08:47:36PM +0100, BALATON Zoltan wrote: > Hello, > > This is adding a new PPC board called pegasos2. More info on it can be > found at: > > https://osdn.net/projects/qmiga/wiki/SubprojectPegasos2 > > Currently it needs a firmware ROM image that I cannot include due to > o

Re: [RFC v2 12/24] target/arm: move cpsr_read, cpsr_write to cpu_common

2021-03-01 Thread Richard Henderson
On 3/1/21 8:49 AM, Claudio Fontana wrote: we need as a result to move switch_mode too, so we put an implementation into cpu_user and cpu_sysemu. Signed-off-by: Claudio Fontana --- target/arm/cpu.h| 2 + target/arm/cpu-common.c | 182 + target/arm/cpu

Re: [RFC v2 13/24] target/arm: add temporary stub for arm_rebuild_hflags

2021-03-01 Thread Richard Henderson
On 3/1/21 8:49 AM, Claudio Fontana wrote: +#ifdef CONFIG_TCG /* CP15 update requires rebuilding hflags */ arm_rebuild_hflags(&target_cpu->env); +#endif /* CONFIG_TCG */ ... +/* XXX this is used all over in hw/arm, needs Philippe's work to remove */ +void arm_rebuild_hflags(CPUARMSta

Re: [RFC v2 14/24] target/arm: split vfp state setting from tcg helpers

2021-03-01 Thread Richard Henderson
On 3/1/21 8:49 AM, Claudio Fontana wrote: vfp_get_fpsr and vfp_set_fpsr are needed also for KVM. Signed-off-by: Claudio Fontana --- target/arm/cpu-vfp.h | 29 + target/arm/cpu-vfp.c | 92 +++ target/arm/kvm/helper-stubs.c | 10 ++ target/arm/tcg/cpu-vfp.

Re: [RFC v2 15/24] target/arm: move arm_mmu_idx* to get-phys-addr

2021-03-01 Thread Richard Henderson
On 3/1/21 8:49 AM, Claudio Fontana wrote: Signed-off-by: Claudio Fontana --- target/arm/get-phys-addr.c | 95 ++ target/arm/tcg/helper.c| 95 -- 2 files changed, 95 insertions(+), 95 deletions(-) So... get-phys-addr

Re: [RFC v2 16/24] target/arm: move sve_zcr_len_for_el to common_cpu

2021-03-01 Thread Richard Henderson
On 3/1/21 8:49 AM, Claudio Fontana wrote: it is required by arch-dump.c and cpu.c, so apparently we need this for KVM too? Signed-off-by: Claudio Fontana --- target/arm/cpu-common.c | 33 + target/arm/tcg/helper.c | 33 - 2 file

Re: [PATCH] docs: show how to spawn qemu-storage-daemon with fd passing

2021-03-01 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Mon, Mar 01, 2021 at 09:49:21AM -0600, Eric Blake wrote: >> On 3/1/21 9:41 AM, Daniel P. Berrangé wrote: >> > On Mon, Mar 01, 2021 at 03:31:59PM +, Stefan Hajnoczi wrote: >> >> The QMP monitor, NBD server, and vhost-user-blk export all support file >> >> descri

Re: CI with --enable-debug?

2021-03-01 Thread Thomas Huth
On 01/03/2021 15.06, Markus Armbruster wrote: Today I debugged why Paolo couldn't reproduce an assertion failure I found in review. Turns out compiling with optimization masks it for both of us. This made me wonder whether our CI tests with and without optimization. I quick grep finds --enable-

Re: [PATCH v3 03/16] qapi/expr.py: constrain incoming expression types

2021-03-01 Thread Markus Armbruster
John Snow writes: > On 2/25/21 6:56 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> On 2/24/21 5:01 AM, Markus Armbruster wrote: John Snow writes: > mypy does not know the types of values stored in Dicts that masquerade > as objects. Help the type checker out by cons

Re: [RFC PATCH] docs/system: add a gentle prompt for the complexity to come

2021-03-01 Thread Thomas Huth
On 01/03/2021 12.27, Alex Bennée wrote: We all know the QEMU command line can become a fiendishly complex beast. Lets gently prepare our user for the horrors to come by referencing where other example command lines can be found in the manual. Signed-off-by: Alex Bennée --- docs/system/quickst

Re: [PATCH v3 08/16] qapi/expr.py: add type hint annotations

2021-03-01 Thread Markus Armbruster
John Snow writes: > On 2/25/21 8:56 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> Annotations do not change runtime behavior. >>> This commit *only* adds annotations. >>> >>> Signed-off-by: John Snow >>> Reviewed-by: Eduardo Habkost >>> Reviewed-by: Cleber Rosa >>> --- >>> scrip

Re: [RFC v2 18/24] target/arm: move arm_cpu_list to common_cpu

2021-03-01 Thread Richard Henderson
On 3/1/21 8:49 AM, Claudio Fontana wrote: Signed-off-by: Claudio Fontana --- target/arm/cpu-common.c | 42 + target/arm/tcg/helper.c | 41 2 files changed, 42 insertions(+), 41 deletions(-) Reviewed-by: Richard

Re: [RFC v2 05/24] target/arm: wrap arm_cpu_exec_interrupt in CONFIG_TCG

2021-03-01 Thread Richard Henderson
On 3/1/21 8:49 AM, Claudio Fontana wrote: +#ifdef CONFIG_TCG bool arm_cpu_exec_interrupt(CPUState *cs, int interrupt_request) { CPUClass *cc = CPU_GET_CLASS(cs); @@ -607,6 +608,7 @@ bool arm_cpu_exec_interrupt(CPUState *cs, int interrupt_request) cc->tcg_ops->do_interrupt(cs);

[PATCH V3 00/10] Detect reentrant RX casued by loopback

2021-03-01 Thread Jason Wang
Hi All: Followed by commit 22dc8663d9 ("net: forbid the reentrant RX"), we still need to fix the issues casued by loopback mode where the NIC usually it via calling nc->info->receive() directly. The fix is to introduce new network helper and check the queue->delivering. Thanks Changes since V2:

[PATCH V3 03/10] dp8393x: switch to use qemu_receive_packet() for loopback packet

2021-03-01 Thread Jason Wang
This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. Signed-off-by: Jason Wang --- hw/net/dp8393x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c index 205c0decc5..533a8304d0 100644 --- a/hw/net/d

[PATCH V3 05/10] sungem: switch to use qemu_receive_packet() for loopback

2021-03-01 Thread Jason Wang
This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- hw/net/sungem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/sungem.c b/hw/net/sungem.c index 33c3722df6

[PATCH V3 06/10] tx_pkt: switch to use qemu_receive_packet_iov() for loopback

2021-03-01 Thread Jason Wang
This patch switches to use qemu_receive_receive_iov() which can detect reentrancy and return early. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- hw/net/net_tx_pkt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/net_tx_pkt.c b/hw/net/net_tx_pkt.c

[PATCH V3 02/10] e1000: switch to use qemu_receive_packet() for loopback

2021-03-01 Thread Jason Wang
This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- hw/net/e1000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index d8da2f6528..3

[PATCH V3 04/10] msf2-mac: switch to use qemu_receive_packet() for loopback

2021-03-01 Thread Jason Wang
This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- hw/net/msf2-emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/msf2-emac.c b/hw/net/msf2-emac.c index 3

[PATCH V2 7/7] rtl8193: switch to use qemu_receive_packet() for loopback

2021-03-01 Thread Jason Wang
From: Alexander Bulekov This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. Buglink: https://bugs.launchpad.net/qemu/+bug/1910826 Signed-off-by: Alexander Bulekov --- hw/net/rtl8139.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH V3 07/10] rtl8139: switch to use qemu_receive_packet() for loopback

2021-03-01 Thread Jason Wang
From: Alexander Bulekov This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. Buglink: https://bugs.launchpad.net/qemu/+bug/1910826 Signed-off-by: Alexander Bulekov --- hw/net/rtl8139.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH V3 01/10] net: introduce qemu_receive_packet()

2021-03-01 Thread Jason Wang
Some NIC supports loopback mode and this is done by calling nc->info->receive() directly which in fact suppresses the effort of reentrancy check that is done in qemu_net_queue_send(). Unfortunately we can't use qemu_net_queue_send() here since for loopback there's no sender as peer, so this patch

[PATCH V3 08/10] pcnet: switch to use qemu_receive_packet() for loopback

2021-03-01 Thread Jason Wang
From: Alexander Bulekov This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. Buglink: https://bugs.launchpad.net/qemu/+bug/1917085 Reviewed-by: Philippe Mathieu-Daudé --- hw/net/pcnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] net: validate that ids are well formed

2021-03-01 Thread Jason Wang
On 2021/3/1 11:07 下午, Eric Blake wrote: On 3/1/21 8:56 AM, Paolo Bonzini wrote: When a network or network device is created from the command line or HMP, QemuOpts ensures that the id passes the id_wellformed check. However, QMP skips this: $ qemu-system-x86_64 -qmp stdio -S -nic user,id=

Re: [PATCH v3 09/16] qapi/expr.py: Consolidate check_if_str calls in check_if

2021-03-01 Thread Markus Armbruster
John Snow writes: > On 2/25/21 9:23 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> This is a small rewrite to address some minor style nits. >>> >>> Don't compare against the empty list to check for the empty condition, and >>> move the normalization forward to unify the check on the

[PATCH V3 09/10] cadence_gem: switch to use qemu_receive_packet() for loopback

2021-03-01 Thread Jason Wang
From: Alexander Bulekov This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. Signed-off-by: Alexander Bulekov --- hw/net/cadence_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index

[PATCH V3 10/10] lan9118: switch to use qemu_receive_packet() for loopback

2021-03-01 Thread Jason Wang
From: Alexander Bulekov This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. Signed-off-by: Alexander Bulekov --- hw/net/lan9118.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c index abc796285a.

Re: [PATCH v3 0/3] vfio: Some fixes and optimizations for VFIO migration

2021-03-01 Thread Shenming Lu
Hi Alex, Does this series need any further modification? Wish you can pick it up. :-) On 2021/2/23 10:22, Shenming Lu wrote: > This patch set includes two fixes and one optimization for VFIO migration > as blew: > > Patch 1-2: > - Fix two ordering problems in migration. > > Patch 3: > - Optimiz

Re: [RFC v2 06/24] target/arm: split off cpu-sysemu.c

2021-03-01 Thread Richard Henderson
On 3/1/21 8:49 AM, Claudio Fontana wrote: Signed-off-by: Claudio Fontana --- target/arm/internals.h | 8 ++- target/arm/cpu-sysemu.c | 105 target/arm/cpu.c| 83 --- target/arm/meson.build | 1 + 4 files cha

Re: [RFC v2 19/24] target/arm: move aarch64_sync_32_to_64 (and vv) to cpu code

2021-03-01 Thread Richard Henderson
On 3/1/21 8:49 AM, Claudio Fontana wrote: and arm_phys_excp_target_el since it is tied up inside the same #ifdef block. aarch64_sync_32_to_64 and aarch64_sync_64_to_32 are mixed in with the tcg helpers, but they shouldn't, as they are needed for kvm too, in the sysemu case. Really? Now that *

Re: [PATCH v2 0/5] hw/block/nvme: misc fixes

2021-03-01 Thread Klaus Jensen
On Feb 22 19:47, Klaus Jensen wrote: > From: Klaus Jensen > > Small set of misc fixes from Gollu. > > v2 changes > > * Split off the trace event additions from "[PATCH 1/3] hw/block/nvme: > nvme_identify fixes" and "[PATCH 2/3] hw/block/nvme: fix potential > compilation error" into th

Re: [PATCH v2 1/2] storage-daemon: report unexpected arguments on the fly

2021-03-01 Thread Markus Armbruster
Eric Blake writes: > On 3/1/21 9:28 AM, Paolo Bonzini wrote: >> If the first character of optstring is '-', then each nonoption argv >> element is handled as if it were the argument of an option with character >> code 1. This removes the reordering of the argv array, and enables usage >> of loc_

Re: [PATCH v2 2/2] storage-daemon: include current command line option in the errors

2021-03-01 Thread Markus Armbruster
Paolo Bonzini writes: > Use the location management facilities that the emulator uses, so that > the current command line option appears in the error message. > > Before: > > $ storage-daemon/qemu-storage-daemon --nbd key..= > qemu-storage-daemon: Invalid parameter 'key..' > > After: > > $

Re: [PATCH V2 7/7] rtl8193: switch to use qemu_receive_packet() for loopback

2021-03-01 Thread P J P
+-- On Tue, 2 Mar 2021, Jason Wang wrote --+ | DPRINTF("+++ transmit loopback mode\n"); | -rtl8139_do_receive(qemu_get_queue(s->nic), buf, size, do_interrupt); | +qemu_receive_packet(qemu_get_queue(s->nic), buf, size); | ... |[PATCH V2 7/7] rtl8193: switch to use qemu_r

Re: CI with --enable-debug?

2021-03-01 Thread Markus Armbruster
Thomas Huth writes: > On 01/03/2021 15.06, Markus Armbruster wrote: >> Today I debugged why Paolo couldn't reproduce an assertion failure I >> found in review. Turns out compiling with optimization masks it for >> both of us. >> This made me wonder whether our CI tests with and without >> optimi

[Bug 1917161] Re: Parameter 'type' expects a netdev backend type

2021-03-01 Thread Thomas Huth
Yes, QEMU should come with the libslirp sources. Are you using git? Then maybe something went wrong with the checkout of the submodule. Is there something in your "slirp" folder? What do you get when you run "git submodule" ? -- You received this bug notification because you are a member of qemu-

Re: [PATCH V2 7/7] rtl8193: switch to use qemu_receive_packet() for loopback

2021-03-01 Thread Jason Wang
On 2021/3/2 2:39 下午, P J P wrote: +-- On Tue, 2 Mar 2021, Jason Wang wrote --+ | DPRINTF("+++ transmit loopback mode\n"); | -rtl8139_do_receive(qemu_get_queue(s->nic), buf, size, do_interrupt); | +qemu_receive_packet(qemu_get_queue(s->nic), buf, size); | ... |[PATCH V2

Re: [PATCH V3 07/10] rtl8139: switch to use qemu_receive_packet() for loopback

2021-03-01 Thread Philippe Mathieu-Daudé
On 3/2/21 6:54 AM, Jason Wang wrote: > From: Alexander Bulekov > > This patch switches to use qemu_receive_packet() which can detect > reentrancy and return early. > > Buglink: https://bugs.launchpad.net/qemu/+bug/1910826 > Signed-off-by: Alexander Bulekov Missing your S-o-b? > --- > hw/net/

Re: [PATCH V3 09/10] cadence_gem: switch to use qemu_receive_packet() for loopback

2021-03-01 Thread Philippe Mathieu-Daudé
On 3/2/21 6:54 AM, Jason Wang wrote: > From: Alexander Bulekov > > This patch switches to use qemu_receive_packet() which can detect > reentrancy and return early. > > Signed-off-by: Alexander Bulekov > --- > hw/net/cadence_gem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > dif

Re: [PATCH V3 10/10] lan9118: switch to use qemu_receive_packet() for loopback

2021-03-01 Thread Philippe Mathieu-Daudé
On 3/2/21 6:55 AM, Jason Wang wrote: > From: Alexander Bulekov > > This patch switches to use qemu_receive_packet() which can detect > reentrancy and return early. > > Signed-off-by: Alexander Bulekov > --- > hw/net/lan9118.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by

Re: [PATCH V3 03/10] dp8393x: switch to use qemu_receive_packet() for loopback packet

2021-03-01 Thread Philippe Mathieu-Daudé
On 3/2/21 6:54 AM, Jason Wang wrote: > This patch switches to use qemu_receive_packet() which can detect > reentrancy and return early. > > Signed-off-by: Jason Wang > --- > hw/net/dp8393x.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

<    1   2   3   4   5   >