OSDN Git Service

Merge tag 'hyperv-next-signed-20230902' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 4 Sep 2023 18:26:29 +0000 (11:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 4 Sep 2023 18:26:29 +0000 (11:26 -0700)
Pull hyperv updates from Wei Liu:

 - Support for SEV-SNP guests on Hyper-V (Tianyu Lan)

 - Support for TDX guests on Hyper-V (Dexuan Cui)

 - Use SBRM API in Hyper-V balloon driver (Mitchell Levy)

 - Avoid dereferencing ACPI root object handle in VMBus driver (Maciej
   Szmigiero)

 - A few misecllaneous fixes (Jiapeng Chong, Nathan Chancellor, Saurabh
   Sengar)

* tag 'hyperv-next-signed-20230902' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: (24 commits)
  x86/hyperv: Remove duplicate include
  x86/hyperv: Move the code in ivm.c around to avoid unnecessary ifdef's
  x86/hyperv: Remove hv_isolation_type_en_snp
  x86/hyperv: Use TDX GHCI to access some MSRs in a TDX VM with the paravisor
  Drivers: hv: vmbus: Bring the post_msg_page back for TDX VMs with the paravisor
  x86/hyperv: Introduce a global variable hyperv_paravisor_present
  Drivers: hv: vmbus: Support >64 VPs for a fully enlightened TDX/SNP VM
  x86/hyperv: Fix serial console interrupts for fully enlightened TDX guests
  Drivers: hv: vmbus: Support fully enlightened TDX guests
  x86/hyperv: Support hypercalls for fully enlightened TDX guests
  x86/hyperv: Add hv_isolation_type_tdx() to detect TDX guests
  x86/hyperv: Fix undefined reference to isolation_type_en_snp without CONFIG_HYPERV
  x86/hyperv: Add missing 'inline' to hv_snp_boot_ap() stub
  hv: hyperv.h: Replace one-element array with flexible-array member
  Drivers: hv: vmbus: Don't dereference ACPI root object handle
  x86/hyperv: Add hyperv-specific handling for VMMCALL under SEV-ES
  x86/hyperv: Add smp support for SEV-SNP guest
  clocksource: hyper-v: Mark hyperv tsc page unencrypted in sev-snp enlightened guest
  x86/hyperv: Use vmmcall to implement Hyper-V hypercall in sev-snp enlightened guest
  drivers: hv: Mark percpu hvcall input arg page unencrypted in SEV-SNP enlightened guest
  ...

1  2 
arch/x86/hyperv/hv_apic.c
arch/x86/hyperv/hv_init.c
arch/x86/hyperv/ivm.c
arch/x86/include/asm/mshyperv.h
arch/x86/kernel/cpu/mshyperv.c
drivers/hv/connection.c
drivers/hv/hv_balloon.c
drivers/hv/hv_common.c
include/asm-generic/mshyperv.h
include/linux/hyperv.h

Simple merge
@@@ -472,27 -546,8 +547,28 @@@ void __init hyperv_init(void
                wrmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);
        }
  
+ skip_hypercall_pg_init:
        /*
 +       * Some versions of Hyper-V that provide IBT in guest VMs have a bug
 +       * in that there's no ENDBR64 instruction at the entry to the
 +       * hypercall page. Because hypercalls are invoked via an indirect call
 +       * to the hypercall page, all hypercall attempts fail when IBT is
 +       * enabled, and Linux panics. For such buggy versions, disable IBT.
 +       *
 +       * Fixed versions of Hyper-V always provide ENDBR64 on the hypercall
 +       * page, so if future Linux kernel versions enable IBT for 32-bit
 +       * builds, additional hypercall page hackery will be required here
 +       * to provide an ENDBR32.
 +       */
 +#ifdef CONFIG_X86_KERNEL_IBT
 +      if (cpu_feature_enabled(X86_FEATURE_IBT) &&
 +          *(u32 *)hv_hypercall_pg != gen_endbr()) {
 +              setup_clear_cpu_cap(X86_FEATURE_IBT);
 +              pr_warn("Hyper-V: Disabling IBT because of Hyper-V bug\n");
 +      }
 +#endif
 +
 +      /*
         * hyperv_init() is called before LAPIC is initialized: see
         * apic_intr_mode_init() -> x86_platform.apic_post_init() and
         * apic_bsp_setup() -> setup_local_APIC(). The direct-mode STIMER
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge