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

2023-05-19 Thread Michael S. Tsirkin
On Sun, Apr 23, 2023 at 05:51:40PM +0100, Jonathan Cameron wrote: > 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

Re: [PATCH v5 6/6] hw/cxl: Add clear poison mailbox command support.

2023-05-19 Thread Michael S. Tsirkin
On Sun, Apr 23, 2023 at 05:20:13PM +0100, Jonathan Cameron wrote: > 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 > Signed-off-by: Jonathan Cameron > --- > v5: > - Much simpler

[PATCH] mkvenv: replace distlib.database with importlib.metadata/pkg_resources

2023-05-19 Thread Paolo Bonzini
importlib.metadata is just as good as distlib.database and a bit more battle-proven for "egg" based distributions, and in fact that is exactly why mkvenv.py is not using distlib.database to find entry points: it simply does not work for eggs. The only disadvantage of importlib.metadata is that it

[PATCH] mkvenv: pass first missing package to diagnose()

2023-05-19 Thread Paolo Bonzini
If sphinx is present but the theme is not, mkvenv will print an inaccurate diagnostic: ERROR: Could not find a version that satisfies the requirement sphinx-rtd-theme>=0.5.0 (from versions: none) ERROR: No matching distribution found for sphinx-rtd-theme>=0.5.0 'sphinx>=1.6.0' not found: •

[PATCH] hw/dma/xilinx_axidma: Check DMASR.HALTED to prevent infinite loop.

2023-05-19 Thread Tommy Wu
When we receive a packet from the xilinx_axienet and then try to s2mem through the xilinx_axidma, if the descriptor ring buffer is full in the xilinx axidma driver, we’ll assert the DMASR.HALTED in the function : stream_process_s2mem and return 0. In the end, we’ll be stuck in an infinite loop in

Re: [PATCH v1] migration: fail the cap check if it requires the use of deferred incoming

2023-05-19 Thread Daniel P . Berrangé
On Thu, May 18, 2023 at 03:20:02PM -0400, Peter Xu wrote: > On Fri, May 19, 2023 at 12:00:26AM +0800, Wei Wang wrote: > > qemu_start_incoming_migration needs to check the number of multifd > > channels or postcopy ram channels to configure the backlog parameter (i.e. > > the maximum length to

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

2023-05-19 Thread Andrei Gudkov via
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 where it should be reported

Re: [PATCH 7/8] python/qemu: allow avocado to set logging name space

2023-05-19 Thread Alex Bennée
John Snow writes: > On Thu, May 18, 2023 at 12:20 PM Alex Bennée wrote: >> >> Since the update to the latest version Avocado only automatically >> collects logging under the avocado name space. Tweak the QEMUMachine >> class to allow avocado to bring logging under its name space. This >> also

Re: [PATCH] hw/dma/xilinx_axidma: Check DMASR.HALTED to prevent infinite loop.

2023-05-19 Thread Edgar E. Iglesias
On Fri, May 19, 2023 at 8:21 AM Tommy Wu wrote: > When we receive a packet from the xilinx_axienet and then try to s2mem > through the xilinx_axidma, if the descriptor ring buffer is full in the > xilinx axidma driver, we’ll assert the DMASR.HALTED in the > function : stream_process_s2mem and

Re: gitlab shared runner time expired

2023-05-19 Thread Mark Cave-Ayland
On 18/05/2023 20:26, Richard Henderson wrote: So, here we are again, out of runner time with 13 days left in the month. Did we come to any resolution since last time?  Holding development for that long just isn't right, so I'll continue processing the hard way -- testing on private runners

Re: [PATCH 1/2] Add CI configuration for Kubernetes

2023-05-19 Thread Daniel P . Berrangé
On Fri, May 19, 2023 at 03:06:41PM +0100, Camilla Conte wrote: > On Fri, May 19, 2023 at 1:51 PM Daniel P. Berrangé > wrote: > > > > On Fri, May 19, 2023 at 01:33:50PM +0100, Camilla Conte wrote: > > > On Fri, May 19, 2023 at 10:00 AM Daniel P. Berrangé > > > wrote: > > > > > > > > On Fri, Apr

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

2023-05-19 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 v6 2/7] hw/cxl: Move CXLRetCode definition to cxl_device.h

2023-05-19 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 Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-mailbox-utils.c | 28 include/hw/cxl/cxl_device.h | 28 2 files changed,

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

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

Re: [PATCH v2 05/19] cutils: Fix wraparound parsing in qemu_strtoui

2023-05-19 Thread Hanna Czenczek
On 12.05.23 04:10, Eric Blake wrote: While we were matching 32-bit strtol in qemu_strtoi, our use of a 64-bit parse was leaking through for some inaccurate answers in qemu_strtoui in comparison to a 32-bit strtoul. Fix those, and update the testsuite now that our bounds checks are correct. Our

