Re: [PATCH v2] acpi: pcihp: make pending delete blocking action expire

2023-04-05 Thread Igor Mammedov
On Wed, 5 Apr 2023 04:47:48 -0400 "Michael S. Tsirkin" wrote: > On Wed, Apr 05, 2023 at 10:34:44AM +0200, Igor Mammedov wrote: > > with Q35 using ACPI PCI hotplug by default, user's request to unplug > > device is ignored when it's issued before guest OS has been boote

Re: [PATCH] acpi: pcihp: make pending delete expire in 5sec

2023-04-05 Thread Igor Mammedov
On Wed, 5 Apr 2023 04:32:16 -0400 "Michael S. Tsirkin" wrote: > On Wed, Apr 05, 2023 at 09:30:20AM +0200, Igor Mammedov wrote: > > On Tue, 4 Apr 2023 10:42:04 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Tue, Apr 04, 2023 at 04:04:35

[PATCH v2] acpi: pcihp: make pending delete blocking action expire

2023-04-05 Thread Igor Mammedov
"pcie: expire pending delete") 2) Fixes: cce8944cc9ef ("qdev-monitor: Forbid repeated device_del") Signed-off-by: Igor Mammedov --- v2: * change timeout to 1ms * add comment to expire usage * massage commit message to be a bit more clear CC: m...@redhat.com CC: anisi...@re

Re: an issue for device hot-unplug

2023-04-05 Thread Igor Mammedov
?id=1878659#c15 and than see comment 17, explaining that cleaning up pending_deleted_event usage won't change current behavior. Anyways, clean up patches are welcome if you wish to follow up on Paolo's suggestion. > On Tue, Apr 4, 2023 at 2:25 PM Igor Mammedov wrote: > > > On Tue

Re: [PATCH] acpi: pcihp: make pending delete expire in 5sec

2023-04-05 Thread Igor Mammedov
On Tue, 4 Apr 2023 10:42:04 -0400 "Michael S. Tsirkin" wrote: > On Tue, Apr 04, 2023 at 04:04:35PM +0200, Igor Mammedov wrote: > > On Tue, 4 Apr 2023 08:46:15 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Tue, Apr 04, 2023 at 10:28:07

Re: [PATCH] acpi: pcihp: make pending delete expire in 5sec

2023-04-04 Thread Igor Mammedov
On Tue, 4 Apr 2023 08:40:45 -0400 "Michael S. Tsirkin" wrote: > On Tue, Apr 04, 2023 at 01:06:38PM +0530, Ani Sinha wrote: > > > > > > On Tue, 4 Apr 2023, Gerd Hoffmann wrote: > > > > > Hi, > > > > > > > > Allowing pending delete expire brings ACPI PCI hotplug on par > > > > > with

Re: [PATCH] acpi: pcihp: make pending delete expire in 5sec

2023-04-04 Thread Igor Mammedov
On Tue, 4 Apr 2023 08:46:15 -0400 "Michael S. Tsirkin" wrote: > On Tue, Apr 04, 2023 at 10:28:07AM +0200, Igor Mammedov wrote: > > On Mon, 3 Apr 2023 13:23:45 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Mon, Apr 03, 2023 at 06:16:1

Re: an issue for device hot-unplug

2023-04-04 Thread Igor Mammedov
; > > pdev->qdev.pending_deleted_event = true; > > > > but you may have a reason to keep it. First of all, I'll open a bug in the > > bug tracker and let you know. > > > > Best regards, > > Yu Zhang > This patch from Igor Mammedov seems relevant, >

Re: an issue for device hot-unplug

2023-04-04 Thread Igor Mammedov
On Mon, 3 Apr 2023 15:24:43 +0200 Yu Zhang wrote: > Dear Laurent, > > recently we run into an issue with the following error: > > command '{ "execute": "device_del", "arguments": { "id": "virtio-diskX" } > }' for VM "id" failed ({ "return": {"class": "GenericError", "desc": > "Device

Re: [PATCH] acpi: pcihp: make pending delete expire in 5sec

2023-04-04 Thread Igor Mammedov
On Tue, 4 Apr 2023 09:03:59 +0200 Gerd Hoffmann wrote: > Hi, > > > > Allowing pending delete expire brings ACPI PCI hotplug on par > > > with native PCIe unplug behavior [1] which in its turn refers > > > back to ACPI PCI hotplug ability to repeat unplug requests. > > > A bit concerned

Re: [PATCH] acpi: pcihp: make pending delete expire in 5sec

2023-04-04 Thread Igor Mammedov
On Mon, 3 Apr 2023 13:23:45 -0400 "Michael S. Tsirkin" wrote: > On Mon, Apr 03, 2023 at 06:16:18PM +0200, Igor Mammedov wrote: > > with Q35 using ACPI PCI hotplug by default, user's request to unplug > > device is ignored when it's issued before guest OS has been boote

[PATCH] acpi: pcihp: make pending delete expire in 5sec

2023-04-03 Thread Igor Mammedov
ie: expire pending delete") 2) Fixes: cce8944cc9ef ("qdev-monitor: Forbid repeated device_del") Signed-off-by: Igor Mammedov --- CC: m...@redhat.com CC: anisi...@redhat.com CC: jus...@redhat.com CC: kra...@redhat.com --- hw/acpi/pcihp.c | 2 ++ 1 file changed, 2 insertions(+) diff

Re: [PATCH 2/2] hw/acpi: i386: bump MADT to revision 5

2023-03-31 Thread Igor Mammedov
On Wed, 29 Mar 2023 08:16:26 -0500 Eric DeVolder wrote: > On 3/29/23 00:03, Michael S. Tsirkin wrote: > > On Tue, Mar 28, 2023 at 11:59:26AM -0400, Eric DeVolder wrote: > >> Currently i386 QEMU generates MADT revision 3, and reports > >> MADT revision 1. ACPI 6.3 introduces MADT revision 5. >

Re: [PATCH 0/2] hw/acpi: bump MADT to revision 5

2023-03-31 Thread Igor Mammedov
On Wed, 29 Mar 2023 12:47:05 -0400 "Michael S. Tsirkin" wrote: > On Wed, Mar 29, 2023 at 08:14:37AM -0500, Eric DeVolder wrote: > > > > > > On 3/29/23 00:19, Michael S. Tsirkin wrote: > > > Hmm I don't think we can reasonably make such a change for 8.0. > > > Seems too risky. > > > Also, I

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-03-30 Thread Igor Mammedov
On Wed, 29 Mar 2023 22:30:44 +0700 Bui Quang Minh wrote: > On 3/29/23 21:53, Bui Quang Minh wrote: > > On 3/28/23 22:58, Bui Quang Minh wrote: > >> On 3/27/23 23:49, David Woodhouse wrote: > >>> On Mon, 2023-03-27 at 23:35 +0700, Bui Quang Minh wrote: > On 3/27/23 23:22, David

Re: [PULL 19/54] acpi: pc: isa bridge: use AcpiDevAmlIf interface to build ISA device descriptors

2023-03-30 Thread Igor Mammedov
On Tue, 28 Mar 2023 14:58:21 +0200 Fiona Ebner wrote: > Am 10.06.22 um 09:57 schrieb Michael S. Tsirkin: > > From: Igor Mammedov > > > > replaces ad-hoc build_isa_devices_aml() with generic AcpiDevAmlIf > > way to build bridge AML including all devices that are

Re: [PATCH 2/6] bios-tables-test: use 128M numa nodes on aarch64

2023-03-28 Thread Igor Mammedov
On Tue, 28 Mar 2023 13:09:37 +0100 Daniel P. Berrangé wrote: > On Tue, Mar 28, 2023 at 02:03:38PM +0200, Igor Mammedov wrote: > > On Thu, 16 Mar 2023 10:54:28 +0100 > > Gerd Hoffmann wrote: > > > > > Recent edk2 versions don't boot with very small numa nodes

Re: [PATCH] hw/acpi: limit warning on acpi table size to pc machines older than version 2.3

2023-03-28 Thread Igor Mammedov
On Mon, 20 Mar 2023 16:59:02 +0530 Ani Sinha wrote: > i440fx machine versions 2.3 and newer and q35 machines supports dynamic ram > resizing. Please see commit a1666142db6233 ("acpi-build: make ROMs RAM blocks > resizeable") . > Hence the warning when the ACPI table size exceeds a pre-defined

Re: [PATCH 2/6] bios-tables-test: use 128M numa nodes on aarch64

2023-03-28 Thread Igor Mammedov
AT.acpihmatvirt | Bin 240 -> 240 bytes > tests/data/acpi/virt/SSDT.memhp| Bin 1817 -> 1817 bytes binary blob updates should be in a separate patch with this fixed: Reviewed-by: Igor Mammedov > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tests

Re: need help with ACPI generic port implementation for QEMU

2023-03-28 Thread Igor Mammedov
On Mon, 13 Mar 2023 14:58:42 -0700 Dave Jiang wrote: > I'm attempting to implement the support of ACPI "generic port" detailed > in the ACPI r6.5 spec in QEMU. The spec section 5.2.16.7 details the > Generi Port Affinity Structure where it ties a Device Handle to a > Proximity Domain. And

Re: [PATCH v4 0/3] NUMA: Apply cluster-NUMA-node boundary for aarch64 and riscv machines

2023-03-27 Thread Igor Mammedov
(Philippe) > > Gavin Shan (3): > numa: Validate cluster and NUMA node boundary if required > hw/arm: Validate cluster and NUMA node boundary > hw/riscv: Validate cluster and NUMA node boundary > > hw/arm/sbsa-ref.c | 2 ++ > hw/arm/virt.c | 2

Re: [PATCH v1 1/2] vhost: Defer filtering memory sections until building the vhost memory structure

2023-03-08 Thread Igor Mammedov
On Tue, 7 Mar 2023 13:46:36 +0100 David Hildenbrand wrote: > On 07.03.23 11:51, Igor Mammedov wrote: > > On Thu, 16 Feb 2023 12:47:51 +0100 > > David Hildenbrand wrote: > > > >> Having multiple devices, some filtering memslots and some not filtering > >>

Re: [PATCH 4/4] test/avocado: test Linux boot up in x2APIC with userspace local APIC

2023-03-07 Thread Igor Mammedov
On Tue, 21 Feb 2023 23:05:00 +0700 Bui Quang Minh wrote: > Simple test to check Linux boot up in x2APIC with userspace local APIC and > TCG accelerator. just an idea, while booting linux would give some coverage, we probably would get much better coverage by using apic test case from kvm unit

Re: [PATCH 1/4] apic: add support for x2APIC mode

2023-03-07 Thread Igor Mammedov
On Mon, 06 Mar 2023 16:50:29 + David Woodhouse wrote: > On Mon, 2023-03-06 at 23:39 +0700, Bui Quang Minh wrote: > > On 3/6/23 22:51, David Woodhouse wrote: > > > On Mon, 2023-03-06 at 11:43 +0100, Igor Mammedov wrote: > > > > > However, there are still p

Re: [PATCH 1/4] apic: add support for x2APIC mode

2023-03-07 Thread Igor Mammedov
On Mon, 06 Mar 2023 15:51:45 + David Woodhouse wrote: > On Mon, 2023-03-06 at 11:43 +0100, Igor Mammedov wrote: > > > However, there are still problems while trying to extending support to > > > APIC ID larger than 255 because there are many places assume APIC ID

Re: [PATCH v1 2/2] vhost: Remove vhost_backend_can_merge() callback

2023-03-07 Thread Igor Mammedov
On Tue, 7 Mar 2023 11:25:48 +0100 Igor Mammedov wrote: > On Thu, 16 Feb 2023 12:47:52 +0100 > David Hildenbrand wrote: > > > Checking whether the memory regions are equal is sufficient: if they are > > equal, then most certainly the contained fd is equal. >

Re: [PATCH v1 0/2] vhost: memslot handling improvements

2023-03-07 Thread Igor Mammedov
On Fri, 17 Feb 2023 09:20:27 -0500 "Michael S. Tsirkin" wrote: > On Thu, Feb 16, 2023 at 12:47:50PM +0100, David Hildenbrand wrote: > > Following up on my previous work to make virtio-mem consume multiple > > memslots dynamically [1] that requires precise accounting between used vs. > > reserved

Re: [PATCH v1 1/2] vhost: Defer filtering memory sections until building the vhost memory structure

2023-03-07 Thread Igor Mammedov
On Thu, 16 Feb 2023 12:47:51 +0100 David Hildenbrand wrote: > Having multiple devices, some filtering memslots and some not filtering > memslots, messes up the "used_memslot" accounting. If we'd have a device > the filters out less memory sections after a device that filters out more, > we'd be

Re: [PATCH v1 2/2] vhost: Remove vhost_backend_can_merge() callback

2023-03-07 Thread Igor Mammedov
o me it looks like we should drop conversion to vhost_dev::mem and replace its usage with vhost_dev::mem_sections directly to get rid of data duplication and back and forth addr<->mr conversion. > For now, let's just drop vhost_backend_can_merge(). > > Signed-off-by: David Hildenbrand

Re: [PATCH v3 0/6] Support for new CPU model SapphireRapids

2023-03-06 Thread Igor Mammedov
On Tue, 7 Feb 2023 10:50:56 +0800 "Wang, Lei" wrote: > On 2/2/2023 7:05 PM, Igor Mammedov wrote: > > On Fri, 6 Jan 2023 00:38:20 -0800 > > Lei Wang wrote: > > > >> This series aims to add a new CPU model SapphireRapids, and tries to >

Re: [PATCH 00/33] pci(pc/q35): acpi-index support on non-hotpluggable slots

2023-03-06 Thread Igor Mammedov
On Thu, 2 Mar 2023 18:21:28 -0500 "Michael S. Tsirkin" wrote: > On Thu, Mar 02, 2023 at 01:07:16PM +0100, Igor Mammedov wrote: > > On Thu, 2 Mar 2023 05:59:16 -0500 > > "Michael S. Tsirkin" wrote: > > > > > On Fri, Feb 24, 2023 at 04:37

Re: [PATCH 1/4] apic: add support for x2APIC mode

2023-03-06 Thread Igor Mammedov
On Sat, 4 Mar 2023 21:10:54 +0700 Bui Quang Minh wrote: > On 2/28/23 23:39, Igor Mammedov wrote: > > On Tue, 28 Feb 2023 21:34:33 +0700 > > Bui Quang Minh wrote: > > > >> On 2/27/23 23:07, Igor Mammedov wrote: > >>> On Sat, 25 Feb 2023

[PATCH v2 02/34] tests: acpi: whitelist new q35.noacpihp test and pc.hpbrroot

2023-03-02 Thread Igor Mammedov
for q35.noacpihp use plain default Q35 DSDT table as a starting point. Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ tests/data/acpi/q35/DSDT.noacpihp | Bin 0 -> 8252 bytes 2 files changed, 2 insertions(+) create mode 100644 tests/data/a

[PATCH v2 09/34] x86: pcihp: fix missing bridge AML when intermediate root-port has 'hotplug=off' set

2023-03-02 Thread Igor Mammedov
describe itself using AcpiDevAmlIfClass:build_dev_aml") Signed-off-by: Igor Mammedov --- hw/acpi/pci-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/acpi/pci-bridge.c b/hw/acpi/pci-bridge.c index 5f3ee5157f..4fbf6da6ad 100644 --- a/hw/acpi/pci-bridge.c +++ b

[PATCH v2 29/34] pci: move acpi-index uniqueness check to generic PCI device code

2023-03-02 Thread Igor Mammedov
is disabled). Move check and related code to generic PCIDevice so it would be independent of ACPI PCI hotplug. Signed-off-by: Igor Mammedov --- PS: this also one step closer to enabling acpi-index support for microvm and virt/arm machines. --- hw/acpi/pcihp.c | 56

[PATCH v2 22/34] tests: acpi: update expected blobs

2023-03-02 Thread Igor Mammedov
x01) +{ +0x65 +} +Return (EDSM (Arg0, Arg1, Arg2, Arg3, Local0)) +} Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 3 --- tests/data/acpi/pc/DSDT.hpbrroot|

