[PATCH v3 0/1] Clean up includes

2023-01-12 Thread Markus Armbruster
Back in 2016, we discussed[1] rules for headers, and these were generally liked: 1. Have a carefully curated header that's included everywhere first. We got that already thanks to Peter: osdep.h. 2. Headers should normally include everything they need beyond osdep.h. If exceptions are need

[PATCH v3 1/1] include: Don't include qemu/osdep.h

2023-01-12 Thread Markus Armbruster
docs/devel/style.rst mandates: The "qemu/osdep.h" header contains preprocessor macros that affect the behavior of core system headers like . It must be the first include so that core system headers included by external libraries get the preprocessor macros that QEMU depends on.

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

2023-01-12 Thread Thomas Huth
On 05/01/2023 15.53, Pierre Morel wrote: When the guest asks to change the polarity this change is forwarded to the admin using QAPI. The admin is supposed to take according decisions concerning CPU provisioning. I somehow doubt that an average admin will monitor QEMU for such events ... so th

Re: qemu-system-i386 and general protection

2023-01-12 Thread Alex Bennée
He Zhe writes: (Cc: Paolo) > Hi All, > > We are experiencing a general protection fault with qemu-system-i386 as > follow. > This can be reproduced with kernel v5.15 and latest v6.2-rc3 as we found so > far. > > It would work well if we reverted the commit > 2f8a21d8ff3af484a37edc8ea61d127ec

Re: [PATCH-for-8.0] softmmu: Extract watchpoint API from physmem.c

2023-01-12 Thread Philippe Mathieu-Daudé
ping? On 9/12/22 15:12, Philippe Mathieu-Daudé wrote: The watchpoint API is specific to TCG system emulation. Move it to a new compile unit. The inlined stubs are used for user-mode and non-TCG accelerators. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + include/h

Re: [PATCH v14 11/11] docs/s390x/cpu topology: document s390x cpu topology

2023-01-12 Thread Daniel P . Berrangé
On Thu, Jan 05, 2023 at 03:53:13PM +0100, Pierre Morel wrote: > Add some basic examples for the definition of cpu topology > in s390x. > > Signed-off-by: Pierre Morel > --- > docs/system/s390x/cpu-topology.rst | 292 + > docs/system/target-s390x.rst | 1 + > 2

Re: [PATCH v2] scripts/archive-source: Use GNU tar on Darwin

2023-01-12 Thread Philippe Mathieu-Daudé
ping? On 9/12/22 12:33, Philippe Mathieu-Daudé wrote: When using the archive-source.sh script on Darwin we get: tar: Option --concatenate is not supported Usage: List:tar -tf Extract: tar -xf Create: tar -cf [filenames...] Help:tar --help 'tar' default to

Re: [PATCH-for-8.0] block/nbd: Add missing include

2023-01-12 Thread Philippe Mathieu-Daudé
Hi, can this reviewed patch get merged via a block tree? On 25/11/22 18:53, Philippe Mathieu-Daudé wrote: The inlined nbd_readXX() functions call beXX_to_cpu(), themselves declared in . This fixes when refactoring: In file included from ../../block/nbd.c:44: include/block/nbd.h: In functi

Re: [PATCH 25/26] tcg: exclude lookup_tb_ptr from helper instrumentation

2023-01-12 Thread Alex Bennée
Alex Bennée writes: > Richard Henderson writes: > >> On 1/10/23 09:39, Alex Bennée wrote: >>> From: Emilio Cota >>> It is internal to TCG and therefore we know it does not >>> access guest memory. >>> Related: #1381 >>> Signed-off-by: Emilio Cota >>> Message-Id: <20230108164731.61469-4-c...@

Re: [PATCH v14 08/11] qapi/s390/cpu topology: change-topology monitor command

2023-01-12 Thread Daniel P . Berrangé
On Thu, Jan 05, 2023 at 03:53:10PM +0100, Pierre Morel wrote: > The modification of the CPU attributes are done through a monitor > commands. > > It allows to move the core inside the topology tree to optimise > the cache usage in the case the host's hypervizor previously > moved the CPU. > > The

Re: [PATCH] virtio-rng-pci: fix migration compat for vectors

2023-01-12 Thread Philippe Mathieu-Daudé
On 9/1/23 11:58, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Fixup the migration compatibility for existing machine types so that they do not enable msi-x. Symptom: (qemu) qemu: get_pci_config_device: Bad config data: i=0x34 read: 84 device: 98 cmask: ff wmask: 0 w1cma

Re: [PATCH v2] scripts/archive-source: Use GNU tar on Darwin

2023-01-12 Thread Thomas Huth
On 12/01/2023 12.58, Philippe Mathieu-Daudé wrote: ping? Who's supposed to take this? On 9/12/22 12:33, Philippe Mathieu-Daudé wrote: When using the archive-source.sh script on Darwin we get:    tar: Option --concatenate is not supported    Usage: List:    tar -tf Extract: tar -x

Re: [PATCH v14 09/11] qapi/s390/cpu topology: monitor query topology information

2023-01-12 Thread Daniel P . Berrangé
On Thu, Jan 05, 2023 at 03:53:11PM +0100, Pierre Morel wrote: > Reporting the current topology informations to the admin through > the QEMU monitor. > > Signed-off-by: Pierre Morel > --- > qapi/machine-target.json | 66 ++ > include/monitor/hmp.h| 1 + > hw/s

Re: [PATCH v2] scripts/archive-source: Use GNU tar on Darwin

2023-01-12 Thread Daniel P . Berrangé
On Thu, Jan 12, 2023 at 01:07:08PM +0100, Thomas Huth wrote: > On 12/01/2023 12.58, Philippe Mathieu-Daudé wrote: > > ping? > > Who's supposed to take this? > > > On 9/12/22 12:33, Philippe Mathieu-Daudé wrote: > > > When using the archive-source.sh script on Darwin we get: > > > > > >    tar: O

Re: [PATCH v2] scripts/archive-source: Use GNU tar on Darwin

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 13:07, Thomas Huth wrote: On 12/01/2023 12.58, Philippe Mathieu-Daudé wrote: ping? Who's supposed to take this? Alex Bennée? I'll precise in v3. On 9/12/22 12:33, Philippe Mathieu-Daudé wrote: When using the archive-source.sh script on Darwin we get:    tar: Option --concatena

Re: [PATCH 04/26] tests/unit: drop hacky race avoidance in test-io-channel-command

2023-01-12 Thread Thomas Huth
On 10/01/2023 18.39, Alex Bennée wrote: We don't need to play timing games to ensure one socat wins over the other, just create the fifo they both can use before spawning the processes. However in the process we need to disable two tests for Windows platforms as we don't have an abstraction for m

Re: [PATCH v4 3/3] block/rbd: Add support for layered encryption

2023-01-12 Thread Ilya Dryomov
On Sun, Nov 20, 2022 at 11:28 AM Or Ozeri wrote: > > Starting from ceph Reef, RBD has built-in support for layered encryption, > where each ancestor image (in a cloned image setting) can be possibly > encrypted using a unique passphrase. > > A new function, rbd_encryption_load2, was added to librb

Re: [PATCH v4 1/3] block/rbd: encryption nit fixes

2023-01-12 Thread Daniel P . Berrangé
On Sun, Nov 20, 2022 at 04:28:34AM -0600, Or Ozeri wrote: > Add const modifier to passphrases, > and remove redundant stack variable passphrase_len. > > Signed-off-by: Or Ozeri > --- > block/rbd.c | 24 ++-- > 1 file changed, 10 insertions(+), 14 deletions(-) > > diff --git

Re: [PATCH v6 10/33] hw/intc/i8259: Introduce i8259 proxy TYPE_ISA_PIC

2023-01-12 Thread Philippe Mathieu-Daudé
On 9/1/23 18:23, Bernhard Beschow wrote: Having an i8259 proxy allows for ISA PICs to be created and wired up in southbridges. This is especially interesting for PIIX3 for two reasons: First, the southbridge doesn't need to care about the virtualization technology used (KVM, TCG, Xen) due to in-I

Re: [PATCH v6 09/33] hw/intc/i8259: Make using the isa_pic singleton more type-safe

2023-01-12 Thread Philippe Mathieu-Daudé
On 9/1/23 18:23, Bernhard Beschow wrote: This even spares some casts in hot code paths along the way. Signed-off-by: Bernhard Beschow Reviewed-by: Michael S. Tsirkin Reviewed-by: Mark Cave-Ayland --- Note: The next patch will introduce a class "isa-pic", which is shall not be confused with th

Re: [PATCH v4 2/3] block/rbd: Add luks-any encryption opening option

2023-01-12 Thread Daniel P . Berrangé
On Sun, Nov 20, 2022 at 04:28:35AM -0600, Or Ozeri wrote: > Ceph RBD encryption API required specifying the encryption format > for loading encryption. The supported formats were LUKS (v1) and LUKS2. > > Starting from Reef release, RBD also supports loading with "luks-any" format, > which works fo

Re: [PATCH v6 13/33] hw/i386/pc_piix: Allow for setting properties before realizing PIIX3 south bridge

2023-01-12 Thread Philippe Mathieu-Daudé
On 9/1/23 18:23, Bernhard Beschow wrote: The next patches will need to take advantage of it. Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell Reviewed-by: Michael S. Tsirkin Message-Id: <20221022150508.26830-3-shen...@gmail.com> --- hw/i386/pc_piix.c | 3 ++- 1 file changed, 2 in

Re: [PATCH v6 14/33] hw/isa/piix3: Create USB controller in host device

2023-01-12 Thread Philippe Mathieu-Daudé
On 9/1/23 18:23, Bernhard Beschow wrote: The USB controller is an integral part of PIIX3 (function 2). So create it as part of the south bridge. Note that the USB function is optional in QEMU. This is why it gets object_initialize_child()'ed in realize rather than in instance_init. Signed-off-b

Re: [PATCH v6 15/33] hw/isa/piix3: Create power management controller in host device

2023-01-12 Thread Philippe Mathieu-Daudé
On 9/1/23 18:23, Bernhard Beschow wrote: The power management controller is an integral part of PIIX3 (function 3). So create it as part of the south bridge. Note that the ACPI function is optional in QEMU. This is why it gets object_initialize_child()'ed in realize rather than in instance_init.

Re: [PATCH v6 22/33] hw/isa/piix3: Drop the "3" from PIIX base class

2023-01-12 Thread Philippe Mathieu-Daudé
On 9/1/23 18:23, Bernhard Beschow wrote: This commit marks the finalization of the PIIX3 preparations to be merged with PIIX4. In particular, PIIXState is prepared to be reused in piix4.c. Signed-off-by: Bernhard Beschow Reviewed-by: Michael S. Tsirkin Message-Id: <20221022150508.26830-25-shen

Re: [PATCH v4 3/3] block/rbd: Add support for layered encryption

2023-01-12 Thread Daniel P . Berrangé
On Sun, Nov 20, 2022 at 04:28:36AM -0600, Or Ozeri wrote: > Starting from ceph Reef, RBD has built-in support for layered encryption, > where each ancestor image (in a cloned image setting) can be possibly > encrypted using a unique passphrase. > > A new function, rbd_encryption_load2, was added t

Re: [PATCH v6 28/33] hw/isa/piix3: Merge hw/isa/piix4.c

2023-01-12 Thread Philippe Mathieu-Daudé
On 9/1/23 18:23, Bernhard Beschow wrote: Now that the PIIX3 and PIIX4 device models are sufficiently consolidated, their implementations can be merged into one file for further consolidation. Signed-off-by: Bernhard Beschow Reviewed-by: Michael S. Tsirkin Message-Id: <20221022150508.26830-37-s

Re: [PATCH v6 30/33] hw/isa/piix: Reuse PIIX3 base class' realize method in PIIX4

