Re: [PULL 0/5] tcg patch queue

2023-01-20 Thread Richard Henderson
On 1/19/23 23:41, Thomas Huth wrote: On 16/01/2023 23.36, Richard Henderson wrote: The following changes since commit fb7e7990342e59cf67dbd895c1a1e3fb1741df7a:    tests/qtest/qom-test: Do not print tested properties by default (2023-01-16 15:00:57 +) are available in the Git repository

Re: [PULL 4/9] MAINTAINERS: Remove bouncing mail address from Kamil Rytarowski

2023-01-20 Thread Brad Smith
I e-mailed his business address and received a bounce back from Google saying the account does not exist. On 1/18/2023 6:34 AM, Thomas Huth wrote: When sending mail to Kamil's address, it's bouncing with a message that the mailbox is full. This already happens since summer 2022, and the last

[PATCH v2 1/2] target/riscv: add Zicond as an experimental extension

2023-01-20 Thread Philipp Tomsich
This implements the Zicond (conditional integer operations) extension, as of version 1.0-draft-20230120 as an experimental extension in QEMU ("x-zicond"). The Zicond extension acts as a building block for branchless sequences including conditional-{arithmetic,logic,select,mov

[PATCH v2 2/2] target/riscv: redirect XVentanaCondOps to use the Zicond functions

2023-01-20 Thread Philipp Tomsich
The Zicond standard extension implements the same instruction semantics as XVentanaCondOps, although using different mnemonics and opcodes. Point XVentanaCondOps to the (newly implemented) Zicond implementation to reduce the future maintenance burden. Also updating MAINTAINERS as

Re: [PATCH v9] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-20 Thread Chuck Zmudzinski
On 1/20/23 4:34 PM, Stefano Stabellini wrote: > On Sat, 14 Jan 2023, Chuck Zmudzinski wrote: > > Intel specifies that the Intel IGD must occupy slot 2 on the PCI bus, > > as noted in docs/igd-assign.txt in the Qemu source code. > > > > Currently, when the xl toolstack is used to configure a Xen

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2023-01-20 Thread Jarkko Sakkinen
On Tue, Jan 10, 2023 at 05:14:32PM +0800, Chao Peng wrote: > On Mon, Jan 09, 2023 at 07:32:05PM +, Sean Christopherson wrote: > > On Fri, Jan 06, 2023, Chao Peng wrote: > > > On Thu, Jan 05, 2023 at 11:23:01AM +, Jarkko Sakkinen wrote: > > > > On Fri, Dec 02, 2022 at 02:13:41PM +0800, Chao

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2023-01-20 Thread Jarkko Sakkinen
On Mon, Jan 09, 2023 at 07:32:05PM +, Sean Christopherson wrote: > On Fri, Jan 06, 2023, Chao Peng wrote: > > On Thu, Jan 05, 2023 at 11:23:01AM +, Jarkko Sakkinen wrote: > > > On Fri, Dec 02, 2022 at 02:13:41PM +0800, Chao Peng wrote: > > > > To make future maintenance easy, internally

Re: [PATCH v8 09/13] vfio/migration: Implement VFIO migration protocol v2

2023-01-20 Thread Alex Williamson
On Mon, 16 Jan 2023 16:11:31 +0200 Avihai Horon wrote: > Implement the basic mandatory part of VFIO migration protocol v2. > This includes all functionality that is necessary to support > VFIO_MIGRATION_STOP_COPY part of the v2 protocol. > > The two protocols, v1 and v2, will co-exist and in

Re: [PATCH v8 05/13] migration/qemu-file: Add qemu_file_get_to_fd()

2023-01-20 Thread Alex Williamson
On Mon, 16 Jan 2023 16:11:27 +0200 Avihai Horon wrote: > Add new function qemu_file_get_to_fd() that allows reading data from > QEMUFile and writing it straight into a given fd. > > This will be used later in VFIO migration code. > > Signed-off-by: Avihai Horon > Reviewed-by: Vladimir

Re: [PATCH v8 04/13] vfio/migration: Allow migration without VFIO IOMMU dirty tracking support

2023-01-20 Thread Alex Williamson
On Mon, 16 Jan 2023 16:11:26 +0200 Avihai Horon wrote: > Currently, if IOMMU of a VFIO container doesn't support dirty page > tracking, migration is blocked. This is because a DMA-able VFIO device > can dirty RAM pages without updating QEMU about it, thus breaking the > migration. > > However,

Re: cxl nvdimm Potential probe ordering issues.

2023-01-20 Thread Dan Williams
Gregory Price wrote: > On Fri, Jan 20, 2023 at 09:38:13AM -0800, Dan Williams wrote: > > As it stands currently that dax device and the cxl device are not > > related since a default dax-device is loaded just based on the presence > > of an EFI_MEMORY_SP address range in the address map. With the

[PATCH] target/i386: translate GPA to HPA even in unpaged mode

2023-01-20 Thread Bernhard Kauer
Guest to host page translation is missing if the guest runs in unpaged mode. See last sentence in AMD SDM rev 3.40 section 15.25.5. Signed-off-by: Bernhard Kauer --- target/i386/tcg/sysemu/excp_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/i386/tcg/sysemu/excp_helper.c

[PATCH 0/2] tests/avocado: Pass parameters via Makefile

2023-01-20 Thread Fabiano Rosas
This is intended to replace the last two patches of Daniel's series: https://lore.kernel.org/r/20230118124348.364771-1-dbarb...@ventanamicro.com Currently, the initialization code in setUp() infers properties of the tests & host/target machine by looking at the avocado tags present in the test.

[PATCH 2/2] tests/avocado: Allow passing command line parameters via Makefile

2023-01-20 Thread Fabiano Rosas
Add support for the 'avocado run' "-p" option, which allows us to pass parameters in the form key=value to be applied to all tests selected for a given run. This is useful to force generic tests to use a specific machine, cpu or qemu-binary where otherwise the defaults would be used. E.g.: $

[PATCH 1/2] tests/avocado: Invert parameter vs. tag precedence during setUp

2023-01-20 Thread Fabiano Rosas
We currently never pass parameters to the avocado process via Makefile. To start doing so we need to invert the precedence between command line parameters and tags, otherwise a command line parameter would override values for all the tests, which is unlikely to be a common use-case. A more likely

[PATCH] target/i386: translate GPA to HPA even in unpaged mode

2023-01-20 Thread Bernhard Kauer
Guest to host page translation should be done even if the guest runs in unpaged mode. See last sentence in AMD SDM rev 3.40 section 15.25.5. Signed-off-by: Bernhard Kauer ---  target/i386/tcg/sysemu/excp_helper.c | 3 +++  1 file changed, 3 insertions(+) diff --git

Re: cxl nvdimm Potential probe ordering issues.

2023-01-20 Thread Gregory Price
On Fri, Jan 20, 2023 at 09:38:13AM -0800, Dan Williams wrote: > As it stands currently that dax device and the cxl device are not > related since a default dax-device is loaded just based on the presence > of an EFI_MEMORY_SP address range in the address map. With the new ram > enabling that

Patch: target/i386: Change CR4 before CR0 in SVM

2023-01-20 Thread Bernhard Kauer
 There is a dependency in cpu_x86_update_cr0() to the current value of CR4  to enable or disable long-mode.  This value is outdated when switching into  or out of SVM. This leads to invalid CPU state when returning from an unpaged  VM when EFER.LME is set.     Signed-off-by: Bernhard Kauer diff

Re: [PATCH v9] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-20 Thread Stefano Stabellini
On Sat, 14 Jan 2023, Chuck Zmudzinski wrote: > Intel specifies that the Intel IGD must occupy slot 2 on the PCI bus, > as noted in docs/igd-assign.txt in the Qemu source code. > > Currently, when the xl toolstack is used to configure a Xen HVM guest with > Intel IGD passthrough to the guest with

Re: [RFC PATCH v5 3/9] target/arm: Use "max" as default cpu for the virt machine with KVM

2023-01-20 Thread Richard Henderson
On 1/20/23 08:48, Fabiano Rosas wrote: Now that the cortex-a15 is under CONFIG_TCG, use as default CPU for a KVM-only build the 'max' cpu. Note that we cannot use 'host' here because the qtests can run without any other accelerator (than qtest) and 'host' depends on KVM being enabled.

Re: [PATCH v8] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-20 Thread Chuck Zmudzinski
On 1/20/2023 11:01 AM, Igor Mammedov wrote: > On Tue, 17 Jan 2023 09:50:23 -0500 > Chuck Zmudzinski wrote: > > > On 1/17/2023 5:35 AM, Igor Mammedov wrote: > > > On Mon, 16 Jan 2023 13:00:53 -0500 > > > Chuck Zmudzinski wrote: > > > > > > > On 1/16/23 10:33, Igor Mammedov wrote: > > > > > On

[PATCH] tests/qtest: Plug memory leaks in qtest_get_machines

2023-01-20 Thread Fabiano Rosas
These leaks can be avoided: 759 bytes in 61 blocks are still reachable in loss record 56 of 60 at 0x4034744: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4A88518: g_malloc (in /usr/lib64/libglib-2.0.so.0.7000.5) by 0x4AA313E: g_strdup (in

Re: [PATCH v8] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-20 Thread Chuck Zmudzinski
On 1/20/2023 11:57 AM, Stefano Stabellini wrote: > On Tue, 17 Jan 2023, Chuck Zmudzinski wrote: > > On 1/17/2023 6:04 AM, Igor Mammedov wrote: > > > On Mon, 16 Jan 2023 13:00:53 -0500 > > > Chuck Zmudzinski wrote: > > > > > > > On 1/16/23 10:33, Igor Mammedov wrote: > > > > > On Fri, 13 Jan 2023

[RFC PATCH v5 7/9] target/avocado: Pass parameters to migration test on aarch64

2023-01-20 Thread Fabiano Rosas
The migration tests are currently broken for an aarch64 host because the tests pass no 'machine' and 'cpu' options on the QEMU command line. Most other architectures define a default value in QEMU for these options, but arm does not. Add these options to the test class in case the test is being

[RFC PATCH v5 0/9] target/arm: Allow CONFIG_TCG=n builds

2023-01-20 Thread Fabiano Rosas
This series makes the necessary changes to allow the use of --disable-tcg for arm. Based on "target/arm: CONFIG_TCG=n part 1": https://lore.kernel.org/r/20230118193518.26433-1-faro...@suse.de Since v4: - Used "max" as the default CPU for KVM-only builds. This allows me to drop all the clunky

[RFC PATCH v5 9/9] arm/Kconfig: Do not build TCG-only boards on a KVM-only build

2023-01-20 Thread Fabiano Rosas
Move all the CONFIG_FOO=y from default.mak into "default y if TCG" statements in Kconfig. That way they won't be selected when CONFIG_TCG=n. I'm leaving CONFIG_ARM_VIRT in default.mak because it allows us to keep the two default.mak files not empty and keep aarch64-default.mak including

[RFC PATCH v5 1/9] target/arm: Move 64-bit TCG CPUs into tcg/

2023-01-20 Thread Fabiano Rosas
Move the 64-bit CPUs that are TCG-only: - cortex-a35 - cortex-a55 - cortex-a72 - cortex-a76 - a64fx - neoverse-n1 Keep the CPUs that can be used with KVM: - cortex-a57 - cortex-a53 - max - host For the special case "max" CPU, there's a nuance that while KVM/HVF use the "host" model instead, we

[RFC PATCH v5 2/9] target/arm: move cpu_tcg to tcg/cpu32.c

2023-01-20 Thread Fabiano Rosas
From: Claudio Fontana move the module containing cpu models definitions for 32bit TCG-only CPUs to tcg/ and rename it for clarity. Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson --- First and last hunks are new. --- hw/arm/virt.c

[RFC PATCH v5 5/9] tests/qtest: Restrict tpm-tis-devices-{swtpm}-test to CONFIG_TCG

2023-01-20 Thread Fabiano Rosas
These tests set -accel tcg, so restrict them to when TCG is present. Signed-off-by: Fabiano Rosas Acked-by: Richard Henderson Reviewed-by: Thomas Huth --- Removed unneeded hunk restricting dependencies Use config_all instead of config_devices_all to check for TCG --- tests/qtest/meson.build |

[RFC PATCH v5 6/9] tests/tcg: Do not build/run TCG tests if TCG is disabled

2023-01-20 Thread Fabiano Rosas
The tests under tests/tcg depend on the TCG accelerator. Do not build them if --disable-tcg was given in the configure line. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- configure | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

[RFC PATCH v5 8/9] arm/Kconfig: Always select SEMIHOSTING when TCG is present

2023-01-20 Thread Fabiano Rosas
We are about to enable the build without TCG, so CONFIG_SEMIHOSTING and CONFIG_ARM_COMPATIBLE_SEMIHOSTING cannot be unconditionally set in default.mak anymore. So reflect the change in a Kconfig. Instead of using semihosting/Kconfig, use a target-specific file, so that the change doesn't affect

[RFC PATCH v5 4/9] tests/qtest: arm-cpu-features: Match tests to required accelerators

2023-01-20 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Acked-by: Thomas Huth --- tests/qtest/arm-cpu-features.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index

[RFC PATCH v5 3/9] target/arm: Use "max" as default cpu for the virt machine with KVM

2023-01-20 Thread Fabiano Rosas
Now that the cortex-a15 is under CONFIG_TCG, use as default CPU for a KVM-only build the 'max' cpu. Note that we cannot use 'host' here because the qtests can run without any other accelerator (than qtest) and 'host' depends on KVM being enabled. Signed-off-by: Fabiano Rosas Cc: Daniel P.

Re: [PATCH v3 0/2] various aarch64 fixes for running Hyper-V on TCG

2023-01-20 Thread Peter Maydell
On Fri, 20 Jan 2023 at 15:59, Evgeny Iakovlev wrote: > > Small series of changes to aarch64 emulation to better support running > Hyper-V as a TCG guest wtih EL3 firmware. Applied to target-arm.next, thanks. -- PMM

Re: [PATCH v3 4/5] hw/char/pl011: better handling of FIFO flags on LCR reset

2023-01-20 Thread Peter Maydell
On Fri, 20 Jan 2023 at 15:54, Evgeny Iakovlev wrote: > > Current FIFO handling code does not reset RXFE/RXFF flags when guest > resets FIFO by writing to UARTLCR register, although internal FIFO state > is reset to 0 read count. Actual guest-visible flag update will happen > only on next data

Re: [PATCH v3 3/5] hw/char/pl011: implement a reset method

2023-01-20 Thread Peter Maydell
On Fri, 20 Jan 2023 at 15:54, Evgeny Iakovlev wrote: > > PL011 currently lacks a reset method. Implement it. > > Signed-off-by: Evgeny Iakovlev > --- > hw/char/pl011.c | 26 +- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v3 1/5] hw/char/pl011: refactor FIFO depth handling code

2023-01-20 Thread Peter Maydell
On Fri, 20 Jan 2023 at 15:54, Evgeny Iakovlev wrote: > > PL011 can be in either of 2 modes depending guest config: FIFO and > single register. The last mode could be viewed as a 1-element-deep FIFO. > > Current code open-codes a bunch of depth-dependent logic. Refactor FIFO > depth handling code

Re: [PATCH v3 2/5] hw/char/pl011: add post_load hook for backwards-compatibility

2023-01-20 Thread Peter Maydell
On Fri, 20 Jan 2023 at 15:54, Evgeny Iakovlev wrote: > > Previous change slightly modified the way we handle data writes when > FIFO is disabled. Previously we kept incrementing read_pos and were > storing data at that position, although we only have a > single-register-deep FIFO now. Then we

Re: [RFC] cxl-host: Fix committed check for passthrough decoder

2023-01-20 Thread Jonathan Cameron via
On Mon, 16 Jan 2023 14:37:23 + Jonathan Cameron via wrote: > On Fri, 13 Jan 2023 17:10:51 + > Fan Ni wrote: > > > On Fri, Jan 13, 2023 at 09:47:25AM +, Jonathan Cameron wrote: > > > > > On Fri, 13 Jan 2023 00:27:55 + > > > Fan Ni wrote: > > > > > > > For passthrough

Re: [PATCH 3/3] plugins: Iterate on cb_lists in qemu_plugin_user_exit

2023-01-20 Thread Alex Bennée
Richard Henderson writes: > Rather than iterate over all plugins for all events, > iterate over plugins that have registered a given event. > > Signed-off-by: Richard Henderson Queued to plugins/next, thanks. -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: cxl nvdimm Potential probe ordering issues.

2023-01-20 Thread Dan Williams
Gregory Price wrote: > On Thu, Jan 19, 2023 at 03:04:49PM +, Jonathan Cameron wrote: > > Gregory, would you mind checking if > > cxl_nvb is NULL here... > > https://elixir.bootlin.com/linux/v6.2-rc4/source/drivers/cxl/pmem.c#L67 > > (printk before it is used should work). > > > > Might also

Re: [PATCH 2/3] plugins: Avoid deadlock in qemu_plugin_user_exit

2023-01-20 Thread Alex Bennée
Richard Henderson writes: > Use of start_exclusive on this exit path leads to deadlock, > in particular when called from dump_core_and_abort. There > does not appear to be a need for it. We don't want to be doing any translation while un-registering things lest things get confused. You could

Re: [PATCH] vhost-user-fs: add capability to allow migration

2023-01-20 Thread Anton Kuchin
On 20/01/2023 15:58, Michael S. Tsirkin wrote: On Thu, Jan 19, 2023 at 03:45:06PM +0200, Anton Kuchin wrote: On 19/01/2023 14:51, Michael S. Tsirkin wrote: On Sun, Jan 15, 2023 at 07:09:03PM +0200, Anton Kuchin wrote: Now any vhost-user-fs device makes VM unmigratable, that also prevents qemu

Re: cxl nvdimm Potential probe ordering issues.

2023-01-20 Thread Dan Williams
Jonathan Cameron wrote: > On Thu, 19 Jan 2023 15:04:49 + > Jonathan Cameron wrote: > > > On Thu, 19 Jan 2023 12:42:44 + > > Jonathan Cameron via wrote: > > > > > On Wed, 18 Jan 2023 14:31:53 -0500 > > > Gregory Price wrote: > > > > > > > I apparently forgot an intro lol > > > > >

Re: [PATCH 15/25] target/arm: Allow users to set the number of VFP registers

2023-01-20 Thread Peter Maydell
On Fri, 20 Jan 2023 at 08:40, Cédric Le Goater wrote: > > On 1/19/23 13:34, Cédric Le Goater wrote: > > Cortex A7 CPUs with an FPU implementing VFPv4 without NEON support > > have 16 64-bit FPU registers and not 32 registers. Let users set the > > number of VFP registers with a CPU property. > >

Re: [PATCH 3/4] semihosting: add semihosting section to the docs

2023-01-20 Thread Alex Bennée
Peter Maydell writes: > On Fri, 13 Jan 2023 at 13:39, Alex Bennée wrote: >> >> diff --git a/qemu-options.hx b/qemu-options.hx >> index 3aa3a2f5a3..de3a368f58 100644 >> --- a/qemu-options.hx >> +++ b/qemu-options.hx >> @@ -4633,10 +4633,13 @@ DEF("semihosting", 0, QEMU_OPTION_semihosting, >>

[PATCH 3/2] MAINTAINERS: Cover tpm.c again

2023-01-20 Thread Markus Armbruster
Commit 800d4deda0 "softmmu: move more files to softmmu/" (v5.2.0) updated MAINTAINERS for all moved files but one. Fix that. Fixes: 800d4deda04be016a95fbbf397c830a2d14ff9f6 Signed-off-by: Markus Armbruster --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v8] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-20 Thread Stefano Stabellini
On Tue, 17 Jan 2023, Chuck Zmudzinski wrote: > On 1/17/2023 6:04 AM, Igor Mammedov wrote: > > On Mon, 16 Jan 2023 13:00:53 -0500 > > Chuck Zmudzinski wrote: > > > > > On 1/16/23 10:33, Igor Mammedov wrote: > > > > On Fri, 13 Jan 2023 16:31:26 -0500 > > > > Chuck Zmudzinski wrote: > > > > > >

Re: [PULL 0/5] tcg patch queue

2023-01-20 Thread Alex Bennée
Thomas Huth writes: > On 20/01/2023 11.53, Ilya Leoshkevich wrote: >> On Fri, 2023-01-20 at 10:41 +0100, Thomas Huth wrote: >>> On 16/01/2023 23.36, Richard Henderson wrote: The following changes since commit fb7e7990342e59cf67dbd895c1a1e3fb1741df7a:   

Re: [RFC] virtio-iommu: Take into account possible aliasing in virtio_iommu_mr()

2023-01-20 Thread Eric Auger
Hi Jean, Robin, On 1/20/23 17:23, Jean-Philippe Brucker wrote: > On Fri, Jan 20, 2023 at 03:50:18PM +, Robin Murphy wrote: >> On 2023-01-20 15:28, Jean-Philippe Brucker wrote: >> >> For some reason this came through as blank mail with a text attachment, > Ugh sorry about that, looks like I

Re: [PATCH v3 2/7] hw/acpi/acpi_dev_interface: Resolve AcpiDeviceIfClass::madt_cpu

2023-01-20 Thread Igor Mammedov
On Thu, 19 Jan 2023 14:47:41 + Bernhard Beschow wrote: > Am 18. Januar 2023 14:59:05 UTC schrieb Igor Mammedov : > >On Tue, 17 Jan 2023 00:30:23 + > >Bernhard Beschow wrote: > > > >> Am 16. Januar 2023 16:29:30 UTC schrieb Igor Mammedov > >> : > >> >On Mon, 16 Jan 2023 16:29:03

[PATCH] migration: Fix migration crash when target psize larger than host

2023-01-20 Thread Peter Xu
Commit d9e474ea56 overlooked the case where the target psize is even larger than the host psize. One example is Alpha has 8K page size and migration will start to crash the source QEMU when running Alpha migration on x86. Fix it by detecting that case and set host start/end just to cover the

Re: [RFC] virtio-iommu: Take into account possible aliasing in virtio_iommu_mr()

2023-01-20 Thread Jean-Philippe Brucker
On Fri, Jan 20, 2023 at 03:50:18PM +, Robin Murphy wrote: > On 2023-01-20 15:28, Jean-Philippe Brucker wrote: > > For some reason this came through as blank mail with a text attachment, Ugh sorry about that, looks like I hit ^D in mutt before sending > so apologies for the lack of quoting,

Re: [PULL 00/12] Header cleanup patches for 2023-01-20

2023-01-20 Thread Peter Maydell
On Fri, 20 Jan 2023 at 07:01, Markus Armbruster wrote: > > The following changes since commit 7ec8aeb6048018680c06fb9205c01ca6bda08846: > > Merge tag 'pull-tpm-2023-01-17-1' of > https://github.com/stefanberger/qemu-tpm into staging (2023-01-17 15:47:53 > +) > > are available in the Git

Re: [PATCH v8] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-20 Thread Igor Mammedov
On Tue, 17 Jan 2023 09:50:23 -0500 Chuck Zmudzinski wrote: > On 1/17/2023 5:35 AM, Igor Mammedov wrote: > > On Mon, 16 Jan 2023 13:00:53 -0500 > > Chuck Zmudzinski wrote: > > > > > On 1/16/23 10:33, Igor Mammedov wrote: > > > > On Fri, 13 Jan 2023 16:31:26 -0500 > > > > Chuck Zmudzinski

[PATCH v3 1/2] target/arm: implement DBGCLAIM registers

2023-01-20 Thread Evgeny Iakovlev
The architecture does not define any functionality for the CLAIM tag bits. So we will just keep the raw bits, as per spec. Signed-off-by: Evgeny Iakovlev Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/cpu.h | 1 + target/arm/debug_helper.c | 33

[PATCH v3 2/2] target/arm: provide stubs for more external debug registers

2023-01-20 Thread Evgeny Iakovlev
Qemu doesn't implement Debug Communication Channel, as well as the rest of external debug interface. However, Microsoft Hyper-V in tries to access some of those registers during an EL2 context switch. Since there is no architectural way to not advertise support for external debug, provide RAZ/WI

[PATCH v3 0/2] various aarch64 fixes for running Hyper-V on TCG

2023-01-20 Thread Evgeny Iakovlev
Small series of changes to aarch64 emulation to better support running Hyper-V as a TCG guest wtih EL3 firmware. v3: * Replaced raw_write fn with raw_write instead of a manual function v2: * DBGCLAIM now implements a (trivial) raw_write handler * Added comments around ignored external debug

[PATCH v3 2/5] hw/char/pl011: add post_load hook for backwards-compatibility

2023-01-20 Thread Evgeny Iakovlev
Previous change slightly modified the way we handle data writes when FIFO is disabled. Previously we kept incrementing read_pos and were storing data at that position, although we only have a single-register-deep FIFO now. Then we changed it to always store data at pos 0. If guest disables FIFO

[PATCH v3 1/5] hw/char/pl011: refactor FIFO depth handling code

2023-01-20 Thread Evgeny Iakovlev
PL011 can be in either of 2 modes depending guest config: FIFO and single register. The last mode could be viewed as a 1-element-deep FIFO. Current code open-codes a bunch of depth-dependent logic. Refactor FIFO depth handling code to isolate calculating current FIFO depth. One functional

[PATCH v3 3/5] hw/char/pl011: implement a reset method

2023-01-20 Thread Evgeny Iakovlev
PL011 currently lacks a reset method. Implement it. Signed-off-by: Evgeny Iakovlev --- hw/char/pl011.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/hw/char/pl011.c b/hw/char/pl011.c index 4df649a064..f9413f3703 100644 --- a/hw/char/pl011.c +++

[PATCH v3 5/5] hw/char/pl011: check if UART is enabled before RX or TX operation

2023-01-20 Thread Evgeny Iakovlev
UART should be enabled in general and have RX enabled specifically to be able to receive data from peripheral device. Same goes for transmitting data to peripheral device and a TXE flag. Check if UART CR register has EN and RXE or TXE bits enabled before trying to receive or transmit data.

[PATCH v3 0/5] Series of fixes for PL011 char device

2023-01-20 Thread Evgeny Iakovlev
v3: * Introduced a post_load hook for PL011State migration for backwards-compatibility due to some input state fragility. * No longer touching irq lines in reset method * Minor changes based on review feedback. v2: * Moved FIFO depth refactoring part of FIFO flags change into its own commit.

[PATCH v3 4/5] hw/char/pl011: better handling of FIFO flags on LCR reset

2023-01-20 Thread Evgeny Iakovlev
Current FIFO handling code does not reset RXFE/RXFF flags when guest resets FIFO by writing to UARTLCR register, although internal FIFO state is reset to 0 read count. Actual guest-visible flag update will happen only on next data read or write attempt. As a result of that any guest that expects

Re: [PATCH v8] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-20 Thread Igor Mammedov
On Tue, 17 Jan 2023 09:43:52 -0500 Chuck Zmudzinski wrote: > On 1/17/2023 5:35 AM, Igor Mammedov wrote: > > On Mon, 16 Jan 2023 13:00:53 -0500 > > Chuck Zmudzinski wrote: > > > > > On 1/16/23 10:33, Igor Mammedov wrote: > > > > On Fri, 13 Jan 2023 16:31:26 -0500 > > > > Chuck Zmudzinski

Re: [RFC] virtio-iommu: Take into account possible aliasing in virtio_iommu_mr()

2023-01-20 Thread Robin Murphy
On 2023-01-20 15:28, Jean-Philippe Brucker wrote: For some reason this came through as blank mail with a text attachment, so apologies for the lack of quoting, but for reference this is a long-standing known issue:

Re: virtio-iommu issue with VFIO device downstream to a PCIe-to-PCI bridge: VFIO devices are not assigned any iommu group

2023-01-20 Thread Jean-Philippe Brucker
On Wed, Jan 18, 2023 at 11:28:32AM -0700, Alex Williamson wrote: > The VT-d spec[2](8.3.1) has a more elegant solution using a path > described in a device scope, based on a root bus number (not > susceptible to OS renumbering) and a sequence of devfns to uniquely > describe a hierarchy or

Re: [RFC] virtio-iommu: Take into account possible aliasing in virtio_iommu_mr()

2023-01-20 Thread Jean-Philippe Brucker
Hi Eric, On Mon, Jan 16, 2023 at 07:47:09AM -0500, Eric Auger wrote: [...] > once we attempt to plug such devices downstream to the pcie-to-pci > bridge, those devices are put in a singleton group. The pcie-to-pci > bridge disappears from the radar (not attached to any group), and the > pcie root

[PATCH v1 2/2] target/riscv: redirect XVentanaCondOps to use the Zicond functions

2023-01-20 Thread Philipp Tomsich
The Zicond standard extension implements the same instruction semantics as XVentanaCondOps, although using different mnemonics and opcodes. Point XVentanaCondOps to the (newly implemented) Zicond implementation to reduce the future maintenance burden. Also updating MAINTAINERS as

[PATCH v1 1/2] target/riscv: add Zicond as an experimental extension

2023-01-20 Thread Philipp Tomsich
This implements the Zicond (conditional integer operations) extension, as of version 1.0-draft-20230120 as an experimental extension in QEMU ("x-zicond"). The Zicond extension acts as a building block for branchless sequences including conditional-{arithmetic,logic,select,mov

[PATCH v1] target/riscv: update disas.c for xnor/orn/andn and slli.uw

2023-01-20 Thread Philipp Tomsich
The decoding of the following instructions from Zb[abcs] currently contains decoding/printing errors: * xnor,orn,andn: the rs2 operand is not being printed * slli.uw: decodes and prints the immediate shift-amount as a register (e.g. 'shift-by-2' becomes 'sp') instead of

Re: [PATCH 2/2] Revert "vhost-user: Introduce nested event loop in vhost_user_read()"

2023-01-20 Thread Maxime Coquelin
On 1/19/23 18:24, Greg Kurz wrote: This reverts commit a7f523c7d114d445c5d83aecdba3efc038e5a692. The nested event loop is broken by design. It's only user was removed. Drop the code as well so that nobody ever tries to use it again. I had to fix a couple of trivial conflicts around return

Re: [PATCH v2 2/4] hw/char/pl011: implement a reset method

2023-01-20 Thread eiakovlev
On 1/20/23 12:45 PM, Peter Maydell wrote: On Thu, 19 Jan 2023 at 21:57, Evgeny Iakovlev wrote: > > > On 1/19/2023 14:27, Peter Maydell wrote: >> On Tue, 17 Jan 2023 at 22:05, Evgeny Iakovlev >> wrote: >>> PL011 currently lacks a reset method. Implement it. >>> >>> Signed-off-by: Evgeny

Re: [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()"

2023-01-20 Thread Maxime Coquelin
On 1/19/23 18:24, Greg Kurz wrote: This reverts commit db8a3772e300c1a656331a92da0785d81667dc81. Motivation : this is breaking vhost-user with DPDK as reported in [0]. Received unexpected msg type. Expected 22 received 40 Fail to update device iotlb Received unexpected msg type. Expected 40

Re: [PATCH 4/4] tests/tcg/multiarch: add vma-pthread.c

2023-01-20 Thread Peter Maydell
On Fri, 13 Jan 2023 at 17:10, Alex Bennée wrote: > > > Peter Maydell writes: > > > On Sat, 24 Dec 2022 at 15:19, Richard Henderson > > wrote: > >> > >> From: Ilya Leoshkevich > >> > >> Add a test that locklessly changes and exercises page protection bits > >> from various threads. This helps

proposed 8.0 cycle freeze/release dates

2023-01-20 Thread Peter Maydell
Here's my proposal for 8.0 cycle freeze and release dates: https://wiki.qemu.org/Planning/8.0 2022-12-14 : Beginning of development phase 2022-03-07 : Soft feature freeze. Only bug fixes after this point. All feature changes must be already in a sub maintainer tree and

Re: [PATCH v4 1/3] memory: prevent dma-reentracy issues

2023-01-20 Thread Peter Maydell
On Fri, 20 Jan 2023 at 14:42, Darren Kenny wrote: > Generally, this looks good, but I do have a comment below... > > On Thursday, 2023-01-19 at 02:00:02 -05, Alexander Bulekov wrote: > > Add a flag to the DeviceState, when a device is engaged in PIO/MMIO/DMA. > > This flag is set/checked prior to

Re: [PATCH v4 1/3] memory: prevent dma-reentracy issues

2023-01-20 Thread Darren Kenny
Hi Alex, Generally, this looks good, but I do have a comment below... On Thursday, 2023-01-19 at 02:00:02 -05, Alexander Bulekov wrote: > Add a flag to the DeviceState, when a device is engaged in PIO/MMIO/DMA. > This flag is set/checked prior to calling a device's MemoryRegion > handlers, and

Re: [PATCH v14 06/11] s390x/cpu topology: interception of PTF instruction

2023-01-20 Thread Pierre Morel
On 1/16/23 19:24, Nina Schoetterl-Glausch wrote: On Thu, 2023-01-05 at 15:53 +0100, Pierre Morel wrote: When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervizor activates the interpretation by

[PATCH v2 7/7] hw/mem/cxl_type3: Add CXL RAS Error Injection Support

2023-01-20 Thread Jonathan Cameron via
CXL uses PCI AER Internal errors to signal to the host that an error has occurred. The host can then read more detailed status from the CXL RAS capability. For uncorrectable errors: support multiple injection in one operation as this is needed to reliably test multiple header logging support in

[PATCH v2 6/7] hw/pci/aer: Make PCIE AER error injection facility available for other emulation to use.

2023-01-20 Thread Jonathan Cameron via
This infrastructure will be reused for CXL RAS error injection in patches that follow. Signed-off-by: Jonathan Cameron --- hw/pci/pci-internal.h | 1 - include/hw/pci/pcie_aer.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pci-internal.h b/hw/pci/pci-internal.h

[PATCH v2 5/7] hw/mem/cxl-type3: Add AER extended capability

2023-01-20 Thread Jonathan Cameron via
This enables AER error injection to function as expected. It is intended as a building block in enabling CXL RAS error injection in the following patches. Signed-off-by: Jonathan Cameron --- hw/mem/cxl_type3.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/mem/cxl_type3.c

[PATCH v2 4/7] hw/pci-bridge/cxl_root_port: Wire up MSI

2023-01-20 Thread Jonathan Cameron via
Done to avoid fixing ACPI route description of traditional PCI interrupts on q35 and because we should probably move with the times anyway. Signed-off-by: Jonathan Cameron --- hw/pci-bridge/cxl_root_port.c | 61 +++ 1 file changed, 61 insertions(+) diff --git

[PATCH v2 3/7] hw/pci-bridge/cxl_root_port: Wire up AER

2023-01-20 Thread Jonathan Cameron via
We are missing necessary config write handling for AER emulation in the CXL root port. Add it based on pcie_root_port.c Signed-off-by: Jonathan Cameron --- hw/pci-bridge/cxl_root_port.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/pci-bridge/cxl_root_port.c

Re: [PATCH v2 1/2] tests/avocado: Factor file_truncate() helper out

2023-01-20 Thread Cédric Le Goater
On 1/20/23 14:43, Philippe Mathieu-Daudé wrote: Factor file_truncate() helper out of image_pow2ceil_expand() for reuse. Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/boot_linux_console.py | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git

[PATCH v2 2/7] hw/pci/aer: Add missing routing for AER errors

2023-01-20 Thread Jonathan Cameron via
PCIe r6.0 Figure 6-3 "Pseudo Logic Diagram for Selected Error Message Control and Status Bits" includes a right hand branch under "All PCI Express devices" that allows for messages to be generated or sent onwards without SERR# being set as long as the appropriate per error class bit in the PCIe

[PATCH v2 1/7] hw/pci/aer: Implement PCI_ERR_UNCOR_MASK register

2023-01-20 Thread Jonathan Cameron via
This register in AER should be both writeable and should have a default value with a couple of the errors masked including the Uncorrectable Internal Error used by CXL for it's error reporting. Signed-off-by: Jonathan Cameron --- hw/pci/pcie_aer.c | 4 include/hw/pci/pcie_regs.h |

[PATCH v2 0/7] hw/cxl: RAS error emulation and injection

2023-01-20 Thread Jonathan Cameron via
v2: Thanks to Mike Maslenkin for review. - Fix wrong parameter type to ct3d_qmp_cor_err_to_cxl() - Rework use of CXLError local variable in ct3d_reg_write() to improve code readability. CXL error reporting is complex. This series only covers the protocol related errors reported via PCIE AER -

Re: [PATCH v14 10/11] qapi/s390/cpu topology: POLARITY_CHANGE qapi event

2023-01-20 Thread Pierre Morel
On 1/20/23 12:56, Thomas Huth wrote: On 18/01/2023 18.09, Pierre Morel wrote: On 1/12/23 12:52, Thomas Huth wrote: On 05/01/2023 15.53, Pierre Morel wrote: ...>>> +# OK +# Emitted when the guest asks to change the polarity. +# +# @polarity: polarity specified by the guest Please

Re: [PATCH v2 01/12] block: Improve empty format-specific info dump

2023-01-20 Thread Kevin Wolf
Am 20.01.2023 um 14:35 hat Hanna Czenczek geschrieben: > On 19.01.23 15:00, Kevin Wolf wrote: > > Am 20.06.2022 um 18:26 hat Hanna Reitz geschrieben: > > > When a block driver supports obtaining format-specific information, but > > > that object only contains optional fields, it is possible that

[PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case

2023-01-20 Thread Greg Kurz
The nested event loop was introduced in QEMU 6.0 to allow servicing of requests coming from the slave channel while waiting for an ack from the back-end on the master socket. It turns out this is fragile and breaks if the servicing of the slave channel causes a new message to be sent on the master

Re: [PATCH] vhost-user-fs: add capability to allow migration

2023-01-20 Thread Michael S. Tsirkin
On Thu, Jan 19, 2023 at 03:45:06PM +0200, Anton Kuchin wrote: > On 19/01/2023 14:51, Michael S. Tsirkin wrote: > > On Sun, Jan 15, 2023 at 07:09:03PM +0200, Anton Kuchin wrote: > > > Now any vhost-user-fs device makes VM unmigratable, that also prevents > > > qemu update without stopping the VM.

Re: MSYS2 and libfdt

2023-01-20 Thread Marc-André Lureau
Hi Thomas On Fri, Jan 20, 2023 at 12:31 PM Thomas Huth wrote: > > On 19/01/2023 09.56, Marc-André Lureau wrote: > > Hi > > > > On Thu, Jan 19, 2023 at 12:31 PM Thomas Huth wrote: > >> > >> > >>Hi all, > >> > >> in some spare minutes, I started playing with a patch to try to remove the > >>

[PATCH 3/4] backends/hostmem: add an ability to specify prealloc timeout

2023-01-20 Thread Daniil Tatianin
Use the new qemu_prealloc_mem_with_timeout api so that we can limit the maximum amount of time to be spent preallocating guest RAM. We also emit a warning from the timeout handler detailing the current prealloc progress and letting the user know that it was exceeded. The timeout is set to zero

[PATCH 2/4] backends/hostmem: move memory region preallocation logic into a helper

2023-01-20 Thread Daniil Tatianin
...so that we don't have to duplicate it in multiple places throughout the file. Signed-off-by: Daniil Tatianin --- backends/hostmem.c | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/backends/hostmem.c b/backends/hostmem.c index

[PATCH v0 0/4] backends/hostmem: add an ability to specify prealloc timeout

2023-01-20 Thread Daniil Tatianin
This series introduces new qemu_prealloc_mem_with_timeout() api, which allows limiting the maximum amount of time to be spent on memory preallocation. It also adds prealloc statistics collection that is exposed via an optional timeout handler. This new api is then utilized by hostmem for guest

[PATCH 4/4] backends/hostmem: add an ability to make prealloc timeout fatal

2023-01-20 Thread Daniil Tatianin
This is controlled via the new 'prealloc-timeout-fatal' property and can be useful for cases when we cannot afford to not preallocate all guest pages while being time constrained. Signed-off-by: Daniil Tatianin --- backends/hostmem.c | 38 ++

[PATCH 1/4] oslib: introduce new qemu_prealloc_mem_with_timeout() api

2023-01-20 Thread Daniil Tatianin
This helper allows limiting the maximum amount time to be spent preallocating a block of memory, which is important on systems that might have unpredictable page allocation delays because of possible fragmentation or other reasons specific to the backend. It also exposes a way to register a

Re: [PATCH v2 00/12] qemu-img info: Show protocol-level information

2023-01-20 Thread Hanna Czenczek
On 19.01.23 21:12, Kevin Wolf wrote: Am 08.12.2022 um 13:24 hat Hanna Reitz geschrieben: On 20.06.22 18:26, Hanna Reitz wrote: Hi, This series is a v2 to: https://lists.nongnu.org/archive/html/qemu-block/2022-05/msg00042.html Ping, it looks like this still applies (to the master branch and

[PATCH v2 1/2] tests/avocado: Factor file_truncate() helper out

2023-01-20 Thread Philippe Mathieu-Daudé
Factor file_truncate() helper out of image_pow2ceil_expand() for reuse. Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/boot_linux_console.py | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/avocado/boot_linux_console.py

  1   2   3   >