[PATCH v2 34/34] pcihp: add ACPI PCI hotplug specific is_hotpluggable_bus() callback

2023-03-02 Thread Igor Mammedov
if hotplug_handler is set on bus. PS: see ("pci: fix 'hotplugglable' property behavior") for details why callback was introduced. Signed-off-by: Igor Mammedov --- include/hw/acpi/ich9.h | 1 + include/hw/acpi/pcihp.h | 1 + hw/acpi/acpi-pci-hotplug-stub.c | 4 hw/a

[PATCH v2 18/34] tests: acpi: update expected blobs

2023-03-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 37 -- tests/data/acpi/pc/DSDT | Bin 6360 -> 6454 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 6283 -> 6377 bytes tests/data/acpi/pc/DSDT.ac

[PATCH v2 04/34] tests: acpi: update expected blobs

2023-03-02 Thread Igor Mammedov
1 != One)) { CDW1 |= 0x08 Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 2 -- tests/data/acpi/pc/DSDT.hpbrroot| Bin 3081 -> 3115 bytes tests/data/acpi/q35/DSDT.noacpihp | Bin 8252 -> 7932 bytes 3 files changed, 2 deletions(-) diff

[PATCH v2 17/34] acpi: pci: add EDSM method to DSDT

2023-03-02 Thread Igor Mammedov
only EDSM method in DSDT without any users. (the follow up patches will use it) Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 54 1 file changed, 54 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index d8ec91b8e3

[PATCH v2 28/34] tests: acpi: update expected blobs

2023-03-02 Thread Igor Mammedov
+{ +Local0 = Package (0x01) +{ +0x66 +} +Return (EDSM (Arg0, Arg1, Arg2, Arg3, Local0)) +} +} Signed-off-by: Igor Mammedov --- tests/qtest/bios

