Re: [PATCH qemu ] hw/acpi: Fix big endian host creation of Generic Port Affinity Structures

2024-06-06 Thread Igor Mammedov
On Wed, 5 Jun 2024 19:04:55 +0100 Jonathan Cameron wrote: > Treating the HID as an integer caused it to get bit reversed > on big endian hosts running little endian guests. Treat it > as a character array instead. > > Fixes hw/acpi: Generic Port Affinity Structure Support > Tested-by: Richard

Re: [PATCH V2 2/3] target/i386: call cpu_exec_realizefn before x86_cpu_filter_features

2024-06-05 Thread Igor Mammedov
On Mon, 3 Jun 2024 14:29:50 -0700 "Chen, Zide" wrote: > On 6/3/2024 2:30 AM, Igor Mammedov wrote: > > On Sat, 1 Jun 2024 23:26:55 +0800 > > Zhao Liu wrote: > > > >> On Fri, May 31, 2024 at 10:13:47AM -0700, Chen, Zide wrote: > >>> Dat

Re: [PATCH 3/3] hw/riscv/virt-acpi-build.c: Update the HID of RISC-V UART

2024-06-05 Thread Igor Mammedov
On Tue, 28 May 2024 13:01:03 +0530 Sunil V L wrote: > RISC-V is going to use new HID RSCV0003 for generi UART. So, update the > HID. where does it come from? > > Signed-off-by: Sunil V L > --- > hw/riscv/virt-acpi-build.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCH V12 0/8] Add architecture agnostic code to support vCPU Hotplug

2024-06-05 Thread Igor Mammedov
On Sun, 2 Jun 2024 18:03:05 -0400 "Michael S. Tsirkin" wrote: > On Thu, May 30, 2024 at 12:42:33AM +0100, Salil Mehta wrote: > > Virtual CPU hotplug support is being added across various > > architectures[1][3]. > > This series adds various code bits common across all architectures: > > > > 1.

Re: [PATCH V3 0/2] improve -overcommit cpu-pm=on|off

2024-06-05 Thread Igor Mammedov
On Mon, 3 Jun 2024 17:02:20 -0700 Zide Chen wrote: > Currently, if running "-overcommit cpu-pm=on" on hosts that don't > have MWAIT support, the MWAIT/MONITOR feature is advertised to the > guest and executing MWAIT/MONITOR on the guest triggers #UD. > > Typically #UD takes priority over

Re: [PATCH V3 2/2] target/i386: Advertise MWAIT iff host supports

2024-06-05 Thread Igor Mammedov
ut. > > Additionally, it seems not a good idea to handle guest CPUID leaves in > host_cpu_realizefn(), and this patch merges host_cpu_enable_cpu_pm() > into kvm_cpu_realizefn(). > > Fixes: f5cc5a5c1686 ("i386: split cpu accelerators from cpu.c, using > AccelCPUClass") > F

Re: [PATCH V3 1/2] vl: Allow multiple -overcommit commands

2024-06-05 Thread Igor Mammedov
ca ("Remove the deprecated -realtime option") > Suggested-by: Thomas Huth > Signed-off-by: Zide Chen > Reviewed-by: Thomas Huth > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > > V3: added Reviewed-by > > v2: > Thanks to Thomas' suggest

Re: [PATCH] qtest/x86/numa-test: do not use the obsolete 'pentium' cpu

2024-06-05 Thread Igor Mammedov
On Tue, 4 Jun 2024 11:51:33 +0530 Ani Sinha wrote: > 'pentium' cpu is old and obsolete and should be avoided for running tests if > its not strictly needed. Use 'max' cpu instead for generic non-cpu specific > numa test. > > CC: th...@redhat.com > Signed-off-by: Ani Sinha

Re: [PATCH V2 2/3] target/i386: call cpu_exec_realizefn before x86_cpu_filter_features

2024-06-03 Thread Igor Mammedov
On Sat, 1 Jun 2024 23:26:55 +0800 Zhao Liu wrote: > On Fri, May 31, 2024 at 10:13:47AM -0700, Chen, Zide wrote: > > Date: Fri, 31 May 2024 10:13:47 -0700 > > From: "Chen, Zide" > > Subject: Re: [PATCH V2 2/3] target/i386: call cpu_exec_realizefn before > > x86_cpu_filter_features > > > > On

Re: [PATCH V2 0/3] improve -overcommit cpu-pm=on|off

2024-05-30 Thread Igor Mammedov
> > > > > > > > On 5/29/2024 5:46 AM, Igor Mammedov wrote: > > > On Tue, 28 May 2024 11:16:59 -0700 > > > "Chen, Zide" wrote: > > > > > >> On 5/28/2024 2:23 AM, Igor Mammedov wrote: > > >>>

Re: [PATCH V2 0/3] improve -overcommit cpu-pm=on|off

2024-05-30 Thread Igor Mammedov
> > > > > > > > On 5/29/2024 5:46 AM, Igor Mammedov wrote: > > > On Tue, 28 May 2024 11:16:59 -0700 > > > "Chen, Zide" wrote: > > > > > >> On 5/28/2024 2:23 AM, Igor Mammedov wrote: > > >>>

Re: [PATCH] hw/i386/acpi-build: Return a pre-computed _PRT table

2024-05-30 Thread Igor Mammedov
On Fri, 3 May 2024 11:09:47 +0200 Ricardo Ribalda wrote: > Friendly ping > > On Wed, 17 Apr 2024 at 15:56, Ricardo Ribalda wrote: > > > > When qemu runs without kvm acceleration the ACPI executions take a great > > amount of time. If they take more than the default time (30sec), the > > ACPI

Re: [PATCH v5 23/23] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE

2024-05-29 Thread Igor Mammedov
On Wed, 29 May 2024 07:15:39 +0200 Philippe Mathieu-Daudé wrote: > PCMachineClass::acpi_data_size was only used by the pc-i440fx-2.0 > machine, which got removed. Since it is constant, replace the class > field by a definition (local to hw/i386/pc.c, since not used > elsewhere). > >

Re: [PATCH v5 20/23] hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine

2024-05-29 Thread Igor Mammedov
f-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov > --- > docs/about/deprecated.rst | 4 ++-- > docs/about/removed-features.rst | 2 +- > hw/i386/pc.c| 25 - > hw/i386/pc_piix.c | 19 --- >

Re: [PATCH v5 19/23] hw/i386/acpi: Remove AcpiBuildState::rsdp field

2024-05-29 Thread Igor Mammedov
On Wed, 29 May 2024 07:15:35 +0200 Philippe Mathieu-Daudé wrote: > AcpiBuildState::rsdp is always NULL, remove it, > simplifying acpi_build_update(). > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Thomas Huth > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov

Re: [PATCH v5 18/23] hw/i386/pc: Remove PCMachineClass::rsdp_in_ram

2024-05-29 Thread Igor Mammedov
ed-by: Thomas Huth > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > include/hw/i386/pc.h | 1 - > hw/i386/acpi-build.c | 35 --- > hw/i386/pc.c | 1 - > 3 files changed, 4 insertions(+), 33 deletions(-) > > diff --git a/i

Re: [PATCH v5 17/23] hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob

2024-05-29 Thread Igor Mammedov
Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > include/hw/i386/pc.h | 3 --- > hw/i386/acpi-build.c | 10 -- > hw/i386/pc.c | 1 - > 3 files changed, 14 deletions(-) > > diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h > index 996495

Re: [PATCH v5 19/23] hw/i386/acpi: Remove AcpiBuildState::rsdp field

2024-05-29 Thread Igor Mammedov
On Wed, 29 May 2024 07:15:35 +0200 Philippe Mathieu-Daudé wrote: > AcpiBuildState::rsdp is always NULL, remove it, > simplifying acpi_build_update(). > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Thomas Huth > Reviewed-by: Zhao Liu I'd squash this into previous patch > --- >

Re: [PATCH v5 18/23] hw/i386/pc: Remove PCMachineClass::rsdp_in_ram

2024-05-29 Thread Igor Mammedov
ed-by: Thomas Huth > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > include/hw/i386/pc.h | 1 - > hw/i386/acpi-build.c | 35 --- > hw/i386/pc.c | 1 - > 3 files changed, 4 insertions(+), 33 deletions(-) > > diff --git a/i

Re: [PATCH v5 16/23] hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine

2024-05-29 Thread Igor Mammedov
f-by: Philippe Mathieu-Daudé > Reviewed-by: Thomas Huth > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > docs/about/deprecated.rst | 2 +- > docs/about/removed-features.rst | 2 +- > include/hw/i386/pc.h| 3 --- > hw/i386/pc.c

Re: [PATCH v5 15/23] hw/mem/memory-device: Remove legacy_align from memory_device_pre_plug()

2024-05-29 Thread Igor Mammedov
: Zhao Liu Reviewed-by: Igor Mammedov > --- > include/hw/mem/memory-device.h | 2 +- > hw/i386/pc.c | 3 +-- > hw/mem/memory-device.c | 12 > hw/mem/pc-dimm.c | 2 +- > hw/virtio/virtio-md-pci.c | 2 +- > 5 fi

Re: [PATCH v5 14/23] hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug()

2024-05-29 Thread Igor Mammedov
On Wed, 29 May 2024 07:15:30 +0200 Philippe Mathieu-Daudé wrote: > 'legacy_align' is always NULL, remove it. > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Thomas Huth > Reviewed-by: David Hildenbrand > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > ---

Re: [PATCH v5 13/23] hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm

2024-05-29 Thread Igor Mammedov
t in Avocado test_phybits_low_pse36(). > > Reviewed-by: Zhao Liu > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov > --- > include/hw/i386/pc.h | 3 --- > hw/i386/pc.c | 14 +++--- > tests/avocado/mem-addr-space-check.py

Re: [PATCH v5 12/23] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid()

2024-05-29 Thread Igor Mammedov
On Wed, 29 May 2024 07:15:28 +0200 Philippe Mathieu-Daudé wrote: > 'smbios_encode_uuid' is always true, remove it, > simplifying smbios_encode_uuid(). > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Zhao Liu I'd squash this into previous commit, but won't insist. Re

Re: [PATCH v5 11/23] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults()

2024-05-29 Thread Igor Mammedov
On Wed, 29 May 2024 07:15:27 +0200 Philippe Mathieu-Daudé wrote: > 'uuid_encoded' is always true, remove it. > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > include/hw/firmware/smbios.h | 3 +-- > hw/arm/virt

Re: [PATCH v5 10/23] hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded

2024-05-29 Thread Igor Mammedov
gt; Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > include/hw/i386/pc.h | 1 - > hw/i386/fw_cfg.c | 3 +-- > hw/i386/pc.c | 1 - > 3 files changed, 1 insertion(+), 4 deletions(-) > > diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h > index

Re: [PATCH v5 09/23] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h'

2024-05-29 Thread Igor Mammedov
; Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Thomas Huth > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > target/i386/kvm/kvm-cpu.h | 41 --- > target/i386/kvm/kvm-cpu.c | 3 +-- > 2 files changed, 1 insertion(+), 43 deletio

Re: [PATCH v5 09/23] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h'

2024-05-29 Thread Igor Mammedov
; Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Thomas Huth > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > target/i386/kvm/kvm-cpu.h | 41 --- > target/i386/kvm/kvm-cpu.c | 3 +-- > 2 files changed, 1 insertion(+), 43 deletio

Re: [PATCH v5 08/23] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine

2024-05-29 Thread Igor Mammedov
f-by: Philippe Mathieu-Daudé > Reviewed-by: Thomas Huth > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > docs/about/deprecated.rst | 2 +- > docs/about/removed-features.rst | 2 +- > include/hw/i386/pc.h| 3 --- > hw/i386/pc.c

Re: [PATCH v5 07/23] hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug'

2024-05-29 Thread Igor Mammedov
Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > hw/acpi/ich9.c | 28 ++-- > 1 file changed, 6 insertions(+), 22 deletions(-) > > diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c > index 9b605af21a..02d8546bd3 100644 > --- a/hw/acpi/ich9.c > +++ b/

Re: [PATCH v5 06/23] hw/acpi/ich9: Remove 'memory-hotplug-support' property

2024-05-29 Thread Igor Mammedov
On Wed, 29 May 2024 07:15:22 +0200 Philippe Mathieu-Daudé wrote: > No external code sets the 'memory-hotplug-support' > property, remove it. > > Suggested-by: Thomas Huth > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov >

Re: [PATCH v5 05/23] hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size

2024-05-29 Thread Igor Mammedov
ao Liu nit below otherwise Reviewed-by: Igor Mammedov > --- > include/hw/i386/pc.h | 1 - > hw/i386/acpi-build.c | 62 +--- > 2 files changed, 12 insertions(+), 51 deletions(-) > > diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h &

Re: [PATCH v5 04/23] hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag

2024-05-29 Thread Igor Mammedov
-Daudé > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > hw/usb/hcd-xhci.h | 3 +-- > hw/usb/hcd-xhci-nec.c | 2 -- > hw/usb/hcd-xhci-pci.c | 1 - > hw/usb/hcd-xhci.c | 42 -- > 4 files changed, 9 insertions(+), 39 de

Re: [PATCH v5 03/23] hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag

2024-05-29 Thread Igor Mammedov
-Daudé > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > hw/usb/hcd-xhci.h | 1 - > hw/usb/hcd-xhci-nec.c | 2 -- > hw/usb/hcd-xhci-pci.c | 3 +-- > 3 files changed, 1 insertion(+), 5 deletions(-) > > diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h > i

Re: [PATCH v5 02/23] hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine

2024-05-29 Thread Igor Mammedov
f-by: Philippe Mathieu-Daudé > Reviewed-by: Thomas Huth > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > docs/about/deprecated.rst | 2 +- > docs/about/removed-features.rst | 2 +- > include/hw/i386/pc.h| 3 --- > hw/i386/pc.c

Re: [PATCH v5 01/23] hw/i386/pc: Deprecate 2.4 to 2.12 pc-i440fx machines

2024-05-29 Thread Igor Mammedov
f-by: Philippe Mathieu-Daudé > Reviewed-by: Thomas Huth > Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov > --- > docs/about/deprecated.rst | 4 ++-- > hw/i386/pc_piix.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/docs/about/deprecate

Re: [PATCH V2 0/3] improve -overcommit cpu-pm=on|off

2024-05-29 Thread Igor Mammedov
On Tue, 28 May 2024 11:16:59 -0700 "Chen, Zide" wrote: > On 5/28/2024 2:23 AM, Igor Mammedov wrote: > > On Fri, 24 May 2024 13:00:14 -0700 > > Zide Chen wrote: > > > >> Currently, if running "-overcommit cpu-pm=on" on hosts that don't

Re: [PATCH V2 0/3] improve -overcommit cpu-pm=on|off

2024-05-28 Thread Igor Mammedov
On Fri, 24 May 2024 13:00:14 -0700 Zide Chen wrote: > Currently, if running "-overcommit cpu-pm=on" on hosts that don't > have MWAIT support, the MWAIT/MONITOR feature is advertised to the > guest and executing MWAIT/MONITOR on the guest triggers #UD. this is missing proper description how do

Re: [PATCH] x86: cpu: fixup number of addressable IDs for processor cores in the physical package

2024-05-27 Thread Igor Mammedov
On Mon, 27 May 2024 11:13:33 +0800 Chuang Xu wrote: > When QEMU is started with: > -cpu host,host-cache-info=on,l3-cache=off \ > -smp 2,sockets=1,dies=1,cores=1,threads=2 > Guest can't acquire maximum number of addressable IDs for processor cores in > the physical package from CPUID[04H].

Re: [PATCH] system/qdev-monitor: move drain_call_rcu call under if (!dev) in qmp_device_add()

2024-04-30 Thread Igor Mammedov
On Fri, 3 Nov 2023 13:56:02 +0300 Dmitrii Gavrilov wrote: Seems related to cpu hotpug issues, CCing Boris for awareness. > Original goal of addition of drain_call_rcu to qmp_device_add was to cover > the failure case of qdev_device_add. It seems call of drain_call_rcu was > misplaced in

Re: [RFC QEMU PATCH v9 2/2] virtio-pci: implement No_Soft_Reset bit

2024-04-16 Thread Igor Mammedov
On Tue, 16 Apr 2024 15:01:27 +0800 Jiqian Chen wrote: > In current code, when guest does S3, virtio-gpu are reset due to the > bit No_Soft_Reset is not set. After resetting, the display resources > of virtio-gpu are destroyed, then the display can't come back and only > show blank after

[PATCH] kvm: error out of kvm_irqchip_add_msi_route() in case of full route table

2024-04-08 Thread Igor Mammedov
re -accel kvm is set. virtio_bus_start_ioeventfd: failed. Fallback to userspace (slower). Signed-off-by: Igor Mammedov --- accel/kvm/kvm-all.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index d4d57da265..10fae1db05 100644 --- a

Re: [PATCH v2] hw/i386/acpi: Set PCAT_COMPAT bit only when pic is not disabled

2024-04-03 Thread Igor Mammedov
On Wed, 3 Apr 2024 10:59:53 -0400 Xiaoyao Li wrote: > A value 1 of PCAT_COMPAT (bit 0) of MADT.Flags indicates that the system > also has a PC-AT-compatible dual-8259 setup, i.e., the PIC. > > When PIC is not enabled (pic=off) for x86 machine, the PCAT_COMPAT bit > needs to be cleared.

Re: [PATCH for-9.0] docs/about: Mark the iaspc machine type as deprecated

2024-03-27 Thread Igor Mammedov
On Wed, 27 Mar 2024 10:49:43 + Daniel P. Berrangé wrote: > On Tue, Mar 26, 2024 at 05:16:32PM +0100, Igor Mammedov wrote: > > On Tue, 26 Mar 2024 14:29:58 +0100 > > Philippe Mathieu-Daudé wrote: > > > > > Hi Igor, > > > > > > On 26/3/2

Re: [PATCH-for-9.1] hw/i386: Add a config to only build the microvm machine

2024-03-26 Thread Igor Mammedov
On Tue, 26 Mar 2024 19:01:50 +0300 Michael Tokarev wrote: > 26.03.2024 18:58, Philippe Mathieu-Daudé: > > >> This is not enough.  This step is good already, but it lacks default > >> machine > >> type selection.  In debian we carry a tiny patch to make microvm the > >> default > >> machine

Re: [PATCH for-9.0] docs/about: Mark the iaspc machine type as deprecated

2024-03-26 Thread Igor Mammedov
On Tue, 26 Mar 2024 13:30:48 + Mark Cave-Ayland wrote: > On 26/03/2024 12:51, Igor Mammedov wrote: > > > ISAPC machine was introduced 25 years ago and it's a lot of time since > > such machine was around with real ISA only PC hardware practically defunct. > > A

Re: [PATCH for-9.0] docs/about: Mark the iaspc machine type as deprecated

2024-03-26 Thread Igor Mammedov
On Tue, 26 Mar 2024 14:29:58 +0100 Philippe Mathieu-Daudé wrote: > Hi Igor, > > On 26/3/24 14:08, Thomas Huth wrote: > > > > s/iaspc/isapc/ in the subject > > > > On 26/03/2024 13.51, Igor Mammedov wrote: > >> ISAPC machine was introduced

[PATCH for-9.0] docs/about: Mark the iaspc machine type as deprecated

2024-03-26 Thread Igor Mammedov
) Rather than spending time on fixing 'the oldest' no longer tested machine type, deprecate it so we can clean up QEMU code from legacy fixups and hopefully make it easier to follow. Folks who have to use ancient guest that requires ISAPC can still use older QEMU to play with it. Signed-off-by: Igor

Re: [PATCH trivial for-9.0] hw/i386/fw_cfg.c: fix non-legacy smbios build

2024-03-26 Thread Igor Mammedov
On Mon, 25 Mar 2024 21:01:42 +0300 Michael Tokarev wrote: > 25.03.2024 18:20, Igor Mammedov wrote > > On Mon, 25 Mar 2024 16:09:20 +0300 > > Michael Tokarev wrote: > > > >> When building qemu with smbios but not legacy mode (eg minimal microvm

[PATCH trivial for-9.0] smbios: add stub for smbios_get_table_legacy()

2024-03-26 Thread Igor Mammedov
el Tokarev Singned-off-by: Philippe Mathieu-Daudé Signed-off-by: Igor Mammedov --- Compile tested only. While it's fixing bug for off-tree usecase with non-upstream config, it's trivial enough to go into 9.0 if time frame allows. Benefit of it going into 9.0 is that folks who play with minimal builds

Re: [PATCH trivial for-9.0] hw/i386/fw_cfg.c: fix non-legacy smbios build

2024-03-25 Thread Igor Mammedov
On Mon, 25 Mar 2024 14:40:21 +0100 Philippe Mathieu-Daudé wrote: > Hi Michael, > > On 25/3/24 14:09, Michael Tokarev wrote: > > When building qemu with smbios but not legacy mode (eg minimal microvm > > build), > > link fails with: > > > >hw/i386/fw_cfg.c:74: undefined reference to

Re: [PATCH trivial for-9.0] hw/i386/fw_cfg.c: fix non-legacy smbios build

2024-03-25 Thread Igor Mammedov
On Mon, 25 Mar 2024 16:09:20 +0300 Michael Tokarev wrote: > When building qemu with smbios but not legacy mode (eg minimal microvm build), > link fails with: > > hw/i386/fw_cfg.c:74: undefined reference to `smbios_get_table_legacy' > > This is because fw_cfg interface can call this function

Re: [PATCH trivial for-9.0] hw/i386/fw_cfg.c: fix non-legacy smbios build

2024-03-25 Thread Igor Mammedov
On Mon, 25 Mar 2024 16:09:20 +0300 Michael Tokarev wrote: > When building qemu with smbios but not legacy mode (eg minimal microvm build), > link fails with: > > hw/i386/fw_cfg.c:74: undefined reference to `smbios_get_table_legacy' > > This is because fw_cfg interface can call this function

[PATCH v4 19/21] pc/q35: set SMBIOS entry point type to 'auto' by default

2024-03-14 Thread Igor Mammedov
of smbios-entry-point-type after series for pc/q35 machines: * 9.0-newer: 'auto' * 8.1-8.2: '64' * 8.0-older: '32' Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2008 Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- hw/i386/pc.c | 2 +- hw/i386

[PATCH v4 03/21] tests: smbios: add test for legacy mode CLI options

2024-03-14 Thread Igor Mammedov
Unfortunately having 2.0 machine type deprecated is not enough to get rid of legacy SMBIOS handling since 'isapc' also uses that and it's staying around. Hence add test for CLI options handling to be sure that it ain't broken during SMBIOS code refactoring. Signed-off-by: Igor Mammedov Reviewed

[PATCH v4 17/21] smbios: error out when building type 4 table is not possible

2024-03-14 Thread Igor Mammedov
-type='auto' Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- hw/smbios/smbios.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index d9dda226e6..be64919def 100644 --- a/hw/smbios/smbios.c

[PATCH v4 04/21] smbios: cleanup smbios_get_tables() from legacy handling

2024-03-14 Thread Igor Mammedov
it. Drop legacy related check in smbios_get_tables() and return from fw_cfg_build_smbios() early if legacy tables where built without proceeding to non legacy part of the function. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- hw/i386/fw_cfg.c | 1 + hw/smbios

[PATCH v4 01/21] tests: smbios: make it possible to write SMBIOS only test

2024-03-14 Thread Igor Mammedov
tions" test case. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- tests/qtest/bios-tables-test.c | 47 +++--- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-te

[PATCH v4 10/21] smbios: rename/expose structures/bitmaps used by both legacy and modern code

2024-03-14 Thread Igor Mammedov
will move legacy code into a separate file. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha --- include/hw/firmware/smbios.h | 16 + hw/smbios/smbios.c | 113 --- 2 files changed, 69 insertions(+), 60 deletions(-) diff --git a/include/hw

[PATCH v4 08/21] smbios: don't check type4 structures in legacy mode

2024-03-14 Thread Igor Mammedov
to add support for type4 to legacy code (both QEMU and SeaBIOS), simplify smbios_get_table_legacy() by dropping not relevant check in legacy code and error out on type4 blob. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- * The issue affects 'isapc' and pc-i440fx

[PATCH v4 06/21] smbios: get rid of smbios_legacy global

2024-03-14 Thread Igor Mammedov
clean up smbios_set_defaults() which is reused by legacy and non legacy machines from being aware of 'legacy' notion and need to turn it off. And push legacy handling up to PC machine code where it's relevant. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Acked-by: Daniel Henrique Barboza

[PATCH v4 20/21] tests: acpi: update expected SSDT.dimmpxm blob

2024-03-14 Thread Igor Mammedov
address shift is caused by switch to 32-bit SMBIOS entry point which has slightly different size from 64-bit one and happens to trigger a bit different memory layout. Expected diff: -Name (MEMA, 0x07FFE000) +Name (MEMA, 0x07FFF000) Signed-off-by: Igor Mammedov Acked-by: Ani Sinha

[PATCH v4 21/21] smbios: add extra comments to smbios_get_table_legacy()

2024-03-14 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/smbios/smbios_legacy.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/smbios/smbios_legacy.c b/hw/smbios/smbios_legacy.c index 06907cd16c..c37a8ee821 100644 --- a/hw/smbios/smbios_legacy.c +++ b/hw/smbios/smbios_legacy.c @@ -151,6 +151,9

[PATCH v4 12/21] smbios: handle errors consistently

2024-03-14 Thread Igor Mammedov
smbios_tables pointer after freeing. that will avoid double free if smbios_get_tables() is called multiple times. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha --- include/hw/firmware/smbios.h | 4 ++-- hw/i386/fw_cfg.c | 3 ++- hw/smbios/smbios.c | 34

[PATCH v4 16/21] smbios: in case of entry point is 'auto' try to build v2 tables 1st

2024-03-14 Thread Igor Mammedov
that is not to possible to describe with SMBIOS 2.0 will switch automatically to SMBIOS 3.0 (which will trigger Windows bug but there is nothing QEMU can do here, so go and aks Microsoft to real fix). Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- hw/smbios/smbios.c

[PATCH v4 05/21] smbios: get rid of smbios_smp_sockets global

2024-03-14 Thread Igor Mammedov
it makes smbios_validate_table() independent from smbios_smp_sockets global, which in turn lets smbios_get_tables() avoid using not related legacy code. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- goal here is to isolate legacy handling from generic

[PATCH v4 18/21] tests: acpi/smbios: whitelist expected blobs

2024-03-14 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Acked-by: Ani Sinha --- 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..81148a604f 100644 --- a/tests/qtest

[PATCH v4 14/21] smbios: clear smbios_type4_count before building tables

2024-03-14 Thread Igor Mammedov
it will help to keep type 4 tables accounting correct in case SMBIOS tables are built multiple times. Signed-off-by: Igor Mammedov Tested-by: Fiona Ebner --- hw/smbios/smbios.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 7fefe98c85

[PATCH v4 15/21] smbios: extend smbios-entry-point-type with 'auto' value

2024-03-14 Thread Igor Mammedov
later patches will use it to pick SMBIOS version at runtime depending on configuration. Signed-off-by: Igor Mammedov Acked-by: Markus Armbruster Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- v3: - make sure i2nd line of comment is indented on 4 spaces only --- qapi/machine.json | 5

[PATCH v4 02/21] tests: smbios: add test for -smbios type=11 option

2024-03-14 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- tests/data/smbios/type11_blob | Bin 0 -> 11 bytes tests/qtest/bios-tables-test.c | 17 + 2 files changed, 17 insertions(+) create mode 100644 tests/data/smbios/type11_blob diff --git a/te

[PATCH v4 09/21] smbios: add smbios_add_usr_blob_size() helper

2024-03-14 Thread Igor Mammedov
it will be used by follow up patch when legacy handling is moved out into a separate file. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha --- hw/smbios/smbios.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c

[PATCH v4 11/21] smbios: build legacy mode code only for 'pc' machine

2024-03-14 Thread Igor Mammedov
size; +(*(uint16_t *)smbios_entries) = +cpu_to_le16(le16_to_cpu(*(uint16_t *)smbios_entries) + 1); +usr_offset += size; +} + +smbios_build_type_0_fields(); +smbios_build_type_1_fields(); +smbios_validate_table(); +*length = smbios_entries_len; +r

[PATCH v4 13/21] smbios: get rid of global smbios_ep_type

2024-03-14 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Acked-by: Daniel Henrique Barboza Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- hw/i386/fw_cfg.h | 3 ++- include/hw/firmware/smbios.h | 5 +++-- hw/arm/virt.c| 4 ++-- hw/i386/fw_cfg.c | 8 hw/i386/pc.c

[PATCH v4 00/21] Workaround Windows failing to find 64bit SMBIOS entry point with SeaBIOS

2024-03-14 Thread Igor Mammedov
/2008 Igor Mammedov (21): tests: smbios: make it possible to write SMBIOS only test tests: smbios: add test for -smbios type=11 option tests: smbios: add test for legacy mode CLI options smbios: cleanup smbios_get_tables() from legacy handling smbios: get rid of smbios_smp_sockets global

[PATCH v4 07/21] smbios: avoid mangling user provided tables

2024-03-14 Thread Igor Mammedov
of this and previous commits there is no need to generate legacy smbios_entries at the time options are parsed. Instead compose smbios_entries on demand from usr_blobs like it is done for non-legacy SMBIOS tables. Signed-off-by: Igor Mammedov Tested-by: Fiona Ebner Reviewed-by: Ani Sinha --- v4: fix

Re: [PATCH v3 00/20] Workaround Windows failing to find 64bit SMBIOS entry point with SeaBIOS

2024-03-13 Thread Igor Mammedov
On Tue, 12 Mar 2024 13:31:39 -0400 "Michael S. Tsirkin" wrote: > On Tue, Mar 12, 2024 at 05:10:30PM +0100, Igor Mammedov wrote: > > Changelog: > > v3: > >* whitespace missed by checkpatch > >* fix idndent in QAPI > >* reorder 17/20 before 1

[PATCH v3 06/20] smbios: get rid of smbios_legacy global

2024-03-12 Thread Igor Mammedov
clean up smbios_set_defaults() which is reused by legacy and non legacy machines from being aware of 'legacy' notion and need to turn it off. And push legacy handling up to PC machine code where it's relevant. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Acked-by: Daniel Henrique Barboza

[PATCH v3 15/20] smbios: extend smbios-entry-point-type with 'auto' value

2024-03-12 Thread Igor Mammedov
later patches will use it to pick SMBIOS version at runtime depending on configuration. Signed-off-by: Igor Mammedov Acked-by: Markus Armbruster Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- v3: - make sure i2nd line of comment is indented on 4 spaces only --- qapi/machine.json | 5

[PATCH v3 18/20] tests: acpi/smbios: whitelist expected blobs

2024-03-12 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Acked-by: Ani Sinha --- 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..81148a604f 100644 --- a/tests/qtest

[PATCH v3 12/20] smbios: handle errors consistently

2024-03-12 Thread Igor Mammedov
smbios_tables pointer after freeing. that will avoid double free if smbios_get_tables() is called multiple times. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha --- include/hw/firmware/smbios.h | 4 ++-- hw/i386/fw_cfg.c | 3 ++- hw/smbios/smbios.c | 34

[PATCH v3 09/20] smbios: add smbios_add_usr_blob_size() helper

2024-03-12 Thread Igor Mammedov
it will be used by follow up patch when legacy handling is moved out into a separate file. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha --- hw/smbios/smbios.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c

[PATCH v3 11/20] smbios: build legacy mode code only for 'pc' machine

2024-03-12 Thread Igor Mammedov
size; +(*(uint16_t *)smbios_entries) = +cpu_to_le16(le16_to_cpu(*(uint16_t *)smbios_entries) + 1); +usr_offset += size; +} + +smbios_build_type_0_fields(); +smbios_build_type_1_fields(); +smbios_validate_table(); +*length = smbios_entries_len; +r

[PATCH v3 19/20] pc/q35: set SMBIOS entry point type to 'auto' by default

2024-03-12 Thread Igor Mammedov
of smbios-entry-point-type after series for pc/q35 machines: * 9.0-newer: 'auto' * 8.1-8.2: '64' * 8.0-older: '32' Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2008 Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- hw/i386/pc.c | 2 +- hw/i386

[PATCH v3 01/20] tests: smbios: make it possible to write SMBIOS only test

2024-03-12 Thread Igor Mammedov
tions" test case. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- tests/qtest/bios-tables-test.c | 47 +++--- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-te

[PATCH v3 20/20] tests: acpi: update expected SSDT.dimmpxm blob

2024-03-12 Thread Igor Mammedov
address shift is caused by switch to 32-bit SMBIOS entry point which has slightly different size from 64-bit one and happens to trigger a bit different memory layout. Expected diff: -Name (MEMA, 0x07FFE000) +Name (MEMA, 0x07FFF000) Signed-off-by: Igor Mammedov Acked-by: Ani Sinha

[PATCH v3 04/20] smbios: cleanup smbios_get_tables() from legacy handling

2024-03-12 Thread Igor Mammedov
it. Drop legacy related check in smbios_get_tables() and return from fw_cfg_build_smbios() early if legacy tables where built without proceeding to non legacy part of the function. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- hw/i386/fw_cfg.c | 1 + hw/smbios

[PATCH v3 05/20] smbios: get rid of smbios_smp_sockets global

2024-03-12 Thread Igor Mammedov
it makes smbios_validate_table() independent from smbios_smp_sockets global, which in turn lets smbios_get_tables() avoid using not related legacy code. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- goal here is to isolate legacy handling from generic

[PATCH v3 08/20] smbios: don't check type4 structures in legacy mode

2024-03-12 Thread Igor Mammedov
to add support for type4 to legacy code (both QEMU and SeaBIOS), simplify smbios_get_table_legacy() by dropping not relevant check in legacy code and error out on type4 blob. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- * The issue affects 'isapc' and pc-i440fx

[PATCH v3 10/20] smbios: rename/expose structures/bitmaps used by both legacy and modern code

2024-03-12 Thread Igor Mammedov
will move legacy code into a separate file. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha --- include/hw/firmware/smbios.h | 16 + hw/smbios/smbios.c | 113 --- 2 files changed, 69 insertions(+), 60 deletions(-) diff --git a/include/hw

[PATCH v3 17/20] smbios: error out when building type 4 table is not possible

2024-03-12 Thread Igor Mammedov
-type='auto' Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- hw/smbios/smbios.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index c4a953bbc9..b64d3bc227 100644 --- a/hw/smbios/smbios.c

[PATCH v3 14/20] smbios: clear smbios_type4_count before building tables

2024-03-12 Thread Igor Mammedov
it will help to keep type 4 tables accounting correct in case SMBIOS tables are built multiple times. Signed-off-by: Igor Mammedov Tested-by: Fiona Ebner --- hw/smbios/smbios.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 5a791fd9eb

[PATCH v3 13/20] smbios: get rid of global smbios_ep_type

2024-03-12 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Acked-by: Daniel Henrique Barboza Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- hw/i386/fw_cfg.h | 3 ++- include/hw/firmware/smbios.h | 5 +++-- hw/arm/virt.c| 4 ++-- hw/i386/fw_cfg.c | 8 hw/i386/pc.c

[PATCH v3 16/20] smbios: in case of entry point is 'auto' try to build v2 tables 1st

2024-03-12 Thread Igor Mammedov
that is not to possible to describe with SMBIOS 2.0 will switch automatically to SMBIOS 3.0 (which will trigger Windows bug but there is nothing QEMU can do here, so go and aks Microsoft to real fix). Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- hw/smbios/smbios.c

[PATCH v3 00/20] Workaround Windows failing to find 64bit SMBIOS entry point with SeaBIOS

2024-03-12 Thread Igor Mammedov
/2008 CC: imamm...@redhat.com CC: m...@redhat.com Igor Mammedov (20): tests: smbios: make it possible to write SMBIOS only test tests: smbios: add test for -smbios type=11 option tests: smbios: add test

[PATCH v3 07/20] smbios: avoid mangling user provided tables

2024-03-12 Thread Igor Mammedov
of this and previous commits there is no need to generate legacy smbios_entries at the time options are parsed. Instead compose smbios_entries on demand from usr_blobs like it is done for non-legacy SMBIOS tables. Signed-off-by: Igor Mammedov Tested-by: Fiona Ebner Reviewed-by: Ani Sinha --- hw/smbios/smbios.c

[PATCH v3 02/20] tests: smbios: add test for -smbios type=11 option

2024-03-12 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- tests/data/smbios/type11_blob | Bin 0 -> 11 bytes tests/qtest/bios-tables-test.c | 17 + 2 files changed, 17 insertions(+) create mode 100644 tests/data/smbios/type11_blob diff --git a/te

[PATCH v3 03/20] tests: smbios: add test for legacy mode CLI options

2024-03-12 Thread Igor Mammedov
Unfortunately having 2.0 machine type deprecated is not enough to get rid of legacy SMBIOS handling since 'isapc' also uses that and it's staying around. Hence add test for CLI options handling to be sure that it ain't broken during SMBIOS code refactoring. Signed-off-by: Igor Mammedov Reviewed

Re: [PATCH v2 07/20] smbios: avoid mangling user provided tables

2024-03-08 Thread Igor Mammedov
On Thu, 7 Mar 2024 09:33:17 +0530 Ani Sinha wrote: > > On 06-Mar-2024, at 12:11, Ani Sinha wrote: > > > > > > > > On Tue, 5 Mar 2024, Igor Mammedov wrote: > > > >> currently smbios_entry_add() preserves internally '-smbios type=' > &

Re: [PATCH] target/i386: Add new CPU model SierraForest

2024-03-08 Thread Igor Mammedov
On Wed, 6 Dec 2023 21:19:23 +0800 Tao Su wrote: > SierraForest is Intel's first generation E-core based Xeon server > processor, which will be released in the first half of 2024. > > SierraForest mainly adds the following new features based on > GraniteRapids: > *) Please specify

[PATCH v3 14/20] smbios: extend smbios-entry-point-type with 'auto' value

2024-03-08 Thread Igor Mammedov
later patches will use it to pick SMBIOS version at runtime depending on configuration. Signed-off-by: Igor Mammedov Acked-by: Markus Armbruster Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- v3: - make sure i2nd line of comment is indented on 4 spaces only --- qapi/machine.json | 5

  1   2   3   4   5   6   7   8   9   10   >