Re: [PATCH v4 2/2] qapi: add '@fdset' feature for BlockdevOptionsVirtioBlkVhostVdpa

2023-05-26 Thread Markus Armbruster
Stefano Garzarella writes: > The virtio-blk-vhost-vdpa driver in libblkio 1.3.0 supports the fd > passing through the new 'fd' property. > > Since now we are using qemu_open() on '@path' if the virtio-blk driver > supports the fd passing, let's announce it. > In this way, the management layer

Re: [PATCH v8 7/7] hw/cxl/events: Add injection of Memory Module Events

2023-05-26 Thread Markus Armbruster
Jonathan Cameron writes: > These events include a copy of the device health information at the > time of the event. Actually using the emulated device health would > require a lot of controls to manipulate that state. Given the aim > of this injection code is to just test the flows when events

Re: [PATCH v8 5/7] hw/cxl/events: Add injection of General Media Events

2023-05-26 Thread Markus Armbruster
Jonathan Cameron writes: > From: Ira Weiny > > To facilitate testing provide a QMP command to inject a general media > event. The event can be added to the log specified. > > Signed-off-by: Ira Weiny > Reviewed-by: Fan Ni > Acked-by: Markus Armbruster > Signed-off-by: Jonathan Cameron >

Re: [PULL 00/12] (Mostly) build system patches for 2023-05-26

2023-05-26 Thread Richard Henderson
On 5/26/23 09:08, Paolo Bonzini wrote: The following changes since commit a3cb6d5004ff638aefe686ecd540718a793bd1b1: Merge tag 'pull-tcg-20230525' of https://gitlab.com/rth7680/qemu into staging (2023-05-25 11:11:52 -0700) are available in the Git repository at:

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

2023-05-26 Thread Akihiko Odaki
On 2023/05/26 0:37, Tomasz Dzieciol wrote: 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.

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

2023-05-26 Thread Akihiko Odaki
On 2023/05/26 0:37, Tomasz Dzieciol wrote: 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 +-

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

2023-05-26 Thread Akihiko Odaki
On 2023/05/26 0:37, Tomasz Dzieciol wrote: 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

[RFC PATCH v2 2/4] vfio: Implement a common device info helper

2023-05-26 Thread Alex Williamson
A common helper implementing the realloc algorithm for handling capabilities. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Signed-off-by: Alex Williamson --- hw/s390x/s390-pci-vfio.c | 37 hw/vfio/common.c | 46

[RFC PATCH v2 1/4] linux-headers: Update for vfio capability reporting AtomicOps

2023-05-26 Thread Alex Williamson
This is a partial linux-headers update for illustrative and testing purposes only, NOT FOR COMMIT. Signed-off-by: Alex Williamson --- linux-headers/linux/vfio.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index

[RFC PATCH v2 0/4] vfio/pci: Atomic Ops completer support

2023-05-26 Thread Alex Williamson
This RFC proposes to allow a vfio-pci device to manipulate the PCI Express capability of an associated root port to enable Atomic Op completer support as equivalent to host capabilities. This would dynamically change capability bits in the config space of the root port on realize and exit of the

[RFC PATCH v2 3/4] pcie: Add a PCIe capability version helper

2023-05-26 Thread Alex Williamson
Report the PCIe capability version for a device Signed-off-by: Alex Williamson --- hw/pci/pcie.c | 7 +++ include/hw/pci/pcie.h | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index b8c24cf45f7e..b7f107ed8dd4 100644 --- a/hw/pci/pcie.c +++

[RFC PATCH v2 4/4] vfio/pci: Enable AtomicOps completers on root ports

2023-05-26 Thread Alex Williamson
Dynamically enable Atomic Ops completer support around realize/exit of vfio-pci devices reporting host support for these accesses and adhering to a minimal configuration standard. While the Atomic Ops completer bits in the root port device capabilities2 register are read-only, the PCIe spec does

Re: [PATCH 4/4] tests/tcg/s390x: Test LOCFHR

2023-05-26 Thread Richard Henderson
On 5/26/23 11:12, Ilya Leoshkevich wrote: Add a small test to prevent regressions. Cc:qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/locfhr.c| 29 + 2 files changed, 30 insertions(+)

Re: [PATCH 2/4] tests/tcg/s390x: Test LCBB

2023-05-26 Thread Richard Henderson
On 5/26/23 11:12, Ilya Leoshkevich wrote: Add a test to prevent regressions. Cc:qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/lcbb.c | 51 + 2 files changed, 52 insertions(+)

Re: [PATCH 1/4] target/s390x: Fix LCBB overwriting the top 32 bits