[PULL 02/40] hw/cxl: cdat: Fix open file not closed in ct3_load_cdat()

2023-05-19 Thread Michael S. Tsirkin
From: Hao Zeng Open file descriptor not closed in error paths. Fix by replace open coded handling of read of whole file into a buffer with g_file_get_contents() Fixes: aba578bdac ("hw/cxl: CDAT Data Object Exchange implementation") Signed-off-by: Zeng Hao Suggested-by: Philippe Mathieu-Daudé

[PULL 03/40] hw/cxl: cdat: Fix failure to free buffer in erorr paths

2023-05-19 Thread Michael S. Tsirkin
From: Jonathan Cameron The failure paths in CDAT file loading did not clear up properly. Change to using g_auto_free and a local pointer for the buffer to ensure this function has no side effects on error. Also drop some unnecessary checks that can not fail. Cleanup properly after a failure to

[PULL 00/40] virtio,pc,pci: fixes, features, cleanups

2023-05-19 Thread Michael S. Tsirkin
The following changes since commit 297e8182194e634baa0cbbfd96d2e09e2a0bcd40: accel/tcg: Fix append_mem_cb (2023-05-18 09:28:44 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to

[PULL 17/40] pci: pci_add_option_rom(): refactor: use g_autofree for path variable

2023-05-19 Thread Michael S. Tsirkin
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: David Hildenbrand Message-Id: <20230515125229.44836-3-vsement...@yandex-team.ru> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Juan Quintela --- hw/pci/pci.c | 8

[PULL 01/40] vhost: fix possible wrap in SVQ descriptor ring

2023-05-19 Thread Michael S. Tsirkin
From: Hawkins Jiawei QEMU invokes vhost_svq_add() when adding a guest's element into SVQ. In vhost_svq_add(), it uses vhost_svq_available_slots() to check whether QEMU can add the element into SVQ. If there is enough space, then QEMU combines some out descriptors and some in descriptors into one

[PULL 18/40] vhost-user: send SET_STATUS 0 after GET_VRING_BASE

2023-05-19 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Setting the VIRTIO Device Status Field to 0 resets the device. The device's state is lost, including the vring configuration. vhost-user.c currently sends SET_STATUS 0 before GET_VRING_BASE. This risks confusion about the lifetime of the vhost-user state (e.g. vring

[PULL 20/40] virtio-mem: Default to "unplugged-inaccessible=on" with 8.1 on x86-64

2023-05-19 Thread Michael S. Tsirkin
From: David Hildenbrand Allowing guests to read unplugged memory simplified the bring-up of virtio-mem in Linux guests -- which was limited to x86-64 only. On arm64 (which was added later), we never had legacy guests and don't even allow to configure it, essentially always having

[PULL 35/40] virtio-pci: add handling of PCI ATS and Device-TLB enable/disable

2023-05-19 Thread Michael S. Tsirkin
From: Viktor Prutyanov According to PCIe Address Translation Services specification 5.1.3., ATS Control Register has Enable bit to enable/disable ATS. Guest may enable/disable PCI ATS and, accordingly, Device-TLB for the VirtIO PCI device. So, raise/lower a flag and call a trigger function to

[PULL 15/40] ACPI: bios-tables-test.c step 5 (update expected table binaries)

2023-05-19 Thread Michael S. Tsirkin
From: Eric DeVolder Following the guidelines in tests/qtest/bios-tables-test.c, this is step 5 and 6. An examination of all the files impacted (as listed in bios-tables-test-allowe-diff.h) shows only the MADT/APIC tables bumping revision from 1 to 3, and a corresponding change to the checksum.

[PULL 23/40] virtio-crypto: fix NULL pointer dereference in virtio_crypto_free_request

2023-05-19 Thread Michael S. Tsirkin
From: Mauro Matteo Cascella Ensure op_info is not NULL in case of QCRYPTODEV_BACKEND_ALG_SYM algtype. Fixes: 0e660a6f90a ("crypto: Introduce RSA algorithm") Signed-off-by: Mauro Matteo Cascella Reported-by: Yiming Tao Message-Id: <20230509075317.1132301-1-mcasc...@redhat.com> Reviewed-by:

[PULL 09/40] hw/cxl: Fix incorrect reset of commit and associated clearing of committed.

2023-05-19 Thread Michael S. Tsirkin
From: Jonathan Cameron The hardware clearing the commit bit is not spec compliant. Clearing of committed bit when commit is cleared is not specifically stated in the CXL spec, but is the expected (and simplest) permitted behaviour so use that for QEMU emulation. Reviewed-by: Fan Ni Tested-by:

Re: [PATCH v2 09/19] test-cutils: Add coverage of qemu_strtod

2023-05-19 Thread Hanna Czenczek
On 12.05.23 04:10, Eric Blake wrote: It's hard to tweak code for consistency if I can't prove what will or won't break from those tweaks. Time to add unit tests for qemu_strtod() and qemu_strtod_finite(). Among other things, I wrote a check whether we have C99 semantics for strtod("0x1")

Re: [PATCH RFC 1/5] hw/cxl: Use define for build bug detection

2023-05-19 Thread Jonathan Cameron via
On Thu, 18 May 2023 13:19:12 -0700 Ira Weiny wrote: > Jonathan Cameron wrote: > > On Wed, 17 May 2023 19:45:54 -0700 > > Ira Weiny wrote: > > > > > Magic numbers can be confusing. > > > > > > Use the range size define for CXL.cachemem rather than a magic number. > > > Update/add spec

Re: [PATCH v2 12/19] cutils: Allow NULL str in qemu_strtosz

2023-05-19 Thread Hanna Czenczek
On 12.05.23 04:10, Eric Blake wrote: All the other qemu_strto* and parse_uint allow a NULL str. Having qemu_strtosz crash on qemu_strtosz(NULL, NULL, ) is an easy fix that adds some consistency between our string parsers. Signed-off-by: Eric Blake --- tests/unit/test-cutils.c | 3 +++

Re: [PATCH] acpi/tests/avocado/bits: enable bios bits avocado tests on gitlab CI pipeline

2023-05-19 Thread Ani Sinha
> On 17-May-2023, at 12:23 PM, Ani Sinha wrote: > > Biosbits avocado tests on gitlab has thus far been disabled because some > packages needed by this test was missing in the container images used by > gitlab > CI. These packages have now been added with the commit: > > da9000784c90d

Re: [PATCH v2 11/19] test-cutils: Refactor qemu_strtosz tests for less boilerplate

2023-05-19 Thread Hanna Czenczek
On 12.05.23 04:10, Eric Blake wrote: No need to copy-and-paste lots of boilerplate per string tested, when we can consolidate that behind helper functions. Plus, this adds a bit more coverage (we now test all strings both with and without endptr, whereas before some tests skipped the NULL

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

2023-05-19 Thread Eric Blake
On Fri, May 19, 2023 at 11:10:30AM +0300, Andrei Gudkov wrote: > 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.

Re: [PATCH v2 15/19] cutils: Set value in all qemu_strtosz* error paths

2023-05-19 Thread Hanna Czenczek
On 12.05.23 04:10, Eric Blake wrote: Making callers determine whether or not *value was populated on error is not nice for usability. Pre-patch, we have unit tests that check that *result is left unchanged on most EINVAL errors and set to 0 on many ERANGE errors. This is subtly different from

Re: [PATCH v1] migration: fail the cap check if it requires the use of deferred incoming

2023-05-19 Thread Peter Xu
On Fri, May 19, 2023 at 02:34:57AM +, Wang, Wei W wrote: > On Friday, May 19, 2023 3:20 AM, Peter Xu wrote: > > On Fri, May 19, 2023 at 12:00:26AM +0800, Wei Wang wrote: > > > qemu_start_incoming_migration needs to check the number of multifd > > > channels or postcopy ram channels to

Re: [PATCH v1] migration: fail the cap check if it requires the use of deferred incoming

2023-05-19 Thread Peter Xu
On Fri, May 19, 2023 at 09:26:23AM +0100, Daniel P. Berrangé wrote: > On Thu, May 18, 2023 at 03:20:02PM -0400, Peter Xu wrote: > > On Fri, May 19, 2023 at 12:00:26AM +0800, Wei Wang wrote: > > > qemu_start_incoming_migration needs to check the number of multifd > > > channels or postcopy ram

Re: [PATCH v2 19/19] cutils: Improve qemu_strtosz handling of fractions

2023-05-19 Thread Hanna Czenczek
On 12.05.23 04:10, Eric Blake wrote: We have several limitations and bugs worth fixing; they are inter-related enough that it is not worth splitting this patch into smaller pieces: * ".5k" should work to specify 512, just as "0.5k" does * "1.k" and "1." + "9"*50 + "k" should both produce

Re: gitlab shared runner time expired

2023-05-19 Thread Richard Henderson
On 5/18/23 17:41, Eldon Stegall wrote: On Thu, May 18, 2023 at 12:26:33PM -0700, Richard Henderson wrote: So, here we are again, out of runner time with 13 days left in the month. Did we come to any resolution since last time? Holding development for that long just isn't right, so I'll

Re: [PATCH v2 05/19] cutils: Fix wraparound parsing in qemu_strtoui

2023-05-19 Thread Eric Blake
On Fri, May 19, 2023 at 04:42:11PM +0200, Hanna Czenczek wrote: > On 12.05.23 04:10, Eric Blake wrote: > > While we were matching 32-bit strtol in qemu_strtoi, our use of a > > 64-bit parse was leaking through for some inaccurate answers in > > qemu_strtoui in comparison to a 32-bit strtoul. Fix

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

2023-05-19 Thread Philippe Mathieu-Daudé
On 19/5/23 18:34, Philippe Mathieu-Daudé wrote: On 18/5/23 08:03, Sunil V L wrote: On Thu, May 18, 2023 at 02:55:16PM +1000, Alistair Francis wrote: On Wed, May 17, 2023 at 10:48 PM Philippe Mathieu-Daudé wrote: On 8/5/23 12:00, Andrea Bolognani wrote: On Mon, May 08, 2023 at 11:37:43AM

Re: [PATCH] hw/dma/xilinx_axidma: Check DMASR.HALTED to prevent infinite loop.

2023-05-19 Thread Tommy Wu
Thank Edgar E. Iglesias for the advice. I can submit another patch to do that. On Fri, May 19, 2023 at 2:39 PM Edgar E. Iglesias wrote: > > On Fri, May 19, 2023 at 8:21 AM Tommy Wu wrote: > >> When we receive a packet from the xilinx_axienet and then try to s2mem >> through the xilinx_axidma,

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

2023-05-19 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 Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-mailbox-utils.c | 82 + hw/mem/cxl_type3.c | 37

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

2023-05-19 Thread Jonathan Cameron via
v6: Rebase + no longer have any comments on patch v6 that should be below the --- cut mark, so issue from v5 fixes. Michael has queued all but last set of dependencies but listing everything here that isn't yet upstream for completeness. Note comemnt on the second to last series where only part

Re: [PATCH v2] hw/arm/sbsa-ref: add GIC node into DT

2023-05-19 Thread Leif Lindholm
On 2023-05-17 11:53, Marcin Juszkiewicz wrote: Let add GIC information into DeviceTree as part of SBSA-REF versioning. Trusted Firmware will read it and provide to next firmware level. Bumps platform version to 0.1 one so we can check is node is present. Signed-off-by: Marcin Juszkiewicz

Re: [PULL v3 00/68] i386, build system, KVM changes for 2023-05-18

2023-05-19 Thread Peter Maydell
On Thu, 18 May 2023 at 12:41, Paolo Bonzini wrote: > > * kvm: enable dirty ring for arm64 > * target/i386: new features > * target/i386: AVX fixes > * configure: create a python venv unconditionally > * meson: bump to 0.63.0 and

Re: [PATCH v2 06/19] cutils: Document differences between parse_uint and qemu_strtou64

2023-05-19 Thread Hanna Czenczek
On 12.05.23 04:10, Eric Blake wrote: These two functions are subtly different, and not just because of swapped parameter order. It took me adding better unit tests to figure out why. Document the differences to make it more obvious to developers trying to pick which one to use, as well as to

[PULL 04/40] docs/cxl: fix some typos

2023-05-19 Thread Michael S. Tsirkin
From: Brice Goglin Signed-off-by: Brice Goglin Signed-off-by: Jonathan Cameron Message-Id: <20230421134507.26842-2-jonathan.came...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- docs/system/devices/cxl.rst | 8 1 file changed, 4 insertions(+), 4

[PULL 25/40] vhost_vdpa: fix the input in trace_vhost_vdpa_listener_region_del()

2023-05-19 Thread Michael S. Tsirkin
From: Cindy Lu In trace_vhost_vdpa_listener_region_del, the value for llend should change to int128_get64(int128_sub(llend, int128_one())) Signed-off-by: Cindy Lu Message-Id: <20230510054631.2951812-3-l...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[PULL 40/40] hw/i386/pc: No need for rtc_state to be an out-parameter

2023-05-19 Thread Michael S. Tsirkin
From: Bernhard Beschow Now that the RTC is created as part of the southbridges it doesn't need to be an out-parameter any longer. Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell Reviewed-by: Michael S. Tsirkin Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé

[PULL 19/40] hw/pci: Disable PCI_ERR_UNCOR_MASK register for machine type < 8.0

2023-05-19 Thread Michael S. Tsirkin
From: Leonardo Bras Since it's implementation on v8.0.0-rc0, having the PCI_ERR_UNCOR_MASK set for machine types < 8.0 will cause migration to fail if the target QEMU version is < 8.0.0 : qemu-system-x86_64: get_pci_config_device: Bad config data: i=0x10a read: 40 device: 0 cmask: ff wmask: 0

[PULL 30/40] hw/i386/pc_q35: Reuse machine parameter

2023-05-19 Thread Michael S. Tsirkin
From: Bernhard Beschow Signed-off-by: Bernhard Beschow Reviewed-by: Thomas Huth Message-Id: <20230213162004.2797-4-shen...@gmail.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_q35.c | 2 +- 1 file changed, 1

Re: [PATCH 4/6] target/tricore: Refactor PCXI/ICR register fields

2023-05-19 Thread Philippe Mathieu-Daudé
Hi Bastian, On 19/5/23 15:36, Bastian Koppelmann wrote: starting from ISA version 1.6.1 (previously known as 1.6P/E), some bitfields in PCXI and ICR have changed. We also refactor these registers using the register fields API. Signed-off-by: Bastian Koppelmann Resolves:

[PATCH] iotests: Fix test 104 under NBD

2023-05-19 Thread Eric Blake
In the past, commit a231cb27 ("iotests: Fix 104 for NBD", v2.3.0) added an additional filter to _filter_img_info to rewrite NBD URIs into the expected output form. This recently broke when we tweaked tests to run in a per-format directory, which did not match the regex, because _img_info itself

Re: [PATCH v1] migration: fail the cap check if it requires the use of deferred incoming

2023-05-19 Thread Peter Xu
On Fri, May 19, 2023 at 11:30:31AM -0400, Peter Xu wrote: > On Fri, May 19, 2023 at 02:34:57AM +, Wang, Wei W wrote: > > On Friday, May 19, 2023 3:20 AM, Peter Xu wrote: > > > On Fri, May 19, 2023 at 12:00:26AM +0800, Wei Wang wrote: > > > > qemu_start_incoming_migration needs to check the

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

2023-05-19 Thread Philippe Mathieu-Daudé
On 19/5/23 17:45, Jonathan Cameron wrote: On Fri, 19 May 2023 17:34:20 +0200 Philippe Mathieu-Daudé wrote: Hi Jonathan, On 19/5/23 16:30, Jonathan Cameron wrote: Defined in CXL r3.0 8.2.9.2.1.2 DRAM Event Record, this event provides information related to DRAM devices. Example injection

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

2023-05-19 Thread Andrea Bolognani
On Tue, Apr 25, 2023 at 03:55:45PM +0530, Sunil V L wrote: > qemu-system-riscv64 -bios \ > -drive file=,if=pflash,format=raw,unit=0 \ > -drive file=,if=pflash,format=raw,unit=1,readonly=on \ > -machine virt I've noticed that edk2 for RISC-V, at least in the form it is currently packaged for

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

2023-05-19 Thread Jonathan Cameron via
On Fri, 19 May 2023 18:08:30 +0200 Philippe Mathieu-Daudé wrote: > On 19/5/23 16:18, Jonathan Cameron wrote: > > 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

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

2023-05-19 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 v6 3/4] hw/cxl: Add poison injection via the mailbox.

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

Re: [PATCH v2 04/19] test-cutils: Test more integer corner cases

2023-05-19 Thread Hanna Czenczek
On 12.05.23 04:10, Eric Blake wrote: We have quite a few undertested and underdocumented integer parsing corner cases. To ensure that any changes we make in the code are intentional rather than accidental semantic changes, it is time to add more unit tests of existing behavior. In particular,

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

2023-05-19 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 v6 7/7] hw/cxl/events: Add injection of Memory Module Events

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

