Skip to content

Commit cffe9f5

Browse files
Naman Jainliuw
authored andcommitted
Drivers: hv: Export some symbols for mshv_vtl
MSHV_VTL driver is going to be introduced, which is supposed to provide interface for Virtual Machine Monitors (VMMs) to control Virtual Trust Level (VTL). Export the symbols needed to make it work (vmbus_isr, hv_context and hv_post_message). Co-developed-by: Roman Kisel <romank@linux.microsoft.com> Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Co-developed-by: Saurabh Sengar <ssengar@linux.microsoft.com> Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202506110544.q0NDMQVc-lkp@intel.com/ Reviewed-by: Michael Kelley <mhklinux@outlook.com> Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Signed-off-by: Wei Liu <wei.liu@kernel.org>
1 parent 796ef5a commit cffe9f5

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/hv/hv.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@
1818
#include <linux/clockchips.h>
1919
#include <linux/delay.h>
2020
#include <linux/interrupt.h>
21+
#include <linux/export.h>
2122
#include <clocksource/hyperv_timer.h>
2223
#include <asm/mshyperv.h>
2324
#include <linux/set_memory.h>
2425
#include "hyperv_vmbus.h"
2526

2627
/* The one and only */
2728
struct hv_context hv_context;
29+
EXPORT_SYMBOL_FOR_MODULES(hv_context, "mshv_vtl");
2830

2931
/*
3032
* hv_init - Main initialization routine.
@@ -104,6 +106,7 @@ int hv_post_message(union hv_connection_id connection_id,
104106

105107
return hv_result(status);
106108
}
109+
EXPORT_SYMBOL_FOR_MODULES(hv_post_message, "mshv_vtl");
107110

108111
static int hv_alloc_page(void **page, bool decrypt, const char *note)
109112
{

drivers/hv/hyperv_vmbus.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
*/
3434
#define HV_UTIL_NEGO_TIMEOUT 55
3535

36+
void vmbus_isr(void);
3637

3738
/* Definitions for the monitored notification facility */
3839
union hv_monitor_trigger_group {

drivers/hv/vmbus_drv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <linux/syscore_ops.h>
3737
#include <linux/dma-map-ops.h>
3838
#include <linux/pci.h>
39+
#include <linux/export.h>
3940
#include <clocksource/hyperv_timer.h>
4041
#include <asm/mshyperv.h>
4142
#include "hyperv_vmbus.h"
@@ -1349,7 +1350,7 @@ static void vmbus_message_sched(struct hv_per_cpu_context *hv_cpu, void *message
13491350
}
13501351
}
13511352

1352-
static void vmbus_isr(void)
1353+
void vmbus_isr(void)
13531354
{
13541355
struct hv_per_cpu_context *hv_cpu
13551356
= this_cpu_ptr(hv_context.cpu_context);
@@ -1362,6 +1363,7 @@ static void vmbus_isr(void)
13621363

13631364
add_interrupt_randomness(vmbus_interrupt);
13641365
}
1366+
EXPORT_SYMBOL_FOR_MODULES(vmbus_isr, "mshv_vtl");
13651367

13661368
static irqreturn_t vmbus_percpu_isr(int irq, void *dev_id)
13671369
{

0 commit comments

Comments
 (0)