[PATCH v2 25/34] tests: acpi: update expected blobs

2023-03-02 Thread Igor Mammedov
) +{ +Name (_ADR, 0x00020004) // _ADR: Address +} + ... +Device (S22) +{ +Name (_ADR, 0x00040002) // _ADR: Address +} Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 37

[PATCH v2 08/34] tests: acpi: whitelist pc/DSDT.hpbrroot and pc/DSDT.hpbridge tests

2023-03-02 Thread Igor Mammedov
follow up fix for missing root-port AML will affect these tests by adding non-hotpluggable Device descriptors of colplugged bridges when bridge hotplug is disabled. Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH v2 30/34] acpi: pci: drop BSEL usage when deciding that device isn't hotpluggable

2023-03-02 Thread Igor Mammedov
to decide if hotplug part should be called but that will be moved out of generic code to hotplug one by followup patches. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index

[PATCH v2 21/34] acpi: pci: support acpi-index for non-hotpluggable devices

2023-03-02 Thread Igor Mammedov
Inject static _DSM (EDSM) if non-hotpluggable device has acpi-index configured on it. It lets use acpi-index non-hotpluggable devices / devices attached to non-hotpluggable bus. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 25 + 1 file changed, 25 insertions

[PATCH v2 20/34] tests: acpi: add device with acpi-index on non-hotpluggble bus

2023-03-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 295d80740e..d7c34ba504 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c

[PATCH v2 15/34] tests: acpi: update expected blobs