2023-05-26 Thread Richard Henderson
On 5/26/23 11:12, Ilya Leoshkevich wrote: LCBB is supposed to overwrite only the bottom 32 bits, but QEMU erroneously overwrites the entire register. Fixes: 6d9303322ed9 ("s390x/tcg: Implement LOAD COUNT TO BLOCK BOUNDARY") Cc: qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich

Re: [PATCH 3/4] target/s390x: Fix LOCFHR taking the wrong half of R2

2023-05-26 Thread Richard Henderson
On 5/26/23 11:12, Ilya Leoshkevich wrote: LOCFHR should write top-to-top, but QEMU erroneously writes bottom-to-top. Fixes: 45aa9aa3b773 ("target/s390x: Implement load-on-condition-2 insns") Cc:qemu-sta...@nongnu.org Reported-by: Mikhail Mitskevich

Re: [PATCH] migration: stop tracking ram writes when cancelling background migration

2023-05-26 Thread Peter Xu
On Fri, May 26, 2023 at 01:59:08PM +0200, Fiona Ebner wrote: > Currently, it is only done when the iteration finishes successfully. > Not cleaning up the userfaultfd write protection can lead to > symptoms/issues such as the process hanging in memmove or GDB not > being able to attach. > >

Re: [PATCH v1] migration: fix migrate_params_test_apply to set the dest param correctly

2023-05-26 Thread Peter Xu
On Wed, May 24, 2023 at 04:01:57PM +0800, Wei Wang wrote: > qmp_migrate_set_parameters expects to use tmp for parameters check, > so migrate_params_test_apply is expected to copy the related fields from > params to tmp. So fix migrate_params_test_apply to use the function > parameter, *dest,

Re: [PATCH] decodetree: Do not remove output_file from /dev

2023-05-26 Thread Richard Henderson
On 5/26/23 12:52, Peter Maydell wrote: On Fri, 26 May 2023 at 18:40, Richard Henderson wrote: Nor report any PermissionError on remove. Previously we were testing with "> /dev/null", but that's not easy to do with meson test(), so we want to use '-o /dev/null' instead. That works fine for

Re: [PATCH v3 00/10] migration: Remove QEMUFileHooks

2023-05-26 Thread Peter Xu
On Tue, May 09, 2023 at 02:06:50PM +0200, Juan Quintela wrote: > Hi > > Changes in v3: > - fix rdma_migration to reset clearly (thanks danp) > - redo the cherks for migration/rdma > - rebased on top of the counters series: > [PATCH 00/21] Migration: More migration atomic counters > Based-on:

Re: [PULL 0/5] Hexagon update

2023-05-26 Thread Richard Henderson
/qemu tags/pull-hex-20230526 for you to fetch changes up to 7d196e2196d50e0dda0f87f396d4f4a7ad9aafbe: Hexagon (target/hexagon) Change Hexagon maintainer (2023-05-26 07:03:41 -0700) Hexagon update Applied, thanks. Please

Re: [PATCH v4 2/2] qapi: add '@fdset' feature for BlockdevOptionsVirtioBlkVhostVdpa

2023-05-26 Thread Jonathon Jongsma
On 5/26/23 10:03 AM, Stefano Garzarella wrote: The virtio-blk-vhost-vdpa driver in libblkio 1.3.0 supports the fd passing through the new 'fd' property. Since now we are using qemu_open() on '@path' if the virtio-blk driver supports the fd passing, let's announce it. In this way, the management

Re: [PATCH 4/5] migration/rdma: It makes no sense to recive that flag without RDMA

2023-05-26 Thread Peter Xu
On Thu, May 04, 2023 at 01:44:42PM +0200, Juan Quintela wrote: > This could only happen if the source send > RAM_SAVE_FLAG_HOOK (i.e. rdma) and destination don't have CONFIG_RDMA. > > Signed-off-by: Juan Quintela Bah, first patch to start reading the master code and it's already merged. I'll

Re: [PATCH 3/5] migration/rdma: We can calculate the rioc from the QEMUFile

2023-05-26 Thread Peter Xu
On Thu, May 04, 2023 at 01:44:41PM +0200, Juan Quintela wrote: > Signed-off-by: Juan Quintela Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH 2/5] migration/rdma: simplify ram_control_load_hook()

2023-05-26 Thread Peter Xu
On Thu, May 04, 2023 at 01:44:40PM +0200, Juan Quintela wrote: > Signed-off-by: Juan Quintela Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH 1/5] migration: Make RAM_SAVE_FLAG_HOOK a normal case entry

