Re: HVF EL2 support in QEMU (aka FEAT_NV/FEAT_NV2) for MacOS

2025-07-17 Thread Mark Burton
> On 17 Jul 2025, at 18:13, Marc Zyngier wrote: > > WARNING: This email originated from outside of Qualcomm. Please be wary of > any links or attachments, and do not enable macros. > > On Thu, 17 Jul 2025 16:45:37 +0100, > Mark Burton wrote: >> >> So

Re: HVF EL2 support in QEMU (aka FEAT_NV/FEAT_NV2) for MacOS

2025-07-17 Thread Mark Burton
So long as we can also switch to the emulated GIC when we want/need to :-) (looking at you KVM :-)) Cheers Mark Sent from Outlook for Android<https://aka.ms/AAb9ysg> From: Peter Maydell Sent: Thursday, July 17, 2025 5:36:18 PM To: Danny Canter Cc: Alex

Re: [PULL 14/17] esp.c: only call dma_memory_read function if transfer length is non-zero

2025-07-17 Thread Mark Cave-Ayland
On 17/07/2025 12:58, Peter Maydell wrote: On Thu, 17 Jul 2025 at 12:51, Philippe Mathieu-Daudé wrote: Hi Mark, On 15/7/25 08:19, Philippe Mathieu-Daudé wrote: From: Mark Cave-Ayland In the cases where mixed DMA/non-DMA transfers are used or no data is available, it is possible for the

Re: [PATCH v3 0/7] esp.c: only allow ESP commands permitted in the current mode

2025-07-17 Thread Mark Cave-Ayland
On 16/07/2025 16:13, Michael Tokarev wrote: On 11.07.2025 23:46, Mark Cave-Ayland wrote: This series contains a few minor tidy-ups along with an implementation of the logic to only allow ESP commands permitted in the current mode. The motivation is to fix GitLab issue #2464 which causes

Re: [RFC PATCH 0/6] Fix building of sparc/sparc32plus test cases

2025-07-17 Thread Mark Cave-Ayland
out what is going on here. ATB, Mark.

[PATCH 04/22] hw/vfio/container.c: use QOM casts where appropriate

2025-07-15 Thread Mark Cave-Ayland
Use QOM casts to convert between VFIOContainer and VFIOContainerBase instead of accessing bcontainer directly. Signed-off-by: Mark Cave-Ayland --- hw/vfio/container.c | 31 +-- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/hw/vfio/container.c b/hw

[PATCH 16/22] vfio/pci.c: use QOM casts where appropriate

2025-07-15 Thread Mark Cave-Ayland
Use QOM casts to convert between VFIOPCIDevice and PCIDevice instead of accessing pdev directly. Signed-off-by: Mark Cave-Ayland --- hw/vfio/pci.c | 202 ++ 1 file changed, 120 insertions(+), 82 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio

[PATCH 15/22] vfio/pci.h: use QOM casts where appropriate

2025-07-15 Thread Mark Cave-Ayland
Use QOM casts to convert between VFIOPCIDevice and PCIDevice instead of accessing pdev directly. Signed-off-by: Mark Cave-Ayland --- hw/vfio/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h index 16f092a0c6..c0c3d68742 100644 --- a/hw/vfio

[PATCH 18/22] vfio/cpr.c: use QOM casts where appropriate

2025-07-15 Thread Mark Cave-Ayland
Use QOM casts to convert between VFIOPCIDevice and PCIDevice instead of accessing pdev directly. Signed-off-by: Mark Cave-Ayland --- hw/vfio/cpr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/vfio/cpr.c b/hw/vfio/cpr.c index af0f12a7ad..3e3f4035ab 100644 --- a/hw

[PATCH 17/22] vfio/pci-quirks.c: use QOM casts where appropriate

2025-07-15 Thread Mark Cave-Ayland
Use QOM casts to convert between VFIOPCIDevice and PCIDevice instead of accessing pdev directly. Signed-off-by: Mark Cave-Ayland --- hw/vfio/pci-quirks.c | 48 ++-- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/hw/vfio/pci-quirks.c b/hw

[PATCH 12/22] vfio-user/pci.c: use QOM casts where appropriate

2025-07-15 Thread Mark Cave-Ayland
Use QOM casts to convert between VFIOUserPCIDevice and VFIOPCIDevice instead of accessing device directly. Signed-off-by: Mark Cave-Ayland --- hw/vfio-user/pci.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c index da6fe51809

[PATCH 11/22] vfio-user/pci.c: update VFIOUserPCIDevice declaration

2025-07-15 Thread Mark Cave-Ayland
Update the VFIOUserPCIDevice declaration so that it is closer to our coding guidelines: add a blank line after the parent object. Signed-off-by: Mark Cave-Ayland --- hw/vfio-user/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c index be71c77729

