qemu/hw-vfio-hct-update-support-ccp-count-to-48.patch
Jiabo Feng f2ed4aa869 QEMU update to version 8.2.0-25:
- hw/arm/virt:Keep Guest L1 cache type consistent with KVM
- cvm : Add support for TEE-based national encryption acceleration.
- Add virtCCA Coda annotation Adjust the position of the security device
- target/i386: sev: Add support for reuse ASID for different CSV guests
- target/i386: sev: Fix incompatibility between SEV and CSV on the GET_ID API
- hw/cxl: Ensure there is enough data for the header in cmd_ccls_set_lsa()
- hw/pci: Add parenthesis to PCI_BUILD_BDF macro
- hw/audio/hda: free timer on exit
- meson.build: Remove ncurses workaround for OpenBSD
- ui/console-vc: Silence warning about sprintf() on OpenBSD
- ui: remove break after g_assert_not_reached()
- s390x/sclp: Simplify get_sclp_device()
- hw/vfio/hct: qemu startup terminate once error happened in hct
- hw/vfio/hct: fix ccp_index error caused by uninitialized buf
- hw/vfio/hct: update support ccp count to 48.
- hw/vfio: add device hct based on vfio.

Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
(cherry picked from commit 702a9cc4e262a50f7aa6f7c9549fbc13d4cd0770)
2024-11-30 11:31:31 +08:00

58 lines
2.1 KiB
Diff

From 3af7045d3aea901d366f4f6dee51e70998351698 Mon Sep 17 00:00:00 2001
From: Yabin Li <liyabin@hygon.cn>
Date: Tue, 23 Apr 2024 15:38:48 +0800
Subject: [PATCH] hw/vfio/hct: update support ccp count to 48.
Signed-off-by: Yabin Li <liyabin@hygon.cn>
Signed-off-by: yangdepei <yangdepei@hygon.cn>
---
hw/vfio/hct.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/hw/vfio/hct.c b/hw/vfio/hct.c
index 476e86c61d..790bb78439 100644
--- a/hw/vfio/hct.c
+++ b/hw/vfio/hct.c
@@ -28,7 +28,7 @@
#include "qapi/error.h"
#include "hw/qdev-properties.h"
-#define MAX_CCP_CNT 16
+#define MAX_CCP_CNT 48
#define PAGE_SIZE 4096
#define HCT_SHARED_MEMORY_SIZE (PAGE_SIZE * MAX_CCP_CNT)
#define CCP_INDEX_BYTES 4
@@ -43,7 +43,7 @@
#define HCT_SHARE_DEV "/dev/hct_share"
-#define HCT_VERSION_STRING "0.2"
+#define HCT_VERSION_STRING "0.5"
#define DEF_VERSION_STRING "0.1"
#define VERSION_SIZE 16
@@ -281,15 +281,14 @@ static int hct_api_version_check(void)
memcpy(ctrl.version, DEF_VERSION_STRING, sizeof(DEF_VERSION_STRING));
ret = ioctl(hct_data.hct_fd, HCT_SHARE_OP, &ctrl);
if (ret < 0) {
- error_report("ret %d, errno %d: fail to get hct.ko version, please "
- "update hct.ko to version 0.2.\n",
- ret, errno);
+ error_report("ret %d, errno %d: fail to get hct.ko version.\n", ret,
+ errno);
return -1;
} else if (memcmp(ctrl.version, HCT_VERSION_STRING,
sizeof(HCT_VERSION_STRING)) < 0) {
- error_report("The API version %s is larger than hct.ko version %s, "
- "please update hct.ko to version 0.2\n",
- HCT_VERSION_STRING, ctrl.version);
+ error_report("The hct.ko version is %s, please upgrade to version %s "
+ "or higher.\n",
+ ctrl.version, HCT_VERSION_STRING);
return -1;
}
--
2.41.0.windows.1