2023-03-02 Thread Igor Mammedov
(Arg4 [One] Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 35 -- tests/data/acpi/pc/DSDT | Bin 6360 -> 6360 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 6283 -> 6283 bytes tests/data/acpi/pc/DSDT.acpihmat

[PATCH v2 01/34] Revert "tests/qtest: Check for devices in bios-tables-test"

2023-03-02 Thread Igor Mammedov
. Signed-off-by: Igor Mammedov --- CC: Fabiano Rosas tests/qtest/bios-tables-test.c | 75 ++ 1 file changed, 4 insertions(+), 71 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index d29a4e47af..d8c8cda58e 100644 --- a/tests

[PATCH v2 31/34] acpi: pci: move BSEL into build_append_pcihp_slots()

2023-03-02 Thread Igor Mammedov
generic code a bit from hotplug stuff and follow up patch will remove remaining call to build_append_pcihp_slots() from generic code, making it possible to use without ACPI PCI hotplug dependencies. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 15 ++- 1 file changed, 6

[PATCH v2 06/34] tests: acpi: extend multi-bridge case with case 'root-port, id=HOHP, hotplug=off root-port, bus=NOHP'

2023-03-02 Thread Igor Mammedov
chain that should accompany it. Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 7828c6b7e6..295d80740e 100644 --- a/tests/qtest/bios-tables

[PATCH v2 32/34] acpi: pci: move out ACPI PCI hotplug generator from generic slot generator build_append_pci_bus_devices()

2023-03-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- include/hw/acpi/pcihp.h | 2 ++ hw/acpi/pci-bridge.c| 12 +++- hw/i386/acpi-build.c| 9 - 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/include/hw/acpi/pcihp.h b/include/hw/acpi/pcihp.h index 7e268c2c9c..cd18ebdcdc

[PATCH v2 19/34] tests: acpi: whitelist DSDT before adding device with acpi-index to testcases

2023-03-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..70244976c9 100644 --- a/tests/qtest/bios-tables-test

[PATCH v2 27/34] tests: acpi: add non zero function device with acpi-index on non-hotpluggble bus

2023-03-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index d7c34ba504..76d5100911 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest

[PATCH v2 07/34] x86: pcihp: fix missing PCNT callchain when intermediate root-port has 'hotplug=off' set

2023-03-02 Thread Igor Mammedov
has not been properly wired and as result not worked. 1) Fixes: ddab4d3fae4e8 ("pcihp: compose PCNT callchain right before its user _GPE._E01") Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a

[PATCH v2 23/34] tests: acpi: whitelist DSDT before exposing non zero functions

2023-03-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 37 + 1 file changed, 37 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..8911b10650 100644 --- a/tests/qtest

[PATCH v2 14/34] pcihp: move PCI _DSM function 0 prolog into separate function

2023-03-02 Thread Igor Mammedov
it will be reused by follow up patches that will implement static _DSM for non-hotpluggable devices. no functional AML change, only context one, where 'cap' (Local1) initialization is moved after UUID/revision checks. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 54

[PATCH v2 11/34] pcihp: piix4: do not redirect hotplug controller to piix4 when ACPI hotplug is disabled

2023-03-02 Thread Igor Mammedov
new flag for i440fx to disable PCI hotplug on the root bus) 2) df4008c9c59 (piix4: don't reserve hw resources when hotplug is off globally) Fixes: df4008c9c59 (piix4: don't reserve hw resources when hotplug is off globally) Signed-off-by: Igor Mammedov --- hw/acpi/piix4.c | 2 +- 1 file change

[PATCH v2 12/34] pci: fix 'hotplugglable' property behavior

2023-03-02 Thread Igor Mammedov
or not. To do that add is_hotpluggable_bus() hook to HotplugHandler interface and use it in 'hotpluggable' property + teach pcie-slot to actually look into 'hotplug' property state before deciding if bus is hotpluggable. Signed-off-by: Igor Mammedov --- include/hw/hotplug.h | 2 ++ include/hw/qdev

[PATCH v2 26/34] tests: acpi: whitelist DSDT before adding non-0 function device with acpi-index to testcases

2023-03-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..ad2b429de8 100644 --- a/tests/qtest/bios-tables-test

[PATCH v2 13/34] tests: acpi: whitelist DSDT blobs before isolating PCI _DSM func 0 prolog

2023-03-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 35 + 1 file changed, 35 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..7e7745db39 100644 --- a/tests/qtest

[PATCH v2 05/34] tests: acpi: whitelist q35/DSDT.multi-bridge before extending testcase

2023-03-02 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..dabc024f53 100644 --- a/tests/qtest/bios-tables-test

[PATCH v2 24/34] acpi: pci: describe all functions on populated slots

2023-03-02 Thread Igor Mammedov
is not required). Signed-off-by: Igor Mammedov --- * patch is making acpi-index feature support complete in the scope of host bridge (support of acpi-index on PXB is out of scope of this series, and probably should follow host-bridge clean up) * follow up patch will add a tests case with acpi

[PATCH v2 10/34] tests: acpi: update expected blobs

2023-03-02 Thread Igor Mammedov
Zero) // _ADR: Address +} } Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 4 tests/data/acpi/pc/DSDT.hpbridge| Bin 6289 -> 6323 bytes tests/data/acpi/pc/DSDT.hpbrroot| Bin 3115 -> 3166 bytes

[PATCH v2 16/34] tests: acpi: whitelist DSDT before adding EDSM method

2023-03-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 37 + 1 file changed, 37 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..8911b10650 100644 --- a/tests/qtest