[PATCH 20/22] vfio-user/pci.c: use QOM casts where appropriate

2025-07-15 Thread Mark Cave-Ayland
Use QOM casts to convert between VFIOPCIDevice and PCIDevice instead of accessing pdev directly. Signed-off-by: Mark Cave-Ayland --- hw/vfio-user/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c index 9380766548..25a1dc0529

[PATCH 19/22] vfio/igd.c: use QOM casts where appropriate

2025-07-15 Thread Mark Cave-Ayland
Use QOM casts to convert between VFIOPCIDevice and PCIDevice instead of accessing pdev directly. Signed-off-by: Mark Cave-Ayland --- hw/vfio/igd.c | 38 +- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c index

[PATCH 13/22] vfio-user/pci.c: rename VFIOUserPCIDevice device field to parent_obj

2025-07-15 Thread Mark Cave-Ayland
Now that nothing accesses the device field directly, rename device to parent_obj as per our current coding guidelines. Signed-off-by: Mark Cave-Ayland --- hw/vfio-user/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c index

[PATCH 08/22] vfio-user/container.h: update VFIOUserContainer declaration

2025-07-15 Thread Mark Cave-Ayland
Update the VFIOUserContainer declaration so that it is closer to our coding guidelines: remove the explicit typedef (this is already handled by the OBJECT_DECLARE_TYPE() macro) and add a blank line after the parent object. Signed-off-by: Mark Cave-Ayland --- hw/vfio-user/container.h | 5

[PATCH 02/22] vfio/vfio-container.h: update VFIOContainer declaration

2025-07-15 Thread Mark Cave-Ayland
Update the VFIOContainer declaration so that it is closer to our coding guidelines: emove the explicit typedef (this is already handled by the OBJECT_DECLARE_TYPE() macro) and add a blank line after the parent object. Signed-off-by: Mark Cave-Ayland --- include/hw/vfio/vfio-container.h | 5

[PATCH 21/22] s390x/s390-pci-vfio.c: use QOM casts where appropriate

2025-07-15 Thread Mark Cave-Ayland
Use QOM casts to cast to VFIOPCIDevice instead of using container_of(). Signed-off-by: Mark Cave-Ayland --- hw/s390x/s390-pci-vfio.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c index aaf91319b4

[PATCH 06/22] vfio/spapr.c: use QOM casts where appropriate

2025-07-15 Thread Mark Cave-Ayland
Use QOM casts to convert between VFIOContainer and VFIOContainerBase instead of accessing bcontainer directly. Signed-off-by: Mark Cave-Ayland --- hw/vfio/spapr.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c index

[PATCH 14/22] vfio/pci.h: update VFIOPCIDevice declaration

2025-07-15 Thread Mark Cave-Ayland
Update the VFIOPCIDevice declaration so that it is closer to our coding guidelines: add a blank line after the parent object. Signed-off-by: Mark Cave-Ayland --- hw/vfio/pci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h index 495fae737d..16f092a0c6 100644

[PATCH 07/22] vfio/vfio-container.h: rename VFIOContainer bcontainer field to parent_obj

2025-07-15 Thread Mark Cave-Ayland
Now that nothing accesses the bcontainer field directly, rename bcontainer to parent_obj as per our current coding guidelines. Signed-off-by: Mark Cave-Ayland --- include/hw/vfio/vfio-container.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/vfio/vfio

[PATCH 22/22] vfio/pci.h: rename VFIOPCIDevice pdev field to parent_obj

2025-07-15 Thread Mark Cave-Ayland
Now that nothing accesses the pdev field directly, rename pdev to parent_obj as per our current coding guidelines. Signed-off-by: Mark Cave-Ayland --- hw/vfio/cpr.c | 4 ++-- hw/vfio/pci.c | 4 ++-- hw/vfio/pci.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/vfio

[PATCH 10/22] vfio-user/container.h: rename VFIOUserContainer bcontainer field to parent_obj

2025-07-15 Thread Mark Cave-Ayland
Now that nothing accesses the bcontainer field directly, rename bcontainer to parent_obj as per our current coding guidelines. Signed-off-by: Mark Cave-Ayland --- hw/vfio-user/container.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio-user/container.h b/hw/vfio-user

[PATCH 09/22] vfio/container.c: use QOM casts where appropriate

2025-07-15 Thread Mark Cave-Ayland
Use QOM casts to convert between VFIOUserContainer and VFIOContainerBase instead of accessing bcontainer directly. Signed-off-by: Mark Cave-Ayland --- hw/vfio-user/container.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/hw/vfio-user

