Re: [PATCH v2] target/loongarch: Fix the vinsgr2vr/vpickve2gr instructions cause system coredump

2023-05-25 Thread Richard Henderson
On 5/25/23 05:00, Song Gao wrote: The vinsgr2vr/vpickve2gr instructions need use get_src/get_dst to get gpr registers value, not cpu_gpr[]. The $zero register does not have cpu_gpr[0] allocated. Resolves:https://gitlab.com/qemu-project/qemu/-/issues/1662 Signed-off-by: Song Gao --- target/loo

Re: [PATCH 09/12] hw/char/pl011: Check if transmitter is enabled

2023-05-25 Thread Philippe Mathieu-Daudé
On 25/5/23 14:55, Peter Maydell wrote: On Thu, 25 May 2023 at 13:52, Alex Bennée wrote: Peter Maydell writes: On Mon, 22 May 2023 at 16:32, Philippe Mathieu-Daudé wrote: Do not transmit characters when UART or transmitter are disabled. Signed-off-by: Philippe Mathieu-Daudé Last time

Re: [RFC PATCH] softfloat: use QEMU_FLATTEN to avoid mistaken isra inlining

2023-05-25 Thread Paolo Bonzini
On 5/23/23 16:33, Richard Henderson wrote: The tests are poorly ordered, testing many unlikely things before the most likely thing (normal).  A better ordering would be     if (likely(tp##_is_normal(arg))) {     } else if (tp##_is_zero(arg)) {     } else if (tp##_is_zero_or_denormal(arg))

Re: [PATCH] tests/decode: Emit TAP

2023-05-25 Thread Peter Maydell
On Thu, 25 May 2023 at 14:11, Richard Henderson wrote: > > On 5/25/23 03:00, Peter Maydell wrote: > > On Wed, 24 May 2023 at 18:38, Richard Henderson > > wrote: > >> > >> We currently print FAIL for the failure of a succ_* test, but don't > >> return a failure exit code. Instead, convert the scr

Re: [RFC PATCH v1 0/9] Hypervisor-Enforced Kernel Integrity

2023-05-25 Thread Mickaël Salaün
On 24/05/2023 23:04, Trilok Soni wrote: On 5/5/2023 8:20 AM, Mickaël Salaün wrote: Hi, This patch series is a proof-of-concept that implements new KVM features (extended page tracking, MBEC support, CR pinning) and defines a new API to protect guest VMs. No VMM (e.g., Qemu) modification is re

Re: [RFC PATCH] softfloat: use QEMU_FLATTEN to avoid mistaken isra inlining

2023-05-25 Thread Paolo Bonzini
On 5/23/23 16:33, Richard Henderson wrote: The tests are poorly ordered, testing many unlikely things before the most likely thing (normal).  A better ordering would be     if (likely(tp##_is_normal(arg))) {     } else if (tp##_is_zero(arg)) {     } else if (tp##_is_zero_or_denormal(arg))

Re: [RFC PATCH] softfloat: use QEMU_FLATTEN to avoid mistaken isra inlining

2023-05-25 Thread Richard Henderson
On 5/25/23 06:22, Paolo Bonzini wrote: On 5/23/23 16:33, Richard Henderson wrote: The tests are poorly ordered, testing many unlikely things before the most likely thing (normal).  A better ordering would be if (likely(tp##_is_normal(arg))) { } else if (tp##_is_zero(arg)) { }

Re: [PATCH v1 2/3] memory-device: Factor out device memory initialization into memory_devices_init()

2023-05-25 Thread Philippe Mathieu-Daudé
Hi David, On 23/5/23 20:51, David Hildenbrand wrote: Let's factor the common setup out, to prepare for further changes. On arm64, we'll add the subregion to system RAM now earlier -- which shouldn't matter, because the system RAM memory region should already be alive at that point. Signed-off-

Re: [PATCH 3/3] Makefile: remove $(TESTS_PYTHON)

2023-05-25 Thread Alex Bennée
Paolo Bonzini writes: > It is now the same as $(PYTHON), since the latter always points at > pyvenv/bin/python3. > > Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 1/3] tests/docker: simplify HOST_ARCH definition

2023-05-25 Thread Alex Bennée
Paolo Bonzini writes: > ARCH is always empty, so just define HOST_ARCH as the result of uname. > > Signed-off-by: Paolo Bonzini Acked-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH] qapi: better docs for calc-dirty-rate and friends

2023-05-25 Thread Peter Xu
On Thu, May 25, 2023 at 03:08:35PM +0200, Markus Armbruster wrote: > Andrei Gudkov writes: > > > Rewrote calc-dirty-rate documentation. Briefly described > > different modes of dirty page rate measurement. Added some > > examples. Fixed obvious grammar errors. > > > > Signed-off-by: Andrei Gudkov

Re: [PATCH 2/3] tests/vm: fix and simplify HOST_ARCH definition

2023-05-25 Thread Alex Bennée
Paolo Bonzini writes: > ARCH is always empty, so just define HOST_ARCH as the result of uname. > The incorrect definition was not being used because the "ifeq" statement > is wrong; replace it with the same idiom based on $(realpath) that the > main Makefile uses. > > With this change, vm-build

Re: [PATCH] tests/decode: Emit TAP

2023-05-25 Thread Paolo Bonzini
On 5/25/23 12:00, Peter Maydell wrote: At least some of its "missing quoting" complaints are also legitimate, notably on $PYTHON and $DECODETREE. $PYTHON could include command line options, so I don't think it should be quoted. Though we could stop insisting on using -B; either not doing any

Re: [PATCH v2 2/2] hw/vfio: Add nr of dirty pages to vfio_get_dirty_bitmap tracepoint

2023-05-25 Thread Joao Martins
On 25/05/2023 12:52, Philippe Mathieu-Daudé wrote: > Hi Joao, > > On 25/5/23 13:43, Joao Martins wrote: >> Include the number of dirty pages on the vfio_get_dirty_bitmap tracepoint. >> These are fetched from the newly added return value in >> cpu_physical_memory_set_lebitmap(). >> >> Signed-off-by

Re: [PATCH v1 2/3] memory-device: Factor out device memory initialization into memory_devices_init()

2023-05-25 Thread David Hildenbrand
On 25.05.23 15:30, Philippe Mathieu-Daudé wrote: Hi David, On 23/5/23 20:51, David Hildenbrand wrote: Let's factor the common setup out, to prepare for further changes. On arm64, we'll add the subregion to system RAM now earlier -- which shouldn't matter, because the system RAM memory region s

Re: [PATCH v3] hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none"

2023-05-25 Thread Andrea Bolognani
On Wed, May 24, 2023 at 11:03:52PM +0530, Sunil V L wrote: > On Wed, May 24, 2023 at 03:50:34PM +, Andrea Bolognani wrote: > > First off, the only RISC-V edk2 build readily accessible to me (from > > the edk2-riscv64 Fedora package) is configured to work off a R/W > > pflash1. You said that you

Re: [PATCH v2 1/2] exec/ram_addr: return nr of dirty pages in cpu_physical_memory_set_dirty_lebitmap()

2023-05-25 Thread Joao Martins
On 25/05/2023 14:16, Peter Xu wrote: > On Thu, May 25, 2023 at 12:43:20PM +0100, Joao Martins wrote: >> In preparation for including the number of dirty pages in the >> vfio_get_dirty_bitmap() tracepoint, return the number of dirty pages in >> cpu_physical_memory_set_dirty_lebitmap() similar to >>

QEMU Developer Survey for KVM Forum 2023

2023-05-25 Thread Alex Bennée
Hi All, It is that time of year again when approaching KVM Forum I like to gather some data about the developer community. The questions are mostly the familiar ones although I've added two new questions at the end. If you are a maintainer or developer who works with QEMU please take some time to

Re: [PATCH] intel_iommu: Optimize out some unnecessary UNMAP calls

2023-05-25 Thread Peter Xu
On Thu, May 25, 2023 at 11:29:34AM +, Duan, Zhenzhong wrote: > Hi Peter, > > See inline. > >-Original Message- > >From: Peter Xu > >Sent: Thursday, May 25, 2023 12:59 AM > >Subject: Re: [PATCH] intel_iommu: Optimize out some unnecessary UNMAP > >calls > > > >Hi, Zhenzhong, > > > >On T

Re: [PATCH v2 1/2] exec/ram_addr: return nr of dirty pages in cpu_physical_memory_set_dirty_lebitmap()

2023-05-25 Thread Peter Xu
On Thu, May 25, 2023 at 02:47:26PM +0100, Joao Martins wrote: > Yeap, Something like this? > > diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h > index 8b8f271d0731..deaf746421da 100644 > --- a/include/exec/ram_addr.h > +++ b/include/exec/ram_addr.h > @@ -333,6 +333,13 @@ static inli

Re: [RFC PATCH v1 0/9] Hypervisor-Enforced Kernel Integrity

2023-05-25 Thread Mickaël Salaün
On 25/05/2023 00:20, Edgecombe, Rick P wrote: On Fri, 2023-05-05 at 17:20 +0200, Mickaël Salaün wrote: # How does it work? This implementation mainly leverages KVM capabilities to control the Second Layer Address Translation (or the Two Dimensional Paging e.g., Intel's EPT or AMD's RVI/NPT) a

Re: [PATCH v12 02/15] accel: collecting TB execution count

2023-05-25 Thread Wu, Fei
On 5/25/2023 1:02 AM, Richard Henderson wrote: > On 5/24/23 06:35, Wu, Fei wrote: >> On 5/23/2023 8:45 AM, Richard Henderson wrote: >>> On 5/18/23 06:57, Fei Wu wrote: +void HELPER(inc_exec_freq)(void *ptr) +{ +    TBStatistics *stats = (TBStatistics *) ptr; +    tcg_debug_asser

[PULL 04/20] meson: move -no-pie from linker to compiler

2023-05-25 Thread Paolo Bonzini
The large comment in the patch says it all; the -no-pie flag is broken and this is why it was not included in QEMU_LDFLAGS before commit a988b4c5614 ("build: move remaining compiler flag tests to meson", 2023-05-18). And some distros made things even worse, so we have to add it to the compiler com

[PULL 17/20] monitor: cleanup fetching of QMP requests

2023-05-25 Thread Paolo Bonzini
Use a continue statement so that "after going to sleep" is treated the same way as "after processing a request". Pull the monitor_lock critical section out of monitor_qmp_requests_pop_any_with_lock() and protect qmp_dispatcher_co_shutdown with the monitor_lock. The two changes are complex to sepa

[PULL 10/20] softmmu/ioport.c: QOMify MemoryRegionPortioList

2023-05-25 Thread Paolo Bonzini
From: Mark Cave-Ayland The aim of QOMification is so that the lifetime of the MemoryRegionPortioList structure can be managed using QOM's in-built refcounting instead of having to handle this manually. Due to the use of an opaque pointer it isn't possible to model the new TYPE_MEMORY_REGION_PORT

[PULL 18/20] monitor: introduce qmp_dispatcher_co_wake

2023-05-25 Thread Paolo Bonzini
This makes it possible to turn qmp_dispatcher_co_busy into a static variable. Signed-off-by: Paolo Bonzini --- monitor/monitor-internal.h | 2 +- monitor/monitor.c | 26 +- monitor/qmp.c | 32 +--- 3 files changed, 31 ins

[PULL 15/20] monitor: do not use mb_read/mb_set for suspend_cnt

2023-05-25 Thread Paolo Bonzini
Clean up monitor_event to just use monitor_suspend/monitor_resume, using mon->mux_out to protect against incorrect nesting (especially on startup). The only remaining case of reading suspend_cnt is in the can_read callback, which is just advisory and can use qatomic_read. As an extra benefit, mux

[PULL 13/20] monitor: allow calling monitor_resume under mon_lock

2023-05-25 Thread Paolo Bonzini
Move monitor_resume()'s call to readline_show_prompt() outside the potentially locked section. Reuse the existing monitor_accept_input() bottom half for this purpose. Signed-off-by: Paolo Bonzini --- monitor/monitor.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --gi

[PULL 14/20] monitor: add more *_locked() functions

2023-05-25 Thread Paolo Bonzini
Allow flushing and printing to the monitor while mon->mon_lock is held. This will help cleaning up the locking of mon->mux_out and mon->suspend_cnt. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- include/monitor/monitor.h | 3 +++ monitor/monitor.c | 14 --

[PULL 06/20] tests/vm: fix and simplify HOST_ARCH definition

2023-05-25 Thread Paolo Bonzini
ARCH is always empty, so just define HOST_ARCH as the result of uname. The incorrect definition was not being used because the "ifeq" statement is wrong; replace it with the same idiom based on $(realpath) that the main Makefile uses. With this change, vm-build-netbsd in a configured tree will not

[PULL 08/20] usb/ohci: Set pad to 0 after frame update

2023-05-25 Thread Paolo Bonzini
When the OHCI controller's framenumber is incremented, HccaPad1 register should be set to zero (Ref OHCI Spec 4.4) ReactOS uses hccaPad1 to determine if the OHCI hardware is running, consequently it fails this check in current qemu master. Signed-off-by: Ryan Wendland Resolves: https://gitlab.co

[PULL 07/20] Makefile: remove $(TESTS_PYTHON)

2023-05-25 Thread Paolo Bonzini
It is now the same as $(PYTHON), since the latter always points at pyvenv/bin/python3. Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- tests/Makefile.include| 8 +++- tests/vm/Makefile.include | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/Makefi

[PULL 20/20] monitor: do not use mb_read/mb_set

2023-05-25 Thread Paolo Bonzini
Instead of relying on magic memory barriers, document the pattern that is being used. It is the one based on Dekker's algorithm, and in this case it is embodied as follows: enqueue request; sleeping = true; smp_mb(); smp_mb(); if (sleeping) kick();

[PULL 12/20] monitor: use QEMU_LOCK_GUARD a bit more

2023-05-25 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- monitor/monitor.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/monitor/monitor.c b/monitor/monitor.c index 602535696c59..4b11bca2a21d 100644 --- a/monitor/monitor.c +++ b/monitor/monitor.c @@ -161,10 +16

[PULL 09/20] softmmu/ioport.c: allocate MemoryRegionPortioList ports on the heap

2023-05-25 Thread Paolo Bonzini
From: Mark Cave-Ayland In order to facilitate a conversion of MemoryRegionPortioList to a QOM object move the allocation of MemoryRegionPortioList ports to the heap instead of using a variable-length member at the end of the MemoryRegionPortioList structure. Signed-off-by: Mark Cave-Ayland Revi

[PULL 01/20] target/i386: EPYC-Rome model without XSAVES

2023-05-25 Thread Paolo Bonzini
From: Maksim Davydov Based on the kernel commit "b0563468ee x86/CPU/AMD: Disable XSAVES on AMD family 0x17", host system with EPYC-Rome can clear XSAVES capability bit. In another words, EPYC-Rome host without XSAVES can occur. Thus, we need an EPYC-Rome cpu model (without this feature) that matc

[PULL 11/20] softmmu/ioport.c: make MemoryRegionPortioList owner of portio_list MemoryRegions

2023-05-25 Thread Paolo Bonzini
From: Mark Cave-Ayland Currently when portio_list MemoryRegions are freed using portio_list_destroy() the RCU thread segfaults generating a backtrace similar to that below: #0 0x599a34b6 in phys_section_destroy ../softmmu/physmem.c:996 #1 0x599a37a3 in phys_sections_free ../soft

[PULL 02/20] meson.build: Fix glib -Wno-unused-function workaround

2023-05-25 Thread Paolo Bonzini
From: Nicolas Saenz Julienne We want to only enable '-Wno-unused-function' if glib's version is smaller than '2.57.2' and has a G_DEFINE_AUTOPTR_CLEANUP_FUNC() implementation that doesn't take into account unused functions. But the compilation test isn't working as intended as '-Wunused-function'

[PULL 19/20] monitor: extract request dequeuing to a new function

2023-05-25 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- monitor/qmp.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/monitor/qmp.c b/monitor/qmp.c index 613b74ec74a7..e6b1043c9f7b 100644 --- a/monitor/qmp.c +++ b/monitor/qmp.c @@ -226,13 +226,8 @@ static QMPR

[PULL 03/20] meson: fix rule for qemu-ga installer

2023-05-25 Thread Paolo Bonzini
The bindir variable is not available in the "glib" variable, which is an internal dependency (created with "declare_dependency"). Use glib_pc instead, which contains the variable as it is instantiated from glib-2.0.pc. Signed-off-by: Paolo Bonzini --- qga/meson.build | 2 +- 1 file changed, 1

[PULL 00/20] Misc patches for 2023-05-25

2023-05-25 Thread Paolo Bonzini
The following changes since commit 886c0453cbf10eebd42a9ccf89c3e46eb389c357: Merge tag 'pull-qapi-2023-05-17-v2' of https://repo.or.cz/qemu/armbru into staging (2023-05-22 15:54:21 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you

[PULL 05/20] tests/docker: simplify HOST_ARCH definition

2023-05-25 Thread Paolo Bonzini
ARCH is always empty, so just define HOST_ARCH as the result of uname. Acked-by: Alex Bennée Signed-off-by: Paolo Bonzini --- tests/docker/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 940

Re: [RFC PATCH 2/6] block: Mark bdrv_co_get_allocated_file_size() as mixed

2023-05-25 Thread Eric Blake
On Tue, May 23, 2023 at 06:38:59PM -0300, Fabiano Rosas wrote: > Some callers of this function are about to be converted to use > coroutines, so allow it to be executed both inside and outside a > coroutine. > > Signed-off-by: Fabiano Rosas > --- > include/block/block-io.h | 2 +- > 1 file chang

[PULL 16/20] monitor: cleanup detection of qmp_dispatcher_co shutting down

2023-05-25 Thread Paolo Bonzini
Instead of overloading qmp_dispatcher_co_busy, make the coroutine pointer NULL. This will make things break spectacularly if somebody tries to start a request after monitor_cleanup(). AIO_WAIT_WHILE_UNLOCKED() does not need qatomic_mb_read(), because the macro contains all the necessary memory ba

Re: [RFC PATCH 3/6] Convert query-block/info_block to coroutine

2023-05-25 Thread Eric Blake
On Tue, May 23, 2023 at 06:39:00PM -0300, Fabiano Rosas wrote: > From: Lin Ma > > Sometimes the query-block performs time-consuming I/O(say waiting for > the fstat of NFS complete), So let's make this QMP handler runs in a > coroutine. Grammar suggestions: Sometimes the query-block command perf

Re: [PATCH] [query-memory-size-summary] Report page size

2023-05-25 Thread Markus Armbruster
Andrei Gudkov writes: > Some commands (query-migrate and calc-dirty-rate) report values > in units of pages. However, currently the only place where we can > get page size is through query-migrate and only after migration > has started. query-memory-size-summary seems like an appropritate > place

Re: [PATCH v2 1/2] exec/ram_addr: return nr of dirty pages in cpu_physical_memory_set_dirty_lebitmap()

2023-05-25 Thread Joao Martins
On 25/05/2023 14:54, Peter Xu wrote: > On Thu, May 25, 2023 at 02:47:26PM +0100, Joao Martins wrote: >> Yeap, Something like this? >> >> diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h >> index 8b8f271d0731..deaf746421da 100644 >> --- a/include/exec/ram_addr.h >> +++ b/include/exec/r

Re: [PATCH v1 1/2] vfio-user: update comments

2023-05-25 Thread Markus Armbruster
Jagannathan Raman writes: > Clarify the behavior of TYPE_VFU_OBJECT when TYPE_REMOTE_MACHINE enables > the auto-shutdown property. Also, add notes to VFU_OBJECT_ERROR. > > Signed-off-by: Jagannathan Raman > --- > hw/remote/vfio-user-obj.c | 14 +++--- > 1 file changed, 11 insertions(+),

Re: [PATCH v3] hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none"

2023-05-25 Thread Sunil V L
Hi Andrea, On Thu, May 25, 2023 at 01:43:28PM +, Andrea Bolognani wrote: > On Wed, May 24, 2023 at 11:03:52PM +0530, Sunil V L wrote: > > On Wed, May 24, 2023 at 03:50:34PM +, Andrea Bolognani wrote: > > > First off, the only RISC-V edk2 build readily accessible to me (from > > > the edk2-

Re: [PATCH v1 2/2] docs: fix multi-process QEMU documentation

2023-05-25 Thread Markus Armbruster
Jagannathan Raman writes: > Fix a typo in the system documentation for multi-process QEMU. > > Signed-off-by: Jagannathan Raman > --- > docs/system/multi-process.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/docs/system/multi-process.rst b/docs/system/multi-proces

Re: [PATCH 1/4] monitor: use QEMU_LOCK_GUARD a bit more

2023-05-25 Thread Markus Armbruster
Paolo Bonzini writes: > Signed-off-by: Paolo Bonzini > --- > monitor/monitor.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/monitor/monitor.c b/monitor/monitor.c > index 602535696c59..4b11bca2a21d 100644 > --- a/monitor/monitor.c > +++ b/monitor/monitor.c > @@

Re: [PATCH 2/2] migration: Put zero_pages in alphabetical order

2023-05-25 Thread Peter Xu
On Thu, May 04, 2023 at 12:33:57PM +0200, Juan Quintela wrote: > I forgot to move it when I rename it from duplicated_pages. > > Signed-off-by: Juan Quintela Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH 2/4] monitor: allow calling monitor_resume under mon_lock

2023-05-25 Thread Markus Armbruster
Paolo Bonzini writes: > Move monitor_resume()'s call to readline_show_prompt() outside the > potentially locked section. Reuse the existing monitor_accept_input() > bottom half for this purpose. This describes what the patch changes, but not why we want the change. Could you elaborate a bit? >

Re: [PATCH 3/4] monitor: add more *_locked() functions

2023-05-25 Thread Markus Armbruster
Paolo Bonzini writes: > Allow flushing and printing to the monitor while mon->mon_lock is > held. This will help cleaning up the locking of mon->mux_out and > mon->suspend_cnt. Actually, the patch adds just monitor_puts_locked(). monitor_flush_locked() it merely gives external linkage. Suggest

Re: [PATCH 0/4] monitor/hmp: cleanup monitor_event() and suspend_cnt

2023-05-25 Thread Markus Armbruster
Copying the HMP maintainer for another pair of eyes.

Re: Performance improvement with 6d740fb01b9f0f5ea7a82f4d5e458d91940a19ee

2023-05-25 Thread Stefan Hajnoczi
On Thu, 25 May 2023 at 06:18, Lukáš Doktor wrote: > the perf-ci detected and bisected the 6d740fb - aio-posix: do not nest poll > handlers - as a performance improvement when using multiple concurrent jobs > and 4k (22%) as well as 1024k (63%) blocks on aarch64 (on a slow rotational > disk). >

[PATCH v9 4/7] igb: RX payload guest writting refactoring

2023-05-25 Thread Tomasz Dzieciol
Refactoring is done in preparation for support of multiple advanced descriptors RX modes, especially packet-split modes. Signed-off-by: Tomasz Dzieciol --- hw/net/e1000e_core.c | 18 ++-- hw/net/igb_core.c| 214 +-- tests/qtest/libqos/igb.c | 5

[PATCH v9 6/7] igb: packet-split descriptors support

2023-05-25 Thread Tomasz Dzieciol
Packet-split descriptors are used by Linux VF driver for MTU values from 2048 Signed-off-by: Tomasz Dzieciol --- hw/net/igb_core.c | 357 ++-- hw/net/igb_regs.h | 9 ++ hw/net/trace-events | 2 +- 3 files changed, 325 insertions(+), 43 deletions(-)

[PATCH v9 7/7] e1000e: rename e1000e_ba_state and e1000e_write_hdr_to_rx_buffers

2023-05-25 Thread Tomasz Dzieciol
Rename e1000e_ba_state according and e1000e_write_hdr_to_rx_buffers for consistency with IGB. Signed-off-by: Tomasz Dzieciol --- hw/net/e1000e_core.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c ind

[PATCH v9 0/7] igb: packet-split descriptors support

2023-05-25 Thread Tomasz Dzieciol
Based-on: <20230523024339.50875-1-akihiko.od...@daynix.com> ("[PATCH v5 00/48] igb: Fix for DPDK") Purposes of this series of patches: * introduce packet-split RX descriptors support. This feature is used by Linux VF driver for MTU values from 2048. * refactor RX descriptor handling for introduc

[PATCH v9 1/7] igb: remove TCP ACK detection

2023-05-25 Thread Tomasz Dzieciol
TCP ACK detection is no longer present in igb. Signed-off-by: Tomasz Dzieciol --- hw/net/igb_core.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index d00b1caa6a..e927c51061 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -1327,11 +1327,

[PATCH v9 2/7] igb: rename E1000E_RingInfo_st

2023-05-25 Thread Tomasz Dzieciol
Rename E1000E_RingInfo_st and E1000E_RingInfo according to qemu typdefs guide. Signed-off-by: Tomasz Dzieciol --- hw/net/e1000e_core.c | 34 +- hw/net/igb_core.c| 42 +- 2 files changed, 38 insertions(+), 38 deletions(-)

[PATCH v9 5/7] igb: add IPv6 extended headers traffic detection

2023-05-25 Thread Tomasz Dzieciol
Signed-off-by: Tomasz Dzieciol --- hw/net/igb_core.c | 4 +++- hw/net/igb_regs.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 8e32f39ece..2bfae517fc 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -1420,7 +1420,9 @@ igb

[PATCH v9 3/7] igb: RX descriptors guest writting refactoring

2023-05-25 Thread Tomasz Dzieciol
Refactoring is done in preparation for support of multiple advanced descriptors RX modes, especially packet-split modes. Signed-off-by: Tomasz Dzieciol --- hw/net/igb_core.c | 170 +++- hw/net/igb_regs.h | 10 +-- hw/net/trace-events | 4 +- 3 files

Re: [RFC PATCH 6/6] block: Add a thread-pool version of fstat

2023-05-25 Thread Eric Blake
On Tue, May 23, 2023 at 06:39:03PM -0300, Fabiano Rosas wrote: > From: João Silva > > The fstat call can take a long time to finish when running over > NFS. Add a version of it that runs in the thread pool. > > Adapt one of its users, raw_co_get_allocated_file size to use the new > version. That

[PATCH] configure: unset harmful environment variables

2023-05-25 Thread Paolo Bonzini
Apart from CLICOLOR_FORCE and GREP_OPTIONS, there are other variables that are listed in the Autoconf manual. While Autoconf neutralizes them very early, and assumes it does not (yet) run in a shell that has "unset", QEMU assumes that the user invoked configure under a POSIX shell, and therefore c

Re: [PATCH 0/2] PC: Create RTC controllers in south bridges

2023-05-25 Thread Mark Cave-Ayland
On 19/05/2023 09:47, Bernhard Beschow wrote: This series contains two patches originating from the PIIX consolidation series [1]. Since the two patches represent general PC code modernization (ICH9 is modernized as well) and since the PIIX consolidation series is still under discussion it made s

Re: [RFC PATCH v1 0/9] Hypervisor-Enforced Kernel Integrity

2023-05-25 Thread Edgecombe, Rick P
On Thu, 2023-05-25 at 15:59 +0200, Mickaël Salaün wrote: [ snip ] > > The kernel often creates writable aliases in order to write to > > protected data (kernel text, etc). Some of this is done right as > > text > > is being first written out (alternatives for example), and some > > happens > > way

Re: [PATCH 5/6] hw/ide: Extract bmdma_status_writeb()

2023-05-25 Thread Mark Cave-Ayland
On 21/05/2023 12:15, Bernhard Beschow wrote: Every TYPE_PCI_IDE device performs the same not-so-trivial bit manipulation by copy'n'paste code. Extract this into bmdma_status_writeb(), mirroring bmdma_cmd_writeb(). Signed-off-by: Bernhard Beschow --- include/hw/ide/pci.h | 1 + hw/ide/cmd646.

Re: [PATCH 6/6] hw/ide/piix: Move registration of VMStateDescription to DeviceClass

2023-05-25 Thread Mark Cave-Ayland
On 21/05/2023 12:15, Bernhard Beschow wrote: The modern, declarative way to set up VM state handling is to assign to DeviceClass::vmsd attribute. There shouldn't be any change in behavior since dc->vmsd causes vmstate_register_with_alias_id() to be called on the instance during the instance ini

[PATCH] libvhost-user: Add new VhostUserRequest ID.

2023-05-25 Thread Li Zebin
Signed-off-by: Li Zebin --- subprojects/libvhost-user/libvhost-user.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index 8fb61e2df2..725de6fba2 100644 --- a/subprojects/libvhost-user/libvhost-user.c ++

Re: [PATCH v3 0/3] Trivial cleanups

2023-05-25 Thread Mark Cave-Ayland
On 23/05/2023 20:56, Bernhard Beschow wrote: This series: * Removes dead code from omap_uart and i82378 * Resolves redundant code in the i8254 timer devices v3: * Drop TYPE_ISA_PARALLEL since they became obsolete by https://lore.kernel.org/qemu-devel/20230522115014.1110840-9-th...@redhat.com

Re: [RFC PATCH v1 0/9] Hypervisor-Enforced Kernel Integrity

2023-05-25 Thread Sean Christopherson
On Thu, May 25, 2023, Rick P Edgecombe wrote: > I wonder if it might be a good idea to POC the guest side before > settling on the KVM interface. Then you can also look at the whole > thing and judge how much usage it would get for the different options > of restrictions. As I said earlier[*], IMO

Re: [PATCH] hw/ppc/openpic: Do not open-code ROUND_UP() macro

2023-05-25 Thread Mark Cave-Ayland
On 23/05/2023 07:15, Philippe Mathieu-Daudé wrote: While reviewing, the ROUND_UP() macro is easier to figure out. Besides, the comment confirms we want to round up here. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/ppc/openpic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[RFC PATCH 0/6] hw/{cxl, i386, arm}: PoC: Emulated MCTP over I2C for CXL Fabric / Device management

2023-05-25 Thread Jonathan Cameron via
Not intended for merge in anything like current form! CC list is a bit random and I'll admit I added a few people just to make them groan. Depends on patches 1 and 2 from. [PATCH v2 0/3] hw/{i2c, nvme}: mctp endpoint, nvme management interface model. Based-on: Message-ID: 20230425063540.46143-1

[RFC PATCH 1/6] hw/acpi/aml-build: add function for i2c slave device serial bus description

2023-05-25 Thread Jonathan Cameron via
Signed-off-by: Jonathan Cameron --- include/hw/acpi/aml-build.h | 1 + hw/acpi/aml-build.c | 17 + 2 files changed, 18 insertions(+) diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index fc2b949fb5..28db028b17 100644 --- a/include/hw/acpi/aml-build

[RFC PATCH 2/6] HACK: arm/virt: Add aspeed-i2c controller and MCTP EP to enable MCTP testing

2023-05-25 Thread Jonathan Cameron via
As the only I2C emulation in QEMU that supports being both a master and a slave, suitable for MCTP over i2c is aspeed-i2c add this controller to the arm virt model and hook up our new i2c_mctp_cxl_fmapi device. The current Linux driver for aspeed-i2c has a hard requirement on a reset controller.

[RFC PATCH 3/6] HACK: hw/arm/virt: Add ACPI support for aspeed-i2c / mctp

2023-05-25 Thread Jonathan Cameron via
Enable this for FM-API testing for CXL devices via MCTP over I2C Example DSDT block: Device (MCTP) { Name (_HID, "PRP0001") // _HID: Hardware ID Name (_DSD, Package (0x02) // _DSD: Device-Specific Data { ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties f

[RFC PATCH 4/6] HACK: hw/i386/pc: Add Aspeed i2c controller + MCTP with ACPI tables

2023-05-25 Thread Jonathan Cameron via
CXL devices provide a standard Fabric Management API - FM-API. See CXL specification r3.0 from https://www.computeexpresslink.org In many real setups that will be used by a separate host from the one actually using the CXL devices (BMC or similar) but it is helpful to be able to use the main CXL em

[RFC PATCH 5/6] misc/i2c_mctp_cxl: Initial device emulation

2023-05-25 Thread Jonathan Cameron via
The CCI and Fabric Manager APIs are used to configure CXL switches and devices. DMTF has defined an MCTP binding specification to carry these messages. The end goal of this work is to hook this up to emulated CXL switches and devices to allow control of the configuration. Signed-off-by: Jonathan

[RFC PATCH 6/6] docs: cxl: Add example commandline for MCTP CXL CCIs

2023-05-25 Thread Jonathan Cameron via
A lot more needed here on what these are for and what can be done with them. Signed-off-by: Jonathan Cameron --- docs/system/devices/cxl.rst | 27 +++ 1 file changed, 27 insertions(+) diff --git a/docs/system/devices/cxl.rst b/docs/system/devices/cxl.rst index f12011e230

Re: [PATCH v3] hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none"

2023-05-25 Thread Andrea Bolognani
On Thu, May 25, 2023 at 08:32:46PM +0530, Sunil V L wrote: > On Thu, May 25, 2023 at 01:43:28PM +, Andrea Bolognani wrote: > > I have also tried booting an openSUSE Tumbleweed "JeOS" image, since > > that's the only distro I'm aware of that uses UEFI boot on RISC-V at > > this point - though th

[PATCH v2] migration: hold the BQL during setup

2023-05-25 Thread Fiona Ebner
This is intended to be a semantic revert of commit 9b09503752 ("migration: run setup callbacks out of big lock"). There have been so many changes since that commit (e.g. a new setup callback dirty_bitmap_save_setup() that also needs to be adapted now), it's easier to do the revert manually. For sn

[PATCH v4 0/3] hw/riscv/virt: pflash improvements

2023-05-25 Thread Sunil V L
This series improves the pflash usage in RISC-V virt machine with solutions to below issues. 1) Currently the first pflash is reserved for ROM/M-mode firmware code. But S-mode payload firmware like EDK2 need both pflash devices to have separate code and variable store so that OS distros can keep

[PATCH v4 2/3] riscv/virt: Support using pflash via -blockdev option

2023-05-25 Thread Sunil V L
Currently, pflash devices can be configured only via -pflash or if=pflash options. This is the legacy way and the better way is to use -blockdev as in other architectures. libvirt also has moved to -blockdev method. To support -blockdev option, pflash devices need to be created in instance_init it

[PATCH v4 3/3] docs/system: riscv: Add pflash usage details

2023-05-25 Thread Sunil V L
pflash devices can be used in virt machine for different purposes like for ROM code or S-mode FW payload. Add a section in the documentation on how to use pflash devices for different purposes. Signed-off-by: Sunil V L --- docs/system/riscv/virt.rst | 29 + 1 file cha

[PATCH v4 1/3] hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none"

2023-05-25 Thread Sunil V L
Currently, virt machine supports two pflash instances each with 32MB size. However, the first pflash is always assumed to contain M-mode firmware and reset vector is set to this if enabled. Hence, for S-mode payloads like EDK2, only one pflash instance is available for use. This means both code and

Re: [PATCH v3] hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none"

2023-05-25 Thread Sunil V L
On Thu, May 25, 2023 at 04:19:12PM +, Andrea Bolognani wrote: > On Thu, May 25, 2023 at 08:32:46PM +0530, Sunil V L wrote: > > On Thu, May 25, 2023 at 01:43:28PM +, Andrea Bolognani wrote: > > > I have also tried booting an openSUSE Tumbleweed "JeOS" image, since > > > that's the only distr

tests/avocado/virtio-gpu.py:VirtioGPUx86.test_vhost_user_vga_virgl: ERROR

2023-05-25 Thread Richard Henderson
Hi guys, https://gitlab.com/qemu-project/qemu/-/jobs/4352476431 https://gitlab.com/qemu-project/qemu/-/jobs/4352476434 This test ERRORs on the azure k8s runners with qemu-system-x86_64: egl: no drm render node available qemu-system-x86_64: egl: render node init failed Can we please SKIP the te

Re: [PATCH v2 5/6] block/linux-aio: convert to blk_io_plug_call() API

2023-05-25 Thread Stefan Hajnoczi
On Wed, May 24, 2023 at 10:52:03AM +0200, Stefano Garzarella wrote: > On Tue, May 23, 2023 at 01:12:59PM -0400, Stefan Hajnoczi wrote: > > Stop using the .bdrv_co_io_plug() API because it is not multi-queue > > block layer friendly. Use the new blk_io_plug_call() API to batch I/O > > submission ins

Re: [PATCH v3 1/1] block/blkio: use qemu_open() to support fd passing for virtio-blk

2023-05-25 Thread Stefan Hajnoczi
On Wed, May 24, 2023 at 11:05:38AM +0200, Stefano Garzarella wrote: > Gentle ping :-) > > On Wed, May 17, 2023 at 4:30 PM Stefan Hajnoczi wrote: > > > > On Wed, May 17, 2023 at 09:19:26AM +0200, Stefano Garzarella wrote: > > > CCing Markus for some advice. > > > > > > On Tue, May 16, 2023 at 11:0

Re: [PULL 00/20] Misc patches for 2023-05-25

2023-05-25 Thread Richard Henderson
On 5/25/23 07:15, Paolo Bonzini wrote: The following changes since commit 886c0453cbf10eebd42a9ccf89c3e46eb389c357: Merge tag 'pull-qapi-2023-05-17-v2' ofhttps://repo.or.cz/qemu/armbru into staging (2023-05-22 15:54:21 -0700) are available in the Git repository at: https://gitlab.com/b

Re: [PATCH v5 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol.

2023-05-25 Thread Markus Armbruster
Het Gala writes: > This patch introduces well defined MigrateAddress struct and its related child > objects. > > The existing argument of 'migrate' and 'migrate-incoming' QAPI - 'uri' is of > string type. The current migration flow follows double encoding scheme for > fetching migration parameter

Re: [PATCH v5 6/9] migration: modified migration QAPIs to accept 'channels' argument for migration

2023-05-25 Thread Markus Armbruster
Het Gala writes: > MigrateChannelList allows to connect accross multiple interfaces. Added > MigrateChannelList struct as argument to migration QAPIs. > > Future patchset series plans to include multiple MigrateChannels > for multiple interfaces to be connected. That is the reason, > 'MigrateCha

Re: [PATCH 18/30] swim: add trace events for IWM and ISM registers

2023-05-25 Thread Philippe Mathieu-Daudé
On 24/5/23 23:10, Mark Cave-Ayland wrote: Signed-off-by: Mark Cave-Ayland --- hw/block/swim.c | 14 ++ hw/block/trace-events | 7 +++ 2 files changed, 21 insertions(+) diff --git a/hw/block/trace-events b/hw/block/trace-events index 34be8b9135..c041ec45e3 100644 --

[PATCH v2 2/2] qemu-iotests: 024: add rebasing test case for overlay_size > backing_size

2023-05-25 Thread Andrey Drobyshev via
Before previous commit, rebase was getting infitely stuck in case of rebasing within the same backing chain and when overlay_size > backing_size. Let's add this case to the rebasing test 024 to make sure it doesn't break again. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/024 | 57

[PATCH v2 0/2] qemu-img: fix getting stuck in infinite loop on in-chain rebase

2023-05-25 Thread Andrey Drobyshev via
v1 -> v2: * Avoid breaking the loop just yet, as the offsets beyond the old backing size need to be explicitly zeroed; * Amend the commit message accordingly; * Alter the added test case to take the last zeroed cluster into consideration. v1: https://lists.nongnu.org/archive/html/qe

[PATCH v2 1/2] qemu-img: rebase: stop when reaching EOF of old backing file

2023-05-25 Thread Andrey Drobyshev via
In case when we're rebasing within one backing chain, and when target image is larger than old backing file, bdrv_is_allocated_above() ends up setting *pnum = 0. As a result, target offset isn't getting incremented, and we get stuck in an infinite for loop. Let's detect this case and proceed furt

Re: [PATCH v5 8/9] migration: Introduced MigrateChannelList struct to migration code flow.

2023-05-25 Thread Markus Armbruster
Het Gala writes: > Integrated MigrateChannelList with all transport backends (socket, exec > and rdma) for both source and destination migration code flow. > > Suggested-by: Aravind Retnakaran > Signed-off-by: Het Gala clang warns for me: ../migration/migration.c:497:13: warning: variable 'ad

Re: [PATCH v4 0/3] hw/riscv/virt: pflash improvements

2023-05-25 Thread Andrea Bolognani
On Thu, May 25, 2023 at 10:18:00PM +0530, Sunil V L wrote: > This series improves the pflash usage in RISC-V virt machine with solutions to > below issues. > > 1) Currently the first pflash is reserved for ROM/M-mode firmware code. But > S-mode > payload firmware like EDK2 need both pflash devices

<    1   2   3   4   >