[PATCH v2 03/34] tests: acpi: add test_acpi_q35_tcg_no_acpi_hotplug test and extend test_acpi_piix4_no_acpi_pci_hotplug

2023-03-02 Thread Igor Mammedov
that will be fixed by follow up patch Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 42 +++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index d8c8cda58e..7828c6b7e6 100644

[PATCH v2 33/34] pcihp: move fields enabling hotplug into AcpiPciHpState

2023-03-02 Thread Igor Mammedov
... instead of duplicating them in piix4 and lpc and then trying to pass them to pcihp routines as arguments. it simplifies call sites and places pcihp specific in its own structure. Signed-off-by: Igor Mammedov --- include/hw/acpi/pcihp.h | 8 include/hw/acpi/piix4.h

[PATCH v2 00/34] pci(pc/q35): acpi-index support on non-hotpluggable slots

2023-03-02 Thread Igor Mammedov
nt to pull there complicated APCI PCI hotplug. gitlab tree: https://gitlab.com/imammedo/qemu/-/tree/acpi_index_non_hotplug_v2 Igor Mammedov (34): Revert "tests/qtest: Check for devices in bios-tables-test" tests: acpi: whitelist new q35.noacpihp test and pc.hpbrroo

Re: [PATCH 14/33] tests: acpi: update expected blobs

2023-03-02 Thread Igor Mammedov
On Thu, 02 Mar 2023 12:43:11 -0300 Fabiano Rosas wrote: > Igor Mammedov writes: > > > On Thu, 02 Mar 2023 09:55:24 -0300 > > Fabiano Rosas wrote: > > > >> Igor Mammedov writes: > >> > >> > On Wed, 1 Mar 2023 19:27:33 -0500 > &g

Re: [PATCH 14/33] tests: acpi: update expected blobs

2023-03-02 Thread Igor Mammedov
On Thu, 02 Mar 2023 09:55:24 -0300 Fabiano Rosas wrote: > Igor Mammedov writes: > > > On Wed, 1 Mar 2023 19:27:33 -0500 > > "Michael S. Tsirkin" wrote: > > > >> On Fri, Feb 24, 2023 at 04:37:53PM +0100, Igor Mammedov wrote: > >> >

Re: [PATCH v2 19/20] hw/i386/ich9: Clean up includes

2023-03-02 Thread Igor Mammedov
On Tue, 31 Jan 2023 12:53:25 +0100 Bernhard Beschow wrote: this lacks commit description explaining below movements > Signed-off-by: Bernhard Beschow > --- > include/hw/i386/ich9.h | 8 +--- > hw/i386/acpi-build.c | 1 + > hw/isa/lpc_ich9.c | 2 +- > 3 files changed, 7

Re: [PATCH 2/3] hw/isa/vt82c686: Allow PM controller to switch to ACPI mode

2023-03-02 Thread Igor Mammedov
On Mon, 6 Feb 2023 09:00:37 +0100 Philippe Mathieu-Daudé wrote: > On 31/1/23 15:54, BALATON Zoltan wrote: > > On Sun, 29 Jan 2023, Bernhard Beschow wrote: > >> Adds missing functionality the real hardware supports. > >> > >> Signed-off-by: Bernhard Beschow > >> --- > >> hw/isa/vt82c686.c | 18

Re: [PATCH 5/7] hw/acpi/piix4: Fix offset of GPE0 registers

2023-03-02 Thread Igor Mammedov
On Sun, 29 Jan 2023 14:55:06 + Bernhard Beschow wrote: > Am 25. Januar 2023 15:55:01 UTC schrieb Igor Mammedov : > >On Sun, 22 Jan 2023 18:07:22 +0100 > >Bernhard Beschow wrote: > > > >> The PIIX4 datasheet defines the GPSTS register to be at offset 0x0c of

Re: [PATCH 00/33] pci(pc/q35): acpi-index support on non-hotpluggable slots

2023-03-02 Thread Igor Mammedov
On Thu, 2 Mar 2023 05:59:16 -0500 "Michael S. Tsirkin" wrote: > On Fri, Feb 24, 2023 at 04:37:39PM +0100, Igor Mammedov wrote: > > Series extends acpi-index support to host-bridge(s) and bridges > > with disabled hotplug (either explicitly or implicitly). > >

Re: [PATCH 14/33] tests: acpi: update expected blobs

2023-03-02 Thread Igor Mammedov
On Wed, 1 Mar 2023 19:27:33 -0500 "Michael S. Tsirkin" wrote: > On Fri, Feb 24, 2023 at 04:37:53PM +0100, Igor Mammedov wrote: > > only following context change: > > - Local1 = Zero > > If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d

Re: [RFC PATCH 0/3] qdev: Introduce QDEV_DECLARE_DEV_BUS_TYPES() macro

2023-03-01 Thread Igor Mammedov
On Mon, 13 Feb 2023 11:56:06 +0100 Philippe Mathieu-Daudé wrote: > Experiment after discussing with Thomas around qdev_get_parent_bus: > https://lore.kernel.org/qemu-devel/ad356f64-dca0-8117-d22a-a530e620d...@redhat.com/ > > When a QDev plug on a QBus, we'll always use qdev_get_parent_bus() >

Re: [RFC PATCH 07/19] hw/scsi: Set QDev properties using QDev API

2023-03-01 Thread Igor Mammedov
On Fri, 3 Feb 2023 19:09:02 +0100 Philippe Mathieu-Daudé wrote: > No need to use the low-level QOM API when an object > inherits from QDev. Directly use the QDev API to set > its properties. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/scsi/scsi-bus.c | 6 +- > 1 file changed, 1

Re: [RFC PATCH 05/19] hw/core/numa: Set QDev properties using QDev API

2023-03-01 Thread Igor Mammedov
On Fri, 3 Feb 2023 19:09:00 +0100 Philippe Mathieu-Daudé wrote: > No need to use the low-level QOM API when an object > inherits from QDev. Directly use the QDev API to set > its properties. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/core/numa.c | 4 ++-- > 1 file changed, 2

Re: [PATCH 03/19] hw/acpi: Set QDev properties using QDev API

2023-03-01 Thread Igor Mammedov
On Fri, 3 Feb 2023 19:08:58 +0100 Philippe Mathieu-Daudé wrote: > No need to use the low-level QOM API when an object > inherits from QDev. Directly use the QDev API to set > its properties. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/acpi/cpu_hotplug.c | 7 +++ > hw/acpi/ich9.c

Re: [RFC PATCH 12/19] hw/i386: Set QDev properties using QDev API

2023-03-01 Thread Igor Mammedov
On Fri, 3 Feb 2023 19:09:07 +0100 Philippe Mathieu-Daudé wrote: > No need to use the low-level QOM API when an object > inherits from QDev. Directly use the QDev API to set > its properties. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/i386/pc.c | 8 +++- >

Re: [PATCH 00/19] hw: Set QDev properties using QDev API (part 1/3)

2023-03-01 Thread Igor Mammedov
On Fri, 3 Feb 2023 19:08:55 +0100 Philippe Mathieu-Daudé wrote: > QEMU provides the QOM API for core objects. > Devices are modelled on top of QOM as QDev objects. > > There is no point in using the lower level QOM API with > QDev; it makes the code more complex and harder to review. > > I

Re: [PATCH V4 5/8] hw/riscv/virt: virt-acpi-build.c: Add RINTC in MADT

2023-02-28 Thread Igor Mammedov
On Tue, 28 Feb 2023 13:04:36 +0530 Sunil V L wrote: > On Mon, Feb 27, 2023 at 04:41:21PM +0100, Igor Mammedov wrote: > > On Fri, 24 Feb 2023 19:56:58 +0530 > > Sunil V L wrote: > > > > > Hi Igor, > > > > > > On Fri, Feb 24, 2023 at 01:53:43PM

Re: [PATCH 1/4] apic: add support for x2APIC mode

2023-02-28 Thread Igor Mammedov
On Tue, 28 Feb 2023 21:34:33 +0700 Bui Quang Minh wrote: > On 2/27/23 23:07, Igor Mammedov wrote: > > On Sat, 25 Feb 2023 17:15:17 +0700 > > Bui Quang Minh wrote: > > > >> On 2/24/23 21:29, Igor Mammedov wrote: > >>> On Tue, 21 Feb 2023

Re: [PATCH][RESEND v3 3/3] Add a Hyper-V Dynamic Memory Protocol driver (hv-balloon)

2023-02-28 Thread Igor Mammedov
On Fri, 24 Feb 2023 22:41:16 +0100 "Maciej S. Szmigiero" wrote: > From: "Maciej S. Szmigiero" > > This driver is like virtio-balloon on steroids: it allows both changing the > guest memory allocation via ballooning and inserting extra RAM into it by > adding required memory backends and

Re: [PATCH 0/3] hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'

2023-02-28 Thread Igor Mammedov
On Tue, 28 Feb 2023 14:36:43 +0100 Philippe Mathieu-Daudé wrote: > ping^2 please use checkpatch before pasting series. Object -> DeviceState is a nice cleanup, the rest is just unnecessary churn in my opinion and a matter of taste, but I fine with it if it makes code easier to read for someone

Re: [PATCH 3/3] hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'

2023-02-28 Thread Igor Mammedov
On Fri, 3 Feb 2023 17:30:21 +0100 Philippe Mathieu-Daudé wrote: > ACPI CPU hotplug parent can't be any QOM object, it must be a QDev. > Convert AcpiCpuHotplug::device field as QDev to enforce this. > Rename 'owner' and 'device' variables as 'parent'. > > Signed-off-by: Philippe Mathieu-Daudé

Re: [PATCH V4 5/8] hw/riscv/virt: virt-acpi-build.c: Add RINTC in MADT