[PATCH 00/22] vfio: improve use of QOM and coding guidelines

2025-07-15 Thread Mark Cave-Ayland
ze. Signed-off-by: Mark Cave-Ayland Mark Cave-Ayland (22): vfio/vfio-container-base.h: update VFIOContainerBase declaration vfio/vfio-container.h: update VFIOContainer declaration hw/vfio/cpr-legacy.c: use QOM casts where appropriate hw/vfio/container.c: use QOM casts where approp

[PATCH 05/22] ppc/spapr_pci_vfio.c: use QOM casts where appropriate

2025-07-15 Thread Mark Cave-Ayland
Use a QOM cast to convert to VFIOContainer instead of accessing bcontainer directly. Signed-off-by: Mark Cave-Ayland --- hw/ppc/spapr_pci_vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c index e318d0d912..7e1c71ef59

[PATCH 01/22] vfio/vfio-container-base.h: update VFIOContainerBase declaration

2025-07-15 Thread Mark Cave-Ayland
VFIOContainerBase struct declaration. Signed-off-by: Mark Cave-Ayland --- include/hw/vfio/vfio-container-base.h | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/include/hw/vfio/vfio-container-base.h b/include/hw/vfio/vfio-container-base.h index bded6e993f..acbd48a18a 100644

[PATCH 03/22] hw/vfio/cpr-legacy.c: use QOM casts where appropriate

2025-07-15 Thread Mark Cave-Ayland
Use QOM casts to convert between VFIOContainer and VFIOContainerBase instead of accessing bcontainer directly. Signed-off-by: Mark Cave-Ayland --- hw/vfio/cpr-legacy.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/vfio/cpr-legacy.c b/hw/vfio/cpr-legacy.c

Re: [PATCH v2 3/4] hw/vfio-user: wait for proxy close correctly

2025-07-15 Thread Mark Cave-Ayland
ile (proxy->state != VFIO_PROXY_CLOSED) { +qemu_cond_wait(&proxy->close_cv, &proxy->lock); +} /* we now hold the only ref to proxy */ qemu_mutex_unlock(&proxy->lock); ATB, Mark.

Re: [PATCH v2 1/4] hw/vfio-user: add Cédric Le Goater as a maintainer

2025-07-15 Thread Mark Cave-Ayland
/test_multiprocess.py VFIO-USER: M: John Levon M: Thanos Makatos +M: Cédric Le Goater S: Supported F: docs/interop/vfio-user.rst F: docs/system/devices/vfio-user.rst Acked-by: Mark Cave-Ayland ATB, Mark.

Re: [PATCH] hw/vfio-user: wait for proxy close correctly

2025-07-15 Thread Mark Cave-Ayland
On 15/07/2025 06:49, Cédric Le Goater wrote: On 7/11/25 13:38, Mark Cave-Ayland wrote: On 10/07/2025 16:47, John Levon wrote: (added Cedric) ah. Thanks Mark. This reminds me that we should have maintainers/reviewers that can send PRs for the vfio-user component. John, Could you please

[PATCH v3 5/7] esp.c: only call dma_memory_write function if transfer length is non-zero

2025-07-11 Thread Mark Cave-Ayland
side-effects (along with generating additional tracing noise). Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/scsi/esp.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index ec9fcbeddf..1c7bad8fc0 100644 --- a/hw

[PATCH v3 1/7] esp.c: only raise IRQ in esp_transfer_data() for CMD_SEL, CMD_SELATN and CMD_TI commands

2025-07-11 Thread Mark Cave-Ayland
Clarify the logic in esp_transfer_data() to ensure that the deferred interrupt code can only be triggered for CMD_SEL, CMD_SELATN and CMD_TI commands. This should already be the case, but make it explicit to ensure the logic isn't triggered unexpectedly. Signed-off-by: Mark Cave-A

[PATCH v3 4/7] esp.c: only call dma_memory_read function if transfer length is non-zero

2025-07-11 Thread Mark Cave-Ayland
side-effects (along with generating additional tracing noise). Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/scsi/esp.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index 62ba406149..ec9fcbeddf

[PATCH v3 3/7] esp.h: remove separate ESPState typedef

2025-07-11 Thread Mark Cave-Ayland
This is not needed as it is now handled by the OBJECT_DECLARE_SIMPLE_TYPE() macro. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- include/hw/scsi/esp.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/scsi/esp.h b/include/hw/scsi/esp.h index 533d856aa3

[PATCH v3 0/7] esp.c: only allow ESP commands permitted in the current mode

