x86: paravirt related cleanup
Subsystems (10)
Juergen Gross
maintainerv2 cover x86: paravirt related cleanup
Cleanup special cases of paravirt patching:
- Xen doesn't need a custom patching function, it can use paravirt_patch_default()
- Remove lguest completely from the tree. A LKML mail asking for any users 3 months ago did not reveal any need for keeping lguest [1].
In case the patches make it to the tree there is quite some potential for further simplification of paravirt stuff. Especially most of the pv operations can be put under the CONFIG_XEN_PV umbrella.
Changes in V2:
- drop patch 3 (removal of vsmp support)
- patch 1: remove even more stuff no longer needed without xen_patch() (Peter Zijlstra)
[1]: https://lkml.org/lkml/2017/5/15/502
Juergen Gross (2):
paravirt,xen: remove xen_patch()
x86/lguest: remove lguest support
MAINTAINERS | 11 - arch/x86/Kbuild | 3 - arch/x86/Kconfig | 2 - arch/x86/include/asm/lguest.h | 91 - arch/x86/include/asm/lguest_hcall.h | 74 - arch/x86/include/asm/processor.h | 2 +- arch/x86/include/uapi/asm/bootparam.h | 2 +- arch/x86/kernel/asm-offsets_32.c | 20 - arch/x86/kernel/head_32.S | 2 - arch/x86/kernel/platform-quirks.c | 1 - arch/x86/kvm/Kconfig | 1 - arch/x86/lguest/Kconfig | 14 - arch/x86/lguest/Makefile | 2 - arch/x86/lguest/boot.c | 1558 --------------- arch/x86/lguest/head_32.S | 192 -- arch/x86/xen/enlighten_pv.c | 59 +- arch/x86/xen/xen-asm.S | 24 +- arch/x86/xen/xen-asm.h | 12 - arch/x86/xen/xen-asm_32.S | 27 +- arch/x86/xen/xen-asm_64.S | 20 +- arch/x86/xen/xen-ops.h | 15 +- drivers/Makefile | 1 - drivers/block/Kconfig | 2 +- drivers/char/Kconfig | 2 +- drivers/char/virtio_console.c | 2 +- drivers/lguest/Kconfig | 13 - drivers/lguest/Makefile | 26 - drivers/lguest/README | 47 - drivers/lguest/core.c | 398 ---- drivers/lguest/hypercalls.c | 304 --- drivers/lguest/interrupts_and_traps.c | 706 ------- drivers/lguest/lg.h | 258 --- drivers/lguest/lguest_user.c | 446 ----- drivers/lguest/page_tables.c | 1239 ------------ drivers/lguest/segments.c | 228 --- drivers/lguest/x86/core.c | 724 ------- drivers/lguest/x86/switcher_32.S | 388 ---- drivers/net/Kconfig | 2 +- drivers/tty/hvc/Kconfig | 2 +- drivers/virtio/Kconfig | 4 +- include/linux/lguest.h | 73 - include/linux/lguest_launcher.h | 44 - include/uapi/linux/virtio_ring.h | 4 +- tools/Makefile | 11 +- tools/lguest/.gitignore | 2 - tools/lguest/Makefile | 14 - tools/lguest/extract | 58 - tools/lguest/lguest.c | 3420 --------------------------------- tools/lguest/lguest.txt | 125 -- 49 files changed, 36 insertions(+), 10639 deletions(-) delete mode 100644 arch/x86/include/asm/lguest.h delete mode 100644 arch/x86/include/asm/lguest_hcall.h delete mode 100644 arch/x86/lguest/Kconfig delete mode 100644 arch/x86/lguest/Makefile delete mode 100644 arch/x86/lguest/boot.c delete mode 100644 arch/x86/lguest/head_32.S delete mode 100644 arch/x86/xen/xen-asm.h delete mode 100644 drivers/lguest/Kconfig delete mode 100644 drivers/lguest/Makefile delete mode 100644 drivers/lguest/README delete mode 100644 drivers/lguest/core.c delete mode 100644 drivers/lguest/hypercalls.c delete mode 100644 drivers/lguest/interrupts_and_traps.c delete mode 100644 drivers/lguest/lg.h delete mode 100644 drivers/lguest/lguest_user.c delete mode 100644 drivers/lguest/page_tables.c delete mode 100644 drivers/lguest/segments.c delete mode 100644 drivers/lguest/x86/core.c delete mode 100644 drivers/lguest/x86/switcher_32.S delete mode 100644 include/linux/lguest.h delete mode 100644 include/linux/lguest_launcher.h delete mode 100644 tools/lguest/.gitignore delete mode 100644 tools/lguest/Makefile delete mode 100644 tools/lguest/extract delete mode 100644 tools/lguest/lguest.c delete mode 100644 tools/lguest/lguest.txt
Signature · 1 line
2.12.3
Juergen Gross
maintainerPATCH v2 1/2 paravirt,xen: remove xen_patch()
Xen's paravirt patch function xen_patch() does some special casing for irq_ops functions to apply relocations when those functions can be patched inline instead of calls.
Unfortunately none of the special case function replacements is small enough to be patched inline, so the special case never applies.
As xen_patch() will call paravirt_patch_default() in all cases it can be just dropped. xen-asm.h doesn't seem necessary without xen_patch() as the only thing left in it would be the definition of XEN_EFLAGS_NMI used only once. So move that definition and remove xen-asm.h.
--- arch/x86/xen/enlighten_pv.c | 59 +-------------------------------------------- arch/x86/xen/xen-asm.S | 24 ++++-------------- arch/x86/xen/xen-asm.h | 12 --------- arch/x86/xen/xen-asm_32.S | 27 ++++----------------- arch/x86/xen/xen-asm_64.S | 20 ++++----------- arch/x86/xen/xen-ops.h | 15 +++--------- 6 files changed, 20 insertions(+), 137 deletions(-) delete mode 100644 arch/x86/xen/xen-asm.h
arch/x86/xen/enlighten_pv.c +1 -58
@@ -981,59 +981,6 @@ void __ref xen_setup_vcpu_info_placement(void) } } -static unsigned xen_patch (u8 type,u16 clobbers,void *insnbuf, -unsigned long addr,unsigned len) -{ -char *start, *end, *reloc; -unsigned ret; - - start = end = reloc =NULL ; - -#define SITE (op, x) \ - case PARAVIRT_PATCH(op.x): \ - if (xen_have_vcpu_info_placement) { \ - start = (char *)xen_##x##_direct; \ - end = xen_##x##_direct_end; \ - reloc = xen_##x##_direct_reloc; \ - } \ - goto patch_site - -switch (type) { -SITE (pv_irq_ops, irq_enable); -SITE (pv_irq_ops, irq_disable); -SITE (pv_irq_ops, save_fl); -SITE (pv_irq_ops, restore_fl); -#undef SITE - - patch_site: -if (start ==NULL || (end-start) > len) - goto default_patch; - - ret =paravirt_patch_insns (insnbuf, len, start, end); - -/* Note: because reloc is assigned from something that -appears to be an array, gcc assumes it's non-null, -but doesn't know its relationship with start and -end. */ -if (reloc > start && reloc < end) { -int reloc_off = reloc - start; -long *relocp = (long *)(insnbuf + reloc_off); -long delta = start - (char *)addr; - - *relocp += delta; - } -break ; - - default_patch: -default : - ret =paravirt_patch_default (type, clobbers, insnbuf, - addr, len); -break ; - } - -return ret; -} -static const struct pv_info xen_info__initconst = { .shared_kernel_pmd =0 ,
@@ -1043,10 +990,6 @@ static const struct pv_info xen_info __initconst = { .name = "Xen", }; -static const struct pv_init_ops xen_init_ops__initconst = { - .patch = xen_patch, -}; -static const struct pv_cpu_ops xen_cpu_ops__initconst = { .cpuid = xen_cpuid,
@@ -1244,7 +1187,7 @@ asmlinkage __visible void __init xen_start_kernel(void)/* Install Xen paravirt ops */ pv_info = xen_info; - pv_init_ops = xen_init_ops; + pv_init_ops.patch = paravirt_patch_default; pv_cpu_ops = xen_cpu_ops; x86_platform.get_nmi_reason = xen_get_nmi_reason;
arch/x86/xen/xen-asm.S +5 -19
@@ -1,14 +1,8 @@ /* - * Asm versions of Xen pv-ops, suitable for either direct use or - * inlining. The inline versions are the same as the direct-use - * versions, with the pre- and post-amble chopped off. - * - * This code is encoded for size rather than absolute efficiency, with - * a view to being able to inline as much as possible. + * Asm versions of Xen pv-ops, suitable for direct use. * * We only bother with direct forms (ie, vcpu in percpu data) of the - * operations here; the indirect forms are better handled in C, since - * they're generally too large to inline anyway. + * operations here; the indirect forms are better handled in C. */ #include <asm/asm-offsets.h>
@@ -16,7 +10,7 @@ #include <asm/processor-flags.h> #include <asm/frame.h> -#include "xen-asm.h" +#include <linux/linkage.h> /* * Enable events. This clears the event mask and tests the pending
@@ -38,13 +32,11 @@ ENTRY(xen_irq_enable_direct) testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending jz 1f -2: call check_events + call check_events 1: -ENDPATCH(xen_irq_enable_direct) FRAME_END ret ENDPROC(xen_irq_enable_direct) - RELOC(xen_irq_enable_direct, 2b+1) /*
@@ -53,10 +45,8 @@ ENDPATCH(xen_irq_enable_direct) */ ENTRY(xen_irq_disable_direct) movb $1, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask -ENDPATCH(xen_irq_disable_direct) ret ENDPROC(xen_irq_disable_direct) - RELOC(xen_irq_disable_direct, 0) /* * (xen_)save_fl is used to get the current interrupt enable status.
@@ -71,10 +61,8 @@ ENTRY(xen_save_fl_direct) testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask setz %ah addb %ah, %ah -ENDPATCH(xen_save_fl_direct) ret ENDPROC(xen_save_fl_direct) - RELOC(xen_save_fl_direct, 0) /*
@@ -101,13 +89,11 @@ ENTRY(xen_restore_fl_direct) /* check for unmasked and pending */ cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending jnz 1f -2: call check_events + call check_events 1: -ENDPATCH(xen_restore_fl_direct) FRAME_END ret ENDPROC(xen_restore_fl_direct) - RELOC(xen_restore_fl_direct, 2b+1) /*
arch/x86/xen/xen-asm.h deleted +0 -12
@@ -1,12 +0,0 @@ -#ifndef _XEN_XEN_ASM_H -#define _XEN_XEN_ASM_H - -#include <linux/linkage.h> - -#define RELOC (x, v) .globl x##_reloc; x##_reloc=v -#define ENDPATCH (x) .globl x##_end; x##_end=. - -/* Pseudo-flag used for virtual NMI, which we don't implement yet */ -#define XEN_EFLAGS_NMI 0x80000000 - -#endif
arch/x86/xen/xen-asm_32.S +5 -22
@@ -1,14 +1,8 @@ /* - * Asm versions of Xen pv-ops, suitable for either direct use or - * inlining. The inline versions are the same as the direct-use - * versions, with the pre- and post-amble chopped off. - * - * This code is encoded for size rather than absolute efficiency, with - * a view to being able to inline as much as possible. + * Asm versions of Xen pv-ops, suitable for direct use. * * We only bother with direct forms (ie, vcpu in pda) of the - * operations here; the indirect forms are better handled in C, since - * they're generally too large to inline anyway. + * operations here; the indirect forms are better handled in C. */ #include <asm/thread_info.h>
@@ -18,21 +12,10 @@ #include <xen/interface/xen.h> -#include "xen-asm.h" +#include <linux/linkage.h> -/* - * Force an event check by making a hypercall, but preserve regs - * before making the call. - */ -check_events: - push %eax - push %ecx - push %edx - call xen_force_evtchn_callback - pop %edx - pop %ecx - pop %eax - ret +/* Pseudo-flag used for virtual NMI, which we don't implement yet */ +#define XEN_EFLAGS_NMI 0x80000000 /* * This is run where a normal iret would be run, with the same stack setup:
arch/x86/xen/xen-asm_64.S +5 -15
@@ -1,14 +1,8 @@ /* - * Asm versions of Xen pv-ops, suitable for either direct use or - * inlining. The inline versions are the same as the direct-use - * versions, with the pre- and post-amble chopped off. - * - * This code is encoded for size rather than absolute efficiency, with - * a view to being able to inline as much as possible. + * Asm versions of Xen pv-ops, suitable for direct use. * * We only bother with direct forms (ie, vcpu in pda) of the - * operations here; the indirect forms are better handled in C, since - * they're generally too large to inline anyway. + * operations here; the indirect forms are better handled in C. */ #include <asm/errno.h>
@@ -20,7 +14,7 @@ #include <xen/interface/xen.h> -#include "xen-asm.h" +#include <linux/linkage.h> ENTRY(xen_adjust_exception_frame) mov 8+0(%rsp), %rcx
@@ -46,9 +40,7 @@ hypercall_iret = hypercall_page + __HYPERVISOR_iret * 32 */ ENTRY(xen_iret) pushq $0 -1: jmp hypercall_iret -ENDPATCH(xen_iret) -RELOC(xen_iret, 1b+1) + jmp hypercall_iret ENTRY(xen_sysret64) /*
@@ -65,9 +57,7 @@ ENTRY(xen_sysret64) pushq %rcx pushq $VGCF_in_syscall -1: jmp hypercall_iret -ENDPATCH(xen_sysret64) -RELOC(xen_sysret64, 1b+1) + jmp hypercall_iret /* * Xen handles syscall callbacks much like ordinary exceptions, which
arch/x86/xen/xen-ops.h +4 -11
@@ -129,17 +129,10 @@ static inline void __init xen_efi_init(void) }#endif -/* Declare an asm function, along with symbols needed to make it -inlineable */ -#define DECL_ASM (ret, name, ...) \ - __visible ret name(__VA_ARGS__); \ - extern char name##_end[] __visible; \ - extern char name##_reloc[] __visible - -DECL_ASM (void, xen_irq_enable_direct, void); -DECL_ASM (void, xen_irq_disable_direct, void); -DECL_ASM(unsigned long, xen_save_fl_direct, void); -DECL_ASM(void, xen_restore_fl_direct, unsigned long); +__visible void xen_irq_enable_direct(void); +__visible void xen_irq_disable_direct(void); +__visible unsigned long xen_save_fl_direct (void ); +__visible void xen_restore_fl_direct(unsigned long);/* These are not functions, and cannot be called normally */ __visible void xen_iret(void);
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Juergen Gross
maintainerPATCH v2 1/2 paravirt,xen: remove xen_patch()
In reply to Juergen GrossXen's paravirt patch function xen_patch() does some special casing for irq_ops functions to apply relocations when those functions can be patched inline instead of calls.
Unfortunately none of the special case function replacements is small enough to be patched inline, so the special case never applies.
As xen_patch() will call paravirt_patch_default() in all cases it can be just dropped. xen-asm.h doesn't seem necessary without xen_patch() as the only thing left in it would be the definition of XEN_EFLAGS_NMI used only once. So move that definition and remove xen-asm.h.
--- arch/x86/xen/enlighten_pv.c | 59 +-------------------------------------------- arch/x86/xen/xen-asm.S | 24 ++++-------------- arch/x86/xen/xen-asm.h | 12 --------- arch/x86/xen/xen-asm_32.S | 27 ++++----------------- arch/x86/xen/xen-asm_64.S | 20 ++++----------- arch/x86/xen/xen-ops.h | 15 +++--------- 6 files changed, 20 insertions(+), 137 deletions(-) delete mode 100644 arch/x86/xen/xen-asm.h
arch/x86/xen/enlighten_pv.c +1 -58
@@ -981,59 +981,6 @@ void __ref xen_setup_vcpu_info_placement(void) } } -static unsigned xen_patch (u8 type,u16 clobbers,void *insnbuf, -unsigned long addr,unsigned len) -{ -char *start, *end, *reloc; -unsigned ret; - - start = end = reloc =NULL ; - -#define SITE (op, x) \ - case PARAVIRT_PATCH(op.x): \ - if (xen_have_vcpu_info_placement) { \ - start = (char *)xen_##x##_direct; \ - end = xen_##x##_direct_end; \ - reloc = xen_##x##_direct_reloc; \ - } \ - goto patch_site - -switch (type) { -SITE (pv_irq_ops, irq_enable); -SITE (pv_irq_ops, irq_disable); -SITE (pv_irq_ops, save_fl); -SITE (pv_irq_ops, restore_fl); -#undef SITE - - patch_site: -if (start ==NULL || (end-start) > len) - goto default_patch; - - ret =paravirt_patch_insns (insnbuf, len, start, end); - -/* Note: because reloc is assigned from something that -appears to be an array, gcc assumes it's non-null, -but doesn't know its relationship with start and -end. */ -if (reloc > start && reloc < end) { -int reloc_off = reloc - start; -long *relocp = (long *)(insnbuf + reloc_off); -long delta = start - (char *)addr; - - *relocp += delta; - } -break ; - - default_patch: -default : - ret =paravirt_patch_default (type, clobbers, insnbuf, - addr, len); -break ; - } - -return ret; -} -static const struct pv_info xen_info__initconst = { .shared_kernel_pmd =0 ,
@@ -1043,10 +990,6 @@ static const struct pv_info xen_info __initconst = { .name = "Xen", }; -static const struct pv_init_ops xen_init_ops__initconst = { - .patch = xen_patch, -}; -static const struct pv_cpu_ops xen_cpu_ops__initconst = { .cpuid = xen_cpuid,
@@ -1244,7 +1187,7 @@ asmlinkage __visible void __init xen_start_kernel(void)/* Install Xen paravirt ops */ pv_info = xen_info; - pv_init_ops = xen_init_ops; + pv_init_ops.patch = paravirt_patch_default; pv_cpu_ops = xen_cpu_ops; x86_platform.get_nmi_reason = xen_get_nmi_reason;
arch/x86/xen/xen-asm.S +5 -19
@@ -1,14 +1,8 @@ /* - * Asm versions of Xen pv-ops, suitable for either direct use or - * inlining. The inline versions are the same as the direct-use - * versions, with the pre- and post-amble chopped off. - * - * This code is encoded for size rather than absolute efficiency, with - * a view to being able to inline as much as possible. + * Asm versions of Xen pv-ops, suitable for direct use. * * We only bother with direct forms (ie, vcpu in percpu data) of the - * operations here; the indirect forms are better handled in C, since - * they're generally too large to inline anyway. + * operations here; the indirect forms are better handled in C. */ #include <asm/asm-offsets.h>
@@ -16,7 +10,7 @@ #include <asm/processor-flags.h> #include <asm/frame.h> -#include "xen-asm.h" +#include <linux/linkage.h> /* * Enable events. This clears the event mask and tests the pending
@@ -38,13 +32,11 @@ ENTRY(xen_irq_enable_direct) testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending jz 1f -2: call check_events + call check_events 1: -ENDPATCH(xen_irq_enable_direct) FRAME_END ret ENDPROC(xen_irq_enable_direct) - RELOC(xen_irq_enable_direct, 2b+1) /*
@@ -53,10 +45,8 @@ ENDPATCH(xen_irq_enable_direct) */ ENTRY(xen_irq_disable_direct) movb $1, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask -ENDPATCH(xen_irq_disable_direct) ret ENDPROC(xen_irq_disable_direct) - RELOC(xen_irq_disable_direct, 0) /* * (xen_)save_fl is used to get the current interrupt enable status.
@@ -71,10 +61,8 @@ ENTRY(xen_save_fl_direct) testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask setz %ah addb %ah, %ah -ENDPATCH(xen_save_fl_direct) ret ENDPROC(xen_save_fl_direct) - RELOC(xen_save_fl_direct, 0) /*
@@ -101,13 +89,11 @@ ENTRY(xen_restore_fl_direct) /* check for unmasked and pending */ cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending jnz 1f -2: call check_events + call check_events 1: -ENDPATCH(xen_restore_fl_direct) FRAME_END ret ENDPROC(xen_restore_fl_direct) - RELOC(xen_restore_fl_direct, 2b+1) /*
arch/x86/xen/xen-asm.h deleted +0 -12
@@ -1,12 +0,0 @@ -#ifndef _XEN_XEN_ASM_H -#define _XEN_XEN_ASM_H - -#include <linux/linkage.h> - -#define RELOC (x, v) .globl x##_reloc; x##_reloc=v -#define ENDPATCH (x) .globl x##_end; x##_end=. - -/* Pseudo-flag used for virtual NMI, which we don't implement yet */ -#define XEN_EFLAGS_NMI 0x80000000 - -#endif
arch/x86/xen/xen-asm_32.S +5 -22
@@ -1,14 +1,8 @@ /* - * Asm versions of Xen pv-ops, suitable for either direct use or - * inlining. The inline versions are the same as the direct-use - * versions, with the pre- and post-amble chopped off. - * - * This code is encoded for size rather than absolute efficiency, with - * a view to being able to inline as much as possible. + * Asm versions of Xen pv-ops, suitable for direct use. * * We only bother with direct forms (ie, vcpu in pda) of the - * operations here; the indirect forms are better handled in C, since - * they're generally too large to inline anyway. + * operations here; the indirect forms are better handled in C. */ #include <asm/thread_info.h>
@@ -18,21 +12,10 @@ #include <xen/interface/xen.h> -#include "xen-asm.h" +#include <linux/linkage.h> -/* - * Force an event check by making a hypercall, but preserve regs - * before making the call. - */ -check_events: - push %eax - push %ecx - push %edx - call xen_force_evtchn_callback - pop %edx - pop %ecx - pop %eax - ret +/* Pseudo-flag used for virtual NMI, which we don't implement yet */ +#define XEN_EFLAGS_NMI 0x80000000 /* * This is run where a normal iret would be run, with the same stack setup:
arch/x86/xen/xen-asm_64.S +5 -15
@@ -1,14 +1,8 @@ /* - * Asm versions of Xen pv-ops, suitable for either direct use or - * inlining. The inline versions are the same as the direct-use - * versions, with the pre- and post-amble chopped off. - * - * This code is encoded for size rather than absolute efficiency, with - * a view to being able to inline as much as possible. + * Asm versions of Xen pv-ops, suitable for direct use. * * We only bother with direct forms (ie, vcpu in pda) of the - * operations here; the indirect forms are better handled in C, since - * they're generally too large to inline anyway. + * operations here; the indirect forms are better handled in C. */ #include <asm/errno.h>
@@ -20,7 +14,7 @@ #include <xen/interface/xen.h> -#include "xen-asm.h" +#include <linux/linkage.h> ENTRY(xen_adjust_exception_frame) mov 8+0(%rsp), %rcx
@@ -46,9 +40,7 @@ hypercall_iret = hypercall_page + __HYPERVISOR_iret * 32 */ ENTRY(xen_iret) pushq $0 -1: jmp hypercall_iret -ENDPATCH(xen_iret) -RELOC(xen_iret, 1b+1) + jmp hypercall_iret ENTRY(xen_sysret64) /*
@@ -65,9 +57,7 @@ ENTRY(xen_sysret64) pushq %rcx pushq $VGCF_in_syscall -1: jmp hypercall_iret -ENDPATCH(xen_sysret64) -RELOC(xen_sysret64, 1b+1) + jmp hypercall_iret /* * Xen handles syscall callbacks much like ordinary exceptions, which
arch/x86/xen/xen-ops.h +4 -11
@@ -129,17 +129,10 @@ static inline void __init xen_efi_init(void) }#endif -/* Declare an asm function, along with symbols needed to make it -inlineable */ -#define DECL_ASM (ret, name, ...) \ - __visible ret name(__VA_ARGS__); \ - extern char name##_end[] __visible; \ - extern char name##_reloc[] __visible - -DECL_ASM (void, xen_irq_enable_direct, void); -DECL_ASM (void, xen_irq_disable_direct, void); -DECL_ASM(unsigned long, xen_save_fl_direct, void); -DECL_ASM(void, xen_restore_fl_direct, unsigned long); +__visible void xen_irq_enable_direct(void); +__visible void xen_irq_disable_direct(void); +__visible unsigned long xen_save_fl_direct (void ); +__visible void xen_restore_fl_direct(unsigned long);/* These are not functions, and cannot be called normally */ __visible void xen_iret(void);
Signature · 1 line
2.12.3
Re: [PATCH v2 1/2] paravirt,xen: remove xen_patch()
arch/x86/xen/xen-asm.S ENDPATCH(xen_irq_enable_direct) · line 59
Quoted 6 lines · Juergen Gross
ENTRY(xen_irq_disable_direct)arch/x86/xen/xen-asm.S +0
-2movb $1, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask -ENDPATCH(xen_irq_disable_direct) ret ENDPROC(xen_irq_disable_direct) - RELOC(xen_irq_disable_direct, 0)
Might as well remove the ENDPROC indentations while you're at it, for readability and consistency with other asm code.
Otherwise,
Signature · 1 line
Josh
Re: [PATCH v2 1/2] paravirt,xen: remove xen_patch()
In reply to Juergen Grossarch/x86/xen/xen-asm.S ENDPATCH(xen_irq_enable_direct) · line 59
Quoted 6 lines · Juergen Gross
ENTRY(xen_irq_disable_direct)arch/x86/xen/xen-asm.S +0
-2movb $1, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask -ENDPATCH(xen_irq_disable_direct) ret ENDPROC(xen_irq_disable_direct) - RELOC(xen_irq_disable_direct, 0)
Might as well remove the ENDPROC indentations while you're at it, for readability and consistency with other asm code.
Otherwise,
Signature · 6 lines
Josh _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH v2 1/2] paravirt,xen: remove xen_patch()
In reply to Juergen GrossQuoted 7 lines · Juergen Gross
Xen's paravirt patch function
xen_patch()does some special casing forirq_opsfunctions to apply relocations when those functions can be patched inline instead of calls.Unfortunately none of the special case function replacements is small enough to be patched inline, so the special case never applies.
Quoted 6 lines
As
xen_patch()will callparavirt_patch_default()in all cases it can be just dropped.xen-asm.hdoesn't seem necessary withoutxen_patch()as the only thing left in it would be the definition ofXEN_EFLAGS_NMIused only once. So move that definition and removexen-asm.h.Signed-off-by Juergen Gross <[email protected]>
Applied to for-linus-4.14
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v2 1/2] paravirt,xen: remove xen_patch()
In reply to Juergen GrossQuoted 7 lines · Juergen Gross
Xen's paravirt patch function
xen_patch()does some special casing forirq_opsfunctions to apply relocations when those functions can be patched inline instead of calls.Unfortunately none of the special case function replacements is small enough to be patched inline, so the special case never applies.
Quoted 6 lines
As
xen_patch()will callparavirt_patch_default()in all cases it can be just dropped.xen-asm.hdoesn't seem necessary withoutxen_patch()as the only thing left in it would be the definition ofXEN_EFLAGS_NMIused only once. So move that definition and removexen-asm.h.Signed-off-by Juergen Gross <[email protected]>
Applied to for-linus-4.14
-boris
tip-bot for Juergen Gross
merge bot[tip:x86/asm] x86/paravirt/xen: Remove xen_patch()
In reply to Juergen Grossx86/paravirt/xen: Remove xen_patch()
Commit-ID: edcb5cf84f05e5d2e2af25422a72ccde359fcca9 Gitweb: http://git.kernel.org/tip/edcb5cf84f05e5d2e2af25422a72ccde359fcca9 Author: Juergen Gross <[email protected]> AuthorDate: Wed, 16 Aug 2017 19:31:56 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 24 Aug 2017 09:57:24 +0200
x86/paravirt/xen: Remove xen_patch()
Xen's paravirt patch function xen_patch() does some special casing for irq_ops functions to apply relocations when those functions can be patched inline instead of calls.
Unfortunately none of the special case function replacements is small enough to be patched inline, so the special case never applies.
As xen_patch() will call paravirt_patch_default() in all cases it can be just dropped. xen-asm.h doesn't seem necessary without xen_patch() as the only thing left in it would be the definition of XEN_EFLAGS_NMI used only once. So move that definition and remove xen-asm.h.
--- arch/x86/xen/enlighten_pv.c | 59 +-------------------------------------------- arch/x86/xen/xen-asm.S | 26 +++++--------------- arch/x86/xen/xen-asm.h | 12 --------- arch/x86/xen/xen-asm_32.S | 27 ++++----------------- arch/x86/xen/xen-asm_64.S | 20 ++++----------- arch/x86/xen/xen-ops.h | 15 +++--------- 6 files changed, 21 insertions(+), 138 deletions(-)
arch/x86/xen/enlighten_pv.c +1 -58
@@ -981,59 +981,6 @@ void __ref xen_setup_vcpu_info_placement(void) } } -static unsigned xen_patch (u8 type,u16 clobbers,void *insnbuf, -unsigned long addr,unsigned len) -{ -char *start, *end, *reloc; -unsigned ret; - - start = end = reloc =NULL ; - -#define SITE (op, x) \ - case PARAVIRT_PATCH(op.x): \ - if (xen_have_vcpu_info_placement) { \ - start = (char *)xen_##x##_direct; \ - end = xen_##x##_direct_end; \ - reloc = xen_##x##_direct_reloc; \ - } \ - goto patch_site - -switch (type) { -SITE (pv_irq_ops, irq_enable); -SITE (pv_irq_ops, irq_disable); -SITE (pv_irq_ops, save_fl); -SITE (pv_irq_ops, restore_fl); -#undef SITE - - patch_site: -if (start ==NULL || (end-start) > len) - goto default_patch; - - ret =paravirt_patch_insns (insnbuf, len, start, end); - -/* Note: because reloc is assigned from something that -appears to be an array, gcc assumes it's non-null, -but doesn't know its relationship with start and -end. */ -if (reloc > start && reloc < end) { -int reloc_off = reloc - start; -long *relocp = (long *)(insnbuf + reloc_off); -long delta = start - (char *)addr; - - *relocp += delta; - } -break ; - - default_patch: -default : - ret =paravirt_patch_default (type, clobbers, insnbuf, - addr, len); -break ; - } - -return ret; -} -static const struct pv_info xen_info__initconst = { .shared_kernel_pmd =0 ,
@@ -1043,10 +990,6 @@ static const struct pv_info xen_info __initconst = { .name = "Xen", }; -static const struct pv_init_ops xen_init_ops__initconst = { - .patch = xen_patch, -}; -static const struct pv_cpu_ops xen_cpu_ops__initconst = { .cpuid = xen_cpuid,
@@ -1244,7 +1187,7 @@ asmlinkage __visible void __init xen_start_kernel(void)/* Install Xen paravirt ops */ pv_info = xen_info; - pv_init_ops = xen_init_ops; + pv_init_ops.patch = paravirt_patch_default; pv_cpu_ops = xen_cpu_ops; x86_platform.get_nmi_reason = xen_get_nmi_reason;
arch/x86/xen/xen-asm.S +6 -20
@@ -1,14 +1,8 @@ /* - * Asm versions of Xen pv-ops, suitable for either direct use or - * inlining. The inline versions are the same as the direct-use - * versions, with the pre- and post-amble chopped off. - * - * This code is encoded for size rather than absolute efficiency, with - * a view to being able to inline as much as possible. + * Asm versions of Xen pv-ops, suitable for direct use. * * We only bother with direct forms (ie, vcpu in percpu data) of the - * operations here; the indirect forms are better handled in C, since - * they're generally too large to inline anyway. + * operations here; the indirect forms are better handled in C. */ #include <asm/asm-offsets.h>
@@ -16,7 +10,7 @@ #include <asm/processor-flags.h> #include <asm/frame.h> -#include "xen-asm.h" +#include <linux/linkage.h> /* * Enable events. This clears the event mask and tests the pending
@@ -38,13 +32,11 @@ ENTRY(xen_irq_enable_direct) testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending jz 1f -2: call check_events + call check_events 1: -ENDPATCH(xen_irq_enable_direct) FRAME_END ret ENDPROC(xen_irq_enable_direct) - RELOC(xen_irq_enable_direct, 2b+1) /*
@@ -53,10 +45,8 @@ ENDPATCH(xen_irq_enable_direct) */ ENTRY(xen_irq_disable_direct) movb $1, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask -ENDPATCH(xen_irq_disable_direct) ret - ENDPROC(xen_irq_disable_direct) - RELOC(xen_irq_disable_direct, 0) +ENDPROC(xen_irq_disable_direct) /* * (xen_)save_fl is used to get the current interrupt enable status.
@@ -71,10 +61,8 @@ ENTRY(xen_save_fl_direct) testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask setz %ah addb %ah, %ah -ENDPATCH(xen_save_fl_direct) ret ENDPROC(xen_save_fl_direct) - RELOC(xen_save_fl_direct, 0) /*
@@ -101,13 +89,11 @@ ENTRY(xen_restore_fl_direct) /* check for unmasked and pending */ cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending jnz 1f -2: call check_events + call check_events 1: -ENDPATCH(xen_restore_fl_direct) FRAME_END ret ENDPROC(xen_restore_fl_direct) - RELOC(xen_restore_fl_direct, 2b+1) /*
arch/x86/xen/xen-asm.h deleted +0 -12
@@ -1,12 +0,0 @@ -#ifndef _XEN_XEN_ASM_H -#define _XEN_XEN_ASM_H - -#include <linux/linkage.h> - -#define RELOC (x, v) .globl x##_reloc; x##_reloc=v -#define ENDPATCH (x) .globl x##_end; x##_end=. - -/* Pseudo-flag used for virtual NMI, which we don't implement yet */ -#define XEN_EFLAGS_NMI 0x80000000 - -#endif
arch/x86/xen/xen-asm_32.S +5 -22
@@ -1,14 +1,8 @@ /* - * Asm versions of Xen pv-ops, suitable for either direct use or - * inlining. The inline versions are the same as the direct-use - * versions, with the pre- and post-amble chopped off. - * - * This code is encoded for size rather than absolute efficiency, with - * a view to being able to inline as much as possible. + * Asm versions of Xen pv-ops, suitable for direct use. * * We only bother with direct forms (ie, vcpu in pda) of the - * operations here; the indirect forms are better handled in C, since - * they're generally too large to inline anyway. + * operations here; the indirect forms are better handled in C. */ #include <asm/thread_info.h>
@@ -18,21 +12,10 @@ #include <xen/interface/xen.h> -#include "xen-asm.h" +#include <linux/linkage.h> -/* - * Force an event check by making a hypercall, but preserve regs - * before making the call. - */ -check_events: - push %eax - push %ecx - push %edx - call xen_force_evtchn_callback - pop %edx - pop %ecx - pop %eax - ret +/* Pseudo-flag used for virtual NMI, which we don't implement yet */ +#define XEN_EFLAGS_NMI 0x80000000 /* * This is run where a normal iret would be run, with the same stack setup:
arch/x86/xen/xen-asm_64.S +5 -15
@@ -1,14 +1,8 @@ /* - * Asm versions of Xen pv-ops, suitable for either direct use or - * inlining. The inline versions are the same as the direct-use - * versions, with the pre- and post-amble chopped off. - * - * This code is encoded for size rather than absolute efficiency, with - * a view to being able to inline as much as possible. + * Asm versions of Xen pv-ops, suitable for direct use. * * We only bother with direct forms (ie, vcpu in pda) of the - * operations here; the indirect forms are better handled in C, since - * they're generally too large to inline anyway. + * operations here; the indirect forms are better handled in C. */ #include <asm/errno.h>
@@ -20,7 +14,7 @@ #include <xen/interface/xen.h> -#include "xen-asm.h" +#include <linux/linkage.h> ENTRY(xen_adjust_exception_frame) mov 8+0(%rsp), %rcx
@@ -46,9 +40,7 @@ hypercall_iret = hypercall_page + __HYPERVISOR_iret * 32 */ ENTRY(xen_iret) pushq $0 -1: jmp hypercall_iret -ENDPATCH(xen_iret) -RELOC(xen_iret, 1b+1) + jmp hypercall_iret ENTRY(xen_sysret64) /*
@@ -65,9 +57,7 @@ ENTRY(xen_sysret64) pushq %rcx pushq $VGCF_in_syscall -1: jmp hypercall_iret -ENDPATCH(xen_sysret64) -RELOC(xen_sysret64, 1b+1) + jmp hypercall_iret /* * Xen handles syscall callbacks much like ordinary exceptions, which
arch/x86/xen/xen-ops.h +4 -11
@@ -129,17 +129,10 @@ static inline void __init xen_efi_init(void) }#endif -/* Declare an asm function, along with symbols needed to make it -inlineable */ -#define DECL_ASM (ret, name, ...) \ - __visible ret name(__VA_ARGS__); \ - extern char name##_end[] __visible; \ - extern char name##_reloc[] __visible - -DECL_ASM (void, xen_irq_enable_direct, void); -DECL_ASM (void, xen_irq_disable_direct, void); -DECL_ASM(unsigned long, xen_save_fl_direct, void); -DECL_ASM(void, xen_restore_fl_direct, unsigned long); +__visible void xen_irq_enable_direct(void); +__visible void xen_irq_disable_direct(void); +__visible unsigned long xen_save_fl_direct (void ); +__visible void xen_restore_fl_direct(unsigned long);/* These are not functions, and cannot be called normally */ __visible void xen_iret(void);
Juergen Gross
maintainerPATCH v2 2/2 x86/lguest: remove lguest support
In reply to Juergen GrossLguest seems to be rather unused these days. It has seen only patches ensuring it still builds the last two years and its official state is "Odd Fixes".
Nuke it in order to be able to clean up the paravirt code.
--- MAINTAINERS | 11 - arch/x86/Kbuild | 3 - arch/x86/Kconfig | 2 - arch/x86/include/asm/lguest.h | 91 - arch/x86/include/asm/lguest_hcall.h | 74 - arch/x86/include/asm/processor.h | 2 +- arch/x86/include/uapi/asm/bootparam.h | 2 +- arch/x86/kernel/asm-offsets_32.c | 20 - arch/x86/kernel/head_32.S | 2 - arch/x86/kernel/platform-quirks.c | 1 - arch/x86/kvm/Kconfig | 1 - arch/x86/lguest/Kconfig | 14 - arch/x86/lguest/Makefile | 2 - arch/x86/lguest/boot.c | 1558 --------------- arch/x86/lguest/head_32.S | 192 -- drivers/Makefile | 1 - drivers/block/Kconfig | 2 +- drivers/char/Kconfig | 2 +- drivers/char/virtio_console.c | 2 +- drivers/lguest/Kconfig | 13 - drivers/lguest/Makefile | 26 - drivers/lguest/README | 47 - drivers/lguest/core.c | 398 ---- drivers/lguest/hypercalls.c | 304 --- drivers/lguest/interrupts_and_traps.c | 706 ------- drivers/lguest/lg.h | 258 --- drivers/lguest/lguest_user.c | 446 ----- drivers/lguest/page_tables.c | 1239 ------------ drivers/lguest/segments.c | 228 --- drivers/lguest/x86/core.c | 724 ------- drivers/lguest/x86/switcher_32.S | 388 ---- drivers/net/Kconfig | 2 +- drivers/tty/hvc/Kconfig | 2 +- drivers/virtio/Kconfig | 4 +- include/linux/lguest.h | 73 - include/linux/lguest_launcher.h | 44 - include/uapi/linux/virtio_ring.h | 4 +- tools/Makefile | 11 +- tools/lguest/.gitignore | 2 - tools/lguest/Makefile | 14 - tools/lguest/extract | 58 - tools/lguest/lguest.c | 3420 --------------------------------- tools/lguest/lguest.txt | 125 -- 43 files changed, 16 insertions(+), 10502 deletions(-) delete mode 100644 arch/x86/include/asm/lguest.h delete mode 100644 arch/x86/include/asm/lguest_hcall.h delete mode 100644 arch/x86/lguest/Kconfig delete mode 100644 arch/x86/lguest/Makefile delete mode 100644 arch/x86/lguest/boot.c delete mode 100644 arch/x86/lguest/head_32.S delete mode 100644 drivers/lguest/Kconfig delete mode 100644 drivers/lguest/Makefile delete mode 100644 drivers/lguest/README delete mode 100644 drivers/lguest/core.c delete mode 100644 drivers/lguest/hypercalls.c delete mode 100644 drivers/lguest/interrupts_and_traps.c delete mode 100644 drivers/lguest/lg.h delete mode 100644 drivers/lguest/lguest_user.c delete mode 100644 drivers/lguest/page_tables.c delete mode 100644 drivers/lguest/segments.c delete mode 100644 drivers/lguest/x86/core.c delete mode 100644 drivers/lguest/x86/switcher_32.S delete mode 100644 include/linux/lguest.h delete mode 100644 include/linux/lguest_launcher.h delete mode 100644 tools/lguest/.gitignore delete mode 100644 tools/lguest/Makefile delete mode 100644 tools/lguest/extract delete mode 100644 tools/lguest/lguest.c delete mode 100644 tools/lguest/lguest.txt
MAINTAINERS +0 -11
@@ -7640,17 +7640,6 @@ T: git git://linuxtv.org/mkrufky/tuners.git S: Maintained F: drivers/media/dvb-frontends/lgdt3305.* -LGUEST -M: Rusty Russell <[email protected]> -L: [email protected] -W: http://lguest.ozlabs.org/ -S: Odd Fixes -F: arch/x86/include/asm/lguest*.h -F: arch/x86/lguest/ -F: drivers/lguest/ -F: include/linux/lguest*.h -F: tools/lguest/ - LIBATA PATA ARASAN COMPACT FLASH CONTROLLER M: Viresh Kumar <[email protected]> L: [email protected]
arch/x86/Kbuild +0 -3
@@ -10,9 +10,6 @@ obj-$(CONFIG_XEN) += xen/ # Hyper-V paravirtualization support obj-$(CONFIG_HYPERVISOR_GUEST) += hyperv/ -# lguest paravirtualization support -obj-$(CONFIG_LGUEST_GUEST) += lguest/ - obj-y += realmode/ obj-y += kernel/ obj-y += mm/
arch/x86/Kconfig +0 -2
@@ -777,8 +777,6 @@ config KVM_DEBUG_FS Statistics are displayed in debugfs filesystem. Enabling this option may incur significant overhead. -source "arch/x86/lguest/Kconfig" - config PARAVIRT_TIME_ACCOUNTING bool "Paravirtual steal time accounting" depends on PARAVIRT
arch/x86/include/asm/lguest.h deleted +0 -91
91 lines not on this page · raw message
arch/x86/include/asm/lguest_hcall.h deleted +0 -74
74 lines not on this page · raw message
arch/x86/include/asm/processor.h +1 -1
@@ -661,7 +661,7 @@ static inline void sync_core(void)* In case NMI unmasking or performance ever becomes a problem, * the next best option appears to be MOV-to-CR2 and an * unconditional jump. That sequence also works on all CPUs, -* but it will fault at CPL3 (i.e. Xen PV and lguest). +* but it will fault at CPL3 (i.e. Xen PV). * * CPUID is the conventional way, but it's nasty: it doesn't * exist on some 486-like CPUs, and it usually exits to a
arch/x86/include/uapi/asm/bootparam.h +1 -1
@@ -201,7 +201,7 @@ struct boot_params {* * @X86_SUBARCH_PC: Should be used if the hardware is enumerable using standard * PC mechanisms (PCI, ACPI) and doesn't need a special boot flow. -* @X86_SUBARCH_LGUEST: Used for x86 hypervisor demo, lguest +* @X86_SUBARCH_LGUEST: Used for x86 hypervisor demo, lguest, deprecated * @X86_SUBARCH_XEN: Used for Xen guest types which follow the PV boot path, * which start at asm startup_xen() entry point and later jump to the C * xen_start_kernel() entry point. Both domU and dom0 type of guests are
arch/x86/kernel/asm-offsets_32.c +0 -20
@@ -4,9 +4,6 @@#include <asm/ucontext.h> -#include <linux/lguest.h> -#include "../../../drivers/lguest/lg.h" -#define __SYSCALL_I386 (nr, sym, qual) [nr] = 1, static char syscalls[] = {#include <asm/syscalls_32.h>
@@ -62,23 +59,6 @@ void foo(void)OFFSET (stack_canary_offset, stack_canary, canary);#endif -#if defined(CONFIG_LGUEST ) || defined(CONFIG_LGUEST_GUEST ) || defined(CONFIG_LGUEST_MODULE ) -BLANK (); -OFFSET (LGUEST_DATA_irq_enabled, lguest_data, irq_enabled); -OFFSET (LGUEST_DATA_irq_pending, lguest_data, irq_pending); - -BLANK (); -OFFSET (LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc); -OFFSET (LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc); -OFFSET (LGUEST_PAGES_host_cr3, lguest_pages, state.host_cr3); -OFFSET (LGUEST_PAGES_host_sp, lguest_pages, state.host_sp); -OFFSET (LGUEST_PAGES_guest_gdt_desc, lguest_pages,state.guest_gdt_desc); -OFFSET (LGUEST_PAGES_guest_idt_desc, lguest_pages,state.guest_idt_desc); -OFFSET (LGUEST_PAGES_guest_gdt, lguest_pages, state.guest_gdt); -OFFSET (LGUEST_PAGES_regs_trapnum, lguest_pages, regs.trapnum); -OFFSET (LGUEST_PAGES_regs_errcode, lguest_pages, regs.errcode); -OFFSET (LGUEST_PAGES_regs, lguest_pages, regs); -#endif BLANK ();DEFINE (__NR_syscall_max,sizeof (syscalls) -1 );DEFINE (NR_syscalls,sizeof (syscalls));
arch/x86/kernel/head_32.S +0 -2
@@ -155,7 +155,6 @@ ENTRY(startup_32) jmp *%eax .Lbad_subarch: -WEAK(lguest_entry) WEAK(xen_entry) /* Unknown implementation; there's really nothing we can do at this point. */
@@ -165,7 +164,6 @@ WEAK(xen_entry) subarch_entries: .long .Ldefault_entry /* normal x86/PC */ - .long lguest_entry /* lguest hypervisor */ .long xen_entry /* Xen hypervisor */ .long .Ldefault_entry /* Moorestown MID */ num_subarch_entries = (. - subarch_entries) / 4
arch/x86/kernel/platform-quirks.c +0 -1
@@ -16,7 +16,6 @@ void __init x86_early_init_platform_quirks(void) x86_platform.legacy.reserve_bios_regions =1 ;break ;case X86_SUBARCH_XEN : -case X86_SUBARCH_LGUEST : x86_platform.legacy.devices.pnpbios =0 ; x86_platform.legacy.rtc =0 ;break ;
arch/x86/kvm/Kconfig +0 -1
@@ -89,6 +89,5 @@ config KVM_MMU_AUDIT # OK, it's a little counter-intuitive to do this, but it puts it neatly under # the virtualization menu. source drivers/vhost/Kconfig -source drivers/lguest/Kconfig endif # VIRTUALIZATION
arch/x86/lguest/Kconfig deleted +0 -14
@@ -1,14 +0,0 @@ -config LGUEST_GUEST - bool "Lguest guest support" - depends on X86_32 && PARAVIRT && PCI - select TTY - select VIRTUALIZATION - select VIRTIO - select VIRTIO_CONSOLE - help - Lguest is a tiny in-kernel hypervisor. Selecting this will - allow your kernel to boot under lguest. This option will increase - your kernel size by about 10k. If in doubt, say N. - - If you say Y here, make sure you say Y (or M) to the virtio block - and net drivers which lguest needs.
arch/x86/lguest/Makefile deleted +0 -2
@@ -1,2 +0,0 @@ -obj-y := head_32.o boot.o -CFLAGS_boot.o := $(call cc-option, -fno-stack-protector)
arch/x86/lguest/boot.c deleted +0 -1558
1,558 lines not on this page · raw message
arch/x86/lguest/head_32.S deleted +0 -192
192 lines not on this page · raw message
drivers/Makefile +0 -1
@@ -125,7 +125,6 @@ obj-$(CONFIG_ACCESSIBILITY) += accessibility/ obj-$(CONFIG_ISDN) += isdn/ obj-$(CONFIG_EDAC) += edac/ obj-$(CONFIG_EISA) += eisa/ -obj-y += lguest/ obj-$(CONFIG_CPU_FREQ) += cpufreq/ obj-$(CONFIG_CPU_IDLE) += cpuidle/ obj-y += mmc/
drivers/block/Kconfig +1 -1
@@ -470,7 +470,7 @@ config VIRTIO_BLK depends on VIRTIO ---help--- This is the virtual block driver for virtio. It can be used with - lguest or QEMU based VMMs (like KVM or Xen). Say Y or M. + QEMU based VMMs (like KVM or Xen). Say Y or M. config VIRTIO_BLK_SCSI bool "SCSI passthrough request for the Virtio block driver"
drivers/char/Kconfig +1 -1
@@ -161,7 +161,7 @@ config VIRTIO_CONSOLE depends on VIRTIO && TTY select HVC_DRIVER help - Virtio console for use with lguest and other hypervisors. + Virtio console for use with hypervisors. Also serves as a general-purpose serial device for data transfer between the guest and host. Character devices at
drivers/char/virtio_console.c +1 -1
@@ -1130,7 +1130,7 @@ static const struct file_operations port_fops = {* We turn the characters into a scatter-gather list, add it to the * output queue and then kick the Host. Then we sit here waiting for * it to finish: inefficient in theory, but in practice -* implementations will do it immediately (lguest's Launcher does). +* implementations will do it immediately. */ static int put_chars (u32 vtermno,const char *buf,int count) {
drivers/lguest/Kconfig deleted +0 -13
@@ -1,13 +0,0 @@ -config LGUEST - tristate "Linux hypervisor example code" - depends on X86_32 && EVENTFD && TTY && PCI_DIRECT - select HVC_DRIVER - ---help--- - This is a very simple module which allows you to run - multiple instances of the same Linux kernel, using the - "lguest" command found in the tools/lguest directory. - - Note that "lguest" is pronounced to rhyme with "fell quest", - not "rustyvisor". See tools/lguest/lguest.txt. - - If unsure, say N. If curious, say M. If masochistic, say Y.
drivers/lguest/Makefile deleted +0 -26
@@ -1,26 +0,0 @@ -# Host requires the other files, which can be a module. -obj-$(CONFIG_LGUEST) += lg.o -lg-y = core.o hypercalls.o page_tables.o interrupts_and_traps.o \ - segments.o lguest_user.o - -lg-$(CONFIG_X86_32) += x86/switcher_32.o x86/core.o - -Preparation Preparation!: PREFIX=P -Guest: PREFIX=G -Drivers: PREFIX=D -Launcher: PREFIX=L -Host: PREFIX=H -Switcher: PREFIX=S -Mastery: PREFIX=M -Beer: - @for f in Preparation Guest Drivers Launcher Host Switcher Mastery; do echo "{==- $$f -==}"; make -s $$f; done; echo "{==-==}" -Preparation Preparation! Guest Drivers Launcher Host Switcher Mastery: - @sh ../../tools/lguest/extract $(PREFIX) `find ../../* -name '*.[chS]' -wholename '*lguest*'` -Puppy: - @clear - @printf " __ \n (___()'\`;\n /, /\`\n \\\\\\\"--\\\\\\ \n" - @sleep 2; clear; printf "\n\n Sit!\n\n"; sleep 1; clear - @printf " __ \n ()'\`; \n /\\|\` \n / | \n(/_)_|_ \n" - @sleep 2; clear; printf "\n\n Stand!\n\n"; sleep 1; clear - @printf " __ \n ()'\`; \n /\\|\` \n /._.= \n /| / \n(_\_)_ \n" - @sleep 2; clear; printf "\n\n Good puppy!\n\n"; sleep 1; clear
drivers/lguest/README deleted +0 -47
47 lines not on this page · raw message
drivers/lguest/core.c deleted +0 -398
398 lines not on this page · raw message
drivers/lguest/hypercalls.c deleted +0 -304
304 lines not on this page · raw message
drivers/lguest/interrupts_and_traps.c deleted +0 -706
141 lines not on this page · raw message
drivers/lguest/lg.h deleted +0 -258
258 lines not on this page · raw message
drivers/lguest/lguest_user.c deleted +0 -446
446 lines not on this page · raw message
drivers/lguest/page_tables.c deleted +0 -1239
1,239 lines not on this page · raw message
drivers/lguest/segments.c deleted +0 -228
228 lines not on this page · raw message
drivers/lguest/x86/core.c deleted +0 -724
724 lines not on this page · raw message
drivers/lguest/x86/switcher_32.S deleted +0 -388
388 lines not on this page · raw message
include/linux/lguest.h deleted +0 -73
73 lines not on this page · raw message
include/linux/lguest_launcher.h deleted +0 -44
44 lines not on this page · raw message
tools/lguest/extract deleted +0 -58
58 lines not on this page · raw message
tools/lguest/lguest.c deleted +0 -3420
3,420 lines not on this page · raw message
tools/lguest/lguest.txt deleted +0 -125
125 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Part of the diff is not shown here. View the raw message.
Juergen Gross
maintainerPATCH v2 2/2 x86/lguest: remove lguest support
In reply to Juergen GrossLguest seems to be rather unused these days. It has seen only patches ensuring it still builds the last two years and its official state is "Odd Fixes".
Nuke it in order to be able to clean up the paravirt code.
--- MAINTAINERS | 11 - arch/x86/Kbuild | 3 - arch/x86/Kconfig | 2 - arch/x86/include/asm/lguest.h | 91 - arch/x86/include/asm/lguest_hcall.h | 74 - arch/x86/include/asm/processor.h | 2 +- arch/x86/include/uapi/asm/bootparam.h | 2 +- arch/x86/kernel/asm-offsets_32.c | 20 - arch/x86/kernel/head_32.S | 2 - arch/x86/kernel/platform-quirks.c | 1 - arch/x86/kvm/Kconfig | 1 - arch/x86/lguest/Kconfig | 14 - arch/x86/lguest/Makefile | 2 - arch/x86/lguest/boot.c | 1558 --------------- arch/x86/lguest/head_32.S | 192 -- drivers/Makefile | 1 - drivers/block/Kconfig | 2 +- drivers/char/Kconfig | 2 +- drivers/char/virtio_console.c | 2 +- drivers/lguest/Kconfig | 13 - drivers/lguest/Makefile | 26 - drivers/lguest/README | 47 - drivers/lguest/core.c | 398 ---- drivers/lguest/hypercalls.c | 304 --- drivers/lguest/interrupts_and_traps.c | 706 ------- drivers/lguest/lg.h | 258 --- drivers/lguest/lguest_user.c | 446 ----- drivers/lguest/page_tables.c | 1239 ------------ drivers/lguest/segments.c | 228 --- drivers/lguest/x86/core.c | 724 ------- drivers/lguest/x86/switcher_32.S | 388 ---- drivers/net/Kconfig | 2 +- drivers/tty/hvc/Kconfig | 2 +- drivers/virtio/Kconfig | 4 +- include/linux/lguest.h | 73 - include/linux/lguest_launcher.h | 44 - include/uapi/linux/virtio_ring.h | 4 +- tools/Makefile | 11 +- tools/lguest/.gitignore | 2 - tools/lguest/Makefile | 14 - tools/lguest/extract | 58 - tools/lguest/lguest.c | 3420 --------------------------------- tools/lguest/lguest.txt | 125 -- 43 files changed, 16 insertions(+), 10502 deletions(-) delete mode 100644 arch/x86/include/asm/lguest.h delete mode 100644 arch/x86/include/asm/lguest_hcall.h delete mode 100644 arch/x86/lguest/Kconfig delete mode 100644 arch/x86/lguest/Makefile delete mode 100644 arch/x86/lguest/boot.c delete mode 100644 arch/x86/lguest/head_32.S delete mode 100644 drivers/lguest/Kconfig delete mode 100644 drivers/lguest/Makefile delete mode 100644 drivers/lguest/README delete mode 100644 drivers/lguest/core.c delete mode 100644 drivers/lguest/hypercalls.c delete mode 100644 drivers/lguest/interrupts_and_traps.c delete mode 100644 drivers/lguest/lg.h delete mode 100644 drivers/lguest/lguest_user.c delete mode 100644 drivers/lguest/page_tables.c delete mode 100644 drivers/lguest/segments.c delete mode 100644 drivers/lguest/x86/core.c delete mode 100644 drivers/lguest/x86/switcher_32.S delete mode 100644 include/linux/lguest.h delete mode 100644 include/linux/lguest_launcher.h delete mode 100644 tools/lguest/.gitignore delete mode 100644 tools/lguest/Makefile delete mode 100644 tools/lguest/extract delete mode 100644 tools/lguest/lguest.c delete mode 100644 tools/lguest/lguest.txt
MAINTAINERS +0 -11
@@ -7640,17 +7640,6 @@ T: git git://linuxtv.org/mkrufky/tuners.git S: Maintained F: drivers/media/dvb-frontends/lgdt3305.* -LGUEST -M: Rusty Russell <[email protected]> -L: [email protected] -W: http://lguest.ozlabs.org/ -S: Odd Fixes -F: arch/x86/include/asm/lguest*.h -F: arch/x86/lguest/ -F: drivers/lguest/ -F: include/linux/lguest*.h -F: tools/lguest/ - LIBATA PATA ARASAN COMPACT FLASH CONTROLLER M: Viresh Kumar <[email protected]> L: [email protected]
arch/x86/Kbuild +0 -3
@@ -10,9 +10,6 @@ obj-$(CONFIG_XEN) += xen/ # Hyper-V paravirtualization support obj-$(CONFIG_HYPERVISOR_GUEST) += hyperv/ -# lguest paravirtualization support -obj-$(CONFIG_LGUEST_GUEST) += lguest/ - obj-y += realmode/ obj-y += kernel/ obj-y += mm/
arch/x86/Kconfig +0 -2
@@ -777,8 +777,6 @@ config KVM_DEBUG_FS Statistics are displayed in debugfs filesystem. Enabling this option may incur significant overhead. -source "arch/x86/lguest/Kconfig" - config PARAVIRT_TIME_ACCOUNTING bool "Paravirtual steal time accounting" depends on PARAVIRT
arch/x86/include/asm/lguest.h deleted +0 -91
91 lines not on this page · raw message
arch/x86/include/asm/lguest_hcall.h deleted +0 -74
74 lines not on this page · raw message
arch/x86/include/asm/processor.h +1 -1
@@ -661,7 +661,7 @@ static inline void sync_core(void)* In case NMI unmasking or performance ever becomes a problem, * the next best option appears to be MOV-to-CR2 and an * unconditional jump. That sequence also works on all CPUs, -* but it will fault at CPL3 (i.e. Xen PV and lguest). +* but it will fault at CPL3 (i.e. Xen PV). * * CPUID is the conventional way, but it's nasty: it doesn't * exist on some 486-like CPUs, and it usually exits to a
arch/x86/include/uapi/asm/bootparam.h +1 -1
@@ -201,7 +201,7 @@ struct boot_params {* * @X86_SUBARCH_PC: Should be used if the hardware is enumerable using standard * PC mechanisms (PCI, ACPI) and doesn't need a special boot flow. -* @X86_SUBARCH_LGUEST: Used for x86 hypervisor demo, lguest +* @X86_SUBARCH_LGUEST: Used for x86 hypervisor demo, lguest, deprecated * @X86_SUBARCH_XEN: Used for Xen guest types which follow the PV boot path, * which start at asm startup_xen() entry point and later jump to the C * xen_start_kernel() entry point. Both domU and dom0 type of guests are
arch/x86/kernel/asm-offsets_32.c +0 -20
@@ -4,9 +4,6 @@#include <asm/ucontext.h> -#include <linux/lguest.h> -#include "../../../drivers/lguest/lg.h" -#define __SYSCALL_I386 (nr, sym, qual) [nr] = 1, static char syscalls[] = {#include <asm/syscalls_32.h>
@@ -62,23 +59,6 @@ void foo(void)OFFSET (stack_canary_offset, stack_canary, canary);#endif -#if defined(CONFIG_LGUEST ) || defined(CONFIG_LGUEST_GUEST ) || defined(CONFIG_LGUEST_MODULE ) -BLANK (); -OFFSET (LGUEST_DATA_irq_enabled, lguest_data, irq_enabled); -OFFSET (LGUEST_DATA_irq_pending, lguest_data, irq_pending); - -BLANK (); -OFFSET (LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc); -OFFSET (LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc); -OFFSET (LGUEST_PAGES_host_cr3, lguest_pages, state.host_cr3); -OFFSET (LGUEST_PAGES_host_sp, lguest_pages, state.host_sp); -OFFSET (LGUEST_PAGES_guest_gdt_desc, lguest_pages,state.guest_gdt_desc); -OFFSET (LGUEST_PAGES_guest_idt_desc, lguest_pages,state.guest_idt_desc); -OFFSET (LGUEST_PAGES_guest_gdt, lguest_pages, state.guest_gdt); -OFFSET (LGUEST_PAGES_regs_trapnum, lguest_pages, regs.trapnum); -OFFSET (LGUEST_PAGES_regs_errcode, lguest_pages, regs.errcode); -OFFSET (LGUEST_PAGES_regs, lguest_pages, regs); -#endif BLANK ();DEFINE (__NR_syscall_max,sizeof (syscalls) -1 );DEFINE (NR_syscalls,sizeof (syscalls));
arch/x86/kernel/head_32.S +0 -2
@@ -155,7 +155,6 @@ ENTRY(startup_32) jmp *%eax .Lbad_subarch: -WEAK(lguest_entry) WEAK(xen_entry) /* Unknown implementation; there's really nothing we can do at this point. */
@@ -165,7 +164,6 @@ WEAK(xen_entry) subarch_entries: .long .Ldefault_entry /* normal x86/PC */ - .long lguest_entry /* lguest hypervisor */ .long xen_entry /* Xen hypervisor */ .long .Ldefault_entry /* Moorestown MID */ num_subarch_entries = (. - subarch_entries) / 4
arch/x86/kernel/platform-quirks.c +0 -1
@@ -16,7 +16,6 @@ void __init x86_early_init_platform_quirks(void) x86_platform.legacy.reserve_bios_regions =1 ;break ;case X86_SUBARCH_XEN : -case X86_SUBARCH_LGUEST : x86_platform.legacy.devices.pnpbios =0 ; x86_platform.legacy.rtc =0 ;break ;
arch/x86/kvm/Kconfig +0 -1
@@ -89,6 +89,5 @@ config KVM_MMU_AUDIT # OK, it's a little counter-intuitive to do this, but it puts it neatly under # the virtualization menu. source drivers/vhost/Kconfig -source drivers/lguest/Kconfig endif # VIRTUALIZATION
arch/x86/lguest/Kconfig deleted +0 -14
@@ -1,14 +0,0 @@ -config LGUEST_GUEST - bool "Lguest guest support" - depends on X86_32 && PARAVIRT && PCI - select TTY - select VIRTUALIZATION - select VIRTIO - select VIRTIO_CONSOLE - help - Lguest is a tiny in-kernel hypervisor. Selecting this will - allow your kernel to boot under lguest. This option will increase - your kernel size by about 10k. If in doubt, say N. - - If you say Y here, make sure you say Y (or M) to the virtio block - and net drivers which lguest needs.
arch/x86/lguest/Makefile deleted +0 -2
@@ -1,2 +0,0 @@ -obj-y := head_32.o boot.o -CFLAGS_boot.o := $(call cc-option, -fno-stack-protector)
arch/x86/lguest/boot.c deleted +0 -1558
1,558 lines not on this page · raw message
arch/x86/lguest/head_32.S deleted +0 -192
192 lines not on this page · raw message
drivers/Makefile +0 -1
@@ -125,7 +125,6 @@ obj-$(CONFIG_ACCESSIBILITY) += accessibility/ obj-$(CONFIG_ISDN) += isdn/ obj-$(CONFIG_EDAC) += edac/ obj-$(CONFIG_EISA) += eisa/ -obj-y += lguest/ obj-$(CONFIG_CPU_FREQ) += cpufreq/ obj-$(CONFIG_CPU_IDLE) += cpuidle/ obj-y += mmc/
drivers/block/Kconfig +1 -1
@@ -470,7 +470,7 @@ config VIRTIO_BLK depends on VIRTIO ---help--- This is the virtual block driver for virtio. It can be used with - lguest or QEMU based VMMs (like KVM or Xen). Say Y or M. + QEMU based VMMs (like KVM or Xen). Say Y or M. config VIRTIO_BLK_SCSI bool "SCSI passthrough request for the Virtio block driver"
drivers/char/Kconfig +1 -1
@@ -161,7 +161,7 @@ config VIRTIO_CONSOLE depends on VIRTIO && TTY select HVC_DRIVER help - Virtio console for use with lguest and other hypervisors. + Virtio console for use with hypervisors. Also serves as a general-purpose serial device for data transfer between the guest and host. Character devices at
drivers/char/virtio_console.c +1 -1
@@ -1130,7 +1130,7 @@ static const struct file_operations port_fops = {* We turn the characters into a scatter-gather list, add it to the * output queue and then kick the Host. Then we sit here waiting for * it to finish: inefficient in theory, but in practice -* implementations will do it immediately (lguest's Launcher does). +* implementations will do it immediately. */ static int put_chars (u32 vtermno,const char *buf,int count) {
drivers/lguest/Kconfig deleted +0 -13
@@ -1,13 +0,0 @@ -config LGUEST - tristate "Linux hypervisor example code" - depends on X86_32 && EVENTFD && TTY && PCI_DIRECT - select HVC_DRIVER - ---help--- - This is a very simple module which allows you to run - multiple instances of the same Linux kernel, using the - "lguest" command found in the tools/lguest directory. - - Note that "lguest" is pronounced to rhyme with "fell quest", - not "rustyvisor". See tools/lguest/lguest.txt. - - If unsure, say N. If curious, say M. If masochistic, say Y.
drivers/lguest/Makefile deleted +0 -26
@@ -1,26 +0,0 @@ -# Host requires the other files, which can be a module. -obj-$(CONFIG_LGUEST) += lg.o -lg-y = core.o hypercalls.o page_tables.o interrupts_and_traps.o \ - segments.o lguest_user.o - -lg-$(CONFIG_X86_32) += x86/switcher_32.o x86/core.o - -Preparation Preparation!: PREFIX=P -Guest: PREFIX=G -Drivers: PREFIX=D -Launcher: PREFIX=L -Host: PREFIX=H -Switcher: PREFIX=S -Mastery: PREFIX=M -Beer: - @for f in Preparation Guest Drivers Launcher Host Switcher Mastery; do echo "{==- $$f -==}"; make -s $$f; done; echo "{==-==}" -Preparation Preparation! Guest Drivers Launcher Host Switcher Mastery: - @sh ../../tools/lguest/extract $(PREFIX) `find ../../* -name '*.[chS]' -wholename '*lguest*'` -Puppy: - @clear - @printf " __ \n (___()'\`;\n /, /\`\n \\\\\\\"--\\\\\\ \n" - @sleep 2; clear; printf "\n\n Sit!\n\n"; sleep 1; clear - @printf " __ \n ()'\`; \n /\\|\` \n / | \n(/_)_|_ \n" - @sleep 2; clear; printf "\n\n Stand!\n\n"; sleep 1; clear - @printf " __ \n ()'\`; \n /\\|\` \n /._.= \n /| / \n(_\_)_ \n" - @sleep 2; clear; printf "\n\n Good puppy!\n\n"; sleep 1; clear
drivers/lguest/README deleted +0 -47
47 lines not on this page · raw message
drivers/lguest/core.c deleted +0 -398
398 lines not on this page · raw message
drivers/lguest/hypercalls.c deleted +0 -304
304 lines not on this page · raw message
drivers/lguest/interrupts_and_traps.c deleted +0 -706
141 lines not on this page · raw message
drivers/lguest/lg.h deleted +0 -258
258 lines not on this page · raw message
drivers/lguest/lguest_user.c deleted +0 -446
446 lines not on this page · raw message
drivers/lguest/page_tables.c deleted +0 -1239
1,239 lines not on this page · raw message
drivers/lguest/segments.c deleted +0 -228
228 lines not on this page · raw message
drivers/lguest/x86/core.c deleted +0 -724
724 lines not on this page · raw message
drivers/lguest/x86/switcher_32.S deleted +0 -388
388 lines not on this page · raw message
include/linux/lguest.h deleted +0 -73
73 lines not on this page · raw message
include/linux/lguest_launcher.h deleted +0 -44
44 lines not on this page · raw message
tools/lguest/extract deleted +0 -58
58 lines not on this page · raw message
tools/lguest/lguest.c deleted +0 -3420
3,420 lines not on this page · raw message
tools/lguest/lguest.txt deleted +0 -125
125 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.12.3
Part of the diff is not shown here. View the raw message.
tip-bot for Juergen Gross
merge bot[tip:x86/asm] x86/lguest: Remove lguest support
x86/lguest: Remove lguest support
Commit-ID: ecda85e70277ef24e44a1f6bc00243cebd19f985 Gitweb: http://git.kernel.org/tip/ecda85e70277ef24e44a1f6bc00243cebd19f985 Author: Juergen Gross <[email protected]> AuthorDate: Wed, 16 Aug 2017 19:31:57 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 24 Aug 2017 09:57:28 +0200
x86/lguest: Remove lguest support
Lguest seems to be rather unused these days. It has seen only patches ensuring it still builds the last two years and its official state is "Odd Fixes".
Remove it in order to be able to clean up the paravirt code.
--- MAINTAINERS | 11 - arch/x86/Kbuild | 3 - arch/x86/Kconfig | 2 - arch/x86/include/asm/lguest.h | 91 - arch/x86/include/asm/lguest_hcall.h | 74 - arch/x86/include/asm/processor.h | 2 +- arch/x86/include/uapi/asm/bootparam.h | 2 +- arch/x86/kernel/asm-offsets_32.c | 20 - arch/x86/kernel/head_32.S | 2 - arch/x86/kernel/platform-quirks.c | 1 - arch/x86/kvm/Kconfig | 1 - arch/x86/lguest/Kconfig | 14 - arch/x86/lguest/Makefile | 2 - arch/x86/lguest/boot.c | 1558 --------------- arch/x86/lguest/head_32.S | 192 -- drivers/Makefile | 1 - drivers/block/Kconfig | 2 +- drivers/char/Kconfig | 2 +- drivers/char/virtio_console.c | 2 +- drivers/lguest/Kconfig | 13 - drivers/lguest/Makefile | 26 - drivers/lguest/README | 47 - drivers/lguest/core.c | 398 ---- drivers/lguest/hypercalls.c | 304 --- drivers/lguest/interrupts_and_traps.c | 706 ------- drivers/lguest/lg.h | 258 --- drivers/lguest/lguest_user.c | 446 ----- drivers/lguest/page_tables.c | 1239 ------------ drivers/lguest/segments.c | 228 --- drivers/lguest/x86/core.c | 724 ------- drivers/lguest/x86/switcher_32.S | 388 ---- drivers/net/Kconfig | 2 +- drivers/tty/hvc/Kconfig | 2 +- drivers/virtio/Kconfig | 4 +- include/linux/lguest.h | 73 - include/linux/lguest_launcher.h | 44 - include/uapi/linux/virtio_ring.h | 4 +- tools/Makefile | 11 +- tools/lguest/.gitignore | 2 - tools/lguest/Makefile | 14 - tools/lguest/extract | 58 - tools/lguest/lguest.c | 3420 --------------------------------- tools/lguest/lguest.txt | 125 -- 43 files changed, 16 insertions(+), 10502 deletions(-)
MAINTAINERS +0 -11
@@ -7640,17 +7640,6 @@ T: git git://linuxtv.org/mkrufky/tuners.git S: Maintained F: drivers/media/dvb-frontends/lgdt3305.* -LGUEST -M: Rusty Russell <[email protected]> -L: [email protected] -W: http://lguest.ozlabs.org/ -S: Odd Fixes -F: arch/x86/include/asm/lguest*.h -F: arch/x86/lguest/ -F: drivers/lguest/ -F: include/linux/lguest*.h -F: tools/lguest/ - LIBATA PATA ARASAN COMPACT FLASH CONTROLLER M: Viresh Kumar <[email protected]> L: [email protected]
arch/x86/Kbuild +0 -3
@@ -10,9 +10,6 @@ obj-$(CONFIG_XEN) += xen/ # Hyper-V paravirtualization support obj-$(CONFIG_HYPERVISOR_GUEST) += hyperv/ -# lguest paravirtualization support -obj-$(CONFIG_LGUEST_GUEST) += lguest/ - obj-y += realmode/ obj-y += kernel/ obj-y += mm/
arch/x86/Kconfig +0 -2
@@ -777,8 +777,6 @@ config KVM_DEBUG_FS Statistics are displayed in debugfs filesystem. Enabling this option may incur significant overhead. -source "arch/x86/lguest/Kconfig" - config PARAVIRT_TIME_ACCOUNTING bool "Paravirtual steal time accounting" depends on PARAVIRT
arch/x86/include/asm/lguest.h deleted +0 -91
91 lines not on this page · raw message
arch/x86/include/asm/lguest_hcall.h deleted +0 -74
74 lines not on this page · raw message
arch/x86/include/asm/processor.h +1 -1
@@ -662,7 +662,7 @@ static inline void sync_core(void)* In case NMI unmasking or performance ever becomes a problem, * the next best option appears to be MOV-to-CR2 and an * unconditional jump. That sequence also works on all CPUs, -* but it will fault at CPL3 (i.e. Xen PV and lguest). +* but it will fault at CPL3 (i.e. Xen PV). * * CPUID is the conventional way, but it's nasty: it doesn't * exist on some 486-like CPUs, and it usually exits to a
arch/x86/include/uapi/asm/bootparam.h +1 -1
@@ -201,7 +201,7 @@ struct boot_params {* * @X86_SUBARCH_PC: Should be used if the hardware is enumerable using standard * PC mechanisms (PCI, ACPI) and doesn't need a special boot flow. -* @X86_SUBARCH_LGUEST: Used for x86 hypervisor demo, lguest +* @X86_SUBARCH_LGUEST: Used for x86 hypervisor demo, lguest, deprecated * @X86_SUBARCH_XEN: Used for Xen guest types which follow the PV boot path, * which start at asm startup_xen() entry point and later jump to the C * xen_start_kernel() entry point. Both domU and dom0 type of guests are
arch/x86/kernel/asm-offsets_32.c +0 -20
@@ -4,9 +4,6 @@#include <asm/ucontext.h> -#include <linux/lguest.h> -#include "../../../drivers/lguest/lg.h" -#define __SYSCALL_I386 (nr, sym, qual) [nr] = 1, static char syscalls[] = {#include <asm/syscalls_32.h>
@@ -62,23 +59,6 @@ void foo(void)OFFSET (stack_canary_offset, stack_canary, canary);#endif -#if defined(CONFIG_LGUEST ) || defined(CONFIG_LGUEST_GUEST ) || defined(CONFIG_LGUEST_MODULE ) -BLANK (); -OFFSET (LGUEST_DATA_irq_enabled, lguest_data, irq_enabled); -OFFSET (LGUEST_DATA_irq_pending, lguest_data, irq_pending); - -BLANK (); -OFFSET (LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc); -OFFSET (LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc); -OFFSET (LGUEST_PAGES_host_cr3, lguest_pages, state.host_cr3); -OFFSET (LGUEST_PAGES_host_sp, lguest_pages, state.host_sp); -OFFSET (LGUEST_PAGES_guest_gdt_desc, lguest_pages,state.guest_gdt_desc); -OFFSET (LGUEST_PAGES_guest_idt_desc, lguest_pages,state.guest_idt_desc); -OFFSET (LGUEST_PAGES_guest_gdt, lguest_pages, state.guest_gdt); -OFFSET (LGUEST_PAGES_regs_trapnum, lguest_pages, regs.trapnum); -OFFSET (LGUEST_PAGES_regs_errcode, lguest_pages, regs.errcode); -OFFSET (LGUEST_PAGES_regs, lguest_pages, regs); -#endif BLANK ();DEFINE (__NR_syscall_max,sizeof (syscalls) -1 );DEFINE (NR_syscalls,sizeof (syscalls));
arch/x86/kernel/head_32.S +0 -2
@@ -155,7 +155,6 @@ ENTRY(startup_32) jmp *%eax .Lbad_subarch: -WEAK(lguest_entry) WEAK(xen_entry) /* Unknown implementation; there's really nothing we can do at this point. */
@@ -165,7 +164,6 @@ WEAK(xen_entry) subarch_entries: .long .Ldefault_entry /* normal x86/PC */ - .long lguest_entry /* lguest hypervisor */ .long xen_entry /* Xen hypervisor */ .long .Ldefault_entry /* Moorestown MID */ num_subarch_entries = (. - subarch_entries) / 4
arch/x86/kernel/platform-quirks.c +0 -1
@@ -16,7 +16,6 @@ void __init x86_early_init_platform_quirks(void) x86_platform.legacy.reserve_bios_regions =1 ;break ;case X86_SUBARCH_XEN : -case X86_SUBARCH_LGUEST : x86_platform.legacy.devices.pnpbios =0 ; x86_platform.legacy.rtc =0 ;break ;
arch/x86/kvm/Kconfig +0 -1
@@ -89,6 +89,5 @@ config KVM_MMU_AUDIT # OK, it's a little counter-intuitive to do this, but it puts it neatly under # the virtualization menu. source drivers/vhost/Kconfig -source drivers/lguest/Kconfig endif # VIRTUALIZATION
arch/x86/lguest/Kconfig deleted +0 -14
@@ -1,14 +0,0 @@ -config LGUEST_GUEST - bool "Lguest guest support" - depends on X86_32 && PARAVIRT && PCI - select TTY - select VIRTUALIZATION - select VIRTIO - select VIRTIO_CONSOLE - help - Lguest is a tiny in-kernel hypervisor. Selecting this will - allow your kernel to boot under lguest. This option will increase - your kernel size by about 10k. If in doubt, say N. - - If you say Y here, make sure you say Y (or M) to the virtio block - and net drivers which lguest needs.
arch/x86/lguest/Makefile deleted +0 -2
@@ -1,2 +0,0 @@ -obj-y := head_32.o boot.o -CFLAGS_boot.o := $(call cc-option, -fno-stack-protector)
arch/x86/lguest/boot.c deleted +0 -1558
1,558 lines not on this page · raw message
arch/x86/lguest/head_32.S deleted +0 -192
192 lines not on this page · raw message
drivers/Makefile +0 -1
@@ -125,7 +125,6 @@ obj-$(CONFIG_ACCESSIBILITY) += accessibility/ obj-$(CONFIG_ISDN) += isdn/ obj-$(CONFIG_EDAC) += edac/ obj-$(CONFIG_EISA) += eisa/ -obj-y += lguest/ obj-$(CONFIG_CPU_FREQ) += cpufreq/ obj-$(CONFIG_CPU_IDLE) += cpuidle/ obj-y += mmc/
drivers/block/Kconfig +1 -1
@@ -470,7 +470,7 @@ config VIRTIO_BLK depends on VIRTIO ---help--- This is the virtual block driver for virtio. It can be used with - lguest or QEMU based VMMs (like KVM or Xen). Say Y or M. + QEMU based VMMs (like KVM or Xen). Say Y or M. config VIRTIO_BLK_SCSI bool "SCSI passthrough request for the Virtio block driver"
drivers/char/Kconfig +1 -1
@@ -161,7 +161,7 @@ config VIRTIO_CONSOLE depends on VIRTIO && TTY select HVC_DRIVER help - Virtio console for use with lguest and other hypervisors. + Virtio console for use with hypervisors. Also serves as a general-purpose serial device for data transfer between the guest and host. Character devices at
drivers/char/virtio_console.c +1 -1
@@ -1130,7 +1130,7 @@ static const struct file_operations port_fops = {* We turn the characters into a scatter-gather list, add it to the * output queue and then kick the Host. Then we sit here waiting for * it to finish: inefficient in theory, but in practice -* implementations will do it immediately (lguest's Launcher does). +* implementations will do it immediately. */ static int put_chars (u32 vtermno,const char *buf,int count) {
drivers/lguest/Kconfig deleted +0 -13
@@ -1,13 +0,0 @@ -config LGUEST - tristate "Linux hypervisor example code" - depends on X86_32 && EVENTFD && TTY && PCI_DIRECT - select HVC_DRIVER - ---help--- - This is a very simple module which allows you to run - multiple instances of the same Linux kernel, using the - "lguest" command found in the tools/lguest directory. - - Note that "lguest" is pronounced to rhyme with "fell quest", - not "rustyvisor". See tools/lguest/lguest.txt. - - If unsure, say N. If curious, say M. If masochistic, say Y.
drivers/lguest/Makefile deleted +0 -26
@@ -1,26 +0,0 @@ -# Host requires the other files, which can be a module. -obj-$(CONFIG_LGUEST) += lg.o -lg-y = core.o hypercalls.o page_tables.o interrupts_and_traps.o \ - segments.o lguest_user.o - -lg-$(CONFIG_X86_32) += x86/switcher_32.o x86/core.o - -Preparation Preparation!: PREFIX=P -Guest: PREFIX=G -Drivers: PREFIX=D -Launcher: PREFIX=L -Host: PREFIX=H -Switcher: PREFIX=S -Mastery: PREFIX=M -Beer: - @for f in Preparation Guest Drivers Launcher Host Switcher Mastery; do echo "{==- $$f -==}"; make -s $$f; done; echo "{==-==}" -Preparation Preparation! Guest Drivers Launcher Host Switcher Mastery: - @sh ../../tools/lguest/extract $(PREFIX) `find ../../* -name '*.[chS]' -wholename '*lguest*'` -Puppy: - @clear - @printf " __ \n (___()'\`;\n /, /\`\n \\\\\\\"--\\\\\\ \n" - @sleep 2; clear; printf "\n\n Sit!\n\n"; sleep 1; clear - @printf " __ \n ()'\`; \n /\\|\` \n / | \n(/_)_|_ \n" - @sleep 2; clear; printf "\n\n Stand!\n\n"; sleep 1; clear - @printf " __ \n ()'\`; \n /\\|\` \n /._.= \n /| / \n(_\_)_ \n" - @sleep 2; clear; printf "\n\n Good puppy!\n\n"; sleep 1; clear
drivers/lguest/README deleted +0 -47
47 lines not on this page · raw message
drivers/lguest/core.c deleted +0 -398
398 lines not on this page · raw message
drivers/lguest/hypercalls.c deleted +0 -304
304 lines not on this page · raw message
drivers/lguest/interrupts_and_traps.c deleted +0 -706
141 lines not on this page · raw message
drivers/lguest/lg.h deleted +0 -258
258 lines not on this page · raw message
drivers/lguest/lguest_user.c deleted +0 -446
446 lines not on this page · raw message
drivers/lguest/page_tables.c deleted +0 -1239
1,239 lines not on this page · raw message
drivers/lguest/segments.c deleted +0 -228
228 lines not on this page · raw message
drivers/lguest/x86/core.c deleted +0 -724
724 lines not on this page · raw message
drivers/lguest/x86/switcher_32.S deleted +0 -388
388 lines not on this page · raw message
include/linux/lguest.h deleted +0 -73
73 lines not on this page · raw message
include/linux/lguest_launcher.h deleted +0 -44
44 lines not on this page · raw message
tools/lguest/extract deleted +0 -58
58 lines not on this page · raw message
tools/lguest/lguest.c deleted +0 -3420
3,420 lines not on this page · raw message
tools/lguest/lguest.txt deleted +0 -125
125 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Quoted 7 lines · Juergen Gross
Cleanup special cases of paravirt patching:
- Xen doesn't need a custom patching function, it can use
paravirt_patch_default()- Remove lguest completely from the tree. A LKML mail asking for any users 3 months ago did not reveal any need for keeping lguest [1].
Shit, I didn't see that mail :(
Posting on lkml is a terrible way to find users (you should generally remove the config option, wait a year, then see, as that gives end users time to find it).
In this case though, I think it's time. I intended for it to be removed with the paravirt infrastructure itself, but I think that's getting closer anyway.
Quoted 94 lines
In case the patches make it to the tree there is quite some potential for further simplification of paravirt stuff. Especially most of the pv operations can be put under the
CONFIG_XEN_PVumbrella.Changes in V2:
- drop patch 3 (removal of vsmp support)
- patch 1: remove even more stuff no longer needed withoutxen_patch()(Peter Zijlstra)[1]: https://lkml.org/lkml/2017/5/15/502
Juergen Gross (2):
paravirt,xen: removexen_patch()
x86/lguest: remove lguest supportMAINTAINERS | 11 - arch/x86/Kbuild | 3 - arch/x86/Kconfig | 2 - arch/x86/include/asm/lguest.h | 91 - arch/x86/include/asm/lguest_hcall.h | 74 - arch/x86/include/asm/processor.h | 2 +- arch/x86/include/uapi/asm/bootparam.h | 2 +- arch/x86/kernel/asm-offsets_32.c | 20 - arch/x86/kernel/head_32.S | 2 - arch/x86/kernel/platform-quirks.c | 1 - arch/x86/kvm/Kconfig | 1 - arch/x86/lguest/Kconfig | 14 - arch/x86/lguest/Makefile | 2 - arch/x86/lguest/boot.c | 1558 --------------- arch/x86/lguest/head_32.S | 192 -- arch/x86/xen/enlighten_pv.c | 59 +- arch/x86/xen/xen-asm.S | 24 +- arch/x86/xen/xen-asm.h | 12 - arch/x86/xen/xen-asm_32.S | 27 +- arch/x86/xen/xen-asm_64.S | 20 +- arch/x86/xen/xen-ops.h | 15 +- drivers/Makefile | 1 - drivers/block/Kconfig | 2 +- drivers/char/Kconfig | 2 +- drivers/char/virtio_console.c | 2 +- drivers/lguest/Kconfig | 13 - drivers/lguest/Makefile | 26 - drivers/lguest/README | 47 - drivers/lguest/core.c | 398 ---- drivers/lguest/hypercalls.c | 304 --- drivers/lguest/interrupts_and_traps.c | 706 ------- drivers/lguest/lg.h | 258 --- drivers/lguest/lguest_user.c | 446 ----- drivers/lguest/page_tables.c | 1239 ------------ drivers/lguest/segments.c | 228 --- drivers/lguest/x86/core.c | 724 ------- drivers/lguest/x86/switcher_32.S | 388 ---- drivers/net/Kconfig | 2 +- drivers/tty/hvc/Kconfig | 2 +- drivers/virtio/Kconfig | 4 +- include/linux/lguest.h | 73 - include/linux/lguest_launcher.h | 44 - include/uapi/linux/virtio_ring.h | 4 +- tools/Makefile | 11 +- tools/lguest/.gitignore | 2 - tools/lguest/Makefile | 14 - tools/lguest/extract | 58 - tools/lguest/lguest.c | 3420 --------------------------------- tools/lguest/lguest.txt | 125 -- 49 files changed, 36 insertions(+), 10639 deletions(-) delete mode 100644 arch/x86/include/asm/lguest.h delete mode 100644 arch/x86/include/asm/lguest_hcall.h delete mode 100644 arch/x86/lguest/Kconfig delete mode 100644 arch/x86/lguest/Makefile delete mode 100644 arch/x86/lguest/boot.c delete mode 100644 arch/x86/lguest/head_32.S delete mode 100644 arch/x86/xen/xen-asm.h delete mode 100644 drivers/lguest/Kconfig delete mode 100644 drivers/lguest/Makefile delete mode 100644 drivers/lguest/README delete mode 100644 drivers/lguest/core.c delete mode 100644 drivers/lguest/hypercalls.c delete mode 100644 drivers/lguest/interrupts_and_traps.c delete mode 100644 drivers/lguest/lg.h delete mode 100644 drivers/lguest/lguest_user.c delete mode 100644 drivers/lguest/page_tables.c delete mode 100644 drivers/lguest/segments.c delete mode 100644 drivers/lguest/x86/core.c delete mode 100644 drivers/lguest/x86/switcher_32.S delete mode 100644 include/linux/lguest.h delete mode 100644 include/linux/lguest_launcher.h delete mode 100644 tools/lguest/.gitignore delete mode 100644 tools/lguest/Makefile delete mode 100644 tools/lguest/extract delete mode 100644 tools/lguest/lguest.c delete mode 100644 tools/lguest/lguest.txtSignature · 1 line
2.12.3
Quoted 7 lines · Juergen Gross
Cleanup special cases of paravirt patching:
- Xen doesn't need a custom patching function, it can use
paravirt_patch_default()- Remove lguest completely from the tree. A LKML mail asking for any users 3 months ago did not reveal any need for keeping lguest [1].
Shit, I didn't see that mail :(
Posting on lkml is a terrible way to find users (you should generally remove the config option, wait a year, then see, as that gives end users time to find it).
In this case though, I think it's time. I intended for it to be removed with the paravirt infrastructure itself, but I think that's getting closer anyway.
Quoted 83 lines
In case the patches make it to the tree there is quite some potential for further simplification of paravirt stuff. Especially most of the pv operations can be put under the
CONFIG_XEN_PVumbrella.Changes in V2:
- drop patch 3 (removal of vsmp support)
- patch 1: remove even more stuff no longer needed withoutxen_patch()(Peter Zijlstra)[1]: https://lkml.org/lkml/2017/5/15/502
Juergen Gross (2):
paravirt,xen: removexen_patch()
x86/lguest: remove lguest supportMAINTAINERS | 11 - arch/x86/Kbuild | 3 - arch/x86/Kconfig | 2 - arch/x86/include/asm/lguest.h | 91 - arch/x86/include/asm/lguest_hcall.h | 74 - arch/x86/include/asm/processor.h | 2 +- arch/x86/include/uapi/asm/bootparam.h | 2 +- arch/x86/kernel/asm-offsets_32.c | 20 - arch/x86/kernel/head_32.S | 2 - arch/x86/kernel/platform-quirks.c | 1 - arch/x86/kvm/Kconfig | 1 - arch/x86/lguest/Kconfig | 14 - arch/x86/lguest/Makefile | 2 - arch/x86/lguest/boot.c | 1558 --------------- arch/x86/lguest/head_32.S | 192 -- arch/x86/xen/enlighten_pv.c | 59 +- arch/x86/xen/xen-asm.S | 24 +- arch/x86/xen/xen-asm.h | 12 - arch/x86/xen/xen-asm_32.S | 27 +- arch/x86/xen/xen-asm_64.S | 20 +- arch/x86/xen/xen-ops.h | 15 +- drivers/Makefile | 1 - drivers/block/Kconfig | 2 +- drivers/char/Kconfig | 2 +- drivers/char/virtio_console.c | 2 +- drivers/lguest/Kconfig | 13 - drivers/lguest/Makefile | 26 - drivers/lguest/README | 47 - drivers/lguest/core.c | 398 ---- drivers/lguest/hypercalls.c | 304 --- drivers/lguest/interrupts_and_traps.c | 706 ------- drivers/lguest/lg.h | 258 --- drivers/lguest/lguest_user.c | 446 ----- drivers/lguest/page_tables.c | 1239 ------------ drivers/lguest/segments.c | 228 --- drivers/lguest/x86/core.c | 724 ------- drivers/lguest/x86/switcher_32.S | 388 ---- drivers/net/Kconfig | 2 +- drivers/tty/hvc/Kconfig | 2 +- drivers/virtio/Kconfig | 4 +- include/linux/lguest.h | 73 - include/linux/lguest_launcher.h | 44 - include/uapi/linux/virtio_ring.h | 4 +- tools/Makefile | 11 +- tools/lguest/.gitignore | 2 - tools/lguest/Makefile | 14 - tools/lguest/extract | 58 - tools/lguest/lguest.c | 3420 --------------------------------- tools/lguest/lguest.txt | 125 -- 49 files changed, 36 insertions(+), 10639 deletions(-) delete mode 100644 arch/x86/include/asm/lguest.h delete mode 100644 arch/x86/include/asm/lguest_hcall.h delete mode 100644 arch/x86/lguest/Kconfig delete mode 100644 arch/x86/lguest/Makefile delete mode 100644 arch/x86/lguest/boot.c delete mode 100644 arch/x86/lguest/head_32.S delete mode 100644 arch/x86/xen/xen-asm.h delete mode 100644 drivers/lguest/Kconfig delete mode 100644 drivers/lguest/Makefile delete mode 100644 drivers/lguest/README delete mode 100644 drivers/lguest/core.c delete mode 100644 drivers/lguest/hypercalls.c delete mode 100644 drivers/lguest/interrupts_and_traps.c delete mode 100644 drivers/lguest/lg.h delete mode 100644 drivers/lguest/lguest_user.c delete mode 100644 drivers/lguest/page_tables.c delete mode 100644 drivers/lguest/segments.c delete mode 100644 drivers/lguest/x86/core.c
Quoted 11 lines
delete mode 100644 drivers/lguest/x86/switcher_32.S delete mode 100644 include/linux/lguest.h delete mode 100644 include/linux/lguest_launcher.h delete mode 100644 tools/lguest/.gitignore delete mode 100644 tools/lguest/Makefile delete mode 100644 tools/lguest/extract delete mode 100644 tools/lguest/lguest.c delete mode 100644 tools/lguest/lguest.txtSignature · 1 line
2.12.3
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel