Skip to content

Commit 74fa5d7

Browse files
romank-msftliuw
authored andcommitted
Drivers: hv: Rename the SynIC enable and disable routines
The confidential VMBus requires support for the both hypervisor facing SynIC and the paravisor one. Rename the functions that enable and disable SynIC with the hypervisor. No functional changes. Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Reviewed-by: Tianyu Lan <tiala@microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Signed-off-by: Wei Liu <wei.liu@kernel.org>
1 parent 09406f2 commit 74fa5d7

4 files changed

Lines changed: 12 additions & 11 deletions

File tree

drivers/hv/channel_mgmt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ static void vmbus_wait_for_unload(void)
846846
/*
847847
* In a CoCo VM the hyp_synic_message_page is not allocated
848848
* in hv_synic_alloc(). Instead it is set/cleared in
849-
* hv_synic_enable_regs() and hv_synic_disable_regs()
849+
* hv_hyp_synic_enable_regs() and hv_hyp_synic_disable_regs()
850850
* such that it is set only when the CPU is online. If
851851
* not all present CPUs are online, the message page
852852
* might be NULL, so skip such CPUs.

drivers/hv/hv.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,10 @@ void hv_synic_free(void)
268268
}
269269

270270
/*
271-
* hv_synic_enable_regs - Initialize the Synthetic Interrupt Controller.
271+
* hv_hyp_synic_enable_regs - Initialize the Synthetic Interrupt Controller
272+
* with the hypervisor.
272273
*/
273-
void hv_synic_enable_regs(unsigned int cpu)
274+
void hv_hyp_synic_enable_regs(unsigned int cpu)
274275
{
275276
struct hv_per_cpu_context *hv_cpu =
276277
per_cpu_ptr(hv_context.cpu_context, cpu);
@@ -337,14 +338,14 @@ void hv_synic_enable_regs(unsigned int cpu)
337338

338339
int hv_synic_init(unsigned int cpu)
339340
{
340-
hv_synic_enable_regs(cpu);
341+
hv_hyp_synic_enable_regs(cpu);
341342

342343
hv_stimer_legacy_init(cpu, VMBUS_MESSAGE_SINT);
343344

344345
return 0;
345346
}
346347

347-
void hv_synic_disable_regs(unsigned int cpu)
348+
void hv_hyp_synic_disable_regs(unsigned int cpu)
348349
{
349350
struct hv_per_cpu_context *hv_cpu =
350351
per_cpu_ptr(hv_context.cpu_context, cpu);
@@ -532,7 +533,7 @@ int hv_synic_cleanup(unsigned int cpu)
532533
always_cleanup:
533534
hv_stimer_legacy_cleanup(cpu);
534535

535-
hv_synic_disable_regs(cpu);
536+
hv_hyp_synic_disable_regs(cpu);
536537

537538
return ret;
538539
}

drivers/hv/hyperv_vmbus.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ extern int hv_synic_alloc(void);
190190

191191
extern void hv_synic_free(void);
192192

193-
extern void hv_synic_enable_regs(unsigned int cpu);
193+
extern void hv_hyp_synic_enable_regs(unsigned int cpu);
194194
extern int hv_synic_init(unsigned int cpu);
195195

196-
extern void hv_synic_disable_regs(unsigned int cpu);
196+
extern void hv_hyp_synic_disable_regs(unsigned int cpu);
197197
extern int hv_synic_cleanup(unsigned int cpu);
198198

199199
/* Interface */

drivers/hv/vmbus_drv.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2810,7 +2810,7 @@ static void hv_crash_handler(struct pt_regs *regs)
28102810
*/
28112811
cpu = smp_processor_id();
28122812
hv_stimer_cleanup(cpu);
2813-
hv_synic_disable_regs(cpu);
2813+
hv_hyp_synic_disable_regs(cpu);
28142814
};
28152815

28162816
static int hv_synic_suspend(void)
@@ -2835,14 +2835,14 @@ static int hv_synic_suspend(void)
28352835
* interrupts-disabled context.
28362836
*/
28372837

2838-
hv_synic_disable_regs(0);
2838+
hv_hyp_synic_disable_regs(0);
28392839

28402840
return 0;
28412841
}
28422842

28432843
static void hv_synic_resume(void)
28442844
{
2845-
hv_synic_enable_regs(0);
2845+
hv_hyp_synic_enable_regs(0);
28462846

28472847
/*
28482848
* Note: we don't need to call hv_stimer_init(0), because the timer

0 commit comments

Comments
 (0)