From 481d66325dfc2a6b4f5e729b64ad144383b63fad Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Tue, 14 Mar 2017 18:35:39 +0100 Subject: x86/xen: split off enlighten_pvh.c Create enlighten_pvh.c by splitting off PVH related code from enlighten.c, put it under CONFIG_XEN_PVH. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross --- arch/x86/xen/Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/x86/xen/Makefile') diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index cb0164aee156..348128b1c55a 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -15,6 +15,8 @@ obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ grant-table.o suspend.o platform-pci-unplug.o \ p2m.o apic.o pmu.o +obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o + obj-$(CONFIG_EVENT_TRACING) += trace.o obj-$(CONFIG_SMP) += smp.o -- cgit v1.2.3 From 98f2a47a002139ce677d3062d334af8b6e36e25c Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Tue, 14 Mar 2017 18:35:40 +0100 Subject: x86/xen: split off enlighten_hvm.c Move PVHVM related code to enlighten_hvm.c. Three functions: xen_cpuhp_setup(), xen_reboot(), xen_emergency_restart() are shared, drop static qualifier from them. These functions will go to common code once it is split from enlighten.c. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross --- arch/x86/xen/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/x86/xen/Makefile') diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index 348128b1c55a..1bca75b8fbe8 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -15,6 +15,7 @@ obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ grant-table.o suspend.o platform-pci-unplug.o \ p2m.o apic.o pmu.o +obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.o -- cgit v1.2.3 From e1dab14cf68d1e03950135969af3faf322f0db04 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Tue, 14 Mar 2017 18:35:41 +0100 Subject: x86/xen: split off enlighten_pv.c Basically, enlighten.c is renamed to enlighten_pv.c and some code moved out to common enlighten.c. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross --- arch/x86/xen/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/x86/xen/Makefile') diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index 1bca75b8fbe8..5ca8d3eb4c93 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -7,13 +7,13 @@ endif # Make sure early boot has no stackprotector nostackp := $(call cc-option, -fno-stack-protector) -CFLAGS_enlighten.o := $(nostackp) +CFLAGS_enlighten_pv.o := $(nostackp) CFLAGS_mmu.o := $(nostackp) obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ time.o xen-asm.o xen-asm_$(BITS).o \ grant-table.o suspend.o platform-pci-unplug.o \ - p2m.o apic.o pmu.o + p2m.o apic.o pmu.o enlighten_pv.o obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o -- cgit v1.2.3 From a52482d9355e25ab7bb3cb190ffe26364db09b3e Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Tue, 14 Mar 2017 18:35:45 +0100 Subject: x86/xen: split off smp_hvm.c Move PVHVM related code to smp_hvm.c. Drop 'static' qualifier from xen_smp_send_reschedule(), xen_smp_send_call_function_ipi(), xen_smp_send_call_function_single_ipi(), these functions will be moved to common smp code when smp_pv.c is split. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross --- arch/x86/xen/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/x86/xen/Makefile') diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index 5ca8d3eb4c93..bc7df8c58d77 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -21,6 +21,7 @@ obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.o obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_XEN_PVHVM_SMP) += smp_hvm.o obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o obj-$(CONFIG_XEN_DEBUG_FS) += debugfs.o obj-$(CONFIG_XEN_DOM0) += vga.o -- cgit v1.2.3 From 83b96794e0ea97ca7e05b15e31d31dac71d3fc2a Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Tue, 14 Mar 2017 18:35:46 +0100 Subject: x86/xen: split off smp_pv.c Basically, smp.c is renamed to smp_pv.c and some code moved out to common smp.c. struct xen_common_irq delcaration ended up in smp.h. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross --- arch/x86/xen/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/x86/xen/Makefile') diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index bc7df8c58d77..ebf3522efbe9 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -20,7 +20,7 @@ obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.o -obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_SMP) += smp.o smp_pv.o obj-$(CONFIG_XEN_PVHVM_SMP) += smp_hvm.o obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o obj-$(CONFIG_XEN_DEBUG_FS) += debugfs.o -- cgit v1.2.3 From feef87ebfde295ff29a8a57ce47c933db7e79b05 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Tue, 14 Mar 2017 18:35:47 +0100 Subject: x86/xen: split off mmu_hvm.c Move PVHVM related code to mmu_hvm.c. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross --- arch/x86/xen/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/x86/xen/Makefile') diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index ebf3522efbe9..6a95a8ba3801 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -15,7 +15,7 @@ obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ grant-table.o suspend.o platform-pci-unplug.o \ p2m.o apic.o pmu.o enlighten_pv.o -obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o +obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o mmu_hvm.o obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.o -- cgit v1.2.3 From 7e0563dea9c4e62297846359186c597e7231912d Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Tue, 4 Apr 2017 14:48:17 +0200 Subject: x86/xen: split off mmu_pv.c Basically, mmu.c is renamed to mmu_pv.c and some code moved out to common mmu.c. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross --- arch/x86/xen/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/x86/xen/Makefile') diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index 6a95a8ba3801..8da1ca92e604 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -8,12 +8,12 @@ endif # Make sure early boot has no stackprotector nostackp := $(call cc-option, -fno-stack-protector) CFLAGS_enlighten_pv.o := $(nostackp) -CFLAGS_mmu.o := $(nostackp) +CFLAGS_mmu_pv.o := $(nostackp) obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ time.o xen-asm.o xen-asm_$(BITS).o \ grant-table.o suspend.o platform-pci-unplug.o \ - p2m.o apic.o pmu.o enlighten_pv.o + p2m.o apic.o pmu.o enlighten_pv.o mmu_pv.o obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o mmu_hvm.o obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o -- cgit v1.2.3 From 9963236d7c753cf89be2e0366af185e51f150c79 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Tue, 14 Mar 2017 18:35:49 +0100 Subject: x86/xen: split suspend.c for PV and PVHVM guests Slit the code in suspend.c into suspend_pv.c and suspend_hvm.c. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross --- arch/x86/xen/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/x86/xen/Makefile') diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index 8da1ca92e604..cf8d6c5e36d8 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -15,7 +15,8 @@ obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ grant-table.o suspend.o platform-pci-unplug.o \ p2m.o apic.o pmu.o enlighten_pv.o mmu_pv.o -obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o mmu_hvm.o +obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o mmu_hvm.o suspend_hvm.o +obj-$(CONFIG_XEN_PV) += suspend_pv.o obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.o -- cgit v1.2.3 From 50a1062d61a62421f3181ce3e594a330f8a15cff Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Tue, 14 Mar 2017 18:35:50 +0100 Subject: x86/xen: put setup.c, pmu.c and apic.c under CONFIG_XEN_PV xen_pmu_init/finish() functions are used in suspend.c and enlighten.c, add stubs for now. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross --- arch/x86/xen/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/x86/xen/Makefile') diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index cf8d6c5e36d8..f610651aec4d 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -10,13 +10,13 @@ nostackp := $(call cc-option, -fno-stack-protector) CFLAGS_enlighten_pv.o := $(nostackp) CFLAGS_mmu_pv.o := $(nostackp) -obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ +obj-y := enlighten.o multicalls.o mmu.o irq.o \ time.o xen-asm.o xen-asm_$(BITS).o \ grant-table.o suspend.o platform-pci-unplug.o \ - p2m.o apic.o pmu.o enlighten_pv.o mmu_pv.o + p2m.o enlighten_pv.o mmu_pv.o obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o mmu_hvm.o suspend_hvm.o -obj-$(CONFIG_XEN_PV) += suspend_pv.o +obj-$(CONFIG_XEN_PV) += setup.o apic.o pmu.o suspend_pv.o obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.o -- cgit v1.2.3 From 33af746985699001c1122c2d5e9dbece28f18272 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Tue, 14 Mar 2017 18:35:55 +0100 Subject: x86/xen: enable PVHVM-only builds Now everything is in place and we can move PV-only code under CONFIG_XEN_PV. CONFIG_XEN_PV_SMP is created to support the change. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross --- arch/x86/xen/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'arch/x86/xen/Makefile') diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index f610651aec4d..fffb0a16f9e3 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -12,16 +12,17 @@ CFLAGS_mmu_pv.o := $(nostackp) obj-y := enlighten.o multicalls.o mmu.o irq.o \ time.o xen-asm.o xen-asm_$(BITS).o \ - grant-table.o suspend.o platform-pci-unplug.o \ - p2m.o enlighten_pv.o mmu_pv.o + grant-table.o suspend.o platform-pci-unplug.o obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o mmu_hvm.o suspend_hvm.o -obj-$(CONFIG_XEN_PV) += setup.o apic.o pmu.o suspend_pv.o +obj-$(CONFIG_XEN_PV) += setup.o apic.o pmu.o suspend_pv.o \ + p2m.o enlighten_pv.o mmu_pv.o obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.o -obj-$(CONFIG_SMP) += smp.o smp_pv.o +obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_XEN_PV_SMP) += smp_pv.o obj-$(CONFIG_XEN_PVHVM_SMP) += smp_hvm.o obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o obj-$(CONFIG_XEN_DEBUG_FS) += debugfs.o -- cgit v1.2.3