2023-01-12 Thread Philippe Mathieu-Daudé
On 9/1/23 18:23, Bernhard Beschow wrote: Resolves duplicate code. Signed-off-by: Bernhard Beschow Reviewed-by: Michael S. Tsirkin Message-Id: <20221022150508.26830-39-shen...@gmail.com> --- hw/isa/piix.c | 65 +++ 1 file changed, 9 insertions(

RE: [PATCH v4 3/3] block/rbd: Add support for layered encryption

2023-01-12 Thread Or Ozeri
> -Original Message- > From: Daniel P. Berrangé > Sent: Thursday, 12 January 2023 14:50 > To: Or Ozeri > Cc: qemu-devel@nongnu.org; qemu-bl...@nongnu.org; Danny Harnik > ; idryo...@gmail.com > Subject: [EXTERNAL] Re: [PATCH v4 3/3] block/rbd: Add support for layered > encryption > > I do

Re: [PATCH] remove unnecessary extern "C" blocks

2023-01-12 Thread David Woodhouse
On Tue, 2023-01-10 at 09:49 +0100, Paolo Bonzini wrote: > A handful of header files in QEMU are wrapped with extern "C" blocks. > These are not necessary: there are C++ source files anymore in QEMU, > and even where there were some, they did not include most of these > files anyway. > > Remove the

completion timeouts with pin-based interrupts in QEMU hw/nvme

2023-01-12 Thread Klaus Jensen
Hi all (linux-nvme, qemu-devel, maintainers), On QEMU riscv64, which does not use MSI/MSI-X and thus relies on pin-based interrupts, I'm seeing occasional completion timeouts, i.e. nvme nvme0: I/O 333 QID 1 timeout, completion polled To rule out issues with shadow doorbells (which have been a

Re: [PATCH] remove unnecessary extern "C" blocks

2023-01-12 Thread Peter Maydell
On Thu, 12 Jan 2023 at 13:10, David Woodhouse wrote: > > On Tue, 2023-01-10 at 09:49 +0100, Paolo Bonzini wrote: > > A handful of header files in QEMU are wrapped with extern "C" blocks. > > These are not necessary: there are C++ source files anymore in QEMU, > > and even where there were some, th

Re: [PATCH v4 3/3] block/rbd: Add support for layered encryption

2023-01-12 Thread Daniel P . Berrangé
On Thu, Jan 12, 2023 at 01:06:51PM +, Or Ozeri wrote: > > -Original Message- > > From: Daniel P. Berrangé > > Sent: Thursday, 12 January 2023 14:50 > > To: Or Ozeri > > Cc: qemu-devel@nongnu.org; qemu-bl...@nongnu.org; Danny Harnik > > ; idryo...@gmail.com > > Subject: [EXTERNAL] Re:

Re: [PATCH] remove unnecessary extern "C" blocks

2023-01-12 Thread Daniel P . Berrangé
On Thu, Jan 12, 2023 at 01:10:13PM +, David Woodhouse wrote: > On Tue, 2023-01-10 at 09:49 +0100, Paolo Bonzini wrote: > > A handful of header files in QEMU are wrapped with extern "C" blocks. > > These are not necessary: there are C++ source files anymore in QEMU, > > and even where there were

Re: [PATCH v5 10/11] hw/riscv/boot.c: consolidate all kernel init in riscv_load_kernel()

2023-01-12 Thread Daniel Henrique Barboza
On 1/11/23 21:34, Alistair Francis wrote: On Mon, Jan 2, 2023 at 9:55 PM Daniel Henrique Barboza wrote: The microchip_icicle_kit, sifive_u, spike and virt boards are now doing the same steps when '-kernel' is used: - execute load_kernel() - load init_rd() - write kernel_cmdline Let's fold

Re: [PATCH v6 28/33] hw/isa/piix3: Merge hw/isa/piix4.c

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 13:50, Philippe Mathieu-Daudé wrote: On 9/1/23 18:23, Bernhard Beschow wrote: Now that the PIIX3 and PIIX4 device models are sufficiently consolidated, their implementations can be merged into one file for further consolidation. Signed-off-by: Bernhard Beschow Reviewed-by: Michael S

[PULL v2 00/29] Misc patches for 2023-01-10

2023-01-12 Thread Paolo Bonzini
The following changes since commit aa96ab7c9df59c615ca82b49c9062819e0a1c287: Merge tag 'pull-request-2023-01-09' of https://gitlab.com/thuth/qemu into staging (2023-01-09 15:54:31 +) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you t

[PULL v2 14/29] enforce use of G_GNUC_PRINTF attributes

2023-01-12 Thread Paolo Bonzini
From: Daniel P. Berrangé We've been very gradually adding G_GNUC_PRINTF annotations to functions over years. This has been useful in detecting certain malformed printf strings, or cases where we pass user data as the printf format which is a potential security flaw. Given the inherant memory cor

[PULL v2 06/29] target/i386: Remove compilation errors when -Werror=maybe-uninitialized

2023-01-12 Thread Paolo Bonzini
From: Eric Auger To avoid compilation errors when -Werror=maybe-uninitialized is used, add a default case with g_assert_not_reached(). Otherwise with GCC 11.3.1 "cc (GCC) 11.3.1 20220421 (Red Hat 11.3.1-2)" we get: ../target/i386/ops_sse.h: In function ‘helper_vpermdq_ymm’: ../target/i386/ops_s

[PATCH 4/7] hw/arm: Move various units to softmmu_ss[]

2023-01-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé arm_ss[] units are built twice: once for 32-bit word size and once for 64-bit. The following units don't require any word size knowledge and can be moved to softmmu_ss[] (where they are built once): - smmu-common.c - exynos4_boards.c - bcm2835_peripherals.c - tos

[PATCH 0/7] Trivial: Mark some more files as target-independant

2023-01-12 Thread Thomas Huth
Here's a collection of low-hanging fruits to mark some more files as target-independent (so that they do not have to be compiled twice, once for qemu-system-arm and once for qemu-system-aarch64). Philippe's patches have been on the list before, but I slightly modified some of them (like fixing typ

[PATCH 1/7] hw/display: Move omap_lcdc.c out of target-specific source set

2023-01-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé While only used by the ARM targets, this device can be built once for all. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221209170042.71169-2-phi...@linaro.org> Signed-off-by: Thomas Huth --- hw/display/meson.build | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 6/7] hw/intc: Mark more interrupt-controller files as target independent

2023-01-12 Thread Thomas Huth
Seems like there is also nothing target-specific in here, so these files can be moved to softmmu_ss to avoid that they get compiled twice (once for qemu-system-arm and once for qemu-system-aarch64). Signed-off-by: Thomas Huth --- hw/intc/meson.build | 8 1 file changed, 4 insertions(+),

[PATCH 5/7] hw/cpu: Mark arm11 and realview mpcore as target-independent code

2023-01-12 Thread Thomas Huth
Seems like there is nothing target-specific in here, so these files can be moved to softmmu_ss to avoid that they get compiled twice (once for qemu-system-arm and once for qemu-system-aarch64). Signed-off-by: Thomas Huth --- hw/cpu/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletio

[PATCH 3/7] hw/tpm: Move tpm_ppi.c out of target-specific source set

2023-01-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé The TPM Physical Presence Interface is not target specific. Build this file once for all targets. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221209170042.71169-4-phi...@linaro.org> [thuth: Drop the CONFIG_SOFTMMU statements, they are not needed here] Signe

[PATCH 7/7] hw/usb: Mark the XLNX_VERSAL-related files as target-independent

2023-01-12 Thread Thomas Huth
Seems like there is nothing target-specific in here, so these files can be moved to softmmu_ss to avoid that they get compiled twice (once for qemu-system-arm and once for qemu-system-aarch64). Signed-off-by: Thomas Huth --- hw/usb/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletio

[PATCH 2/7] hw/intc: Move some files out of the target-specific source set

2023-01-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé The Goldfish interrupt controller is not target specific. While the Exynos interrupt combiner is only used by the ARM targets, we can build this device once for all. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221209170042.71169-3-phi...@linaro.org> [thuth

Re: [PATCH v3 1/1] include: Don't include qemu/osdep.h

2023-01-12 Thread Michael S. Tsirkin
On Thu, Jan 12, 2023 at 12:50:05PM +0100, Markus Armbruster wrote: > docs/devel/style.rst mandates: > > The "qemu/osdep.h" header contains preprocessor macros that affect > the behavior of core system headers like . It must be > the first include so that core system headers included b

Re: [PULL 0/6] hw/nvme updates

2023-01-12 Thread Peter Maydell
On Wed, 11 Jan 2023 at 07:52, Klaus Jensen wrote: > > From: Klaus Jensen > > Hi Peter, > > The following changes since commit 528d9f33cad5245c1099d77084c78bb2244d5143: > > Merge tag 'pull-tcg-20230106' of https://gitlab.com/rth7680/qemu into > staging (2023-01-08 11:23:17 +) > > are availa

[PATCH 17/40] tests: acpi: whitelist DSDT before refactoring acpi based PCI hotplug machinery

2023-01-12 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..dea61d94f1 100644 --- a/tests/qtest/bios-tables-test-allowe

[PATCH 07/40] pci_bridge: remove whitespace

2023-01-12 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/pci-bridge/pci_bridge_dev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c index 3435df8d73..4b2696ea7f 100644 --- a/hw/pci-bridge/pci_bridge_dev.c +++ b/hw/pci-bridge/pci_bridge_dev.c @@ -186,

Re: [PATCH v4] riscv: Allow user to set the satp mode

2023-01-12 Thread Alexandre Ghiti
Hey Andrew, Sorry about the response delay, I was traveling. On Fri, Jan 6, 2023 at 4:30 PM Andrew Jones wrote: > > On Mon, Dec 12, 2022 at 11:22:50AM +0100, Alexandre Ghiti wrote: > > RISC-V specifies multiple sizes for addressable memory and Linux probes for > > the machine's support at startu

[PATCH 05/40] tests: acpi: update expected blobs

2023-01-12 Thread Igor Mammedov
add extra nested bridges/root ports to blobs so it would be posible to check how follow up patches would affect it. Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 4 tests/data/acpi/pc/DSDT.bridge | Bin 9532 -> 12608 bytes tests/data/acpi/pc/D

Re: [PATCH v3 1/1] include: Don't include qemu/osdep.h

2023-01-12 Thread Michael S. Tsirkin
On Thu, Jan 12, 2023 at 08:51:32AM -0500, Michael S. Tsirkin wrote: > On Thu, Jan 12, 2023 at 12:50:05PM +0100, Markus Armbruster wrote: > > docs/devel/style.rst mandates: > > > > The "qemu/osdep.h" header contains preprocessor macros that affect > > the behavior of core system headers lik

[PATCH 15/40] tests: boot_sector_test(): make it multi-shot

2023-01-12 Thread Igor Mammedov
if the function is called the 2nd time within the same qtest session, it will prematurely return before boot sector is executed due to remaining signature. Follow up patch will add VM reboot to a test case and will call boot_sector_test() again within the same qtest env, which may lead to above is

[PATCH 10/40] pcihp: piix4: do not call acpi_pcihp_reset() when ACPI PCI hotplug is disabled

2023-01-12 Thread Igor Mammedov
piix4_pm_reset() is calling acpi_pcihp_reset() when ACPI PCI hotplug is disabled, which leads to assigning BSEL properties to bridges on path acpi_set_bsel() ... if (qbus_is_hotpluggable(BUS(bus))) { // above happens to be true by default (though it's SHPC hotplug handle

[PATCH 20/40] tests: acpi: whitelist DSDT before refactoring acpi based PCI hotplug machinery

2023-01-12 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 36 + 1 file changed, 36 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..4be20b2cd1 100644 --- a/tests/qtest/

[PATCH 40/40] tests: acpi: update expected blobs

2023-01-12 Thread Igor Mammedov
Expected change removal of dynamic _DSM AML for non-hotpluggable hots-bridge, storage, isa bridge devices from PC machine blobs: -Scope (S00) -{ -Name (ASUN, Zero) -Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method -

[PATCH 26/40] tests: acpi: update expected blobs

2023-01-12 Thread Igor Mammedov
previous commit added endpoint devices to bridge testcases, which exposes extra non-hotpluggable slot in DSDT on bus where hotplug is not available. It should look like this (numbers may vary): +Device (S28) +{ +Name (_ADR, 0x0005) // _ADR: Address +

[PATCH 06/40] tests: acpi: cleanup use_uefi argument usage

2023-01-12 Thread Igor Mammedov
'use_uefi' is used for the flag is a part of 'test_data *data' argument that is passed to the same functions, which makes use_uefi argument redundant. Drop it and use 'data::uefi_*' directly, instead. Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 35 +++--

[PATCH 34/40] tests: acpi: update expected blobs

2023-01-12 Thread Igor Mammedov
Expected change for non-populated slots is that thay are moved after non-hotpluggable PCI tree description. And expected change for hotplug capable populated slots is: - ... +Name (BSEL, 0x03) +Scope (S00) +{ +Name (ASUN

[PATCH 08/40] x86: acpi: pcihp: clean up duplicate bridge_in_acpi assignment

2023-01-12 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 127c4e2d50..8a35c3cad0 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -466,7 +466,6 @@ static void build_append_pci_bus_devic

[PATCH 02/40] tests: acpi: cleanup arguments to make them more readable

2023-01-12 Thread Igor Mammedov
no functional change Signed-off-by: Igor Mammedov --- CC: Thomas Huth CC: Laurent Vivier --- tests/qtest/bios-tables-test.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 8608408213..

[PATCH 33/40] pcihp: acpi: decouple hotplug and generic slots description

2023-01-12 Thread Igor Mammedov
Split build_append_pci_bus_devices() onto generic part that builds AML descriptions only for populated slots which is applicable to both hotplug disabled and enabled bridges. And a hotplug only part that complements generic AML with hotplug depended bits (that depend on BSEL), like _SUN/_EJ0 entrie

[PATCH 37/40] tests: acpi: update expected blobs

2023-01-12 Thread Igor Mammedov
expected change is removal of dynamic _DSM bits from slots populated by coldplugged bridges (something like): -Scope (S18) -{ -Name (ASUN, 0x03) -Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method -

[PATCH 24/40] whitelist DSDT before adding endpoint devices to bridge testcases

2023-01-12 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 4 1 file changed, 4 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..571f14fd59 100644 --- a/tests/qtest/bios-tables-test-al

[PATCH 04/40] tests: acpi: extend pcihp with nested bridges

2023-01-12 Thread Igor Mammedov
add nested bridges/root-ports to pcihp tests, to make sure follow up patches don't break nested enumeration of bridges in DSDT. Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/qtest/bios-

Re: [PATCH v2 0/7] target/arm: Introduce aarch64_set_svcr

2023-01-12 Thread Fabiano Rosas
Philippe Mathieu-Daudé writes: > This is a respin of Richard's patch > https://lore.kernel.org/qemu-devel/20230112004322.161330-1-richard.hender...@linaro.org/ > but split in multiple trivial changes, as I was having hard > time to understand all changes at once while reviewing it. > > Richard He

[PATCH 31/40] pcihp: isolate rule whether slot should be described in DSDT

2023-01-12 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 83 +++- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 5b4f453395..56a4d0549c 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-bu

[PATCH 13/40] tests: boot_sector_test: avoid crashing if status is not available yet

2023-01-12 Thread Igor Mammedov
If test case was started in paused mode (-S CLI option) and then allowed to continue via QMP, boot_sector_test could assert on transient state with following error: assertion failed (qdict_get_try_str(qret, "status") == "running"): (NULL == "running") Instead of crashing test if 'status' is n

[PATCH 19/40] tests: acpi: update expected blobs

2023-01-12 Thread Igor Mammedov
expected change: Scope (PCI0) ... Method (PCNT, 0, NotSerialized) { } ... } Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 - tests/data/acpi/pc/DSDT.hpbrroot| Bin 3064 -> 3071 byte

[PATCH 23/40] tests: acpi: update expected blobs

2023-01-12 Thread Igor Mammedov
Expected changes: * pc/bridge testcase due to ("pcihp: compose PCNT callchain right before its user _GPE._E01") ... +Scope (\_SB.PCI0) +{ +Scope (S18) +{ +Scope (S08) +{ +Method (PCNT, 0, NotSerialized) +

Re: [PATCH] target/arm: Introduce aarch64_set_svcr

2023-01-12 Thread Fabiano Rosas
Richard Henderson writes: > Unify the two helper_set_pstate_{sm,za} in this function. > Do not call helper_* functions from svcr_write. > Cleans up linux-user usage by consolodating logic. > > Cc: Fabiano Rosas > Signed-off-by: Richard Henderson > --- > > Fabiano, I expect this to replace much

[PATCH 29/40] pcihp: make bridge describe itself using AcpiDevAmlIfClass:build_dev_aml

2023-01-12 Thread Igor Mammedov
simplify build_append_pci_bus_devices() a bit by handling bridge specific logic in bridge dedicated AcpiDevAmlIfClass::build_dev_aml callback. Signed-off-by: Igor Mammedov --- include/hw/acpi/pci.h | 4 hw/acpi/Kconfig | 4 hw/acpi/meson.build | 4 +++- hw/acpi/p

[PATCH 25/40] tests: acpi: add endpoint devices to bridges

2023-01-12 Thread Igor Mammedov
to make sure that they are enumerated or ignored as expected Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 37 ++ 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c ind

[PATCH 35/40] tests: acpi: whitelist DSDT blobs before removing dynamic _DSM on coldplugged bridges

2023-01-12 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 4 1 file changed, 4 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..a83322cb08 100644 --- a/tests/qtest/bios-tables-test-al

Re: [PATCH v4 1/3] block/rbd: encryption nit fixes

2023-01-12 Thread Ilya Dryomov
On Thu, Jan 12, 2023 at 1:35 PM Daniel P. Berrangé wrote: > > On Sun, Nov 20, 2022 at 04:28:34AM -0600, Or Ozeri wrote: > > Add const modifier to passphrases, > > and remove redundant stack variable passphrase_len. > > > > Signed-off-by: Or Ozeri > > --- > > block/rbd.c | 24 ++--

[PATCH 32/40] tests: acpi: whitelist DSDT before decoupling PCI hotplug code from basic slots description

2023-01-12 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..1983fa596b 100644 --- a/tests/qtest/bios-ta

[PATCH 11/40] pci: acpihp: assign BSEL only to coldplugged bridges

2023-01-12 Thread Igor Mammedov
ACPI PCI hotplug would broken after bridge hotplug and then migration if hotplugged bridge were specified on target at command line. Currently it's not possible since, 'hotplugged' property was made read-only for some time now. The issue would happen due to BSEL being assigned to all bridges durin

[PATCH 09/40] pci: acpi hotplug: rename x-native-hotplug to x-do-not-expose-native-hotplug-cap

2023-01-12 Thread Igor Mammedov
When ACPI PCI hotplug for Q35 was introduced (6.1), it was implemented by hiding HPC capability on PCIE slot. That however led to a number of regressions and to fix it, it was decided to keep HPC cap exposed in ACPI PCI hotplug case and force guest in ACPI PCI hotplug mode by other means [1]. That

[PATCH 39/40] pcihp: generate populated non-hotpluggble slot descriptions on non-hotplug path

2023-01-12 Thread Igor Mammedov
Generating slots descriptions populated by non-hotpluggable devices is akward at best and complicates hotplug path (build_append_pcihp_slots) needlessly, and builds only dynamic _DSM for such slots which is overlkill. Clean it up and let non-hotplug path (build_append_pci_bus_devices) to handle tha

[PATCH 16/40] tests: acpi: add reboot cycle to bridge test

2023-01-12 Thread Igor Mammedov
hotplugged bridges should not be described in DSDT, while it works on cold boot, some ACPPI PCI code are invoked during reboot. This patch will let us catch unexpected AML if hotplug checks are broken. Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 16 +++- 1 file

[PATCH 30/40] pci: make sure pci_bus_is_express() won't error out with "discards ‘const’ qualifier"

2023-01-12 Thread Igor Mammedov
function doesn't need RW aceess to passed in bus pointer, make it const. Signed-off-by: Igor Mammedov --- include/hw/pci/pci.h | 2 +- hw/pci/pci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 7048a373d1..03e8d61

[PATCH 14/40] tests: acpi: extend bridge tests with hotplugged bridges

2023-01-12 Thread Igor Mammedov
with previous commit fixing malformed PCNT calls to hotplugged bridges, it should be possible add coldplug/hotplug test when describing PCI topology in DSDT without breeaking CI. Signed-off-by: Igor Mammedov --- PS: no need to update expected blobs as hotplugged bridges shouldn't be visible (i.e.

[PATCH 01/40] tests: qtest: print device_add error before failing test

2023-01-12 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- CC: Thomas Huth CC: Laurent Vivier --- tests/qtest/libqtest.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 5cb38f90da..3dbbdd30b9 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@

[PATCH 00/40] x86: fixing and cleaning up ACPI PCI code part 3

2023-01-12 Thread Igor Mammedov
Series continues refactoring on top of [1]. It focuses on isolating creation of non hotplug and hotplug slot descriptions. In state it's posted, it's not complete, but pretty close to it. The series contains stable patches from refactoring and is already too large to keep it to myself, hence I'm p

[PATCH] target/tricore: Fix OPC1_16_SRO_LD_H translation

2023-01-12 Thread Anton Kochkov
Signed-off-by: Eitan Eliahu Resolves: https://gitlab.com/qemu-project/qemu/-/issues/652 --- target/tricore/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index df9e46c649..b2a5e11778 100644 --- a/target/trico

tricore-debian-cross-container CI job failing

2023-01-12 Thread Peter Maydell
The tricore-debian-cross-container CI job has started failing for no obvious reason: https://gitlab.com/qemu-project/qemu/-/jobs/3593581274 gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I../bfd -I./../bfd -I./../include -I./../intl -I../intl -w -DLOCALEDIR="\"/usr/local/share/locale\"" -

[PATCH 03/40] tests: acpi: whitelist DSDT blobs for tests that use pci-bridges

2023-01-12 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 4 1 file changed, 4 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..2602a57c9b 100644 --- a/tests/qtest/bios-tables-test-al

[PATCH v2] tests/qtest: Poll on waitpid() for a while before sending SIGKILL

2023-01-12 Thread Stefan Berger
To prevent getting stuck on waitpid() in case the target process does not terminate on SIGTERM, poll on waitpid() for 30s and if the target process has not changed state until then send a SIGKILL to it. Signed-off-by: Stefan Berger Reviewed-by: Daniel P. Berrangé --- tests/qtest/libqtest.c | 20

[PATCH 12/40] x86: pcihp: fix invalid AML PCNT calls to hotplugged bridges

2023-01-12 Thread Igor Mammedov
When QEMU is started with hotplugged bridges (think migration): QEMU -S -monitor stdio \ -device pci-bridge,chassis_nr=1 \ -device pci-bridge,bus=pci.1,addr=1.0,chassis_nr=2 (qemu) device_add pci-bridge,id=hpbr,bus=pci.1,addr=2.0,chassis_nr=3 (qemu) cont it will generate A

Re: completion timeouts with pin-based interrupts in QEMU hw/nvme

2023-01-12 Thread Guenter Roeck
On 1/12/23 05:10, Klaus Jensen wrote: Hi all (linux-nvme, qemu-devel, maintainers), On QEMU riscv64, which does not use MSI/MSI-X and thus relies on pin-based interrupts, I'm seeing occasional completion timeouts, i.e. nvme nvme0: I/O 333 QID 1 timeout, completion polled To rule out issues

Re: tricore-debian-cross-container CI job failing

2023-01-12 Thread Peter Maydell
On Thu, 12 Jan 2023 at 14:13, Peter Maydell wrote: > > The tricore-debian-cross-container CI job has started failing for > no obvious reason: > > https://gitlab.com/qemu-project/qemu/-/jobs/3593581274 > > gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I../bfd > -I./../bfd -I./../include -I

[PATCH 22/40] pcihp: do not put empty PCNT in DSDT

2023-01-12 Thread Igor Mammedov
count number of PCNT methods that actually call Notify and if there aren't any, drop PCNT altogether. It mostly affects 'Q35' tests where there is no root-ports /bridges attached and 'PC' machine when ACPI PCI hotplug is completely disabled. Expected ASL change: -Method (PCNT, 0, NotS

Re: [PATCH v4 1/3] block/rbd: encryption nit fixes

2023-01-12 Thread Daniel P . Berrangé
On Thu, Jan 12, 2023 at 03:26:56PM +0100, Ilya Dryomov wrote: > On Thu, Jan 12, 2023 at 1:35 PM Daniel P. Berrangé > wrote: > > > > On Sun, Nov 20, 2022 at 04:28:34AM -0600, Or Ozeri wrote: > > > Add const modifier to passphrases, > > > and remove redundant stack variable passphrase_len. > > > >

[PATCH 18/40] pcihp: drop pcihp_bridge_en dependency when composing PCNT method

2023-01-12 Thread Igor Mammedov
.. and use only BSEL presence to decide on how PCNT should be composed. That simplifies possible combinations to consider, but mainly it makes PCIHP AML be governed only by BSEL, which is property of PCIBus (aka part of bridge) and as result it opens possibility to convert build_append_pci_bus_dev

[PATCH 28/40] pci: acpi: wire up AcpiDevAmlIf interface to generic bridge

2023-01-12 Thread Igor Mammedov
... so that the concrete impl. won't has to duplicate it every time. By default it doesn't do anything unless leaf class defines and sets AcpiDevAmlIfClass::build_dev_aml handler. Signed-off-by: Igor Mammedov --- hw/pci/pci_bridge.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/pci

[PATCH 36/40] pcihp: acpi: ignore coldplugged bridges when composing hotpluggable slots

2023-01-12 Thread Igor Mammedov
coldplugged bridges are not unpluggable, so there is no need to describe slots where they are plugged as hotpluggable. To that effect we have a condition that marks slot as non-hotpluggable if it's populated by coldplugged bridge and prevents generation _SUN/_EJ0 objects for it. That leaves dynamic

[PATCH v2 4/5] parallels: Replace fprintf by qemu_log in check

2023-01-12 Thread Alexander Ivanov
If the check is called during normal work, tracking of the check must be present in VM logs to have some clues if something going wrong with user's data. Signed-off-by: Alexander Ivanov --- block/parallels.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/b

[PATCH 27/40] x86: pcihp: acpi: prepare slot ignore rule to work with self describing bridges

2023-01-12 Thread Igor Mammedov
Before switching pci bridges to AcpiDevAmlIf interface, ensure that ignored slots are handled correctly. (existing rule works but only if bridge doesn't have AcpiDevAmlIf interface). While at it rewrite related comments to be less confusing (hopefully). Signed-off-by: Igor Mammedov --- hw/i386/a

<    1   2   3   4   >