2023-02-27 Thread Igor Mammedov
On Fri, 24 Feb 2023 19:56:58 +0530 Sunil V L wrote: > Hi Igor, > > On Fri, Feb 24, 2023 at 01:53:43PM +0100, Igor Mammedov wrote: > > On Fri, 24 Feb 2023 14:06:58 +0530 > > Sunil V L wrote: > > > > > Add Multiple APIC Description Table (MADT) with th

Re: [PATCH 1/4] apic: add support for x2APIC mode

2023-02-27 Thread Igor Mammedov
On Sat, 25 Feb 2023 17:15:17 +0700 Bui Quang Minh wrote: > On 2/24/23 21:29, Igor Mammedov wrote: > > On Tue, 21 Feb 2023 23:04:57 +0700 > > Bui Quang Minh wrote: > > > >> This commit refactors APIC registers read/write function to support both > >> MMI

[PATCH 06/33] x86: pcihp: fix missing PCNT callchain when intermediate root-port has 'hotplug=off' set

2023-02-24 Thread Igor Mammedov
has not been properly wired and as result not worked. 1) Fixes: ddab4d3fae4e8 ("pcihp: compose PCNT callchain right before its user _GPE._E01") Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a

[PATCH 12/33] tests: acpi: whitelist DSDT blobs before isolating PCI _DSM func 0 prolog

2023-02-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 35 + 1 file changed, 35 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..7e7745db39 100644 --- a/tests/qtest

[PATCH 10/33] pcihp: piix4: do not redirect hotplug controller to piix4 when ACPI hotplug is disabled

2023-02-24 Thread Igor Mammedov
new flag for i440fx to disable PCI hotplug on the root bus) 2) df4008c9c59 (piix4: don't reserve hw resources when hotplug is off globally) Fixes: df4008c9c59 (piix4: don't reserve hw resources when hotplug is off globally) Signed-off-by: Igor Mammedov --- hw/acpi/piix4.c | 2 +- 1 file change

[PATCH 32/33] pcihp: move fields enabling hotplug into AcpiPciHpState

2023-02-24 Thread Igor Mammedov
... instead of duplicating them in piix4 and lpc and then trying to pass them to pcihp routines as arguments. it simplifies call sites and places pcihp specific in its own structure. Signed-off-by: Igor Mammedov --- include/hw/acpi/pcihp.h | 8 include/hw/acpi/piix4.h

[PATCH 28/33] pci: move acpi-index uniqueness check to generic PCI device code

2023-02-24 Thread Igor Mammedov
is disabled). Move check and related code to generic PCIDevice so it would be independent of ACPI PCI hotplug. Signed-off-by: Igor Mammedov --- PS: this also one step closer to enabling acpi-index support for microvm and virt/arm machines. --- hw/acpi/pcihp.c | 56

[PATCH 29/33] acpi: pci: drop BSEL usage when deciding that device isn't hotpluggable

2023-02-24 Thread Igor Mammedov
to decide if hotplug part should be called but that will be moved out of generic code to hotplug one by followup patches. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index

[PATCH 30/33] acpi: pci: move BSEL into build_append_pcihp_slots()

2023-02-24 Thread Igor Mammedov
generic code a bit from hotplug stuff and follow up patch will remove remaining call to build_append_pcihp_slots() from generic code, making it possible to use without ACPI PCI hotplug dependencies. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 15 ++- 1 file changed, 6

[PATCH 03/33] tests: acpi: update expected blobs

2023-02-24 Thread Igor Mammedov
1 != One)) { CDW1 |= 0x08 Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 2 -- tests/data/acpi/pc/DSDT.hpbrroot| Bin 3081 -> 3115 bytes tests/data/acpi/q35/DSDT.noacpihp | Bin 8252 -> 7932 bytes 3 files changed, 2 deletions(-) diff

[PATCH 19/33] tests: acpi: add device with acpi-index on non-hotpluggble bus

2023-02-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 638a193e13..88493abc40 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c

[PATCH 17/33] tests: acpi: update expected blobs

2023-02-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 37 -- tests/data/acpi/pc/DSDT | Bin 6360 -> 6454 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 6283 -> 6377 bytes tests/data/acpi/pc/DSDT.ac

[PATCH 11/33] pci: fix 'hotplugglable' property behavior

2023-02-24 Thread Igor Mammedov
or not. To do that add is_hotpluggable_bus() hook to HotplugHandler interface and use it in 'hotpluggable' property + teach pcie-slot to actually look into 'hotplug' property state before deciding if bus is hotpluggable. Signed-off-by: Igor Mammedov --- include/hw/hotplug.h | 2 ++ include/hw/qdev

[PATCH 14/33] tests: acpi: update expected blobs

2023-02-24 Thread Igor Mammedov
(Arg4 [One] Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 35 -- tests/data/acpi/pc/DSDT | Bin 6360 -> 6360 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 6283 -> 6283 bytes tests/data/acpi/pc/DSDT.acpihmat

[PATCH 16/33] acpi: pci: add EDSM method to DSDT

2023-02-24 Thread Igor Mammedov
only EDSM method in DSDT without any users. (the follow up patches will use it) Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 54 1 file changed, 54 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index cb80b7a318

<    1   2   3   4   5   6   7   8   9   10   >