[PULL 08/40] hw/cxl: Fix endian handling for decoder commit.

2023-05-19 Thread Michael S. Tsirkin
From: Jonathan Cameron Not a real problem yet as all supported architectures are little endian, but continue to tidy these up when touching code for other reasons. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jonathan Cameron Message-Id:

[PULL 05/40] docs/cxl: Remove incorrect CXL type 3 size parameter

2023-05-19 Thread Michael S. Tsirkin
From: Raghu H cxl-type3 memory size is read directly from the provided memory backed end device. Remove non existent size option Signed-off-by: Raghu H Signed-off-by: Jonathan Cameron Message-Id: <20230421134507.26842-3-jonathan.came...@huawei.com> Reviewed-by: Michael S. Tsirkin

[PULL 06/40] docs/cxl: Replace unsupported AARCH64 with x86_64

2023-05-19 Thread Michael S. Tsirkin
From: Raghu H Currently Qemu CXL emulation support is not availabe on AARCH64 but its available with qemu x86_64 architecture, updating the document to reflect the supported platform. Signed-off-by: Raghu H Signed-off-by: Jonathan Cameron Message-Id:

[RFC 0/1] hw/input: add basic support for a PCI PS/2 controller

2023-05-19 Thread Liav Albani
This small patch I wrote might raise few questions on the motivation to why someone would write such thing like this - I'll try my best to be descriptive about this. I am SerenityOS developer. In that project I mainly work on kernel stuff for the most part. Recently I started to fix issues with

[PULL 10/40] tests/qtest/cxl-test: whitespace, line ending cleanup

2023-05-19 Thread Michael S. Tsirkin
From: Gregory Price Defines are starting to exceed line length limits, align them for cleanliness before making modifications. Signed-off-by: Gregory Price Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jonathan Cameron Message-Id: <20230421160827.2227-2-jonathan.came...@huawei.com>

[PULL 07/40] hw/cxl: drop pointless memory_region_transaction_guards

2023-05-19 Thread Michael S. Tsirkin
From: Jonathan Cameron Not clear what intent was here, but probably based on a misunderstanding of what these guards are for. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jonathan Cameron Message-Id: <20230421135906.3515-2-jonathan.came...@huawei.com> Reviewed-by: Michael S. Tsirkin

Re: [PULL 04/29] arm/kvm: add support for MTE

2023-05-19 Thread Peter Maydell
On Fri, 19 May 2023 at 14:31, Peter Maydell wrote: > > On Fri, 19 May 2023 at 13:55, Alex Bennée wrote: > > > > > > Peter Maydell writes: > > > > > From: Cornelia Huck > > > > > > Extend the 'mte' property for the virt machine to cover KVM as > > > well. For KVM, we don't allocate tag memory,

[PULL 13/40] ACPI: bios-tables-test.c step 2 (allowed-diff entries)