2025-07-11 Thread Mark Cave-Ayland
not use an illegal ESP command sequence. Signed-off-by: Mark Cave-Ayland v3: - Fix typo in comments for patches 4 and 5 as pointed out by Phil - Add R-B tags from Phil v2: - Rebase onto master - Add patches 4 and 5 to avoid calling the DMA functions for zero-length transfers Mark Cave

[PATCH v3 2/7] esp.c: improve comment in esp_transfer_data()

2025-07-11 Thread Mark Cave-Ayland
Whilst working on the previous patch, the existing comment was not enough to document when the TI command codepath was being used. Update and improve the comment accordingly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/scsi/esp.c | 5 +++-- 1 file changed, 3

[PATCH v3 6/7] esp.c: add asc_mode property to indicate the current ESP mode

2025-07-11 Thread Mark Cave-Ayland
-off-by: Mark Cave-Ayland --- hw/scsi/esp.c | 21 - include/hw/scsi/esp.h | 7 +++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index 1c7bad8fc0..4aa58f9e48 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -275,6

[PATCH v3 7/7] esp.c: only allow ESP commands permitted in the current asc_mode

2025-07-11 Thread Mark Cave-Ayland
ICCS after a Chip Reset which is not permitted, but will fail with an INACCESSIBLE_BOOT_DEVICE error unless an interrupt is generated. Signed-off-by: Mark Cave-Ayland Fixes: 83428f7a97 ("esp.c: move write_response() non-DMA logic to esp_do_nodma()") Resolves: https://gitlab.com/qemu-pr

Re: [PATCH v2 5/7] esp.c: only call dma_memory_write function if transfer length is non-zero

2025-07-11 Thread Mark Cave-Ayland
On 09/07/2025 12:14, Philippe Mathieu-Daudé wrote: On 18/6/25 08:12, Mark Cave-Ayland wrote: In the cases where mixed DMA/non-DMA transfers are used or no data is available, it is possible to for the calculated transfer length to be zero. Only call the dma_memory_write function where the

Re: [PATCH v2 0/7] esp.c: only allow ESP commands permitted in the current mode

2025-07-11 Thread Mark Cave-Ayland
On 09/07/2025 12:16, Philippe Mathieu-Daudé wrote: Hi Mark, On 9/7/25 09:50, Mark Cave-Ayland wrote: On 18/06/2025 07:12, Mark Cave-Ayland wrote: This series contains a few minor tidy-ups along with an implementation of the logic to only allow ESP commands permitted in the current mode. The

Re: [PATCH v2 4/7] esp.c: only call dma_memory_read function if transfer length is non-zero

2025-07-11 Thread Mark Cave-Ayland
On 09/07/2025 12:11, Philippe Mathieu-Daudé wrote: On 18/6/25 08:12, Mark Cave-Ayland wrote: In the cases where mixed DMA/non-DMA transfers are used or no data is available, it is possible to for the calculated transfer length to be "to ~for~ the..." Ooops. Will fix in v3.

Re: [PATCH v2 1/7] esp.c: only raise IRQ in esp_transfer_data() for CMD_SEL, CMD_SELATN and CMD_TI commands

2025-07-11 Thread Mark Cave-Ayland
On 09/07/2025 12:09, Philippe Mathieu-Daudé wrote: On 18/6/25 08:12, Mark Cave-Ayland wrote: Clarify the logic in esp_transfer_data() to ensure that the deferred interrupt code can only be triggered for CMD_SEL, CMD_SELATN and CMD_TI commands. This should already be the case, but make it

Re: [PATCH] hw/vfio: fix region fd initialization

2025-07-11 Thread Mark Cave-Ayland
g_clear_pointer(&vbasedev->reginfo, g_free); Reviewed-by: Mark Cave-Ayland ATB, Mark.

Re: [PATCH] hw/vfio-user: wait for proxy close correctly

2025-07-11 Thread Mark Cave-Ayland
qemu_cond_wait(&proxy->close_cv, &proxy->lock); +} /* we now hold the only ref to proxy */ qemu_mutex_unlock(&proxy->lock); It think it is worth mentioning the function rename in the commit message, otherwise looks good to me: Reviewed-by: Mark Cave-Ayland ATB, Mark.

[PATCH v5 17/19] hw/i386/pc_piix.c: remove unused headers after isapc machine split

2025-07-11 Thread Mark Cave-Ayland
The headers for isapc-only devices can be removed from pc_piix.c since they are no longer used by the i440fx-pc machine. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386

[PATCH v5 08/19] hw/i386/pc_piix.c: remove nvdimm initialisation from pc_init_isa()

2025-07-11 Thread Mark Cave-Ayland
NVDIMMs cannot be used by PCs from a pre-PCI era. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index c49be1d799..78f50a7893 100644 --- a/hw/i386/pc_piix.c

