patch 'bus/vmbus: use Hyper-V page size' has been queued to stable release 22.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Jun 12 23:06:55 CEST 2025
Hi,
FYI, your patch has been queued to stable release 22.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2da70953f668415fb325af744a5eff15b612dfc3
Thanks.
Luca Boccassi
---
>From 2da70953f668415fb325af744a5eff15b612dfc3 Mon Sep 17 00:00:00 2001
From: Long Li <longli at microsoft.com>
Date: Fri, 18 Apr 2025 12:32:48 -0700
Subject: [PATCH] bus/vmbus: use Hyper-V page size
[ upstream commit 30f24d33f33bbb29b1fba32b01e8c8d77400a5d5 ]
Hyper-V uses 4k page size, regardless of the system page size used.
Define Hyper-V page size for use in drivers.
The interrupt and monitor pages mapped from Hyper-V via kernel are always
4k in sizes. Use Hyper-V page size to map them.
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Signed-off-by: Long Li <longli at microsoft.com>
---
drivers/bus/vmbus/bus_vmbus_driver.h | 4 ++++
drivers/bus/vmbus/linux/vmbus_uio.c | 2 +-
drivers/bus/vmbus/vmbus_common_uio.c | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/bus/vmbus/bus_vmbus_driver.h b/drivers/bus/vmbus/bus_vmbus_driver.h
index e2475a642d..879cbd5bbf 100644
--- a/drivers/bus/vmbus/bus_vmbus_driver.h
+++ b/drivers/bus/vmbus/bus_vmbus_driver.h
@@ -14,6 +14,10 @@ extern "C" {
#include <rte_compat.h>
#include <dev_driver.h>
+#define HYPERV_PAGE_SHIFT 12
+#define HYPERV_PAGE_SIZE (1 << HYPERV_PAGE_SHIFT)
+#define HYPERV_PAGE_MASK (HYPERV_PAGE_SIZE - 1)
+
struct vmbus_channel;
struct vmbus_mon_page;
diff --git a/drivers/bus/vmbus/linux/vmbus_uio.c b/drivers/bus/vmbus/linux/vmbus_uio.c
index 26edef342d..d4522f2e21 100644
--- a/drivers/bus/vmbus/linux/vmbus_uio.c
+++ b/drivers/bus/vmbus/linux/vmbus_uio.c
@@ -268,7 +268,7 @@ static int vmbus_uio_map_subchan(const struct rte_vmbus_device *dev,
}
file_size = sb.st_size;
- if (file_size == 0 || (file_size & (rte_mem_page_size() - 1))) {
+ if (file_size == 0 || (file_size & (HYPERV_PAGE_SIZE - 1))) {
VMBUS_LOG(ERR, "incorrect size %s: %zu",
ring_path, file_size);
diff --git a/drivers/bus/vmbus/vmbus_common_uio.c b/drivers/bus/vmbus/vmbus_common_uio.c
index 4d4613513c..13289cd9a4 100644
--- a/drivers/bus/vmbus/vmbus_common_uio.c
+++ b/drivers/bus/vmbus/vmbus_common_uio.c
@@ -201,7 +201,7 @@ vmbus_uio_map_resource(struct rte_vmbus_device *dev)
}
dev->int_page = (uint32_t *)((char *)uio_res->maps[HV_INT_PAGE_MAP].addr
- + (rte_mem_page_size() >> 1));
+ + (HYPERV_PAGE_SIZE >> 1));
dev->monitor_page = uio_res->maps[HV_MON_PAGE_MAP].addr;
return 0;
}
--
2.47.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-12 22:06:25.291881223 +0100
+++ 0038-bus-vmbus-use-Hyper-V-page-size.patch 2025-06-12 22:06:23.858044384 +0100
@@ -1 +1 @@
-From 30f24d33f33bbb29b1fba32b01e8c8d77400a5d5 Mon Sep 17 00:00:00 2001
+From 2da70953f668415fb325af744a5eff15b612dfc3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 30f24d33f33bbb29b1fba32b01e8c8d77400a5d5 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index bc394208de..0a56275437 100644
+index e2475a642d..879cbd5bbf 100644
@@ -26,3 +27,3 @@
-@@ -14,6 +14,10 @@
- extern "C" {
- #endif
+@@ -14,6 +14,10 @@ extern "C" {
+ #include <rte_compat.h>
+ #include <dev_driver.h>
More information about the stable
mailing list