2023-05-19 Thread Michael S. Tsirkin
From: Eric DeVolder Following the guidelines in tests/qtest/bios-tables-test.c, set up bios-tables-test-allowed-diff.h to ignore the imminent changes to the APIC tables, per step 2. Signed-off-by: Eric DeVolder Message-Id: <20230517162545.2191-2-eric.devol...@oracle.com> Reviewed-by: Michael

[PULL 34/40] hw/pci-host/pam: Make init_pam() usage more readable

2023-05-19 Thread Michael S. Tsirkin
From: Bernhard Beschow Unlike pam_update() which takes the subject -- PAMMemoryRegion -- as first argument, init_pam() takes it as fifth (!) argument. This makes it quite hard to figure out what an init_pam() invocation actually initializes. By moving the subject to the front this should become

[PULL 37/40] hw/cxl: rename mailbox return code type from ret_code to CXLRetCode

2023-05-19 Thread Michael S. Tsirkin
From: Jonathan Cameron Given the increasing usage of this mailbox return code type, now is a good time to switch to QEMU style naming. Reviewed-by: Ira Weiny Reviewed-by: Fan Ni Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jonathan Cameron Message-Id:

[PULL 26/40] vhost-vdpa: Add check for full 64-bit in region delete

2023-05-19 Thread Michael S. Tsirkin
From: Cindy Lu The unmap ioctl doesn't accept a full 64-bit span. So need to add check for the section's size in vhost_vdpa_listener_region_del(). Signed-off-by: Cindy Lu Message-Id: <20230510054631.2951812-4-l...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[PULL 28/40] hw/pci-host/i440fx: Inline sysbus_add_io()

