Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1645702 > unrolled thread
| Started by | Juergen Gross <jgross@suse.com> |
|---|---|
| First post | 2017-05-19 18:00 +0200 |
| Last post | 2017-05-23 08:30 +0200 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 00/10] paravirt: make amount of paravirtualization configurable Juergen Gross <jgross@suse.com> - 2017-05-19 18:00 +0200
[PATCH 03/10] xen: move interrupt handling for pv guests under CONFIG_XEN_PV umbrella Juergen Gross <jgross@suse.com> - 2017-05-19 18:00 +0200
[PATCH 04/10] xen: remove non-pv test from arch/x86/xen/irq.c Juergen Gross <jgross@suse.com> - 2017-05-19 18:00 +0200
Re: [PATCH 00/10] paravirt: make amount of paravirtualization configurable Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-05-22 21:50 +0200
Re: [PATCH 00/10] paravirt: make amount of paravirtualization configurable Juergen Gross <jgross@suse.com> - 2017-05-23 08:30 +0200
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Date | 2017-05-19 18:00 +0200 |
| Subject | [PATCH 00/10] paravirt: make amount of paravirtualization configurable |
| Message-ID | <tISk9-4bg-3@gated-at.bofh.it> |
Today paravirtualization is a all-or-nothing game: either a kernel is
compiled with no paravirtualization support at all, or it is supporting
paravirtualized environments like Xen pv-guests or lguest additionally
to some paravirtualized tuning for KVM, Hyperv, VMWare or Xen
HVM-guests.
As support of pv-guests requires quite intrusive pv-hooks (e.g. all
access functions to page table entries, privileged instructions) it is
desirable to enable those hooks only in cases where support of
pv-guests is really desired.
With splitting up of Xen guest support into pv-guest support and
support for HVM-guests it is now possible to do the same for support
of paravirtualization: only if XEN_PV or LGUEST_GUEST are configured
full paravirtualization is required.
This patch series carves out pv-guest support form PARAVIRT by
introducing PARAVIRT_FULL config option selected by XEN_PV and
LGUEST_GUEST config options.
The series has been tested for 32 and 64 bit kernels without
PARAVIRT, with PARAVIRT, and with PARAVIRT + PARAVIRT_FULL configured.
Juergen Gross (10):
x86: remove stale prototype from arch/x86/include/asm/pgalloc.h
paravirt: remove unused function paravirt_disable_iospace()
xen: move interrupt handling for pv guests under CONFIG_XEN_PV
umbrella
xen: remove non-pv test from arch/x86/xen/irq.c
paravirt: add new PARAVIRT_FULL config item
paravirt: split pv_cpu_ops for support of PARAVIRT_FULL
paravirt: split pv_irq_ops for support of PARAVIRT_FULL
paravirt: split pv_mmu_ops for support of PARAVIRT_FULL
paravirt: split pv_info for support of PARAVIRT_FULL
paravirt: merge pv_ops_* structures into one
MAINTAINERS | 2 +-
arch/x86/Kconfig | 4 +
arch/x86/boot/compressed/misc.h | 1 +
arch/x86/entry/entry_32.S | 4 +-
arch/x86/entry/entry_64.S | 10 +-
arch/x86/include/asm/debugreg.h | 2 +-
arch/x86/include/asm/desc.h | 4 +-
arch/x86/include/asm/fixmap.h | 2 +-
arch/x86/include/asm/irqflags.h | 40 +-
arch/x86/include/asm/mmu_context.h | 4 +-
arch/x86/include/asm/msr.h | 4 +-
arch/x86/include/asm/paravirt.h | 738 ++--------------------------
arch/x86/include/asm/paravirt_full.h | 714 +++++++++++++++++++++++++++
arch/x86/include/asm/paravirt_types.h | 243 +--------
arch/x86/include/asm/paravirt_types_full.h | 218 ++++++++
arch/x86/include/asm/pgalloc.h | 4 +-
arch/x86/include/asm/pgtable-3level_types.h | 4 +-
arch/x86/include/asm/pgtable.h | 8 +-
arch/x86/include/asm/processor.h | 4 +-
arch/x86/include/asm/ptrace.h | 5 +-
arch/x86/include/asm/segment.h | 2 +-
arch/x86/include/asm/special_insns.h | 25 +-
arch/x86/include/asm/tlbflush.h | 2 +-
arch/x86/kernel/Makefile | 1 +
arch/x86/kernel/alternative.c | 4 +-
arch/x86/kernel/asm-offsets.c | 21 +-
arch/x86/kernel/asm-offsets_64.c | 9 +-
arch/x86/kernel/cpu/common.c | 4 +-
arch/x86/kernel/cpu/vmware.c | 6 +-
arch/x86/kernel/head_64.S | 2 +-
arch/x86/kernel/kvm.c | 6 +-
arch/x86/kernel/kvmclock.c | 6 +-
arch/x86/kernel/paravirt.c | 303 +-----------
arch/x86/kernel/paravirt_full.c | 277 +++++++++++
arch/x86/kernel/paravirt_patch_32.c | 36 +-
arch/x86/kernel/paravirt_patch_64.c | 50 +-
arch/x86/kernel/tsc.c | 2 +-
arch/x86/kernel/vsmp_64.c | 18 +-
arch/x86/lguest/Kconfig | 1 +
arch/x86/lguest/boot.c | 100 ++--
arch/x86/xen/Kconfig | 1 +
arch/x86/xen/Makefile | 8 +-
arch/x86/xen/enlighten_hvm.c | 4 +-
arch/x86/xen/enlighten_pv.c | 58 ++-
arch/x86/xen/irq.c | 15 +-
arch/x86/xen/mmu_hvm.c | 2 +-
arch/x86/xen/mmu_pv.c | 34 +-
arch/x86/xen/time.c | 11 +-
drivers/xen/time.c | 2 +-
49 files changed, 1548 insertions(+), 1477 deletions(-)
create mode 100644 arch/x86/include/asm/paravirt_full.h
create mode 100644 arch/x86/include/asm/paravirt_types_full.h
create mode 100644 arch/x86/kernel/paravirt_full.c
--
2.12.0
[toc] | [next] | [standalone]
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Date | 2017-05-19 18:00 +0200 |
| Subject | [PATCH 03/10] xen: move interrupt handling for pv guests under CONFIG_XEN_PV umbrella |
| Message-ID | <tIStQ-4fG-37@gated-at.bofh.it> |
| In reply to | #1645702 |
There is no need to include pv-guest only object files in a kernel not configured to support those. Move Xen's irq.o, xen-asm*.o and pv parts of entry_*.o into CONFIG_XEN_PV sections. Signed-off-by: Juergen Gross <jgross@suse.com> --- arch/x86/entry/entry_32.S | 4 +++- arch/x86/entry/entry_64.S | 6 ++++-- arch/x86/xen/Makefile | 8 ++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S index 50bc26949e9e..37ae4a7809d9 100644 --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S @@ -789,7 +789,7 @@ ENTRY(spurious_interrupt_bug) jmp common_exception END(spurious_interrupt_bug) -#ifdef CONFIG_XEN +#ifdef CONFIG_XEN_PV ENTRY(xen_hypervisor_callback) pushl $-1 /* orig_ax = -1 => not a system call */ SAVE_ALL @@ -870,7 +870,9 @@ ENTRY(xen_failsafe_callback) _ASM_EXTABLE(3b, 8b) _ASM_EXTABLE(4b, 9b) ENDPROC(xen_failsafe_callback) +#endif /* CONFIG_XEN_PV */ +#ifdef CONFIG_XEN BUILD_INTERRUPT3(xen_hvm_callback_vector, HYPERVISOR_CALLBACK_VECTOR, xen_evtchn_do_upcall) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 607d72c4a485..cd47214ff402 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -902,7 +902,7 @@ ENTRY(do_softirq_own_stack) ret END(do_softirq_own_stack) -#ifdef CONFIG_XEN +#ifdef CONFIG_XEN_PV idtentry xen_hypervisor_callback xen_do_hypervisor_callback has_error_code=0 /* @@ -983,7 +983,9 @@ ENTRY(xen_failsafe_callback) ENCODE_FRAME_POINTER jmp error_exit END(xen_failsafe_callback) +#endif /* CONFIG_XEN_PV */ +#ifdef CONFIG_XEN apicinterrupt3 HYPERVISOR_CALLBACK_VECTOR \ xen_hvm_callback_vector xen_evtchn_do_upcall @@ -998,7 +1000,7 @@ idtentry debug do_debug has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK idtentry int3 do_int3 has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK idtentry stack_segment do_stack_segment has_error_code=1 -#ifdef CONFIG_XEN +#ifdef CONFIG_XEN_PV idtentry xen_debug do_debug has_error_code=0 idtentry xen_int3 do_int3 has_error_code=0 idtentry xen_stack_segment do_stack_segment has_error_code=1 diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index fffb0a16f9e3..5fc463eaafff 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 multicalls.o mmu.o irq.o \ - time.o xen-asm.o xen-asm_$(BITS).o \ +obj-y := enlighten.o multicalls.o mmu.o time.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 \ - p2m.o enlighten_pv.o mmu_pv.o +obj-$(CONFIG_XEN_PV) += setup.o apic.o pmu.o suspend_pv.o irq.o \ + p2m.o enlighten_pv.o mmu_pv.o \ + xen-asm.o xen-asm_$(BITS).o obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.o -- 2.12.0
[toc] | [prev] | [next] | [standalone]
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Date | 2017-05-19 18:00 +0200 |
| Subject | [PATCH 04/10] xen: remove non-pv test from arch/x86/xen/irq.c |
| Message-ID | <tIStR-4fG-47@gated-at.bofh.it> |
| In reply to | #1645702 |
As arch/x86/xen/irq.c is used for pv-guests only, there is no need to
have a test targeting a HVM guest in it. Remove it.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
arch/x86/xen/irq.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/xen/irq.c b/arch/x86/xen/irq.c
index 33e92955e09d..3b55ae664521 100644
--- a/arch/x86/xen/irq.c
+++ b/arch/x86/xen/irq.c
@@ -130,8 +130,6 @@ static const struct pv_irq_ops xen_irq_ops __initconst = {
void __init xen_init_irq_ops(void)
{
- /* For PVH we use default pv_irq_ops settings. */
- if (!xen_feature(XENFEAT_hvm_callback_vector))
- pv_irq_ops = xen_irq_ops;
+ pv_irq_ops = xen_irq_ops;
x86_init.irqs.intr_init = xen_init_IRQ;
}
--
2.12.0
[toc] | [prev] | [next] | [standalone]
| From | Boris Ostrovsky <boris.ostrovsky@oracle.com> |
|---|---|
| Date | 2017-05-22 21:50 +0200 |
| Subject | Re: [PATCH 00/10] paravirt: make amount of paravirtualization configurable |
| Message-ID | <tK1v4-1nY-37@gated-at.bofh.it> |
| In reply to | #1645702 |
> 49 files changed, 1548 insertions(+), 1477 deletions(-) > create mode 100644 arch/x86/include/asm/paravirt_full.h > create mode 100644 arch/x86/include/asm/paravirt_types_full.h > create mode 100644 arch/x86/kernel/paravirt_full.c Do you have this in a tree that can be pulled? -boris
[toc] | [prev] | [next] | [standalone]
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Date | 2017-05-23 08:30 +0200 |
| Subject | Re: [PATCH 00/10] paravirt: make amount of paravirtualization configurable |
| Message-ID | <tKbuq-7MU-7@gated-at.bofh.it> |
| In reply to | #1647314 |
On 22/05/17 21:42, Boris Ostrovsky wrote: > >> 49 files changed, 1548 insertions(+), 1477 deletions(-) >> create mode 100644 arch/x86/include/asm/paravirt_full.h >> create mode 100644 arch/x86/include/asm/paravirt_types_full.h >> create mode 100644 arch/x86/kernel/paravirt_full.c > > > Do you have this in a tree that can be pulled? https://github.com/jgross1/linux pvops Juergen
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web