[PATCH v5 19/19] hw/i386/isapc.c: replace rom_memory with system_memory

2025-07-11 Thread Mark Cave-Ayland
Now that we can guarantee the isapc machine will never have a PCI bus, any instances of rom_memory can be replaced by system_memory and rom_memory removed completely. Signed-off-by: Mark Cave-Ayland --- hw/i386/isapc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw

[PATCH v5 05/19] hw/i386/pc_piix.c: remove pcmc->pci_enabled dependent initialisation from pc_init_isa()

2025-07-11 Thread Mark Cave-Ayland
PCI code will never be used for an isapc machine. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 105 -- 1 file changed, 8 insertions(+), 97 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c

[PATCH v5 02/19] hw/i386/pc_piix.c: remove include for loader.h

2025-07-11 Thread Mark Cave-Ayland
This header is not required since the loader functionality is handled separately by pc_memory_init() in pc.c. Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 34beea993e..4b0eeb4497 100644 --- a

[PATCH v5 16/19] hw/i386: move isapc machine to separate isapc.c file

2025-07-11 Thread Mark Cave-Ayland
MIT licence. The text originates from commit 1df912cf9e ("VL license of the day is MIT/BSD") so we can be sure that this was the original intent. As a consequence we can update the file header to use a SPDX tag as per the current project contribution guidelines. Signed-off-by: Mark C

[PATCH v5 15/19] hw/i386/pc_piix.c: assume pcmc->pci_enabled is always true in pc_init1()

2025-07-11 Thread Mark Cave-Ayland
PCI is always enabled on the pc-i440fx machine so hardcode the relevant logic in pc_init1(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 194 ++ 1 file changed, 76 insertions(+), 118 deletions(-) diff

[PATCH v5 14/19] hw/i386/pc_piix.c: hardcode pcms->pci_bus to NULL in pc_init_isa()

2025-07-11 Thread Mark Cave-Ayland
By definition PCI can never be enabled on an isapc machine so hardcode the PCIBus argument of pc_nic_init() to NULL. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_piix.c

[PATCH v5 13/19] hw/i386/pc_piix.c: assume pcmc->pci_enabled is always false in pc_init_isa()

2025-07-11 Thread Mark Cave-Ayland
By definition PCI can never be enabled on an isapc machine so hardcode the relevant values set via pcmc->pci_enabled. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i

[PATCH v5 12/19] hw/i386/pc_piix.c: always initialise ISA IDE drives in pc_init_isa()

2025-07-11 Thread Mark Cave-Ayland
By definition an isapc machine must always use ISA IDE drives so ensure that they are always enabled. At the same time also remove the surrounding CONFIG_IDE_ISA define since it will be enabled via the ISAPC Kconfig. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw

[PATCH v5 18/19] hw/i386/pc_piix.c: replace rom_memory with pci_memory

2025-07-11 Thread Mark Cave-Ayland
Now that we can guarantee the i440fx-pc machine will always have a PCI bus, any instances of rom_memory can be replaced by pci_memory and rom_memory removed completely. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 4 +--- 1 file changed, 1

[PATCH v5 11/19] hw/i386/pc_piix.c: remove pc_system_flash_cleanup_unused() from pc_init_isa()

2025-07-11 Thread Mark Cave-Ayland
This function contains 'assert(PC_MACHINE_GET_CLASS(pcms)->pci_enabled)' and so we can safely assume that it should never be used for the isapc machine. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 1 - 1 file changed, 1 deletion(-)

[PATCH v5 03/19] hw/i386/pc_piix.c: inline pc_xen_hvm_init_pci() into pc_xen_hvm_init()

2025-07-11 Thread Mark Cave-Ayland
This helps to simplify the initialisation of the Xen hvm machine. Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 4b0eeb4497..b33480e203 100644 --- a/hw/i386

[PATCH v5 09/19] hw/i386/pc_piix.c: simplify RAM size logic in pc_init_isa()

2025-07-11 Thread Mark Cave-Ayland
All isapc machines must have 32-bit CPUs and so the RAM split logic can be hardcoded accordingly. Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 58 --- 1 file changed, 4 insertions(+), 54 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw

[PATCH v5 06/19] hw/i386/pc_piix.c: remove SMI and piix4_pm initialisation from pc_init_isa()

2025-07-11 Thread Mark Cave-Ayland
These are based upon the PIIX4 PCI chipset and so can never be used on an isapc machine. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c

[PATCH v5 10/19] hw/i386/pc_piix.c: hardcode hole64_size to 0 in pc_init_isa()

2025-07-11 Thread Mark Cave-Ayland
All isapc machines must have 32-bit CPUs and have no PCI 64-bit hole so it can be hardcoded to 0. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386

[PATCH v5 00/19] hw/i386: separate isapc out from pc_piix

2025-07-11 Thread Mark Cave-Ayland
running older OSs, this series splits the isapc machine and its main initialisation routine pc_init_isa() into a separate isapc.c file to reduce the maintenance burden on pc machine developers. Signed-off-by: Mark Cave-Ayland [1] https://lists.gnu.org/archive/html/qemu-devel/2024-03/msg06137

[PATCH v5 07/19] hw/i386/pc_piix.c: remove SGX initialisation from pc_init_isa()

2025-07-11 Thread Mark Cave-Ayland
The Intel SGX instructions only exist on recent CPUs and so would never be available on a CPU from the pre-PCI era. Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 16d666f97e..c49be1d799

[PATCH v5 04/19] hw/i386/pc_piix.c: duplicate pc_init1() into pc_isa_init()

2025-07-11 Thread Mark Cave-Ayland
This is to prepare for splitting the isapc machine into its own separate file. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 261 +- 1 file changed, 260 insertions(+), 1 deletion(-) diff --git a/hw/i386

[PATCH v5 01/19] hw/i386/pc_piix.c: restrict isapc machine to 32-bit CPUs

2025-07-11 Thread Mark Cave-Ayland
inadvertently uses -cpu max then the "best" 32-bit CPU is used (in this case the pentium3). Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386

Re: [PATCH v4 18/18] hw/i386/isapc.c: replace rom_memory with system_memory

2025-07-10 Thread Mark Cave-Ayland
On 10/07/2025 12:05, Philippe Mathieu-Daudé wrote: On 10/7/25 12:53, Philippe Mathieu-Daudé wrote: On 10/7/25 10:52, Mark Cave-Ayland wrote: Now that we can guarantee the isapc machine will never have a PCI bus, any instances of rom_memory can be replaced by system_memory and rom_memory

Re: [PATCH v3 02/14] hw/i386/pc_piix.c: duplicate pc_init1() into pc_isa_init()

2025-07-10 Thread Mark Cave-Ayland
On 10/07/2025 11:38, Philippe Mathieu-Daudé wrote: On 4/7/25 16:09, Mark Cave-Ayland wrote: This is to prepare for splitting the isapc machine into its own separate file. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé ---   hw/i386/pc_piix.c | 261

Re: [PATCH v4 01/18] hw/i386/pc_piix.c: restrict isapc machine to 32-bit CPUs

2025-07-10 Thread Mark Cave-Ayland
On 10/07/2025 11:46, Philippe Mathieu-Daudé wrote: On 10/7/25 10:52, Mark Cave-Ayland wrote: The isapc machine represents a legacy ISA PC with a 486 CPU. Whilst it is possible to specify any CPU via -cpu on the command line, it makes no sense to allow modern 64-bit CPUs to be used. Restrict

[PATCH v4 02/18] hw/i386/pc_piix.c: remove include for loader.h

2025-07-10 Thread Mark Cave-Ayland
This header is not required since the loader functionality is handled separately by pc_memory_init() in pc.c. Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 67c52d79b2..f66eaeb910 100644 --- a

[PATCH v4 05/18] hw/i386/pc_piix.c: remove SMI and piix4_pm initialisation from pc_init_isa()

2025-07-10 Thread Mark Cave-Ayland
These are based upon the PIIX4 PCI chipset and so can never be used on an isapc machine. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c

[PATCH v4 11/18] hw/i386/pc_piix.c: always initialise ISA IDE drives in pc_init_isa()

2025-07-10 Thread Mark Cave-Ayland
By definition an isapc machine must always use ISA IDE drives so ensure that they are always enabled. At the same time also remove the surrounding CONFIG_IDE_ISA define since it will be enabled via the ISAPC Kconfig. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw

[PATCH v4 14/18] hw/i386/pc_piix.c: assume pcmc->pci_enabled is always true in pc_init1()

2025-07-10 Thread Mark Cave-Ayland
PCI is always enabled on the pc-i440fx machine so hardcode the relevant logic in pc_init1(). Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 194 ++ 1 file changed, 76 insertions(+), 118 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386

[PATCH v4 03/18] hw/i386/pc_piix.c: duplicate pc_init1() into pc_isa_init()

2025-07-10 Thread Mark Cave-Ayland
This is to prepare for splitting the isapc machine into its own separate file. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 261 +- 1 file changed, 260 insertions(+), 1 deletion(-) diff --git a/hw/i386

[PATCH v4 07/18] hw/i386/pc_piix.c: remove nvdimm initialisation from pc_init_isa()

2025-07-10 Thread Mark Cave-Ayland
NVDIMMs cannot be used by PCs from a pre-PCI era. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index cbe4b33ba4..2c508f9db6 100644 --- a/hw/i386/pc_piix.c

[PATCH v4 10/18] hw/i386/pc_piix.c: remove pc_system_flash_cleanup_unused() from pc_init_isa()

2025-07-10 Thread Mark Cave-Ayland
This function contains 'assert(PC_MACHINE_GET_CLASS(pcms)->pci_enabled)' and so we can safely assume that it should never be used for the isapc machine. Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/pc_pii

[PATCH v4 16/18] hw/i386/pc_piix.c: remove unused headers after isapc machine split

2025-07-10 Thread Mark Cave-Ayland
The headers for isapc-only devices can be removed from pc_piix.c since they are no longer used by the i440fx-pc machine. Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index b04c683e4e..ed5a313500

[PATCH v4 13/18] hw/i386/pc_piix.c: hardcode pcms->pci_bus to NULL in pc_init_isa()

2025-07-10 Thread Mark Cave-Ayland
By definition PCI can never be enabled on an isapc machine so hardcode the PCIBus argument of pc_nic_init() to NULL. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_piix.c

[PATCH v4 08/18] hw/i386/pc_piix.c: simplify RAM size logic in pc_init_isa()

2025-07-10 Thread Mark Cave-Ayland
All isapc machines must have 32-bit CPUs and so the RAM split logic can be hardcoded accordingly. Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 58 --- 1 file changed, 4 insertions(+), 54 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw

[PATCH v4 18/18] hw/i386/isapc.c: replace rom_memory with system_memory

2025-07-10 Thread Mark Cave-Ayland
Now that we can guarantee the isapc machine will never have a PCI bus, any instances of rom_memory can be replaced by system_memory and rom_memory removed completely. Signed-off-by: Mark Cave-Ayland --- hw/i386/isapc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw

[PATCH v4 17/18] hw/i386/pc_piix.c: replace rom_memory with pci_memory

2025-07-10 Thread Mark Cave-Ayland
Now that we can guarantee the i440fx-pc machine will always have a PCI bus, any instances of rom_memory can be replaced by pci_memory and rom_memory removed completely. Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a

[PATCH v4 15/18] hw/i386: move isapc machine to separate isapc.c file

2025-07-10 Thread Mark Cave-Ayland
MIT licence. The text originates from commit 1df912cf9e ("VL license of the day is MIT/BSD") so we can be sure that this was the original intent. As a consequence we can update the file header to use a SPDX tag as per the current project contribution guidelines. Signed-off-by: Mark C

[PATCH v4 04/18] hw/i386/pc_piix.c: remove pcmc->pci_enabled dependent initialisation from pc_init_isa()

2025-07-10 Thread Mark Cave-Ayland
PCI code will never be used for an isapc machine. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 105 -- 1 file changed, 8 insertions(+), 97 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c

[PATCH v4 09/18] hw/i386/pc_piix.c: hardcode hole64_size to 0 in pc_init_isa()

2025-07-10 Thread Mark Cave-Ayland
All isapc machines must have 32-bit CPUs and have no PCI 64-bit hole so it can be hardcoded to 0. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386

[PATCH v4 12/18] hw/i386/pc_piix.c: assume pcmc->pci_enabled is always false in pc_init_isa()

2025-07-10 Thread Mark Cave-Ayland
By definition PCI can never be enabled on an isapc machine so hardcode the relevant values set via pcmc->pci_enabled. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i

[PATCH v4 00/18] hw/i386: separate isapc out from pc_piix

2025-07-10 Thread Mark Cave-Ayland
running older OSs, this series splits the isapc machine and its main initialisation routine pc_init_isa() into a separate isapc.c file to reduce the maintenance burden on pc machine developers. Signed-off-by: Mark Cave-Ayland [1] https://lists.gnu.org/archive/html/qemu-devel/2024-03/msg06137

[PATCH v4 06/18] hw/i386/pc_piix.c: remove SGX initialisation from pc_init_isa()

2025-07-10 Thread Mark Cave-Ayland
The Intel SGX instructions only exist on recent CPUs and so would never be available on a CPU from the pre-PCI era. Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index cf451d1cb5..cbe4b33ba4

[PATCH v4 01/18] hw/i386/pc_piix.c: restrict isapc machine to 32-bit CPUs

2025-07-10 Thread Mark Cave-Ayland
inadvertently uses -cpu max then the "best" 32-bit CPU is used (in this case the pentium3). Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 25 + 1 file changed, 25 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index ea7572e783..67c52d7

Re: [PATCH v3 14/14] hw/i386: move isapc machine to separate isapc.c file

2025-07-10 Thread Mark Cave-Ayland
On 08/07/2025 18:36, Bernhard Beschow wrote: Am 4. Juli 2025 14:09:41 UTC schrieb Mark Cave-Ayland : Now that pc_init_isa() is independent of any PCI initialisation, move it into a separate isapc.c file. This enables us to finally fix the dependency of ISAPC on I440FX in hw/i386/Kconfig

Re: [PATCH] hw/vfio-user: fix use of uninitialized variable

2025-07-09 Thread Mark Cave-Ayland
e *bcontainer, hwaddr iova, 0, &local_err)) { error_report_err(local_err); ret = -EFAULT; -} else { -ret = 0; } } else { VFIOUserFDs local_fds = { 1, 0, &fd }; Reviewed-by: Mark Cave-Ayland ATB, Mark.

Re: [PATCH v2 0/7] esp.c: only allow ESP commands permitted in the current mode

2025-07-09 Thread Mark Cave-Ayland
On 18/06/2025 07:12, Mark Cave-Ayland wrote: This series contains a few minor tidy-ups along with an implementation of the logic to only allow ESP commands permitted in the current mode. The motivation is to fix GitLab issue #2464 which causes Windows NT MIPS to bluescreen on boot. Patches 1

[PATCH v3 08/14] hw/i386/pc_piix.c: hardcode hole64_size to 0 in pc_init_isa()

2025-07-04 Thread Mark Cave-Ayland
All isapc machines must have 32-bit CPUs and have no PCI 64-bit hole so it can be hardcoded to 0. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386

[PATCH v3 13/14] hw/i386/pc_piix.c: assume pcmc->pci_enabled is always true in pc_init1()

2025-07-04 Thread Mark Cave-Ayland
PCI is always enabled on the pc-i440fx machine so hardcode the relevant logic in pc_init1(). Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 194 ++ 1 file changed, 76 insertions(+), 118 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386

[PATCH v3 10/14] hw/i386/pc_piix.c: always initialise ISA IDE drives in pc_init_isa()

2025-07-04 Thread Mark Cave-Ayland
By definition an isapc machine must always use ISA IDE drives so ensure that they are always enabled. At the same time also remove the surrounding CONFIG_IDE_ISA define since it will be enabled via the ISAPC Kconfig. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw

[PATCH v3 06/14] hw/i386/pc_piix.c: remove nvdimm initialisation from pc_init_isa()

2025-07-04 Thread Mark Cave-Ayland
NVDIMMs cannot be used by PCs from a pre-PCI era. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 75226aa775..a6a35405ba 100644 --- a/hw/i386/pc_piix.c

[PATCH v3 01/14] hw/i386/pc_piix.c: restrict isapc machine to 32-bit CPUs

2025-07-04 Thread Mark Cave-Ayland
inadvertently uses -cpu max then the "best" 32-bit CPU is used (in this case the pentium3). Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 25 + 1 file changed, 25 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index ea7572e783..67c52d7

[PATCH v3 12/14] hw/i386/pc_piix.c: hardcode pcms->pci_bus to NULL in pc_init_isa()

2025-07-04 Thread Mark Cave-Ayland
By definition PCI can never be enabled on an isapc machine so hardcode the PCIBus argument of pc_nic_init() to NULL. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_piix.c

[PATCH v3 04/14] hw/i386/pc_piix.c: remove SMI and piix4_pm initialisation from pc_init_isa()

2025-07-04 Thread Mark Cave-Ayland
These are based upon the PIIX4 PCI chipset and so can never be used on an isapc machine. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c

[PATCH v3 03/14] hw/i386/pc_piix.c: remove pcmc->pci_enabled dependent initialisation from pc_init_isa()

2025-07-04 Thread Mark Cave-Ayland
PCI code will never be used for an isapc machine. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 105 -- 1 file changed, 8 insertions(+), 97 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c

[PATCH v3 14/14] hw/i386: move isapc machine to separate isapc.c file

2025-07-04 Thread Mark Cave-Ayland
MIT licence. The text originates from commit 1df912cf9e ("VL license of the day is MIT/BSD") so we can be sure that this was the original intent. As a consequence we can update the file header to use a SPDX tag as per the current project contribution guidelines. Signed-off-by: Mark C

[PATCH v3 11/14] hw/i386/pc_piix.c: assume pcmc->pci_enabled is always false in pc_init_isa()

2025-07-04 Thread Mark Cave-Ayland
By definition PCI can never be enabled on an isapc machine so hardcode the relevant values set via pcmc->pci_enabled. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i

  1   2   3   4   5   6   7   8   9   10   >