2023-05-19 Thread Michael S. Tsirkin
From: Bernhard Beschow sysbus_add_io() just wraps memory_region_add_subregion() while also obscuring where the memory is attached. So use memory_region_add_subregion() directly and attach it to the existing memory region s->bus->address_space_io which is set as an alias to get_system_io() by the

[PULL 31/40] hw/i386/pc_{q35,piix}: Reuse MachineClass::desc as SMB product name

2023-05-19 Thread Michael S. Tsirkin
From: Bernhard Beschow No need to repeat the descriptions. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20230213162004.2797-5-shen...@gmail.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[PULL 27/40] vhost-vdpa: Add support for vIOMMU.

2023-05-19 Thread Michael S. Tsirkin
From: Cindy Lu 1. The vIOMMU support will make vDPA can work in IOMMU mode. This will fix security issues while using the no-IOMMU mode. To support this feature we need to add new functions for IOMMU MR adds and deletes. Also since the SVQ does not support vIOMMU yet, add the check for IOMMU in

[PULL 11/40] hw/mem: Use memory_region_size() in cxl_type3

2023-05-19 Thread Michael S. Tsirkin
From: Jonathan Cameron Accessors prefered over direct use of int128_get64() as they clamp out of range values. None are expected here but cleaner to always use the accessor than mix and match. Signed-off-by: Jonathan Cameron Message-Id: <20230421160827.2227-3-jonathan.came...@huawei.com>

[PATCH] Revert "arm/kvm: add support for MTE"

2023-05-19 Thread Peter Maydell
This reverts commit b320e21c48ce64853904bea6631c0158cc2ef227, which accidentally broke TCG, because it made the TCG -cpu max report the presence of MTE to the guest even if the board hadn't enabled MTE by wiring up the tag RAM. This meant that if the guest then tried to use MTE QEMU would segfault

[PULL 39/40] hw/i386/pc: Create RTC controllers in south bridges

2023-05-19 Thread Michael S. Tsirkin
From: Bernhard Beschow Just like in the real hardware (and in PIIX4), create the RTC controllers in the south bridges. Signed-off-by: Bernhard Beschow Reviewed-by: Michael S. Tsirkin Reviewed-by: Thomas Huth Message-Id: <20230519084734.220480-2-shen...@gmail.com> Reviewed-by: Michael S.

[PULL 29/40] hw/pci-host/q35: Inline sysbus_add_io()

2023-05-19 Thread Michael S. Tsirkin
From: Bernhard Beschow sysbus_add_io() just wraps memory_region_add_subregion() while also obscuring where the memory is attached. So use memory_region_add_subregion() directly and attach it to the existing memory region s->mch.address_space_io which is set as an alias to get_system_io() by the

[PULL 24/40] vhost: expose function vhost_dev_has_iommu()

2023-05-19 Thread Michael S. Tsirkin
From: Cindy Lu To support vIOMMU in vdpa, need to exposed the function vhost_dev_has_iommu, vdpa will use this function to check if vIOMMU enable. Signed-off-by: Cindy Lu Message-Id: <20230510054631.2951812-2-l...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[PULL 38/40] hw/cxl: Introduce cxl_device_get_timestamp() utility function

2023-05-19 Thread Michael S. Tsirkin
From: Ira Weiny There are new users of this functionality coming shortly so factor it out from the GET_TIMESTAMP mailbox command handling. Signed-off-by: Ira Weiny Reviewed-by: Fan Ni Signed-off-by: Jonathan Cameron Message-Id: <20230423162013.4535-3-jonathan.came...@huawei.com>

[PULL 14/40] ACPI: i386: bump to MADT to revision 3

2023-05-19 Thread Michael S. Tsirkin
From: Eric DeVolder Currently i386 QEMU generates MADT revision 3, and reports MADT revision 1. Set .revision to 3 to match reality. Link: https://lore.kernel.org/linux-acpi/20230327191026.3454-1-eric.devolder@ora cle.com/T/#t Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha Message-Id:

Re: [PULL v2 00/44] Hexagon update

2023-05-19 Thread Richard Henderson
On 5/18/23 13:03, Taylor Simpson wrote: The following changes since commit 278238505d28d292927bff7683f39fb4fbca7fd1: Merge tag 'pull-tcg-20230511-2' ofhttps://gitlab.com/rth7680/qemu into staging (2023-05-11 11:44:23 +0100) are available in the Git repository at:

Re: [PATCH v2 04/19] test-cutils: Test more integer corner cases

2023-05-19 Thread Eric Blake
On Fri, May 19, 2023 at 04:27:10PM +0200, Hanna Czenczek wrote: > On 12.05.23 04:10, Eric Blake wrote: > > We have quite a few undertested and underdocumented integer parsing > > corner cases. To ensure that any changes we make in the code are > > intentional rather than accidental semantic

Re: [PATCH] multifd: Set a higher "backlog" default value for listen()

2023-05-19 Thread Peter Xu
On Fri, May 19, 2023 at 01:22:20PM +0200, Juan Quintela wrote: > "Wang, Wei W" wrote: > > On Friday, May 19, 2023 9:31 AM, Wang, Lei4 wrote: > >> On 5/18/2023 17:16, Juan Quintela wrote: > >> > Lei Wang wrote: > >> >> When destination VM is launched, the "backlog" parameter for listen() > >> >>

Re: [PATCH v2 17/19] cutils: Use parse_uint in qemu_strtosz for negative rejection

2023-05-19 Thread Hanna Czenczek
On 12.05.23 21:34, Eric Blake wrote: On Thu, May 11, 2023 at 09:10:31PM -0500, Eric Blake wrote: Rather than open-coding two different ways to check for an unwanted negative sign, reuse the same code in both functions. That way, if we decide down the road to accept "-0" instead of rejecting

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

