Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / arch / x86 / kernel / setup.c
index 0957dd73d127554803f35d5be45dcddb845ca741..47073f6aeaf244293af1a35e774edc8ee9182396 100644 (file)
@@ -136,18 +136,6 @@ RESERVE_BRK(dmi_alloc, 65536);
 static __initdata unsigned long _brk_start = (unsigned long)__brk_base;
 unsigned long _brk_end = (unsigned long)__brk_base;
 
-#ifdef CONFIG_X86_64
-int default_cpu_present_to_apicid(int mps_cpu)
-{
-       return __default_cpu_present_to_apicid(mps_cpu);
-}
-
-int default_check_phys_apicid_present(int phys_apicid)
-{
-       return __default_check_phys_apicid_present(phys_apicid);
-}
-#endif
-
 struct boot_params boot_params;
 
 /*
@@ -380,9 +368,11 @@ static void __init reserve_initrd(void)
         * If SME is active, this memory will be marked encrypted by the
         * kernel when it is accessed (including relocation). However, the
         * ramdisk image was loaded decrypted by the bootloader, so make
-        * sure that it is encrypted before accessing it.
+        * sure that it is encrypted before accessing it. For SEV the
+        * ramdisk will already be encrypted, so only do this for SME.
         */
-       sme_early_encrypt(ramdisk_image, ramdisk_end - ramdisk_image);
+       if (sme_active())
+               sme_early_encrypt(ramdisk_image, ramdisk_end - ramdisk_image);
 
        initrd_start = 0;
 
@@ -1045,7 +1035,7 @@ void __init setup_arch(char **cmdline_p)
 
        /*
         * VMware detection requires dmi to be available, so this
-        * needs to be done after dmi_scan_machine, for the BP.
+        * needs to be done after dmi_scan_machine(), for the boot CPU.
         */
        init_hypervisor_platform();
 
@@ -1294,7 +1284,7 @@ void __init setup_arch(char **cmdline_p)
 
        io_apic_init_mappings();
 
-       kvm_guest_init();
+       x86_init.hyper.guest_late_init();
 
        e820__reserve_resources();
        e820__register_nosave_regions(max_low_pfn);