Re: [PATCH 00/17] acpi:pc/q35: minor PCI refactoring/cleanups

2022-09-27 Thread Igor Mammedov
On Tue, 6 Sep 2022 09:10:32 -0400 "Michael S. Tsirkin" wrote: > On Tue, Sep 06, 2022 at 01:41:08PM +0200, Igor Mammedov wrote: > > On Fri, 1 Jul 2022 09:34:58 -0400 > > Igor Mammedov wrote: > > > > > Flushing out ACPI PCI cleanups that preceed convers

Re: [PATCH v2] Revert "intel_iommu: Fix irqchip / X2APIC configuration checks"

2022-09-27 Thread Igor Mammedov
X2APIC configuration checks", > 2022-05-16) > dc89f32d92 ("target/i386: Fix sanity check on max APIC ID / X2APIC > enablement", 2022-05-16) > > We may want to have this for stable too (mostly for 7.1.0 only). Adding a > fixes tag. > > Cc: David W

Re: [PATCH v4 5/5] test/acpi/bios-tables-test: SSDT: update golden master binaries

2022-09-26 Thread Igor Mammedov
On Thu, 22 Sep 2022 20:29:12 +0800 Robert Hoo wrote: > On Thu, 2022-09-22 at 20:21 +0800, Robert Hoo wrote: > > And empty bios-tables-test-allowed-diff.h. > > > > Diff of ASL form, from qtest testlog.txt: > > > > --- /tmp/asl-RFWZS1.dsl 2022-09-22 18:25:06.191519589 +0800 > > +++

Re: [PATCH] Revert "intel_iommu: Fix irqchip / X2APIC configuration checks"

2022-09-26 Thread Igor Mammedov
On Fri, 23 Sep 2022 21:27:08 -0400 Peter Xu wrote: > On Fri, Sep 23, 2022 at 06:03:44PM -0400, Peter Xu wrote: > > On Fri, Sep 23, 2022 at 10:41:59AM +0200, Igor Mammedov wrote: > > > It's worth putting history excavation with explanation what is broken and > >

Re: [PATCH] Revert "intel_iommu: Fix irqchip / X2APIC configuration checks"

2022-09-23 Thread Igor Mammedov
On Fri, 23 Sep 2022 10:20:34 +0200 Igor Mammedov wrote: > On Thu, 22 Sep 2022 12:40:01 -0400 > Peter Xu wrote: > > > On Thu, Sep 22, 2022 at 03:46:17PM +0200, Igor Mammedov wrote: > > > On Wed, 21 Sep 2022 12:12:27 -0400 > > > Peter Xu wrote: > > &

Re: [PATCH] Revert "intel_iommu: Fix irqchip / X2APIC configuration checks"

2022-09-23 Thread Igor Mammedov
On Thu, 22 Sep 2022 12:40:01 -0400 Peter Xu wrote: > On Thu, Sep 22, 2022 at 03:46:17PM +0200, Igor Mammedov wrote: > > On Wed, 21 Sep 2022 12:12:27 -0400 > > Peter Xu wrote: > > > > > It's true that when vcpus<=255 we don't require the length of 32bit APIC

Re: [PATCH] Revert "intel_iommu: Fix irqchip / X2APIC configuration checks"

2022-09-22 Thread Igor Mammedov
want to enable x2apic, we can use eim=off in the > intel-iommu parameters to skip enabling KVM x2apic. > > This partly reverts commit 77250171bdc02aee106083fd2a068147befa1a38, while > keeping the valid bit on checking split irqchip, but revert the other change. > > Cc: David Woo

Re: [PATCH v3 4/5] acpi/nvdimm: Implement ACPI NVDIMM Label Methods

2022-09-21 Thread Igor Mammedov
On Tue, 20 Sep 2022 20:28:31 +0800 Robert Hoo wrote: > On Tue, 2022-09-20 at 11:13 +0200, Igor Mammedov wrote: > > On Fri, 16 Sep 2022 21:15:35 +0800 > > Robert Hoo wrote: > > > > > On Fri, 2022-09-16 at 09:37 +0200, Igor Mammedov wrote: > > >

Re: [PATCH v2] hw/acpi: Add ospm_status hook implementation for acpi-ged

2022-09-21 Thread Igor Mammedov
On Tue, 20 Sep 2022 14:15:36 +0100 Peter Maydell wrote: > On Wed, 24 Aug 2022 at 16:04, Igor Mammedov wrote: > > > > On Tue, 16 Aug 2022 17:49:57 +0800 > > Keqian Zhu wrote: > > > > > Setup an ARM virtual machine of machine virt and execute qmp > &g

Re: [PATCH v3 4/5] acpi/nvdimm: Implement ACPI NVDIMM Label Methods

2022-09-20 Thread Igor Mammedov
On Fri, 16 Sep 2022 21:15:35 +0800 Robert Hoo wrote: > On Fri, 2022-09-16 at 09:37 +0200, Igor Mammedov wrote: > > > > Fine, get your point now. > > > In ASL it will look like this: > > > Local1 = Package (0x3) {STTS, SLSA, MAXT} > &g

Re: [PATCH 06/27] qapi acpi: Elide redundant has_FOO in generated C

2022-09-16 Thread Igor Mammedov
> them step by step. This is the step for qapi/acpi.py. > > Said commit explains the transformation in more detail. The invariant > violations mentioned there do not occur here. > > Cc: Michael S. Tsirkin > Cc: Igor Mammedov > Cc: Ani Sinha > Signed-off-by:

Re: [PATCH v3 4/5] acpi/nvdimm: Implement ACPI NVDIMM Label Methods

2022-09-16 Thread Igor Mammedov
On Fri, 16 Sep 2022 10:27:08 +0800 Robert Hoo wrote: > On Fri, 2022-09-09 at 15:39 +0200, Igor Mammedov wrote: > ... > > looks more or less fine except of excessive use of named variables > > which creates global scope variables. > > > > I'd suggest to store tempor

Re: [PATCH] i386: Add new CPU model SapphireRapids

2022-09-14 Thread Igor Mammedov
yet) > - fast short CMPSB, SCASB (KVM doesn't support yet) > > Signed-off-by: Wang, Lei > Reviewed-by: Robert Hoo looks fine to me, Acked-by: Igor Mammedov > --- > target/i386/cpu.c | 128 ++ > target/i386/cpu.h | 4 ++ >

Re: [PATCH v3 4/5] acpi/nvdimm: Implement ACPI NVDIMM Label Methods

2022-09-12 Thread Igor Mammedov
On Fri, 09 Sep 2022 22:02:34 +0800 Robert Hoo wrote: > On Fri, 2022-09-09 at 15:39 +0200, Igor Mammedov wrote: > > On Thu, 1 Sep 2022 11:27:20 +0800 > > Robert Hoo wrote: > > > > > Recent ACPI spec [1] has defined NVDIMM Label Methods _LS{I,R,W}, > > &g

Re: [PATCH v3 4/5] acpi/nvdimm: Implement ACPI NVDIMM Label Methods

2022-09-09 Thread Igor Mammedov
On Thu, 1 Sep 2022 11:27:20 +0800 Robert Hoo wrote: > Recent ACPI spec [1] has defined NVDIMM Label Methods _LS{I,R,W}, which > deprecates corresponding _DSM Functions defined by PMEM _DSM Interface spec > [2]. > > Since the semantics of the new Label Methods are same as old _DSM > methods,

Re: [PATCH v3 3/5] acpi/nvdimm: define macro for NVDIMM Device _DSM

2022-09-07 Thread Igor Mammedov
ec, > Section 3. [1] > > No functional changes in this patch. > > [1] https://pmem.io/documents/IntelOptanePMem_DSM_Interface-V2.0.pdf > > Signed-off-by: Robert Hoo > Reviewed-by: Jingqi Liu Reviewed-by: Igor Mammedov > --- > hw/acpi/nvdimm.c | 4 ++-- > 1 file changed,

Re: [PATCH] fw_cfg: Don't set callback_opaque NULL in fw_cfg_modify_bytes_read()

2022-09-07 Thread Igor Mammedov
ond reboot, > virt_acpi_build_update() is called with a NULL "build_state" and > returns without updating the ACPI tables. This seems to be > upsetting the firmware. > > To fix this, don't change the callback_opaque in fw_cfg_modify_bytes_read(). Fixes: bdbb5b1706d165

Re: [PATCH 00/17] acpi:pc/q35: minor PCI refactoring/cleanups

2022-09-06 Thread Igor Mammedov
On Fri, 1 Jul 2022 09:34:58 -0400 Igor Mammedov wrote: > Flushing out ACPI PCI cleanups that preceed conversion of > DSDT PCI slots ennumeration to AcpiDevAmlIf interface. > It's is mostly collection of patches thraet removes code > duplication, we've accumulated around PCI

Re: [RFC PATCH] hw/acpi: do not let OSPM set pcie native hotplug when acpi hotplug is enabled

2022-09-06 Thread Igor Mammedov
On Mon, 5 Sep 2022 22:25:25 +0530 (IST) Ani Sinha wrote: > On Mon, 5 Sep 2022, Ani Sinha wrote: > > > > > > > > > > > > > > diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c > > > > index 0355bd3dda..3dc9379f27 100644 > > > > --- a/hw/i386/acpi-build.c > > > > +++

Re: [RFC PATCH] hw/acpi: do not let OSPM set pcie native hotplug when acpi hotplug is enabled

2022-09-05 Thread Igor Mammedov
On Mon, 5 Sep 2022 12:55:31 +0530 Ani Sinha wrote: > Possible fix for https://bugzilla.redhat.com/show_bug.cgi?id=2089545 > > Change in AML: > > @@ -47,33 +47,39 @@ > Scope (_SB) > { > Device (PCI0) > { > Name (_HID, EisaId ("PNP0A08") /* PCI Express

Re: [PATCH 2/4] hw/acpi: set ATS capability explicitly per pcie root port

2022-08-25 Thread Igor Mammedov
On Wed, 24 Aug 2022 21:46:58 +0530 Ani Sinha wrote: > On Wed, Aug 24, 2022 at 8:54 PM Igor Mammedov wrote: > > > On Mon, 22 Aug 2022 14:38:09 +0530 > > Ani Sinha wrote: > > > > > Currently the bit 0 of the flags field of Root Port ATS capability > >

Re: [PATCH v2 4/5] bios-tables-test: add test for number of cores > 255

2022-08-25 Thread Igor Mammedov
On Sun, 31 Jul 2022 18:21:40 +0200 Julia Suvorova wrote: > The new test is run with a large number of cpus and checks if the > core_count field in smbios_cpu_test (structure type 4) is correct. > > Choose q35 as it allows to run with -smp > 255. > > Signed-off-by: Julia Suvorova pls, run

Re: [PATCH v2 2/5] bios-tables-test: teach test to use smbios 3.0 tables

2022-08-25 Thread Igor Mammedov
On Sun, 31 Jul 2022 18:21:38 +0200 Julia Suvorova wrote: > Introduce the 64-bit entry point. Since we no longer have a total > number of structures, stop checking for the new ones at the EOF > structure (type 127). needs fixing checkpatch warnings other than that Reviewed-by: Igor

Re: [PATCH v2 1/5] hw/smbios: add core_count2 to smbios table type 4

2022-08-24 Thread Igor Mammedov
res than 256, and contains the actual core number per socket if > we have more. > > core_enabled2 and thread_count2 fields work the same way. > > Signed-off-by: Julia Suvorova I'd fix up checkpatch warnings but otherwise looks good to me Reviewed-by: Igor Mammedov > -

Re: [PATCH 2/4] hw/acpi: set ATS capability explicitly per pcie root port

2022-08-24 Thread Igor Mammedov
On Mon, 22 Aug 2022 14:38:09 +0530 Ani Sinha wrote: > Currently the bit 0 of the flags field of Root Port ATS capability reporting > structure sub-table under the DMAR table is set to 1. This indicates > ALL_PORTS, > thus enabling ATS capability for all pcie roots without the ability to turn >

Re: [PATCH v2] hw/acpi: Add ospm_status hook implementation for acpi-ged

2022-08-24 Thread Igor Mammedov
y=47, > argv=argv@entry=0xf518, envp=envp@entry=0x0) at ../softmmu/main.c:38 > #14 0xab16f99c in main (argc=47, argv=0xf518) at > ../softmmu/main.c:47 > > Fixes: ebb62075021a ("hw/acpi: Add ACPI Generic Event Device Support") > Signed-off-by: Ke

Re: [PATCH for-7.1 1/4] target/loongarch: Only allow short -cpu arguments without type name suffix

2022-08-15 Thread Igor Mammedov
On Sun, 14 Aug 2022 22:55:19 +0800 WANG Xuerui wrote: > From: WANG Xuerui > > Previously both "foo" and "foo-loongarch-cpu" are accepted for the -cpu > command-line option, the latter of which being excessively long and > redundant, hence unwanted. Remove support for consistency with other >

Re: [PATCH for-7.1] tests: acpi: silence applesmc warning about invalid key

2022-08-09 Thread Igor Mammedov
On Thu, 28 Jul 2022 09:37:13 -0400 Igor Mammedov wrote: > OSK value is irrelevant for ACPI test case. > Supply fake OSK explicitly to prevent QEMU complaining about > invalid key when it fallbacks to default_osk. > > Suggested-by: Daniel P. Berrangé > Signed-off-by: Igor

Re: [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-08-09 Thread Igor Mammedov
On Mon, 08 Aug 2022 19:57:23 +0200 BB wrote: > Am 8. August 2022 14:15:40 MESZ schrieb Igor Mammedov : > >On Wed, 3 Aug 2022 19:26:30 +0200 > >Bernhard Beschow wrote: > > > >> On Tue, Aug 2, 2022 at 8:37 AM Philippe Mathieu-Daudé via < > >> qemu-devel

Re: [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-08-08 Thread Igor Mammedov
On Wed, 3 Aug 2022 19:26:30 +0200 Bernhard Beschow wrote: > On Tue, Aug 2, 2022 at 8:37 AM Philippe Mathieu-Daudé via < > qemu-devel@nongnu.org> wrote: > > > On 28/7/22 15:16, Igor Mammedov wrote: > > > On Thu, 28 Jul 2022 13:29:07 +0100 > > > Peter Ma

Re: [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-07-29 Thread Igor Mammedov
On Thu, 28 Jul 2022 16:12:34 +0100 Peter Maydell wrote: > On Thu, 28 Jul 2022 at 16:09, Dr. David Alan Gilbert > wrote: > > > > * Igor Mammedov (imamm...@redhat.com) wrote: > > > On Thu, 28 Jul 2022 15:44:20 +0100 > > > "Dr. David Alan Gilbert"

Re: [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-07-29 Thread Igor Mammedov
On Thu, 28 Jul 2022 16:04:58 +0100 Peter Maydell wrote: > On Thu, 28 Jul 2022 at 15:44, Dr. David Alan Gilbert > wrote: > > > > * Igor Mammedov (imamm...@redhat.com) wrote: > > > QEMU crashes trying to save VMSTATE when only MIPS target are compiled in > >

Re: [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-07-28 Thread Igor Mammedov
On Thu, 28 Jul 2022 15:44:20 +0100 "Dr. David Alan Gilbert" wrote: > * Igor Mammedov (imamm...@redhat.com) wrote: > > QEMU crashes trying to save VMSTATE when only MIPS target are compiled in > > $ qemu-system-mips -monitor stdio > > (qemu) migra

Re: [QEMU PATCH v2 4/6] nvdimm: Implement ACPI NVDIMM Label Methods

2022-07-28 Thread Igor Mammedov
On Wed, 27 Jul 2022 13:22:34 +0800 Robert Hoo wrote: > On Thu, 2022-07-21 at 10:58 +0200, Igor Mammedov wrote: > [...] > Thanks Igor for review. > > > > The patch it is too intrusive and my hunch is that it breaks > > > > ABI and needs a bunch

Re: Question to mem-path support at QEMU for Xen

2022-07-28 Thread Igor Mammedov
On Thu, 28 Jul 2022 15:17:49 +0800 Huang Rui wrote: > Hi Igor, > > Appreciate you for the reply! > > On Wed, Jul 27, 2022 at 04:19:30PM +0800, Igor Mammedov wrote: > > On Tue, 26 Jul 2022 15:27:07 +0800 > > Huang Rui wrote: > > > > > Hi Anthon

Re: [PATCH 5/6] hw/loongarch: Add acpi ged support

2022-07-28 Thread Igor Mammedov
On Tue, 12 Jul 2022 16:32:05 +0800 Xiaojuan Yang wrote: > Loongarch virt machine uses general hardware reduces acpi method, rather > than LS7A acpi device. Now only power management function is used in > acpi ged device, memory hotplug will be added later. Also acpi tables > such as

[PATCH for-7.1] tests: acpi: silence applesmc warning about invalid key

2022-07-28 Thread Igor Mammedov
OSK value is irrelevant for ACPI test case. Supply fake OSK explicitly to prevent QEMU complaining about invalid key when it fallbacks to default_osk. Suggested-by: Daniel P. Berrangé Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 4 +++- 1 file changed, 3 insertions(+), 1

Re: [PATCH for-7.1] applesmc: silence invalid key warning in case default one is used

2022-07-28 Thread Igor Mammedov
On Thu, 28 Jul 2022 at 10:48, Daniel P. Berrangé > >> > wrote: > >> > > > >> > > On Thu, Jul 28, 2022 at 05:35:58AM -0400, Igor Mammedov wrote: > >> > > > QEMU probably can't carry OSK key[1] for legal reasons so it > >> > >

Re: [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-07-28 Thread Igor Mammedov
On Thu, 28 Jul 2022 13:29:07 +0100 Peter Maydell wrote: > On Thu, 28 Jul 2022 at 12:50, Igor Mammedov wrote: > > > > QEMU crashes trying to save VMSTATE when only MIPS target are compiled in > > $ qemu-system-mips -monitor stdio > > (qemu) migrate &

Re: [PATCH for-7.1] applesmc: silence invalid key warning in case default one is used

2022-07-28 Thread Igor Mammedov
On Thu, 28 Jul 2022 11:23:00 +0100 Daniel P. Berrangé wrote: > On Thu, Jul 28, 2022 at 11:05:13AM +0100, Peter Maydell wrote: > > On Thu, 28 Jul 2022 at 10:48, Daniel P. Berrangé > > wrote: > > > > > > On Thu, Jul 28, 2022 at 05:35:58AM -0400, Igor Mammed

Re: [PATCH for-7.1] applesmc: silence invalid key warning in case default one is used

2022-07-28 Thread Igor Mammedov
On Thu, 28 Jul 2022 10:48:27 +0100 Daniel P. Berrangé wrote: > On Thu, Jul 28, 2022 at 05:35:58AM -0400, Igor Mammedov wrote: > > QEMU probably can't carry OSK key[1] for legal reasons so it > > can't supply the valid default key. However when tests are run > > applesmc

[PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-07-28 Thread Igor Mammedov
ast risky way to deal with issue. Signed-off-by: Igor Mammedov --- PS: another approach could be setting defaults to disabled state and enabling them using compat props on PC machines (which is more code to deal with => more risky) or continue with PIIX4_PM refactoring to split x86-shism out (whic

[PATCH for-7.1] applesmc: silence invalid key warning in case default one is used

2022-07-28 Thread Igor Mammedov
running MacOS guest might suffer. 1) After some googling, it seems 'secret' key is the same for all Mac hardware and is widely known but whether it's permited to use that is up to lawyers/Apple to decide. Signed-off-by: Igor Mammedov --- hw/misc/applesmc.c | 8 +--- 1 file changed, 5

Re: [PATCH v3] hw/pci/pci_bridge: ensure PCIe slots have only one slot

2022-07-27 Thread Igor Mammedov
On Mon, 25 Jul 2022 16:59:21 +0300 Vladimir Sementsov-Ogievskiy wrote: > On 7/20/22 14:04, Daniel P. Berrangé wrote: > > On Wed, Jul 20, 2022 at 02:00:16PM +0300, Roman Kagan wrote: > >> On Wed, Jul 20, 2022 at 11:44:26AM +0100, Daniel P. Berrangé wrote: > >>> On Wed, Jul 20, 2022 at

Re: Question to mem-path support at QEMU for Xen

2022-07-27 Thread Igor Mammedov
On Tue, 26 Jul 2022 15:27:07 +0800 Huang Rui wrote: > Hi Anthony and other Qemu/Xen guys, > > We are trying to enable venus on Xen virtualization platform. And we would > like to use the backend memory with memory-backend-memfd,id=mem1,size=4G > options on QEMU, however, the QEMU will tell us

Re: [QEMU PATCH v2 4/6] nvdimm: Implement ACPI NVDIMM Label Methods

2022-07-21 Thread Igor Mammedov
On Fri, 01 Jul 2022 17:23:04 +0800 Robert Hoo wrote: > On Thu, 2022-06-16 at 14:32 +0200, Igor Mammedov wrote: > > On Mon, 30 May 2022 11:40:45 +0800 > > Robert Hoo wrote: > > > > > Recent ACPI spec [1] has defined NVDIMM Label Methods _LS{I,R,W}, > > &g

Re: [PATCH v9 07/11] i386/pc: handle unitialized mr in pc_get_cxl_range_end()

2022-07-20 Thread Igor Mammedov
() to be called early > in pc_memory_init(), handle CXL memory region end when its underlying > memory region isn't yet initialized. > > Cc: Jonathan Cameron > Signed-off-by: Joao Martins Acked-by: Igor Mammedov > --- > hw/i386/pc.c | 18 -- > 1 file

Re: [PATCH v3 1/5] target/loongarch/cpu: Fix cpu_class_by_name function

2022-07-19 Thread Igor Mammedov
On Tue, 19 Jul 2022 12:22:14 +0530 Richard Henderson wrote: > On 7/19/22 12:16, Richard Henderson wrote: > > On 7/15/22 11:37, Xiaojuan Yang wrote: > >> In loongarch_cpu_class_by_name(char *cpu_model) function, > >> the argument cpu_model already has the suffix '-loongarch-cpu', > >> so we

Re: [PATCH 7/8] tests: acpi: aarch64/virt: add a test for hmat nodes with no initiators

2022-07-18 Thread Igor Mammedov
On Mon, 11 Jul 2022 11:44:35 +0100 Hesham Almatary wrote: > This patch imitates the "tests: acpi: q35: add test for hmat nodes > without initiators" commit to test numa nodes with different HMAT > attributes, but on AArch64/virt. > > Tested with: > qemu-system-aarch64 -accel tcg \ > -machine

Re: [PATCH 4/8] tests: acpi: q35: update expected blobs *.hmat-noinitiators

2022-07-18 Thread Igor Mammedov
On Mon, 11 Jul 2022 11:44:32 +0100 Hesham Almatary wrote: > From: Brice Goglin > [...] > Signed-off-by: Brice Goglin > --- > tests/data/acpi/q35/APIC.acpihmat-noinitiator | Bin 0 -> 144 bytes [...] > tests/data/acpi/q35/FACP.acpihmat-noinitiator | Bin 0 -> 244 bytes drop these 2 tables,

Re: [PATCH 3/8] tests: acpi: q35: add test for hmat nodes without initiators

2022-07-18 Thread Igor Mammedov
On Mon, 11 Jul 2022 11:44:31 +0100 Hesham Almatary wrote: > From: Brice Goglin > > expected HMAT: > > [000h 4]Signature : "HMAT"[Heterogeneous > Memory Attributes Table] > [004h 0004 4] Table Length : 0120 > [008h 0008 1]

Re: [PATCH v8 09/11] i386/pc: bounds check phys-bits against max used GPA

2022-07-18 Thread Igor Mammedov
On Mon, 18 Jul 2022 15:16:22 +0200 Igor Mammedov wrote: > On Fri, 15 Jul 2022 18:16:26 +0100 > Joao Martins wrote: > > > Calculate max *used* GPA against the CPU maximum possible address > > and error out if the former surprasses the latter. This ensures > >

Re: [PATCH 6/8] hw/arm/virt: Enable HMAT on arm virt machine

2022-07-18 Thread Igor Mammedov
On Mon, 11 Jul 2022 11:44:34 +0100 Hesham Almatary wrote: > From: Xiang Chen > > Since the patchset ("Build ACPI Heterogeneous Memory Attribute Table (HMAT)"), > HMAT is supported, but only x86 is enabled. Enable HMAT on arm virt machine. > > Signed-off-by: Xi

Re: [PATCH 1/8] hmat acpi: Don't require initiator value in -numa

2022-07-18 Thread Igor Mammedov
On Mon, 11 Jul 2022 11:44:29 +0100 Hesham Almatary wrote: > From: Brice Goglin > > The "Memory Proximity Domain Attributes" structure of the ACPI HMAT > has a "Processor Proximity Domain Valid" flag that is currently > always set because Qemu -numa requires an initiator=X value > when hmat=on.

Re: [PATCH 5/8] tests: Add HMAT AArch64/virt empty table files

2022-07-18 Thread Igor Mammedov
On Mon, 11 Jul 2022 11:44:33 +0100 Hesham Almatary wrote: > Signed-off-by: Hesham Almatary > --- > tests/data/acpi/virt/DSDT.acpihmatvirt | 0 > tests/data/acpi/virt/FACP.acpihmatvirt | 0 > tests/data/acpi/virt/HMAT.acpihmatvirt | 0 > tests/data/acpi/virt/SRAT.acpihmatvirt

Re: [PATCH] acpi/nvdimm: Define trace events for NVDIMM and substitute nvdimm_debug()

2022-07-18 Thread Igor Mammedov
On Mon, 18 Jul 2022 15:12:03 +0800 Robert Hoo wrote: [...] > BTW, during the unit test, I met some bios-table test error, > https://gitlab.com/qemu-project/qemu/-/issues/1098, perhaps related to > your patches in June. >

Re: [PATCH v8 10/11] i386/pc: relocate 4g start to 1T where applicable

2022-07-18 Thread Igor Mammedov
address space covers it, we > also add the the reserved HT e820 range as reserved. > > Default phys-bits on Qemu is TCG_PHYS_ADDR_BITS (40) which is enough > to address 1Tb (0xff ). On AMD platforms, if a > ram-above-4g relocation is attempted and the CPU wasn't configured

Re: [PATCH v8 09/11] i386/pc: bounds check phys-bits against max used GPA

2022-07-18 Thread Igor Mammedov
DDR_BITS (40) which is enough for the CPU to > address 1Tb (0xff ) or 1010G (0xfc ) in AMD hosts > with IOMMU. > > This is preparation for AMD guests with >1010G, where it will want relocate > ram-above-4g to be after 1Tb instead of 4G. > > Signed-o

Re: [PATCH v8 08/11] i386/pc: factor out device_memory base/size to helper

2022-07-18 Thread Igor Mammedov
based logic from this newly added helper. > > This is the final step that allows pc_pci_hole64_start() to be callable > at the beginning of pc_memory_init() before any memory regions are > initialized. > > Cc: Jonathan Cameron > Signed-off-by: Joao Martins Acked-by: Igor Mamm

Re: [PATCH v8 07/11] i386/pc: handle unitialized mr in pc_get_cxl_range_end()

2022-07-18 Thread Igor Mammedov
On Fri, 15 Jul 2022 18:16:24 +0100 Joao Martins wrote: > Remove pc_get_cxl_range_end() dependency on the CXL memory region, > and replace with one that does not require the CXL host_mr to determine > the start of CXL start. > > This in preparation to allow pc_pci_hole64_start() to be called

Re: [PATCH v8 05/11] i386/pc: factor out cxl range end to helper

2022-07-18 Thread Igor Mammedov
() to be called before any memory region are > initialized. > > Cc: Jonathan Cameron > Signed-off-by: Joao Martins Acked-by: Igor Mammedov > --- > hw/i386/pc.c | 31 +-- > 1 file changed, 21 insertions(+), 10 deletions(-) > > diff -

Re: [PATCH v8 06/11] i386/pc: factor out cxl range start to helper

2022-07-18 Thread Igor Mammedov
duplication. > > Cc: Jonathan Cameron > Signed-off-by: Joao Martins Acked-by: Igor Mammedov PS: see note below in case series respin > --- > hw/i386/pc.c | 26 +- > 1 file changed, 17 insertions(+), 9 deletions(-) > > diff --git a/hw/i386/pc.c

Re: [PATCH] x86: cpu: Error out if memory exceeds addressable range

2022-07-18 Thread Igor Mammedov
On Mon, 18 Jul 2022 13:47:34 +0530 Nikunj A Dadhania wrote: > Currently it is possible to start a guest with memory that is beyond > the addressable range of CPU and QEMU does not even warn about it. > The default phys_bits is 40 and can address 1TB. However it allows to > start a guest with

Re: [PATCH v7 09/10] i386/pc: relocate 4g start to 1T where applicable

2022-07-15 Thread Igor Mammedov
t; with a big enough phys-bits, print an error message to the user > and do not make the relocation of the above-4g-region if phys-bits > is too low. > > Suggested-by: Igor Mammedov > Signed-off-by: Joao Martins > --- > hw/i386/pc.c | 82 +

Re: [PATCH v6 09/10] i386/pc: relocate 4g start to 1T where applicable

2022-07-14 Thread Igor Mammedov
On Thu, 14 Jul 2022 11:47:19 +0100 Joao Martins wrote: > On 7/14/22 10:54, Joao Martins wrote: > > On 7/14/22 10:28, Igor Mammedov wrote: > >> On Tue, 12 Jul 2022 12:35:49 +0100 > >> Joao Martins wrote: > >>> On 7/12/22 11:01, Joao Martins wrote:

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

2022-07-14 Thread Igor Mammedov
On Thu, 14 Jul 2022 10:16:34 +0100 Peter Maydell wrote: > On Fri, 10 Jun 2022 at 08:57, Michael S. Tsirkin wrote: > > > > virtio,pc,pci: fixes,cleanups,features > > > > more CXL patches > > VIOT > > Igor's huge AML rework > >

Re: [PATCH v6 09/10] i386/pc: relocate 4g start to 1T where applicable

2022-07-14 Thread Igor Mammedov
On Tue, 12 Jul 2022 12:35:49 +0100 Joao Martins wrote: > On 7/12/22 11:01, Joao Martins wrote: > > On 7/12/22 10:06, Igor Mammedov wrote: > >> On Mon, 11 Jul 2022 21:03:28 +0100 > >> Joao Martins wrote: > >>> On 7/11/22 16:31, Joao Martins wrote:

Re: [PATCH v6 09/10] i386/pc: relocate 4g start to 1T where applicable

2022-07-14 Thread Igor Mammedov
On Tue, 12 Jul 2022 11:01:18 +0100 Joao Martins wrote: > On 7/12/22 10:06, Igor Mammedov wrote: > > On Mon, 11 Jul 2022 21:03:28 +0100 > > Joao Martins wrote: > > > >> On 7/11/22 16:31, Joao Martins wrote: > >>> On 7/11/22 15:52, Joao Martin

Re: [PATCH v6 09/10] i386/pc: relocate 4g start to 1T where applicable

2022-07-12 Thread Igor Mammedov
On Mon, 11 Jul 2022 21:03:28 +0100 Joao Martins wrote: > On 7/11/22 16:31, Joao Martins wrote: > > On 7/11/22 15:52, Joao Martins wrote: > >> On 7/11/22 13:56, Igor Mammedov wrote: > >>> On Fri, 1 Jul 2022 17:10:13 +0100 > >>> Joao Martins wrote:

Re: [PATCH v6 10/10] i386/pc: restrict AMD only enforcing of valid IOVAs to new machine type

2022-07-11 Thread Igor Mammedov
rops, pc_compat_7_0, pc_compat_7_0_len); > } > diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h > index 568c226d3034..3a873ff69499 100644 > --- a/include/hw/i386/pc.h > +++ b/include/hw/i386/pc.h > @@ -118,6 +118,7 @@ struct PCMachineClass { > bool has_reserved_memory; > bool enforce_aligned_dimm; > bool broken_reserved_end; > +bool enforce_valid_iova; maybe s/enforce_valid_iova/enforce_amd_1tb_hole/ to be less ambiguous otherwise looks good to me so Acked-by: Igor Mammedov > > /* generate legacy CPU hotplug AML */ > bool legacy_cpu_hotplug;

Re: [PATCH v6 07/10] i386/pc: handle unitialized mr in pc_get_cxl_range_end()

2022-07-11 Thread Igor Mammedov
On Thu, 7 Jul 2022 16:21:07 +0100 Joao Martins wrote: > On 7/7/22 14:05, Igor Mammedov wrote: > > On Fri, 1 Jul 2022 17:10:11 +0100 > > Joao Martins wrote: > > > >> This in preparation to allow pc_pci_hole64_start() to be called early > >> in pc_memo

Re: [PATCH v6 09/10] i386/pc: relocate 4g start to 1T where applicable

2022-07-11 Thread Igor Mammedov
t; with a big enough phys-bits, print an error message to the user > and do not make the relocation of the above-4g-region if phys-bits > is too low. > > Suggested-by: Igor Mammedov > Signed-off-by: Joao Martins > --- > hw/i386/pc.c | 101 +

Re: [PATCH v6 06/10] i386/pc: factor out cxl range start to helper

2022-07-11 Thread Igor Mammedov
On Thu, 7 Jul 2022 16:18:43 +0100 Joao Martins wrote: > On 7/7/22 14:00, Igor Mammedov wrote: > > On Fri, 1 Jul 2022 17:10:10 +0100 > > Joao Martins wrote: > > > >> Factor out the calculation of the base address of the MR. It will be > >> used lat

Re: [PATCH 0/3] hw/cxl, hw/machine, hw/i386: Misc minor fixes / cleanup

2022-07-11 Thread Igor Mammedov
ons(+), 6 deletions(-) > For whole series: Acked-by: Igor Mammedov

Re: [PATCH v6 08/10] i386/pc: factor out device_memory base/size to helper

2022-07-07 Thread Igor Mammedov
On Fri, 1 Jul 2022 17:10:12 +0100 Joao Martins wrote: > Move obtaining hole64_start from device_memory MR base/size into an helper > alongside correspondent getters in pc_memory_init() when the hotplug > range is unitialized. > > This is the final step that allows pc_pci_hole64_start() to be

Re: [PATCH v6 07/10] i386/pc: handle unitialized mr in pc_get_cxl_range_end()

2022-07-07 Thread Igor Mammedov
On Fri, 1 Jul 2022 17:10:11 +0100 Joao Martins wrote: > This in preparation to allow pc_pci_hole64_start() to be called early > in pc_memory_init(), handle CXL memory region end when its underlying > memory region isn't yet initialized. > > Cc: Jonathan Cameron > Signed-off-by: Joao Martins

Re: [PATCH v6 06/10] i386/pc: factor out cxl range start to helper

2022-07-07 Thread Igor Mammedov
On Fri, 1 Jul 2022 17:10:10 +0100 Joao Martins wrote: > Factor out the calculation of the base address of the MR. It will be > used later on for the cxl range end counterpart calculation and as > well in pc_memory_init() CXL mr initialization, thus avoiding > duplication. > > Cc: Jonathan

Re: [PATCH v6 05/10] i386/pc: factor out cxl range end to helper

2022-07-07 Thread Igor Mammedov
On Fri, 1 Jul 2022 17:10:09 +0100 Joao Martins wrote: > Move calculation of CXL memory region end to separate helper in > preparation to allow pc_pci_hole64_start() to be called before > any mrs are initialized. s/mrs/memory regions/ > > Cc: Jonathan Cameron > Signed-off-by: Joao Martins

Re: [PATCH v6 04/10] i386/pc: factor out above-4g end to an helper

2022-07-07 Thread Igor Mammedov
On Fri, 1 Jul 2022 17:10:08 +0100 Joao Martins wrote: > There's a couple of places that seem to duplicate this calculation > of RAM size above the 4G boundary. Move all those to a helper function. > > Signed-off-by: Joao Martins Reviewed-by: Igor Mammedov > --- >

Re: [PATCH 02/17] acpi: x86: deduplicate HPET AML building

2022-07-07 Thread Igor Mammedov
On Thu, 7 Jul 2022 06:08:35 -0400 "Michael S. Tsirkin" wrote: > On Thu, Jul 07, 2022 at 11:16:16AM +0200, Igor Mammedov wrote: > > On Fri, 1 Jul 2022 12:26:16 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Fri, Jul 01, 2022 at 09:35:0

Re: [PATCH] acpi/nvdimm: Define trace events for NVDIMM and substitute nvdimm_debug()

2022-07-07 Thread Igor Mammedov
On Mon, 4 Jul 2022 16:58:52 +0800 Robert Hoo wrote: > Signed-off-by: Robert Hoo > Reviewed-by: Jingqi Liu Reviewed-by: Igor Mammedov > --- > This is separated from patch set > https://lore.kernel.org/qemu-devel/20220616143542.3e049...@redhat.com/ > > hw/acpi

Re: [PATCH 02/17] acpi: x86: deduplicate HPET AML building

2022-07-07 Thread Igor Mammedov
On Fri, 1 Jul 2022 12:26:16 -0400 "Michael S. Tsirkin" wrote: > On Fri, Jul 01, 2022 at 09:35:00AM -0400, Igor Mammedov wrote: > > HPET AML doesn't depend on piix4 nor q35, move code buiding it > > to common scope to avoid duplication. > > > > Signed-off-by:

Re: [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa

2022-07-04 Thread Igor Mammedov
On Fri, 1 Jul 2022 17:08:48 +0100 Jonathan Cameron wrote: > On Thu, 30 Jun 2022 09:30:58 -0400 > "Michael S. Tsirkin" wrote: > > > On Thu, Jun 30, 2022 at 02:40:13PM +0200, Brice Goglin wrote: > > > > > > Le 30/06/2022 à 14:23, Igor Mammedov a éc

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

2022-07-01 Thread Igor Mammedov
) // _EJx: Eject Device { PCEJ (BSEL, _SUN) } +} Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 14 -- tests/data/acpi/pc/DSDT | Bin 6422 -> 6

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

2022-07-01 Thread Igor Mammedov
Expected change: -Name (_SUN, 0x0X) // _SUN: Slot User Number Name (_ADR, 0xY) // _ADR: Address ... +Name (_SUN, 0xX) // _SUN: Slot User Number Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 14

[PATCH 15/17] x86: pci: acpi: reorder Device's _DSM method

2022-07-01 Thread Igor Mammedov
slots descriptors. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index fd7f3253e5..406bbac1c7 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -444,15 +444,13

[PATCH 14/17] tests: acpi: whitelist pc/q35 DSDT before moving _ADR field

2022-07-01 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

[PATCH 05/17] acpi: x86: refactor PDSM method to reduce nesting

2022-07-01 Thread Igor Mammedov
.., it will help with code readability and make easier to extend method in followup patches Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 139 --- 1 file changed, 77 insertions(+), 62 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386

[PATCH 06/17] x86: acpi: _DSM: use Package to pass parameters

2022-07-01 Thread Igor Mammedov
arguments of _DSM as is, and pack custom parameters into Package that is passed as the last argument to PDSM. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 40 +++- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/hw/i386/acpi-build.c b

[PATCH 08/17] tests: acpi: whitelist pc/q35 DSDT before switching _DSM to use ASUN

2022-07-01 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

[PATCH 17/17] x86: pci: acpi: deduplate PCI slots creation

2022-07-01 Thread Igor Mammedov
. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 111 +-- 1 file changed, 54 insertions(+), 57 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 406bbac1c7..9d0512666d 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c

[PATCH 11/17] tests: acpi: whitelist pc/q35 DSDT before moving _ADR field

2022-07-01 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

[PATCH 09/17] x86: acpi: cleanup PCI device _DSM duplication

2022-07-01 Thread Igor Mammedov
add ASUN variable to hotpluggable slots and use it instead of _SUN which has the same value to reuse _DMS code on both branches (hot- and non-hotpluggable). No functional change. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 56 +--- 1 file

[PATCH 03/17] tests: acpi: update expected blobs after HPET move

2022-07-01 Thread Igor Mammedov
Return (0x0F) +} + +Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings +{ +Memory32Fixed (ReadOnly, +0xFED0, // Address Base +0x0400, // Address Length + ) + })

[PATCH 12/17] x86: pci: acpi: reorder Device's _ADR and _SUN fields

2022-07-01 Thread Igor Mammedov
when slot is hotpluggable. 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 36fe43c52f..fd7f3253e5 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -442,8 +442,8

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

2022-07-01 Thread Igor Mammedov
BSEL, +_SUN +} +Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0)) } } Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 34 tests/data/ac

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

2022-07-01 Thread Igor Mammedov
BSEL, -_SUN +ASUN } Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0)) } Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 14 ---

[PATCH 02/17] acpi: x86: deduplicate HPET AML building

2022-07-01 Thread Igor Mammedov
HPET AML doesn't depend on piix4 nor q35, move code buiding it to common scope to avoid duplication. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index cad6f5ac41

[PATCH 04/17] tests: acpi: whitelist pc/q35 DSDT due to HPET AML move

2022-07-01 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 34 + 1 file changed, 34 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..452145badd 100644 --- a/tests/qtest

[PATCH 01/17] tests: acpi: whitelist pc/q35 DSDT due to HPET AML move

2022-07-01 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 32 + 1 file changed, 32 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..a7aa428fab 100644 --- a/tests/qtest

  1   2   3   4   5   6   7   8   9   10   >