2023-05-19 Thread Jonathan Cameron via
On Fri, 19 May 2023 17:34:20 +0200 Philippe Mathieu-Daudé wrote: > Hi Jonathan, > > On 19/5/23 16:30, Jonathan Cameron wrote: > > 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: > > > > {

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

2023-05-19 Thread Andrea Bolognani
On Thu, May 18, 2023 at 02:53:05PM +1000, Alistair Francis wrote: > On Wed, May 17, 2023 at 6:45 PM Andrea Bolognani wrote: > > On Wed, May 17, 2023 at 02:57:12PM +1000, Alistair Francis wrote: > At one point we loaded Oreboot in in flash and booted from that. I > think Oreboot then loaded

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

2023-05-19 Thread Philippe Mathieu-Daudé
On 19/5/23 16:18, Jonathan Cameron wrote: 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

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

2023-05-19 Thread Philippe Mathieu-Daudé
On 19/5/23 18:24, Jonathan Cameron wrote: On Fri, 19 May 2023 18:08:30 +0200 Philippe Mathieu-Daudé wrote: On 19/5/23 16:18, Jonathan Cameron wrote: 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

Re: [PULL v3 00/68] i386, build system, KVM changes for 2023-05-18

2023-05-19 Thread Peter Maydell
On Fri, 19 May 2023 at 17:51, Paolo Bonzini wrote: > > > > Il ven 19 mag 2023, 16:39 Peter Maydell ha scritto: >> >> On Thu, 18 May 2023 at 12:41, Paolo Bonzini wrote: >> > >> > * kvm: enable dirty ring for arm64 >> > *

[RFC PATCH 5/8] qtest: use cpu interface in qtest_clock_warp

2023-05-19 Thread Alex Bennée
This generalises the qtest_clock_warp code to use the AccelOps handlers for updating its own sense of time. This will make the next patch which moves the warp code closer to pure code motion. Signed-off-by: Alex Bennée --- include/sysemu/qtest.h | 1 + accel/qtest/qtest.c| 1 +

[RFC PATCH 6/8] sysemu: generalise qtest_warp_clock as qemu_clock_advance_virtual_time

2023-05-19 Thread Alex Bennée
Move the key functionality of moving time forward into the clock sub-system itself. This will allow us to plumb in time control into plugins. Signed-off-by: Alex Bennée --- include/qemu/timer.h | 15 +++ softmmu/qtest.c | 24 ++-- util/qemu-timer.c| 26

Re: [PATCH v8 00/23] Consolidate PIIX south bridges

2023-05-19 Thread Bernhard Beschow
Am 18. Mai 2023 21:28:12 UTC schrieb "Michael S. Tsirkin" : >On Wed, May 10, 2023 at 06:39:49PM +, Bernhard Beschow wrote: >> >> >> Am 21. April 2023 16:40:47 UTC schrieb Bernhard Beschow : >> > >> > >> >Am 21. April 2023 07:15:18 UTC schrieb "Michael S. Tsirkin" >> >: >> >>On Thu, Mar

Re: [PATCH 1/2] Add CI configuration for Kubernetes

2023-05-19 Thread Daniel P . Berrangé
On Fri, Apr 07, 2023 at 03:52:51PM +0100, Camilla Conte wrote: > Configure Gitlab CI to run on Kubernetes > according to the official documentation. > https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#docker-in-docker-with-tls-enabled-in-kubernetes > > These changes are needed because

Re: [PATCH 2/6] meson: simplify logic for -Dfdt

2023-05-19 Thread Daniel P . Berrangé
On Fri, May 19, 2023 at 10:56:42AM +0200, Paolo Bonzini wrote: > 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

Re: [PATCH v2 0/6] meson: use subprojects for bundled projects

2023-05-19 Thread Paolo Bonzini
On Fri, May 19, 2023 at 11:21 AM Peter Maydell wrote: > > On Fri, 19 May 2023 at 09:56, Paolo Bonzini wrote: > > > > QEMU bundles a copy of dtc and keycodemapdb. They both support meson, > > so we can run their build system via subproject() instead of hardcoding > > their contents. > > > > In

Re: [PATCH 6/6] meson: subprojects: replace submodules with wrap files

2023-05-19 Thread Paolo Bonzini
On 5/19/23 11:25, Daniel P. Berrangé wrote: * dtc - the distro should always have it anyway * libvfio-user - don't think this has found its way into any distros yet. So if we don't bundle it, distros have to pacakge it or re-bundle with

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

2023-05-19 Thread Het Gala
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 parameters such as 'uri' and this is

Re: [PATCH v2 0/6] meson: use subprojects for bundled projects

2023-05-19 Thread Paolo Bonzini
On 5/19/23 11:32, Daniel P. Berrangé wrote: Feels like we should be able to figure out some way to get rid of all the submodules though, except for the roms, which are special and ok to leave IMHO Hmm, almost. roms/SLOF is used to build pc-bios/s390-ccw/s390-netboot.img, so right now

  1   2   3   >