Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 platform updates from Ingo Molnar: "The main changes in this cycle were: - a refactoring of the early virt init code by merging 'struct x86_hyper' into 'struct x86_platform' and 'struct x86_init', which allows simplifications and also the addition of a new ->guest_late_init() callback. (Juergen Gross) - timer_setup() conversion of the UV code (Kees Cook)" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/virt/xen: Use guest_late_init to detect Xen PVH guest x86/virt, x86/platform: Add ->guest_late_init() callback to hypervisor_x86 structure x86/virt, x86/acpi: Add test for ACPI_FADT_NO_VGA x86/virt: Add enum for hypervisors to replace x86_hyper x86/virt, x86/platform: Merge 'struct x86_hyper' into 'struct x86_platform' and 'struct x86_init' x86/platform/UV: Convert timers to use timer_setup()
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/memblock.h>
|
||||
@@ -188,8 +189,6 @@ static void __init xen_hvm_guest_init(void)
|
||||
xen_hvm_init_time_ops();
|
||||
xen_hvm_init_mmu_ops();
|
||||
|
||||
if (xen_pvh_domain())
|
||||
machine_ops.emergency_restart = xen_emergency_restart;
|
||||
#ifdef CONFIG_KEXEC_CORE
|
||||
machine_ops.shutdown = xen_hvm_shutdown;
|
||||
machine_ops.crash_shutdown = xen_hvm_crash_shutdown;
|
||||
@@ -226,12 +225,33 @@ static uint32_t __init xen_platform_hvm(void)
|
||||
return xen_cpuid_base();
|
||||
}
|
||||
|
||||
const struct hypervisor_x86 x86_hyper_xen_hvm = {
|
||||
static __init void xen_hvm_guest_late_init(void)
|
||||
{
|
||||
#ifdef CONFIG_XEN_PVH
|
||||
/* Test for PVH domain (PVH boot path taken overrides ACPI flags). */
|
||||
if (!xen_pvh &&
|
||||
(x86_platform.legacy.rtc || !x86_platform.legacy.no_vga))
|
||||
return;
|
||||
|
||||
/* PVH detected. */
|
||||
xen_pvh = true;
|
||||
|
||||
/* Make sure we don't fall back to (default) ACPI_IRQ_MODEL_PIC. */
|
||||
if (!nr_ioapics && acpi_irq_model == ACPI_IRQ_MODEL_PIC)
|
||||
acpi_irq_model = ACPI_IRQ_MODEL_PLATFORM;
|
||||
|
||||
machine_ops.emergency_restart = xen_emergency_restart;
|
||||
pv_info.name = "Xen PVH";
|
||||
#endif
|
||||
}
|
||||
|
||||
const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = {
|
||||
.name = "Xen HVM",
|
||||
.detect = xen_platform_hvm,
|
||||
.init_platform = xen_hvm_guest_init,
|
||||
.pin_vcpu = xen_pin_vcpu,
|
||||
.x2apic_available = xen_x2apic_para_available,
|
||||
.init_mem_mapping = xen_hvm_init_mem_mapping,
|
||||
.type = X86_HYPER_XEN_HVM,
|
||||
.init.init_platform = xen_hvm_guest_init,
|
||||
.init.x2apic_available = xen_x2apic_para_available,
|
||||
.init.init_mem_mapping = xen_hvm_init_mem_mapping,
|
||||
.init.guest_late_init = xen_hvm_guest_late_init,
|
||||
.runtime.pin_vcpu = xen_pin_vcpu,
|
||||
};
|
||||
EXPORT_SYMBOL(x86_hyper_xen_hvm);
|
||||
|
@@ -1459,9 +1459,9 @@ static uint32_t __init xen_platform_pv(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
const struct hypervisor_x86 x86_hyper_xen_pv = {
|
||||
const __initconst struct hypervisor_x86 x86_hyper_xen_pv = {
|
||||
.name = "Xen PV",
|
||||
.detect = xen_platform_pv,
|
||||
.pin_vcpu = xen_pin_vcpu,
|
||||
.type = X86_HYPER_XEN_PV,
|
||||
.runtime.pin_vcpu = xen_pin_vcpu,
|
||||
};
|
||||
EXPORT_SYMBOL(x86_hyper_xen_pv);
|
||||
|
@@ -25,13 +25,6 @@ struct boot_params pvh_bootparams __attribute__((section(".data")));
|
||||
struct hvm_start_info pvh_start_info;
|
||||
unsigned int pvh_start_info_sz = sizeof(pvh_start_info);
|
||||
|
||||
static void xen_pvh_arch_setup(void)
|
||||
{
|
||||
/* Make sure we don't fall back to (default) ACPI_IRQ_MODEL_PIC. */
|
||||
if (nr_ioapics == 0)
|
||||
acpi_irq_model = ACPI_IRQ_MODEL_PLATFORM;
|
||||
}
|
||||
|
||||
static void __init init_pvh_bootparams(void)
|
||||
{
|
||||
struct xen_memory_map memmap;
|
||||
@@ -102,6 +95,4 @@ void __init xen_prepare_pvh(void)
|
||||
wrmsr_safe(msr, (u32)pfn, (u32)(pfn >> 32));
|
||||
|
||||
init_pvh_bootparams();
|
||||
|
||||
x86_init.oem.arch_setup = xen_pvh_arch_setup;
|
||||
}
|
||||
|
Reference in New Issue
Block a user