2023-05-26 Thread Peter Xu
On Thu, May 04, 2023 at 01:44:39PM +0200, Juan Quintela wrote: > Fixes this commit, clearly a bad merge after a rebase or similar, it > should have been its own case since that point. > > commit 5b0e9dd46fbda5152566a4a26fd96bc0d0452bf7 > Author: Peter Lieven > Date: Tue Jun 24 11:32:36 2014

[PATCH] Add virtio-sound and virtio-sound-pci devices

2023-05-26 Thread Manos Pitsidianakis
This patch adds an audio device implementing the recent virtio sound spec (1.2) and a corresponding PCI wrapper device. PCM functionality is implemented, and jack[0], chmaps[1] messages are at the moment ignored. To test this, you'll need a >6.0 kernel compiled with the virtio-snd flag enabled,

Support for multiple UARTS on qemu for Arm64

2023-05-26 Thread Anton Dimov Hristozov

Re: [PATCH v7 7/7] hw/cxl/events: Add injection of Memory Module Events

2023-05-26 Thread Markus Armbruster
Jonathan Cameron writes: >> > +# @temperature: Device temperature in degrees Celsius. >> > +# >> > +# @dirty-shutdown-count: Number of time the device has been unable to >> >> Number of times >> >> > +#determine whether data loss may have occurred. >> > +# >> > +#

Re: [PATCH] decodetree: Do not remove output_file from /dev

2023-05-26 Thread Peter Maydell
On Fri, 26 May 2023 at 18:40, Richard Henderson wrote: > > Nor report any PermissionError on remove. > > Previously we were testing with "> /dev/null", but that's not easy > to do with meson test(), so we want to use '-o /dev/null' instead. > That works fine for all of the existing tests, where

Re: [PATCH 6/6] tests/decode: Add tests for various named-field cases

2023-05-26 Thread Peter Maydell
On Fri, 26 May 2023 at 18:07, Richard Henderson wrote: > > On 5/24/23 03:26, Peter Maydell wrote: > > On Tue, 23 May 2023 at 13:04, Peter Maydell > > wrote: > >> > >> Add some tests for various cases of named-field use, both ones that > >> should work and ones that should be diagnosed as

Re: [RESEND PATCH v2 0/3] Enable -cpu ,help

2023-05-26 Thread Peter Maydell
On Fri, 26 May 2023 at 15:28, Igor Mammedov wrote: > > On Mon, 3 Apr 2023 21:19:53 -0400 > Dinah Baum wrote: > > > Part 1 is a refactor/code motion patch for > > qapi/machine target required for setup of > > > > Part 2 which enables query-cpu-model-expansion > > on all architectures > > > >

Re: [PATCH v2 16/16] migration/multifd: Compute transferred bytes correctly

2023-05-26 Thread Leonardo Bras Soares Passos
On Fri, May 26, 2023 at 5:24 AM Juan Quintela wrote: > > Leonardo Brás wrote: > > On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote: > >> In the past, we had to put the in the main thread all the operations > >> related with sizes due to qemu_file not beeing thread safe. As now > >> all

Re: [PATCH v2 15/16] migration/rdma: Simplify the function that saves a page

2023-05-26 Thread Leonardo Bras Soares Passos
On Fri, May 26, 2023 at 5:21 AM Juan Quintela wrote: > > Leonardo Brás wrote: > > On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote: > >> When we sent a page through QEMUFile hooks (RDMA) there are three > >> posiblities: > >> - We are not using RDMA. return RAM_SAVE_CONTROL_DELAYED and >

Re: [PATCH v2 09/16] migration: We don't need the field rate_limit_used anymore

2023-05-26 Thread Leonardo Bras Soares Passos
On Fri, May 26, 2023 at 5:18 AM Juan Quintela wrote: > > Leonardo Brás wrote: > > On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote: > >> Since previous commit, we calculate how much data we have send with > >> migration_transferred_bytes() so no need to maintain this counter and > >>

Re: [PATCH v2 08/16] migration: Use migration_transferred_bytes() to calculate rate_limit

2023-05-26 Thread Leonardo Bras Soares Passos
On Fri, May 26, 2023 at 5:17 AM Juan Quintela wrote: > > Leonardo Brás wrote: > > On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote: > >> Signed-off-by: Juan Quintela > >> Reviewed-by: Cédric Le Goater > >> --- > >> migration/migration-stats.h | 8 +++- > >>

Re: [PATCH v2 04/16] qemu-file: Account for rate_limit usage on qemu_fflush()

2023-05-26 Thread Leonardo Bras Soares Passos
On Fri, May 26, 2023 at 5:09 AM Juan Quintela wrote: > > Leonardo Brás wrote: > > On Mon, 2023-05-15 at 21:56 +0200, Juan Quintela wrote: > >> That is the moment we know we have transferred something. > >> > >> Signed-off-by: Juan Quintela > >> Reviewed-by: Cédric Le Goater > >> --- > >>

