Re: [PATCH v7] hw/i386/cpu: remove default_cpu_version and simplify

2025-05-30 Thread Ani Sinha
> On 30 May 2025, at 8:37 PM, Igor Mammedov wrote: > > On Sun, 11 May 2025 09:40:08 -0400 > "Michael S. Tsirkin" wrote: > >> On Fri, Mar 07, 2025 at 03:53:28PM +0530, Ani Sinha wrote: >>> commit 0788a56bd1ae3 ("i386: Make unver

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-05-21 Thread Ani Sinha
> On 8 Apr 2025, at 1:41 PM, Gerd Hoffman wrote: > > Hi, > >> Which means we are back to the single firmware image. I think it makes >> sense to continue supporting classic rom images (which can also be >> loaded via -bios). Any use case which needs more fine-grained control >> must use ig

Re: [PATCH v7 00/16] Introduce support for IGVM files

2025-05-20 Thread Ani Sinha
> On 27 Feb 2025, at 7:08 PM, Roy Hopkins wrote: > > Here is v7 of the set of patches to add support for IGVM files to QEMU. This > is > based on commit 40efe733e10cc00e4fb4f9f5790a28e744e63c62 of qemu. > > Firstly, apologies for the amount of time between the last version and this > one. >

Re: [PATCH 3/9] hw/acpi/pci: Consolidate OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES

2025-05-14 Thread Ani Sinha
e type, then there's no need for class definition. > > Cc: "Michael S. Tsirkin" > Cc: Igor Mammedov > Cc: Ani Sinha > Signed-off-by: Zhao Liu Reviewed-by: Ani Sinha > --- > hw/acpi/pci.c | 24 > 1 file changed, 8 insertions(+),

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-04-16 Thread Ani Sinha
> On 10 Apr 2025, at 4:14 PM, Gerd Hoffmann wrote: > > On Thu, Apr 10, 2025 at 12:01:18PM +0530, Ani Sinha wrote: >> >> >>> On 9 Apr 2025, at 11:51 AM, Gerd Hoffman wrote: >>> >>> Hi, >>> >>>>> The chicken-and-egg pr

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-04-09 Thread Ani Sinha
> On 9 Apr 2025, at 11:51 AM, Gerd Hoffman wrote: > > Hi, > >>> The chicken-and-egg problem arises if you go for hashing and want embed >>> the igvm file in the UKI. >> >> I don't really see how signing the IGVM file for secure boot helps anything. > > It doesn't help indeed. This comes f

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-04-09 Thread Ani Sinha
> On Apr 9, 2025, at 03:12, Dionna Amalie Glaze wrote: > > On Tue, Apr 8, 2025 at 1:33 AM Gerd Hoffman wrote: >> >> Hi, >> Well. If you want put the db into the igvm and the igvm into the uki you've got a chicken-and-egg problem. Moving the firmware from the main UKI to UK

Re: [PATCH] hw/acpi: Remove legacy reset handling from vmclock

2025-04-08 Thread Ani Sinha
> On Apr 9, 2025, at 09:53, Ani Sinha wrote: > > > >> On Feb 7, 2025, at 20:04, David Woodhouse wrote: >> >> From: David Woodhouse >> >> The vmclock device only has a reset method in order to plug its memory >> region into the system

Re: [PATCH] hw/acpi: Remove legacy reset handling from vmclock

2025-04-08 Thread Ani Sinha
while > we're at it, since it looks like that wouldn't have built when vmclock > wasn't enabled. > > Signed-off-by: David Woodhouse Reviewed-by: Ani Sinha mailto:anisi...@redhat.com>> > --- > hw/acpi/vmclock.c | 18 ++ > hw/i386/

Re: [PATCH] hw/acpi: Remove legacy reset handling from vmclock

2025-04-05 Thread Ani Sinha
On Sat, Mar 29, 2025 at 1:43 PM David Woodhouse wrote: > > On Fri, 2025-02-07 at 14:34 +, David Woodhouse wrote: > > From: David Woodhouse > > > > The vmclock device only has a reset method in order to plug its memory > > region into the system memory. It was originally done this way in order

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-28 Thread Ani Sinha
On Fri, 21 Mar, 2025, 3:38 pm Gerd Hoffman, wrote: > Hi, > > > > While digging around in the igvm spec I've seen there is the > > > concept of 'parameters'. Can this be used to pass on the memory > > > location of kernel + initrd + cmdline? Maybe the kernel hashes > too? > > >

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-27 Thread Ani Sinha
On Wed, Mar 26, 2025 at 8:52 PM Alexander Graf wrote: > > > On 26.03.25 13:27, Gerd Hoffman wrote: > >Hi, > > > >> The problem is that add-ons are > >> > >>1) Separate binaries. So you need to match multiple files. > >>2) In this case, get generated out of the vendor (RH)'s control in

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-24 Thread Ani Sinha
On Mon, Mar 24, 2025 at 1:13 PM Gerd Hoffman wrote: > > Hi, > > > > Going ship the distro kernel as igvm image would work too. Will > > > simplify the measurement pre-calculation. Also there is no need to pass > > > around any parameters, everything (how the firmware finds the UKI etc) > > > c

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-20 Thread Ani Sinha
On Thu, Mar 20, 2025 at 7:24 PM Alexander Graf wrote: > > Hey Gerd, > > On 18.03.25 12:11, Gerd Hoffman wrote: > >Hi, > > > >> Maybe not from the user's point of view, but surely for the vmfwupdate > >> interface design and for the launch measurement calculations. > >> > >> When using igvm par

Re: [PATCH v2] microvm: do not use the lastest cpu version

2025-03-17 Thread Ani Sinha
On Wed, Mar 5, 2025 at 7:56 PM Ani Sinha wrote: > > On Wed, Mar 5, 2025 at 7:12 PM Stefan Hajnoczi wrote: > > > > On Wed, Mar 05, 2025 at 01:24:25PM +0530, Ani Sinha wrote: > > > On Sat, Mar 1, 2025 at 9:04 PM Ani Sinha wrote: > > > > > > > &g

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-14 Thread Ani Sinha
On Fri, Mar 14, 2025 at 8:47 PM Jörg Rödel wrote: > > On Fri, Mar 14, 2025 at 03:08:43PM +0100, Gerd Hoffman wrote: > > If your input firmware image already is an IGVM (say coconut), what is > > supposed to happen? > > The COCONUT igvmbuilder has the ability to take another IGVM file as > input an

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-13 Thread Ani Sinha
On Thu, Mar 13, 2025 at 4:57 PM Jörg Rödel wrote: > > On Thu, Mar 13, 2025 at 04:39:15PM +0530, Ani Sinha wrote: > > Right so what we are proposing is generic enough so that if the VM > > wants to use an IGVM container as opposed to an actual firmware image > > in a FUKI,

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-13 Thread Ani Sinha
On Thu, Mar 13, 2025 at 7:01 PM Jörg Rödel wrote: > > Hi Gerd, > > On Thu, Mar 13, 2025 at 01:05:13PM +0100, Gerd Hoffman wrote: > > // regions_addr points to an array of this structure > > struct vmfwupdate_regions { > > uint64_t size; > > uint64_t src_addr; // source address (befor

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-13 Thread Ani Sinha
On Thu, Mar 13, 2025 at 4:57 PM Jörg Rödel wrote: > > On Thu, Mar 13, 2025 at 04:39:15PM +0530, Ani Sinha wrote: > > Right so what we are proposing is generic enough so that if the VM > > wants to use an IGVM container as opposed to an actual firmware image > > in a FUKI,

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-13 Thread Ani Sinha
l VMs > yet and want to discuss how to change that. > > On Thu, Mar 13, 2025 at 04:02:11PM +0530, Ani Sinha wrote: > > Forgive my ignorance, today none of the hyperscalers use IGVM to > > define this. How then the expected launch measurement is derived? > > There is

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-13 Thread Ani Sinha
On Thu, Mar 13, 2025 at 3:40 PM Jörg Rödel wrote: > > Hi Ani, > > On Thu, Mar 13, 2025 at 03:07:42PM +0530, Ani Sinha wrote: > > The state before reset is the state that uses stock firmware from the > > hyperscaler. The state after reset is a fresh new state that uses th

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-13 Thread Ani Sinha
On Thu, Mar 13, 2025 at 2:40 PM Jörg Rödel wrote: > > Hi Ani, > > On Fri, Feb 14, 2025 at 09:04:07PM +0530, Ani Sinha wrote: > > VM firmware update is a mechanism where the virtual machines can use their > > preferred and trusted firmware image in their execution environme

Re: [PATCH 3/7] hw/i386/fw_cfg: Check ACPI availability with acpi_builtin()

2025-03-07 Thread Ani Sinha
On Fri, Mar 7, 2025 at 8:46 PM Philippe Mathieu-Daudé wrote: > > Replace the compile-time CONFIG_ACPI check by a runtime one. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Ani Sinha > --- > hw/i386/fw_cfg.c | 8 > 1 file changed, 4 insertions(+), 4

Re: [PATCH 2/7] hw/acpi: Introduce acpi_builtin() helper

2025-03-07 Thread Ani Sinha
On Fri, Mar 7, 2025 at 8:46 PM Philippe Mathieu-Daudé wrote: > > acpi_builtin() can be used to check at runtime whether > the ACPI subsystem is built in a qemu-system binary. > > Signed-off-by: Philippe Mathieu-Daudé Ah, very similar to something I did recently. Reviewe

[PATCH v7] hw/i386/cpu: remove default_cpu_version and simplify

2025-03-07 Thread Ani Sinha
us. This change also removes all complications around CPU_VERSION_AUTO including removal of the value itself. 1) See commit dcafd1ef0af227 ("i386: Register versioned CPU models") 2) See commit XXX ("microvm: do not use the lastest cpu version") CC: imamm...@redhat.com Signed-

Re: [PATCH v2] microvm: do not use the lastest cpu version

2025-03-05 Thread Ani Sinha
On Wed, Mar 5, 2025 at 7:12 PM Stefan Hajnoczi wrote: > > On Wed, Mar 05, 2025 at 01:24:25PM +0530, Ani Sinha wrote: > > On Sat, Mar 1, 2025 at 9:04 PM Ani Sinha wrote: > > > > > > On Thu, Feb 20, 2025 at 12:36 PM Zhao Liu wrote: > > > > > > &

[PULL 2/3] hw/i386/ovmf: check if ovmf is supported before calling ovmf parsing code

2025-03-05 Thread Ani Sinha
api ovmf_supported() that returns true wnen ovmf is enabled and false otherwise. Ovmf parsing code is only called after checking if ovmf is supported. Message-ID: <20250228170434.317306-1-anisi...@redhat.com> Signed-off-by: Ani Sinha Reviewed-by: Gerd Hoffmann --- hw/i386/pc_sysfw.c

[PULL 3/3] microvm: do not use the lastest cpu version

2025-03-05 Thread Ani Sinha
ommit dcafd1ef0af227 ("i386: Register versioned CPU models") CC: imamm...@redhat.com CC: zhao1@intel.com Message-ID: <20250220065326.312596-1-anisi...@redhat.com> Reviewed-by: Igor Mammedov Reviewed-by: Sergio Lopez Signed-off-by: Ani Sinha Reviewed-by: Zhao Liu --- hw/i386/

Re: [PATCH v2] microvm: do not use the lastest cpu version

2025-03-04 Thread Ani Sinha
On Sat, Mar 1, 2025 at 9:04 PM Ani Sinha wrote: > > On Thu, Feb 20, 2025 at 12:36 PM Zhao Liu wrote: > > > > On Thu, Feb 20, 2025 at 12:23:26PM +0530, Ani Sinha wrote: > > > Date: Thu, 20 Feb 2025 12:23:26 +0530 > > > From: Ani Sinha > > > Subject: [

[PULL 0/3] Some refactoring/cleanups for cpu versions on microvms

2025-03-04 Thread Ani Sinha
. Ani Sinha (3): hw/i386: introduce x86_firmware_reconfigure api hw/i386/ovmf: check if ovmf is supported before calling ovmf parsing code microvm: do not use the lastest cpu version hw/i386/microvm.c | 2 +- hw/i386/pc_sysfw.c| 30

[PULL 1/3] hw/i386: introduce x86_firmware_reconfigure api

2025-03-04 Thread Ani Sinha
://pretalx.com/kvm-forum-2024/talk/HJSKRQ/ Message-ID: <20250228114230.306852-1-anisi...@redhat.com> Signed-off-by: Ani Sinha Reviewed-by: Gerd Hoffmann --- hw/i386/pc_sysfw.c| 26 ++ hw/i386/pc_sysfw_ovmf-stubs.c | 5 + hw/i386/pc_sysfw_ovmf.c

Re: [PATCH v6] hw/i386/cpu: remove default_cpu_version and simplify

2025-03-04 Thread Ani Sinha
On Wed, Mar 5, 2025 at 3:53 AM Ani Sinha wrote: > > On Fri, Jan 31, 2025 at 3:24 PM Igor Mammedov wrote: > > > > On Tue, 28 Jan 2025 09:25:26 +0530 > > Ani Sinha wrote: > > > > > commit 0788a56bd1ae3 ("i386: Make unversioned CPU models be aliases&

Re: [PATCH v6] hw/i386/cpu: remove default_cpu_version and simplify

2025-03-04 Thread Ani Sinha
On Fri, Jan 31, 2025 at 3:24 PM Igor Mammedov wrote: > > On Tue, 28 Jan 2025 09:25:26 +0530 > Ani Sinha wrote: > > > commit 0788a56bd1ae3 ("i386: Make unversioned CPU models be aliases") > > introduced 'default_cpu_version' for PCMachineClass. Thi

[PATCH v3] hw/i386: introduce x86_firmware_reconfigure api

2025-03-03 Thread Ani Sinha
://pretalx.com/kvm-forum-2024/talk/HJSKRQ/ Signed-off-by: Ani Sinha --- hw/i386/pc_sysfw.c| 26 ++ hw/i386/pc_sysfw_ovmf-stubs.c | 5 + hw/i386/pc_sysfw_ovmf.c | 5 + include/hw/i386/pc.h | 1 + include/hw/i386/x86.h | 1 + 5

Re: [PATCH v2] microvm: do not use the lastest cpu version

2025-03-01 Thread Ani Sinha
On Thu, Feb 20, 2025 at 12:36 PM Zhao Liu wrote: > > On Thu, Feb 20, 2025 at 12:23:26PM +0530, Ani Sinha wrote: > > Date: Thu, 20 Feb 2025 12:23:26 +0530 > > From: Ani Sinha > > Subject: [PATCH v2] microvm: do not use the lastest cpu version > > X-Mailer: git-se

Re: [PATCH] hw/i386/ovmf: check if ovmf is supported before calling ovmf parsing code

2025-02-28 Thread Ani Sinha
On Fri, Feb 28, 2025 at 10:34 PM Ani Sinha wrote: > > Currently call to x86_firmware_configure() -> pc_system_parse_ovmf_flash() > happens only when SEV is enabled. Fortunately, X86_FW_OVMF is turned on > automatically when SEV is enabled and therefore, we never

[PATCH] hw/i386/ovmf: check if ovmf is supported before calling ovmf parsing code

2025-02-28 Thread Ani Sinha
api ovmf_supported() that returns true wnen ovmf is enabled and false otherwise. Ovmf parsing code is only called after checking if ovmf is supported. Signed-off-by: Ani Sinha --- hw/i386/pc_sysfw.c| 18 +++--- hw/i386/pc_sysfw_ovmf-stubs.c | 5 + hw/i386/pc_sysfw_ovmf.c |

[PATCH v2] hw/i386: introduce x86_firmware_reconfigure api

2025-02-28 Thread Ani Sinha
://pretalx.com/kvm-forum-2024/talk/HJSKRQ/ Signed-off-by: Ani Sinha --- hw/i386/pc_sysfw.c| 26 ++ hw/i386/pc_sysfw_ovmf-stubs.c | 5 + hw/i386/pc_sysfw_ovmf.c | 5 + include/hw/i386/pc.h | 1 + include/hw/i386/x86.h | 1 + 5

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-25 Thread Ani Sinha
On Tue, Feb 25, 2025 at 2:09 PM Gerd Hoffman wrote: > > On Tue, Feb 25, 2025 at 10:51:08AM +0530, Ani Sinha wrote: > > On Mon, Feb 24, 2025 at 9:17 PM Gerd Hoffman wrote: > > > > > > Works nicely for me. Test case: > > > https://kraxel.gitlab.io/uefi

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-24 Thread Ani Sinha
On Mon, Feb 24, 2025 at 9:17 PM Gerd Hoffman wrote: > > On Fri, Feb 14, 2025 at 09:04:07PM +0530, Ani Sinha wrote: > > VM firmware update is a mechanism where the virtual machines can use their > > preferred and trusted firmware image in their execution environment without >

Re: [PATCH] hw/i386: introduce x86_firmware_reconfigure api

2025-02-24 Thread Ani Sinha
On Mon, Feb 24, 2025 at 9:01 PM Gerd Hoffmann wrote: > > Hi, > > > /* should only be called once */ > > -if (ovmf_flash_parsed) { > > +if (ovmf_flash_parsed && !force) { > > I think it makes more sense to clear ovmf_flash_parsed when replacing > the firmware (instead of adding the f

[PATCH] hw/i386: introduce x86_firmware_reconfigure api

2025-02-20 Thread Ani Sinha
://pretalx.com/kvm-forum-2024/talk/HJSKRQ/ Signed-off-by: Ani Sinha --- hw/i386/pc_sysfw.c| 25 + hw/i386/pc_sysfw_ovmf-stubs.c | 3 ++- hw/i386/pc_sysfw_ovmf.c | 5 +++-- include/hw/i386/pc.h | 3 ++- include/hw/i386/x86.h | 1 + 5 files

[PATCH v2] microvm: do not use the lastest cpu version

2025-02-19 Thread Ani Sinha
ommit dcafd1ef0af227 ("i386: Register versioned CPU models") CC: imamm...@redhat.com CC: zhao1@intel.com Reviewed-by: Igor Mammedov Reviewed-by: Sergio Lopez Signed-off-by: Ani Sinha --- hw/i386/microvm.c | 2 +- target/i386/cpu.c | 15 --- target/i386/cpu.h | 4

Re: [PATCH v5] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-15 Thread Ani Sinha
On Fri, Feb 14, 2025 at 9:26 PM Alexander Graf wrote: > > > On 14.02.25 16:35, Ani Sinha wrote: > > On Mon, Feb 3, 2025 at 3:50 AM Alexander Graf wrote: > >> Hey Ani! > >> > >> On 28.01.25 22:31, Ani Sinha wrote: > > > [...] > >

Re: [PATCH v5] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-14 Thread Ani Sinha
On Mon, Feb 3, 2025 at 3:50 AM Alexander Graf wrote: > > Hey Ani! > > On 28.01.25 22:31, Ani Sinha wrote: > > VM firmware update is a mechanism where the virtual machines can use their > > preferred and trusted firmware image in their execution environment without &

[PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-14 Thread Ani Sinha
/35091 and https://github.com/systemd/systemd/pull/35281 for some discussions on how we can bundle firmware image within an UKI. CC: Alex Graf CC: Paolo Bonzini CC: Gerd Hoffman CC: Igor Mammedov CC: Vitaly Kuznetsov Signed-off-by: Ani Sinha --- MAINTAINERS | 11

[PATCH] microvm: do not use the lastest cpu version

2025-02-13 Thread Ani Sinha
: zhao1@intel.com Signed-off-by: Ani Sinha --- hw/i386/microvm.c | 2 +- target/i386/cpu.c | 15 --- target/i386/cpu.h | 4 3 files changed, 1 insertion(+), 20 deletions(-) Pipeline passes: https://gitlab.com/anisinha/qemu/-/pipelines/1669159835 See also Igor's comment on

[PATCH v5] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-01-28 Thread Ani Sinha
/35091 and https://github.com/systemd/systemd/pull/35281 for some discussions on how we can bundle firmware image within an UKI. CC: Alex Graf CC: Paolo Bonzini CC: Gerd Hoffman CC: Igor Mammedov CC: Vitaly Kuznetsov Signed-off-by: Ani Sinha --- MAINTAINERS | 11

[PATCH v6] hw/i386/cpu: remove default_cpu_version and simplify

2025-01-27 Thread Ani Sinha
6: Register versioned CPU models") CC: imamm...@redhat.com Signed-off-by: Ani Sinha Reviewed-by: Zhao Liu --- hw/i386/microvm.c | 3 +- hw/i386/pc.c | 14 + hw/i386/pc_piix.c | 6 ++-- hw/i386/pc_q35.c | 6 ++-- hw/i386/x86-common.c | 4 +-- include/hw/i38

Re: [PATCH v6 3/3] tests/qtest/vmcoreinfo: add a unit test to exercize basic vmcoreinfo function

2025-01-26 Thread Ani Sinha
On Mon, Jan 20, 2025 at 10:09 AM Ani Sinha wrote: > > A new qtest is written that exercizes the fw-cfg DMA based read and write ops > to write values into vmcoreinfo fw-cfg file and read them back and verify that > they are the same. > > Signed-off-by: Ani Sinha Final

Re: [PATCH v6 2/3] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-26 Thread Ani Sinha
On Mon, Jan 20, 2025 at 10:09 AM Ani Sinha wrote: > > At present, the libqos/fw_cfg.c library does not support the modern DMA > interface which is required to write to the fw_cfg files. It only uses the IO > interface. Implement read and write methods based on DMA. This will enable

Re: [PATCH v5] hw/i386/cpu: remove default_cpu_version and simplify

2025-01-24 Thread Ani Sinha
On Thu, Jan 23, 2025 at 7:52 PM Igor Mammedov wrote: > > On Thu, 23 Jan 2025 17:26:12 +0530 > Ani Sinha wrote: > > > commit 0788a56bd1ae3 ("i386: Make unversioned CPU models be aliases") > > introduced 'default_cpu_version' for PCMachineClass. Thi

Re: [PATCH v4] hw/i386/cpu: remove default_cpu_version and simplify

2025-01-23 Thread Ani Sinha
On Thu, Jan 23, 2025 at 1:56 PM Zhao Liu wrote: > > Hi Ani, > > [snip] > > > --- a/include/hw/i386/x86.h > > +++ b/include/hw/i386/x86.h > > @@ -114,7 +114,10 @@ void init_topo_info(X86CPUTopoInfo *topo_info, const > > X86MachineState *x86ms); > > uint32_t x86_cpu_apic_id_from_index(X86MachineSt

[PATCH v5] hw/i386/cpu: remove default_cpu_version and simplify

2025-01-23 Thread Ani Sinha
6: Register versioned CPU models") CC: imamm...@redhat.com Signed-off-by: Ani Sinha --- hw/i386/microvm.c | 3 +- hw/i386/pc.c | 14 + hw/i386/pc_piix.c | 6 ++-- hw/i386/pc_q35.c | 6 ++-- hw/i386/x86-common.c | 4 +-- include/hw/i386/pc.h | 7 +++

Re: [PATCH v3] hw/i386/cpu: remove default_cpu_version and simplify

2025-01-22 Thread Ani Sinha
On Tue, Jan 21, 2025 at 4:58 PM Zhao Liu wrote: > > Hi Ani, > > Sorry for late reply. > > On Thu, Jan 16, 2025 at 09:04:18AM +0530, Ani Sinha wrote: > > Date: Thu, 16 Jan 2025 09:04:18 +0530 > > From: Ani Sinha > > Subject: [PATCH v3] hw/i386/cpu: remove de

[PATCH v4] hw/i386/cpu: remove default_cpu_version and simplify

2025-01-22 Thread Ani Sinha
6: Register versioned CPU models") CC: imamm...@redhat.com Signed-off-by: Ani Sinha --- hw/i386/microvm.c | 3 +- hw/i386/pc_piix.c | 6 ++-- hw/i386/pc_q35.c | 6 ++-- hw/i386/x86-common.c | 4 +-- include/hw/i386/pc.h | 19 ++-- include/hw/i386/x86.h | 5 ++

Re: [PATCH v3] hw/i386/cpu: remove default_cpu_version and simplify

2025-01-20 Thread Ani Sinha
On Thu, Jan 16, 2025 at 9:04 AM Ani Sinha wrote: > > commit 0788a56bd1ae3 ("i386: Make unversioned CPU models be aliases") > introduced 'default_cpu_version' for PCMachineClass. This created three > categories of CPU models: > - Most unversioned CPU mo

[PATCH v6 0/3] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-19 Thread Ani Sinha
eview feedbacks has been taken into account. Ani Sinha (3): libqos/fw_cfg: refactor file directory iteraton to make it more reusable tests/qtest/libqos: add DMA support for writing and reading fw_cfg files tests/qtest/vmcoreinfo: add a unit test to exercize basic vmcoreinfo fun

[PATCH v6 3/3] tests/qtest/vmcoreinfo: add a unit test to exercize basic vmcoreinfo function

2025-01-19 Thread Ani Sinha
A new qtest is written that exercizes the fw-cfg DMA based read and write ops to write values into vmcoreinfo fw-cfg file and read them back and verify that they are the same. Signed-off-by: Ani Sinha --- MAINTAINERS | 2 + tests/qtest/meson.build | 1 + tests/qtest

[PATCH v6 1/3] libqos/fw_cfg: refactor file directory iteraton to make it more reusable

2025-01-19 Thread Ani Sinha
fw-cfg file directory iteration code can be used by other functions that may want to implement fw-cfg file operations. Refactor it into a smaller helper so that it can be reused. No functional change. Signed-off-by: Ani Sinha Reviewed-by: Fabiano Rosas --- tests/qtest/libqos/fw_cfg.c | 63

[PATCH v6 2/3] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-19 Thread Ani Sinha
of the code is taken from edk2 fw_cfg implementation. It has been tested by writing a qtest that writes to a fw_cfg file. Signed-off-by: Ani Sinha --- tests/qtest/libqos/fw_cfg.c | 139 tests/qtest/libqos/fw_cfg.h | 6 +- 2 files changed, 144 insertions

Re: [PATCH v5 0/3] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-17 Thread Ani Sinha
On Fri, Jan 10, 2025 at 4:16 PM Ani Sinha wrote: > > This patchset enables DMA interface support for writing fw-cfg files in > libqtest. The first patch is just a code refactoring so that fw-cfg > directory parsing can be part of a separate helper function. > The second patch is t

Re: [PATCH 2/3] pci: acpi: Windows 'PCI Label Id' bug workaround

2025-01-16 Thread Ani Sinha
On Wed, Jan 15, 2025 at 6:23 PM Igor Mammedov wrote: > > Current versions of Windows call _DSM(func=7) regardless > of whether it is supported or not. It leads to NICs having bogus > 'PCI Label Id = 0', where none should be set at all. > > Also presence of 'PCI Label Id' triggers another Windows b

Re: [PATCH v5 2/3] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-16 Thread Ani Sinha
On Fri, Jan 10, 2025 at 4:16 PM Ani Sinha wrote: > > At present, the libqos/fw_cfg.c library does not support the modern DMA > interface which is required to write to the fw_cfg files. It only uses the IO > interface. Implement read and write methods based on DMA. This will enable >

Re: [PATCH v5 3/3] tests/qtest/vmcoreinfo: add a unit test to exercize basic vmcoreinfo function

2025-01-16 Thread Ani Sinha
On Fri, Jan 10, 2025 at 4:16 PM Ani Sinha wrote: > > A new qtest is written that exercizes the fw-cfg DMA based read and write ops > to write values into vmcoreinfo fw-cfg file and read them back and varify that > they are the same. > Ping ... > Signed-off-by: Ani Sinha &g

[PATCH v3] hw/i386/cpu: remove default_cpu_version and simplify

2025-01-15 Thread Ani Sinha
6: Register versioned CPU models") CC: imamm...@redhat.com Signed-off-by: Ani Sinha --- hw/i386/microvm.c | 2 +- hw/i386/pc_piix.c | 6 ++--- hw/i386/pc_q35.c | 6 ++--- hw/i386/x86-common.c | 15 --- include/hw/i386/pc.h | 21 --- include/hw/i386/x86.

Re: [PATCH v2] hw/i386/cpu: remove default_cpu_version and simplify

2025-01-15 Thread Ani Sinha
On Wed, Jan 15, 2025 at 9:38 PM Ani Sinha wrote: > > On Wed, Jan 15, 2025 at 7:08 PM Michael S. Tsirkin wrote: > > > > On Wed, Jan 15, 2025 at 11:33:10AM +0530, Ani Sinha wrote: > > > On Thu, Dec 12, 2024 at 8:19 PM Ani Sinha wrote: > > > > > > >

Re: [PATCH v2] hw/i386/cpu: remove default_cpu_version and simplify

2025-01-15 Thread Ani Sinha
On Wed, Jan 15, 2025 at 7:08 PM Michael S. Tsirkin wrote: > > On Wed, Jan 15, 2025 at 11:33:10AM +0530, Ani Sinha wrote: > > On Thu, Dec 12, 2024 at 8:19 PM Ani Sinha wrote: > > > > > > commit 0788a56bd1ae3 ("i386: Make unversioned CPU models be aliases"

Re: [PATCH 1/3] tests: acpi: whitelist expected blobs

2025-01-15 Thread Ani Sinha
On Wed, Jan 15, 2025 at 6:23 PM Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov Acked-by: Ani Sinha > --- > tests/qtest/bios-tables-test-allowed-diff.h | 40 + > 1 file changed, 40 insertions(+) > > diff --git a/tests/qtest/bios-tables-test-allo

Re: [PATCH v2] hw/i386/cpu: remove default_cpu_version and simplify

2025-01-14 Thread Ani Sinha
On Thu, Dec 12, 2024 at 8:19 PM Ani Sinha wrote: > > commit 0788a56bd1ae3 ("i386: Make unversioned CPU models be aliases") > introduced 'default_cpu_version' for PCMachineClass. This created three > categories of CPU models: > - Most unversioned CPU mo

Re: [PATCH v6 1/7] tests: virt: Update expected ACPI tables for virt test

2025-01-14 Thread Ani Sinha
On Tue, Jan 14, 2025 at 11:16 PM Alireza Sanaee wrote: > > From: Yicong Yang > > Update the ACPI tables according to the acpi aml_build change, also > empty bios-tables-test-allowed-diff.h. Where is this part? That is the part where you empty bios-tables-test-allowed-diff.h.? You are supposed to

Re: [PATCH v5 1/3] libqos/fw_cfg: refactor file directory iteraton to make it more reusable

2025-01-11 Thread Ani Sinha
On Fri, Jan 10, 2025 at 9:48 PM Philippe Mathieu-Daudé wrote: > > On 10/1/25 11:46, Ani Sinha wrote: > > fw-cfg file directory iteration code can be used by other functions that may > > want to implement fw-cfg file operations. Refactor it into a smaller helper > >

[PATCH v5 1/3] libqos/fw_cfg: refactor file directory iteraton to make it more reusable

2025-01-10 Thread Ani Sinha
fw-cfg file directory iteration code can be used by other functions that may want to implement fw-cfg file operations. Refactor it into a smaller helper so that it can be reused. No functional change. Signed-off-by: Ani Sinha --- tests/qtest/libqos/fw_cfg.c | 62

[PATCH v5 2/3] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-10 Thread Ani Sinha
structure of the code is taken from edk2 fw_cfg implementation. It has been tested by writing a qtest that writes to a fw_cfg file. This test will be part of a future patch series. Signed-off-by: Ani Sinha --- tests/qtest/libqos/fw_cfg.c | 142 tests/qtest/libqos

[PATCH v5 3/3] tests/qtest/vmcoreinfo: add a unit test to exercize basic vmcoreinfo function

2025-01-10 Thread Ani Sinha
A new qtest is written that exercizes the fw-cfg DMA based read and write ops to write values into vmcoreinfo fw-cfg file and read them back and varify that they are the same. Signed-off-by: Ani Sinha --- MAINTAINERS | 2 + tests/qtest/meson.build | 1 + tests/qtest

[PATCH v5 0/3] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-10 Thread Ani Sinha
: first working version of the patch. v4: refactoring without any new changes put into a new patch. v5: a new qtest added to exercize the two new write and read apis. all along, other review feedbacks has been taken into account. Ani Sinha (3): libqos/fw_cfg: refactor file directory iteraton to

[PATCH v5 0/3] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-10 Thread Ani Sinha
: first working version of the patch. v4: refactoring without any new changes put into a new patch. v5: a new qtest added to exercize the two new write and read apis. all along, other review feedbacks has been taken into account. Ani Sinha (3): libqos/fw_cfg: refactor file directory iteraton to

Re: [PATCH v4 2/2] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-09 Thread Ani Sinha
> On 10 Jan 2025, at 2:00 AM, Fabiano Rosas wrote: > > Ani Sinha writes: > >> At present, the libqos/fw_cfg.c library does not support the modern DMA >> interface which is required to write to the fw_cfg files. It only uses the IO >> interface. Implement read

Re: [PATCH v4 1/2] libqos/fw_cfg: refactor file directory iteraton to make it more reusable

2025-01-09 Thread Ani Sinha
> On 10 Jan 2025, at 1:31 AM, Fabiano Rosas wrote: > > Ani Sinha writes: > >> fw-cfg file directory iteration code can be used by other functions that may >> want to implement fw-cfg file operations. Refactor it into a smaller helper >> so that it can be reuse

[PATCH v4 2/2] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-08 Thread Ani Sinha
structure of the code is taken from edk2 fw_cfg implementation. It has been tested by writing a qtest that writes to a fw_cfg file. This test will be part of a future patch series. Signed-off-by: Ani Sinha --- tests/qtest/libqos/fw_cfg.c | 138 tests/qtest/libqos

[PATCH v4 0/2] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-08 Thread Ani Sinha
/-/commits/fuki-hyperface which has vmfwupdate changes on top of the patches sent in this series. cc: kra...@redhat.com cc: faro...@suse.de cc: lviv...@redhat.com cc: pbonz...@redhat.com cc: arm...@redhat.com cc: phi...@linaro.org cc: berra...@redhat.com cc: qemu-devel@nongnu.org Ani Sinha (2

[PATCH v4 1/2] libqos/fw_cfg: refactor file directory iteraton to make it more reusable

2025-01-08 Thread Ani Sinha
fw-cfg file directory iteration code can be used by other functions that may want to implement fw-cfg file operations. Refactor it into a smaller helper so that it can be reused. No functional change. Signed-off-by: Ani Sinha --- tests/qtest/libqos/fw_cfg.c | 63

Re: [PATCH v3] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-08 Thread Ani Sinha
> On 8 Jan 2025, at 6:38 PM, Daniel P. Berrangé wrote: > > On Wed, Jan 08, 2025 at 06:27:50PM +0530, Ani Sinha wrote: >> At present, the libqos/fw_cfg.c library does not support the modern DMA >> interface which is required to write to the fw_cfg files. It only use

[PATCH v3] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-08 Thread Ani Sinha
structure of the code is taken from edk2 fw_cfg implementation. It has been tested by writing a qtest that writes to a fw_cfg file. This test will be part of a future patch series. Signed-off-by: Ani Sinha --- tests/qtest/libqos/fw_cfg.c | 204 tests/qtest/libqos

Re: [PATCH v2] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-07 Thread Ani Sinha
> On 7 Jan 2025, at 8:21 PM, Ani Sinha wrote: > > At present, the libqos/fw_cfg.c library does not support the modern DMA > interface which is required to write to the fw_cfg files. It only uses the IO > interface. Implement read and write methods based on DMA. This will enab

[PATCH v2] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-07 Thread Ani Sinha
structure of the code is taken from edk2 fw_cfg implementation. It has been tested by writing a qtest that writes to a fw_cfg file. This test will be part of a future patch series. Signed-off-by: Ani Sinha --- tests/qtest/libqos/fw_cfg.c | 191 +++- tests/qtest/libqos

Re: [PATCH] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-07 Thread Ani Sinha
> On 7 Jan 2025, at 6:28 PM, Ani Sinha wrote: > > At present, the libqos/fw_cfg.c library does not support the modern DMA which > is required to write to the fw_cfg files. It only uses the IO interface. > Implement read and write methods based on DMA. This will enable develo

[PATCH] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-07 Thread Ani Sinha
code is taken from edk2 fw_cfg implementation. It has been tested by writing a qtest that writes to a fw_cfg file. This test will be part of a future patch series. Signed-off-by: Ani Sinha --- tests/qtest/libqos/fw_cfg.c | 150 tests/qtest/libqos/fw_cfg.h | 4

Re: DMA interface support for libqos/fw_cfg.c

2025-01-02 Thread Ani Sinha
On Thu, Jan 2, 2025 at 11:31 AM Ani Sinha wrote: > > Hi Markus: > Currently this library can only be used to read fw_cfg files from > QEMU. It can not be used to write to fw_cfg files since it does not > support the DMA interface. Is it possible to add DMA interface support > to

DMA interface support for libqos/fw_cfg.c

2025-01-01 Thread Ani Sinha
Hi Markus: Currently this library can only be used to read fw_cfg files from QEMU. It can not be used to write to fw_cfg files since it does not support the DMA interface. Is it possible to add DMA interface support to this libraries so that we may use it to write tests that write to fw_cfg files?

[PATCH] qtest/fw-cfg: remove compiled out code

2025-01-01 Thread Ani Sinha
Remove code that is already compiled out. This prevents confusion. CC: qemu-triv...@nongnu.org Signed-off-by: Ani Sinha --- tests/qtest/fw_cfg-test.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/tests/qtest/fw_cfg-test.c b/tests/qtest/fw_cfg-test.c index 5dc807ba23..e48b34afa5

[PATCH] docs: update copyright date to the year 2025

2025-01-01 Thread Ani Sinha
We are already in January 2025! Update copyright notices. Cc: peter.mayd...@linaro.org Cc: qemu-triv...@nongnu.org Signed-off-by: Ani Sinha --- docs/conf.py | 2 +- include/qemu/help-texts.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-20 Thread Ani Sinha
On Fri, 20 Dec, 2024, 7:01 pm Ani Sinha, wrote: > On Fri, Dec 20, 2024 at 5:03 PM Alexander Graf wrote: > > > > > > On 20.12.24 11:00, Ani Sinha wrote: > > >>> Either add the I386 dependency or don't use PC_MACHINE, because on > > >>> n

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-20 Thread Ani Sinha
On Fri, Dec 20, 2024 at 5:03 PM Alexander Graf wrote: > > > On 20.12.24 11:00, Ani Sinha wrote: > >>> Either add the I386 dependency or don't use PC_MACHINE, because on > >>> non-x86 targets PC_MACHINE(qdev_get_machine()) will crash. > >> Ah thi

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-20 Thread Ani Sinha
> > Either add the I386 dependency or don't use PC_MACHINE, because on > > non-x86 targets PC_MACHINE(qdev_get_machine()) will crash. > > Ah this is where we have a disconnect. I assumed that > > pcms = PC_MACHINE(m_obj) > > would return NULL on non-x86. > > Seems a better way to do this (as is don

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-19 Thread Ani Sinha
On Thu, Dec 19, 2024 at 10:46 PM Philippe Mathieu-Daudé wrote: > > On 19/12/24 18:08, Ani Sinha wrote: > > > > > > On Thu, 19 Dec, 2024, 10:21 pm Philippe Mathieu-Daudé, > > mailto:phi...@linaro.org>> wrote: > > > > On 19/12/24 17:16, Ani Sinh

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-19 Thread Ani Sinha
On Thu, 19 Dec, 2024, 10:21 pm Philippe Mathieu-Daudé, wrote: > On 19/12/24 17:16, Ani Sinha wrote: > > > > > > On Thu, 19 Dec, 2024, 9:22 pm Philippe Mathieu-Daudé, > <mailto:phi...@linaro.org>> wrote: > > > > On 16/12/24 12:48, Ani Sin

Re: [RFC PATCH 00/10] hw/misc/vmcoreinfo: Convert from QDev to plain Object

2024-12-19 Thread Ani Sinha
On Thu, 19 Dec, 2024, 9:27 pm Daniel P. Berrangé, wrote: > On Thu, Dec 19, 2024 at 04:38:47PM +0100, Philippe Mathieu-Daudé wrote: > > No reason for vmcoreinfo to be based on QDev, since it > > doesn't use any QDev API. Demote to plain Object. > > I'm not especially convinced by that rationale, a

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-19 Thread Ani Sinha
On Thu, Dec 19, 2024 at 6:25 PM Marc-André Lureau wrote: > > Hi > > On Thu, Dec 19, 2024 at 2:03 PM Philippe Mathieu-Daudé > wrote: > > >>> +static const TypeInfo vmfwupdate_device_info = { > > >>> +.name = TYPE_VMFWUPDATE, > > >>> +.parent= TYPE_DEVICE, > > >> > > >> Wha

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-19 Thread Ani Sinha
On Thu, 19 Dec, 2024, 9:22 pm Philippe Mathieu-Daudé, wrote: > On 16/12/24 12:48, Ani Sinha wrote: > > > diff --git a/hw/misc/meson.build b/hw/misc/meson.build > > index d02d96e403..4c5bdb0de2 100644 > > --- a/hw/misc/meson.build > > +++ b/hw/misc/me

  1   2   3   4   5   6   7   8   9   10   >