Skip to content

Commit 63d32b5

Browse files
committed
fixes for Tianyu's patches
1 parent b4a67d2 commit 63d32b5

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

arch/x86/hyperv/hv_init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ void __init hyperv_init(void)
382382
PAGE_SIZE,
383383
GFP_KERNEL);
384384
if (hv_vp_early_input_arg) {
385-
ret = set_memory_decrypted(hv_vp_early_input_arg,
385+
ret = set_memory_decrypted((u64)hv_vp_early_input_arg,
386386
num_possible_cpus());
387387
if (ret) {
388388
kfree(hv_vp_early_input_arg);
@@ -568,7 +568,7 @@ void __init hyperv_init(void)
568568
kfree(hv_vp_assist_page);
569569
hv_vp_assist_page = NULL;
570570
free_vp_early_input_arg:
571-
set_memory_encrypted(hv_vp_early_input_arg, num_possible_cpus());
571+
set_memory_encrypted((u64)hv_vp_early_input_arg, num_possible_cpus());
572572
kfree(hv_vp_early_input_arg);
573573
hv_vp_early_input_arg = NULL;
574574
common_free:

arch/x86/hyperv/ivm.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,6 @@ union hv_ghcb {
6565
/* Only used in an SNP VM with the paravisor */
6666
static u16 hv_ghcb_version __ro_after_init;
6767

68-
/*
69-
* Use static page to set Secure AVIC backing page.
70-
* The operation happens before allocating input arg
71-
* page when start AP.
72-
*/
73-
static u8 inputbuf[PAGE_SIZE] __bss_decrypted __aligned(PAGE_SIZE);
74-
7568
/* Functions only used in an SNP VM with the paravisor go here. */
7669
u64 hv_ghcb_hypercall(u64 control, void *input, void *output, u32 input_size)
7770
{

drivers/hv/hv.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
#include <linux/interrupt.h>
2121
#include <clocksource/hyperv_timer.h>
2222
#include <asm/mshyperv.h>
23+
#ifdef CONFIG_SEV_GUEST
2324
#include <asm/apic.h>
25+
#endif
2426
#include <linux/set_memory.h>
2527
#include "hyperv_vmbus.h"
2628

@@ -313,8 +315,9 @@ void hv_synic_enable_regs(unsigned int cpu)
313315
if (vmbus_irq != -1)
314316
enable_percpu_irq(vmbus_irq, 0);
315317
shared_sint.as_uint64 = hv_get_msr(HV_MSR_SINT0 + VMBUS_MESSAGE_SINT);
318+
#ifdef CONFIG_SEV_GUEST
316319
x2apic_savic_update_vector(smp_processor_id(), vmbus_interrupt, true);
317-
320+
#endif
318321
shared_sint.vector = vmbus_interrupt;
319322
shared_sint.masked = false;
320323

0 commit comments

Comments
 (0)