Re: [PATCH v2 03/16] migration: Move setup_time to mig_stats

2023-05-26 Thread Leonardo Bras Soares Passos
On Fri, May 26, 2023 at 5:07 AM Juan Quintela wrote: > > Leonardo Brás wrote: > > On Mon, 2023-05-15 at 21:56 +0200, Juan Quintela wrote: > >> It is a time that needs to be cleaned each time cancel migration. > >> Once there create migration_time_since() to calculate how time since a > >> time

Re: [PATCH v2 02/16] migration: Correct transferred bytes value

2023-05-26 Thread Leonardo Bras Soares Passos
On Fri, May 26, 2023 at 5:04 AM Juan Quintela wrote: > > Leonardo Brás wrote: > > On Mon, 2023-05-15 at 21:56 +0200, Juan Quintela wrote: > >> We forget several places to add to trasferred amount of data. With > >> this fixes I get: > >> > >>qemu_file_transferred() + multifd_bytes ==

[PATCH 3/4] target/s390x: Fix LOCFHR taking the wrong half of R2

2023-05-26 Thread Ilya Leoshkevich
LOCFHR should write top-to-top, but QEMU erroneously writes bottom-to-top. Fixes: 45aa9aa3b773 ("target/s390x: Implement load-on-condition-2 insns") Cc: qemu-sta...@nongnu.org Reported-by: Mikhail Mitskevich Closes: https://gitlab.com/qemu-project/qemu/-/issues/1668 Signed-off-by: Ilya

[PATCH 4/4] tests/tcg/s390x: Test LOCFHR

2023-05-26 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Cc: qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/locfhr.c| 29 + 2 files changed, 30 insertions(+) create mode 100644 tests/tcg/s390x/locfhr.c

[PATCH 2/4] tests/tcg/s390x: Test LCBB

2023-05-26 Thread Ilya Leoshkevich
Add a test to prevent regressions. Cc: qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/lcbb.c | 51 + 2 files changed, 52 insertions(+) create mode 100644 tests/tcg/s390x/lcbb.c diff

[PATCH 0/4] Fix Fedora 38 Clang on s390x

2023-05-26 Thread Ilya Leoshkevich
Hi, It was reported that Fedora 38 Clang does not run correctly under qemu-s390x [1]. Comparing qemu and real s390x instruction traces has shown that the implementations of LCBB and LOCFHR were not fully correct. This series fixes the issues and adds tests. I can now run Fedora 38 Clang under

[PATCH 1/4] target/s390x: Fix LCBB overwriting the top 32 bits

2023-05-26 Thread Ilya Leoshkevich
LCBB is supposed to overwrite only the bottom 32 bits, but QEMU erroneously overwrites the entire register. Fixes: 6d9303322ed9 ("s390x/tcg: Implement LOAD COUNT TO BLOCK BOUNDARY") Cc: qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/insn-data.h.inc | 2 +- 1 file

Re: [PATCH v2 4/6] tests/qtest: make more migration pre-copy scenarios run non-live

2023-05-26 Thread Daniel P . Berrangé
On Mon, Apr 24, 2023 at 06:01:36PM -0300, Fabiano Rosas wrote: > Daniel P. Berrangé writes: > > > There are 27 pre-copy live migration scenarios being tested. In all of > > these we force non-convergance and run for one iteration, then let it > > converge and wait for completion during the

Multiple UART for virt platform on qemu

2023-05-26 Thread Anton Dimov Hristozov

[PATCH] decodetree: Do not remove output_file from /dev

2023-05-26 Thread Richard Henderson
Nor report any PermissionError on remove. Previously we were testing with "> /dev/null", but that's not easy to do with meson test(), so we want to use '-o /dev/null' instead. That works fine for all of the existing tests, where all errors are diagnosed before opening the output file. However,

[PATCH] igb: Add Function Level Reset to PF and VF

2023-05-26 Thread Cédric Le Goater
The Intel 82576EB GbE Controller say that the Physical and Virtual Functions support Function Level Reset. Add the capability to each device model. Cc: Akihiko Odaki Fixes: 3a977deebe6b ("Intrdocue igb device emulation") Signed-off-by: Cédric Le Goater --- hw/net/igb.c | 3 +++

Re: [PATCH] hw/ppc/mac_newworld: Check for the availability of pci-ohci before using it

2023-05-26 Thread Mark Cave-Ayland
On 26/05/2023 14:30, BALATON Zoltan wrote: On Fri, 26 May 2023, Thomas Huth wrote: pci-ohci might habe been disabled in the QEMU binary (e.g. when "configure" has been run with "--without-default-devices"). Thus we should check for its availability before blindly using it. Signed-off-by:

[PATCH v8 7/7] hw/cxl/events: Add injection of Memory Module Events

2023-05-26 Thread Jonathan Cameron via
These events include a copy of the device health information at the time of the event. Actually using the emulated device health would require a lot of controls to manipulate that state. Given the aim of this injection code is to just test the flows when events occur, inject the contents of the

[PATCH v8 6/7] hw/cxl/events: Add injection of DRAM events

2023-05-26 Thread Jonathan Cameron via
Defined in CXL r3.0 8.2.9.2.1.2 DRAM Event Record, this event provides information related to DRAM devices. Example injection command in QMP: { "execute": "cxl-inject-dram-event", "arguments": { "path": "/machine/peripheral/cxl-mem0", "log": "informational", "flags":

[PATCH v8 5/7] hw/cxl/events: Add injection of General Media Events

2023-05-26 Thread Jonathan Cameron via
From: Ira Weiny To facilitate testing provide a QMP command to inject a general media event. The event can be added to the log specified. Signed-off-by: Ira Weiny Reviewed-by: Fan Ni Acked-by: Markus Armbruster Signed-off-by: Jonathan Cameron --- qapi/cxl.json | 74

[PATCH v8 4/7] hw/cxl/events: Add event interrupt support

2023-05-26 Thread Jonathan Cameron via
From: Ira Weiny Replace the stubbed out CXL Get/Set Event interrupt policy mailbox commands. Enable those commands to control interrupts for each of the event log types. Skip the standard input mailbox length on the Set command due to DCD being optional. Perform the checks separately.

[PATCH v8 3/7] hw/cxl/events: Wire up get/clear event mailbox commands

2023-05-26 Thread Jonathan Cameron via
From: Ira Weiny CXL testing is benefited from an artificial event log injection mechanism. Add an event log infrastructure to insert, get, and clear events from the various logs available on a device. Replace the stubbed out CXL Get/Clear Event mailbox commands with commands that operate on

[PATCH v8 2/7] hw/cxl: Move CXLRetCode definition to cxl_device.h

2023-05-26 Thread Jonathan Cameron via
Following patches will need access to the mailbox return code type so move it to the header. Reviewed-by: Ira Weiny Reviewed-by: Fan Ni Signed-off-by: Jonathan Cameron --- include/hw/cxl/cxl_device.h | 28 hw/cxl/cxl-mailbox-utils.c | 28

[PATCH v8 1/7] hw/cxl/events: Add event status register

2023-05-26 Thread Jonathan Cameron via
From: Ira Weiny The device status register block was defined. However, there were no individual registers nor any data wired up. Define the event status register [CXL 3.0; 8.2.8.3.1] as part of the device status register block. Wire up the register and initialize the event status for each

[PATCH v8 0/7] QEMU CXL Provide mock CXL events and irq support

2023-05-26 Thread Jonathan Cameron via
v8: QMP documentation formatting fixes from Markus. Gathered tags. Based on: [PATCH v8 0/4] hw/cxl: Poison get, inject, clear Based on: Message-ID: 20230526170010.574-1-jonathan.came...@huawei.com Updated cover letter from earlier versions: One challenge here is striking the right balance

Re: [PATCH v7 7/7] hw/cxl/events: Add injection of Memory Module Events

2023-05-26 Thread Jonathan Cameron via
> > +# @temperature: Device temperature in degrees Celsius. > > +# > > +# @dirty-shutdown-count: Number of time the device has been unable to > > Number of times > > > +#determine whether data loss may have occurred. > > +# > > +# @corrected-volatile-error-count:

Re: [PATCH 6/6] tests/decode: Add tests for various named-field cases

2023-05-26 Thread Richard Henderson
On 5/24/23 03:26, Peter Maydell wrote: On Tue, 23 May 2023 at 13:04, Peter Maydell wrote: Add some tests for various cases of named-field use, both ones that should work and ones that should be diagnosed as errors. Signed-off-by: Peter Maydell --- tests/decode/err_field1.decode | 2

[PATCH v8 4/4] hw/cxl: Add clear poison mailbox command support.

2023-05-26 Thread Jonathan Cameron via
Current implementation is very simple so many of the corner cases do not exist (e.g. fragmenting larger poison list entries) Reviewed-by: Fan Ni Reviewed-by: Ira Weiny Signed-off-by: Jonathan Cameron --- include/hw/cxl/cxl_device.h | 1 + hw/cxl/cxl-mailbox-utils.c | 82

[PATCH v8 3/4] hw/cxl: Add poison injection via the mailbox.

2023-05-26 Thread Jonathan Cameron via
Very simple implementation to allow testing of corresponding kernel code. Note that for now we track each 64 byte section independently. Whilst a valid implementation choice, it may make sense to fuse entries so as to prove out more complex corners of the kernel code. Reviewed-by: Ira Weiny

[PATCH v8 2/4] hw/cxl: QMP based poison injection support

2023-05-26 Thread Jonathan Cameron via
Inject poison using QMP command cxl-inject-poison to add an entry to the poison list. For now, the poison is not returned CXL.mem reads, but only via the mailbox command Get Poison List. So a normal memory read to an address that is on the poison list will not yet result in a synchronous

[PATCH v8 0/4] hw/cxl: Poison get, inject, clear

2023-05-26 Thread Jonathan Cameron via
v8: Formatting fixes for QMP docs from Markus Armbruster (thanks!) The bswap naming discussions seems to have died down, so I'll stick with this version (24) Precursors now all upstream which make this email easier to write :) The kernel support for Poison handling is now upstream. This code

[PATCH v8 1/4] bswap: Add the ability to store to an unaligned 24 bit field

2023-05-26 Thread Jonathan Cameron via
From: Ira Weiny CXL has 24 bit unaligned fields which need to be stored to. CXL is specified as little endian. Define st24_le_p() and the supporting functions to store such a field from a 32 bit host native value. The use of b, w, l, q as the size specifier is limiting. So "24" was used for

[PATCH v6 10/11] hw/9pfs: use qemu_xxhash4

2023-05-26 Thread Alex Bennée
No need to pass zeros as we have helpers that do that for us. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Christian Schoenebeck Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20230524133952.3971948-10-alex.ben...@linaro.org> ---

[PATCH v6 07/11] trace: remove code that depends on setting vcpu

2023-05-26 Thread Alex Bennée
Now we no longer have any events that are for vcpus we can start excising the code from the trace control. As the vcpu parameter is encoded as part of QMP we just stub out the has_vcpu/vcpu parameters rather than alter the API. Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson

[PATCH v6 11/11] accel/tcg: include cs_base in our hash calculations

2023-05-26 Thread Alex Bennée
We weren't using cs_base in the hash calculations before. Since the arm front end moved a chunk of flags in a378206a20 (target/arm: Move mode specific TB flags to tb->cs_base) they comprise of an important part of the execution state. Widen the tb_hash_func to include cs_base and expand to

[PATCH v6 02/11] trace-events: remove the remaining vcpu trace events

2023-05-26 Thread Alex Bennée
While these are all in helper functions being designated vcpu events complicates the removal of the dynamic vcpu state code. TCG plugins allow you to instrument vcpu_[init|exit|idle]. We rename cpu_reset and make it a normal trace point. Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard

[PATCH v6 01/11] *-user: remove the guest_user_syscall tracepoints

2023-05-26 Thread Alex Bennée
This is pure duplication now. Both bsd-user and linux-user have builtin strace support and we can also track syscalls via the plugins system. Reviewed-by: Warner Losh Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée

[PATCH v6 04/11] scripts/qapi: document the tool that generated the file

2023-05-26 Thread Alex Bennée
This makes it a little easier for developers to find where things where being generated. Reviewed-by: Richard Henderson Reviewed-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Signed-off-by: Alex Bennée Message-Id:

[PATCH v6 09/11] tcg: remove the final vestiges of dstate

2023-05-26 Thread Alex Bennée
Now we no longer have dynamic state affecting things we can remove the additional fields in cpu.h and simplify the TB hash calculation. For the benchmark: hyperfine -w 2 -m 20 \ "./arm-softmmu/qemu-system-arm -cpu cortex-a15 \ -machine type=virt,highmem=off \ -display

[PATCH v6 08/11] trace: remove control-vcpu.h

2023-05-26 Thread Alex Bennée
Now we no longer have vcpu controlled trace events we can excise the code that allows us to query its status. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id:

[PATCH v6 00/11] tracing: remove dynamic vcpu state

2023-05-26 Thread Alex Bennée
Hi Stefan, The references dynamic vcpu tracing support was removed when the original TCG trace points where removed. However there was still a legacy of dynamic trace state to track this in cpu.h and extra hash variables to track TBs. While the removed vcpu tracepoints are not in generated code

[PATCH v6 03/11] trace: remove vcpu_id from the TraceEvent structure

2023-05-26 Thread Alex Bennée
This does involve temporarily stubbing out some helper functions before we excise the rest of the code. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20230524133952.3971948-4-alex.ben...@linaro.org> ---

[PATCH v6 05/11] docs/deprecated: move QMP events bellow QMP command section

2023-05-26 Thread Alex Bennée
Also rename the section to make the fact this is part of the management protocol even clearer. Suggested-by: Markus Armbruster Signed-off-by: Alex Bennée --- docs/about/deprecated.rst | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git

[PATCH v6 06/11] qapi: make the vcpu parameters deprecated for 8.1

2023-05-26 Thread Alex Bennée
I don't think I can remove the parameters directly but certainly mark them as deprecated. Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20230524133952.3971948-6-alex.ben...@linaro.org> --- v6 -

Re: [PATCH v1 6/9] KVM: x86: Add Heki hypervisor support

2023-05-26 Thread Mickaël Salaün
On 08/05/2023 23:18, Wei Liu wrote: On Fri, May 05, 2023 at 05:20:43PM +0200, Mickaël Salaün wrote: From: Madhavan T. Venkataraman Each supported hypervisor in x86 implements a struct x86_hyper_init to define the init functions for the hypervisor. Define a new init_heki() entry point in

Re: [PATCH 6/6] target/riscv: Add HS-mode virtual interrupt and IRQ filtering support.

2023-05-26 Thread Rajnesh Kanwal
On Mon, May 22, 2023 at 6:18 PM Daniel Henrique Barboza wrote: > > > > On 5/18/23 08:38, Rajnesh Kanwal wrote: > > This change adds support for inserting virtual interrupts from HS-mode > > into VS-mode using hvien and hvip csrs. This also allows for IRQ filtering > > from HS-mode. > > > > Also,

[PATCH v2 6/6] target/riscv: Add HS-mode virtual interrupt and IRQ filtering support.

2023-05-26 Thread Rajnesh Kanwal
This change adds support for inserting virtual interrupts from HS-mode into VS-mode using hvien and hvip csrs. This also allows for IRQ filtering from HS-mode. Also, the spec doesn't mandate the interrupt to be actually supported in hardware. Which allows HS-mode to assert virtual interrupts to

[PATCH v2 4/6] target/riscv: Split interrupt logic from riscv_cpu_update_mip.

2023-05-26 Thread Rajnesh Kanwal
This is to allow virtual interrupts to be inserted into S and VS modes. Given virtual interrupts will be maintained in separate mvip and hvip CSRs, riscv_cpu_update_mip will no longer be in the path and interrupts need to be triggered for these cases from rmw_hvip64 and rmw_mvip64 functions.

[PATCH v2 0/6] target/riscv: Add RISC-V Virtual IRQs and IRQ filtering support

2023-05-26 Thread Rajnesh Kanwal
This series adds M and HS-mode virtual interrupt and IRQ filtering support. This allows inserting virtual interrupts from M/HS-mode into S/VS-mode using mvien/hvien and mvip/hvip csrs. IRQ filtering is a use case of this change, i-e M-mode can stop delegating an interrupt to S-mode and instead

[PATCH v2 5/6] target/riscv: Add M-mode virtual interrupt and IRQ filtering support.

2023-05-26 Thread Rajnesh Kanwal
This change adds support for inserting virtual interrupts from M-mode into S-mode using mvien and mvip csrs. IRQ filtering is a use case of this change, i-e M-mode can stop delegating an interrupt to S-mode and instead enable it in MIE and receive those interrupts in M-mode and then selectively

[PATCH v2 3/6] target/riscv: Set VS* bits to one in mideleg when H-Ext is enabled

2023-05-26 Thread Rajnesh Kanwal
With H-Ext supported, VS bits are all hardwired to one in MIDELEG denoting always delegated interrupts. This is being done in rmw_mideleg but given mideleg is used in other places when routing interrupts this change initializes it in riscv_cpu_realize to be on the safe side. Signed-off-by:

[PATCH v2 2/6] target/riscv: Check for async flag in case of RISCV_EXCP_SEMIHOST.

2023-05-26 Thread Rajnesh Kanwal
RISCV_EXCP_SEMIHOST is set to 0x10, which can be a local interrupt id as well. This change moves RISCV_EXCP_SEMIHOST to switch case so that async flag check is performed before invoking semihosting logic. Signed-off-by: Rajnesh Kanwal --- target/riscv/cpu_helper.c | 10 -- 1 file

[PATCH v2 1/6] target/riscv: Without H-mode mask all HS mode inturrupts in mie.

2023-05-26 Thread Rajnesh Kanwal
Signed-off-by: Rajnesh Kanwal --- target/riscv/csr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 4451bd1263..041f0b3e2e 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -1522,7 +1522,7 @@ static RISCVException

Re: [PULL 00/15] Improve --without-default-devices testing, fix CVE-2023-0330

2023-05-26 Thread Richard Henderson
On 5/26/23 02:08, Thomas Huth wrote: The following changes since commit a3cb6d5004ff638aefe686ecd540718a793bd1b1: Merge tag 'pull-tcg-20230525' ofhttps://gitlab.com/rth7680/qemu into staging (2023-05-25 11:11:52 -0700) are available in the Git repository at:

Re: [PULL 0/2] loongarch-to-apply queue

2023-05-26 Thread Richard Henderson
/qemu.git tags/pull-loongarch-20230526 for you to fetch changes up to 65bfaaae6ac79ebc623acc0ce28cc3bd4fe8b5e5: target/loongarch: Fix the vinsgr2vr/vpickve2gr instructions cause system coredump (2023-05-26 17:21:16 +0800) pull

Re: [PATCH v5 10/10] accel/tcg: include cs_base in our hash calculations

2023-05-26 Thread Richard Henderson
On 5/24/23 06:39, Alex Bennée wrote: We weren't using cs_base in the hash calculations before. Since the arm front end moved a chunk of flags in a378206a20 (target/arm: Move mode specific TB flags to tb->cs_base) they comprise of an important part of the execution state. Widen the tb_hash_func

[PULL 07/12] slirp: update wrap to latest master

2023-05-26 Thread Paolo Bonzini
It is recommended to use SSIZE_T for ssize_t on win32, but the commit that is being used for slirp.wrap uses int. Update to include the fix as well as the other bugfix commit "ip: Enforce strict aliasing". Reported-by: Michael Tokarev Signed-off-by: Paolo Bonzini --- subprojects/slirp.wrap |

[PULL 04/12] configure: unset harmful environment variables

2023-05-26 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

[PULL 12/12] configure: ignore --make

2023-05-26 Thread Paolo Bonzini
Setting the MAKE variable to a GNU Make executable does not really have any effect: if a non-GNU Make is used, the QEMU Makefile will fail to parse. Just remove everything related to --make and $make as dead code. Signed-off-by: Paolo Bonzini --- configure | 18 +-

[PULL 05/12] meson: Remove leftover comment

2023-05-26 Thread Paolo Bonzini
From: Fabiano Rosas Commit d2e6f9272d ("fuzz: remove fork-fuzzing scaffolding") removed the linker script and forgot to remove the comment. Signed-off-by: Fabiano Rosas Message-Id: <20230525212044.30222-2-faro...@suse.de> Signed-off-by: Paolo Bonzini --- meson.build | 2 -- 1 file changed, 2

Re: [ANNOUNCE] KVM Microconference at LPC 2023

2023-05-26 Thread Mickaël Salaün
See James Morris's proposal here: https://lore.kernel.org/all/17f62cb1-a5de-2020-2041-359b8e96b...@linux.microsoft.com/ On 26/05/2023 04:36, James Morris wrote: > [Side topic] > > Would folks be interested in a Linux Plumbers Conference MC on this > topic generally, across different

[PULL 00/12] (Mostly) build system patches for 2023-05-26

2023-05-26 Thread Paolo Bonzini
The following changes since commit a3cb6d5004ff638aefe686ecd540718a793bd1b1: Merge tag 'pull-tcg-20230525' of https://gitlab.com/rth7680/qemu into staging (2023-05-25 11:11:52 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to

[PULL 08/12] virtio: qmp: fix memory leak

2023-05-26 Thread Paolo Bonzini
The VirtioInfoList is already allocated by QAPI_LIST_PREPEND and need not be allocated by the caller. Fixes Coverity CID 1508724. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- hw/virtio/virtio-qmp.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff

[PULL 10/12] meson: use subproject for internal libfdt

2023-05-26 Thread Paolo Bonzini
Recent dtc/libfdt can use either Make or meson as the build system. By using a subproject, our own meson.build can remove the hard coded list of source files. This is also the first step towards managing downloads with .wrap files instead of submodule. Reviewed-by: Daniel P. Berrangé

[PULL 09/12] meson: simplify logic for -Dfdt

2023-05-26 Thread Paolo Bonzini
fdt_opt == 'disabled' is going to give an error if libfdt is required by any target, so catch that immediately. For fdt_opt == 'enabled', instead, do not check immediately whether the internal libfdt is present. Instead do the check after ascertaining that libfdt is absent or too old.

[PULL 01/12] tests/docker: simplify HOST_ARCH definition

2023-05-26 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

[PULL 03/12] Makefile: remove $(TESTS_PYTHON)

2023-05-26 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

[PULL 02/12] tests/vm: fix and simplify HOST_ARCH definition

2023-05-26 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

  1   2   3   4   >