qemu/Add-virtCCA-Coda-annotation.patch

40 lines
1.8 KiB
Diff
Raw Permalink Normal View History

From 0cf5a4c56d34542bcc2f646446bf54828a51a014 Mon Sep 17 00:00:00 2001
From: yangxiangkai <yangxiangkai@huawei.com>
Date: Tue, 12 Nov 2024 09:03:51 +0800
Subject: [PATCH] Add virtCCA Coda annotation Adjust the position of the
security device Signed-off-by: yangxiangkai <yangxiangkai@huawei.com>
---
hw/arm/virt.c | 1 +
linux-headers/linux/vfio.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index e73a795d3d..a744393f6e 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -162,6 +162,7 @@ static const MemMapEntry base_memmap[] = {
[VIRT_PVTIME] = { 0x090a0000, 0x00010000 },
[VIRT_SECURE_GPIO] = { 0x090b0000, 0x00001000 },
[VIRT_CPUHP_ACPI] = { 0x090c0000, ACPI_CPU_HOTPLUG_REG_LEN},
+ /* In the virtCCA scenario, this space is used for MSI interrupt mapping */
[VIRT_MMIO] = { 0x0a000000, 0x00000200 },
[VIRT_CPUFREQ] = { 0x0b000000, 0x00010000 },
/* ...repeating for a total of NUM_VIRTIO_TRANSPORTS, each of that size */
diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
index c27a43d74b..5b1e2871af 100644
--- a/linux-headers/linux/vfio.h
+++ b/linux-headers/linux/vfio.h
@@ -225,7 +225,7 @@ struct vfio_device_info {
#define VFIO_DEVICE_FLAGS_FSL_MC (1 << 6) /* vfio-fsl-mc device */
#define VFIO_DEVICE_FLAGS_CAPS (1 << 7) /* Info supports caps */
#define VFIO_DEVICE_FLAGS_CDX (1 << 8) /* vfio-cdx device */
-#define VFIO_DEVICE_FLAGS_SECURE (1 << 9) /* secure pci device */
+#define VFIO_DEVICE_FLAGS_SECURE (1 << 15) /* secure pci device */
__u32 num_regions; /* Max region index + 1 */
__u32 num_irqs; /* Max IRQ index + 1 */
__u32 cap_offset; /* Offset within info struct of first cap */
--
2.41.0.windows.1