remove CONFIG_X86_SUPERVISOR_MODE_KERNEL as x86_32 builds are unsupported
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 7 Jan 2015 10:15:49 +0000 (11:15 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 7 Jan 2015 10:15:49 +0000 (11:15 +0100)
supervisor_mode_kernel was an x86_32-only feature which permitted a PV dom0 to
run in ring 0, but at the expense of not being able to start any domUs.

As the x86_32 Xen build has been removed from tree, removing the remaining
supervisor_mode_kernel code.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/Rules.mk
xen/arch/x86/domain.c
xen/arch/x86/domain_build.c
xen/common/domctl.c
xen/common/kernel.c
xen/include/asm-arm/config.h
xen/include/asm-x86/config.h
xen/include/asm-x86/desc.h

index 6775cb52e6ed2b82fccbac835492dff60fad4e44..ef8c222dca2c9683c457100d8d5970cad538aca1 100644 (file)
@@ -15,12 +15,6 @@ HAS_GDBSX := y
 HAS_PDX := y
 xenoprof := y
 
-#
-# If you change any of these configuration options then you must
-# 'make clean' before rebuilding.
-#
-supervisor_mode_kernel ?= n
-
 CFLAGS += -I$(BASEDIR)/include 
 CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
 CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default
@@ -34,10 +28,6 @@ $(call as-insn-check,CFLAGS,CC,"vmcall",-DHAVE_GAS_VMX)
 $(call as-insn-check,CFLAGS,CC,"invept (%rax)$$(comma)%rax",-DHAVE_GAS_EPT)
 $(call as-insn-check,CFLAGS,CC,"rdfsbase %rax",-DHAVE_GAS_FSGSBASE)
 
-ifeq ($(supervisor_mode_kernel),y)
-CFLAGS += -DCONFIG_X86_SUPERVISOR_MODE_KERNEL=1
-endif
-
 x86 := y
 x86_32 := n
 x86_64 := y
index 11c7d9fdb7fa55af55e7d43a7110ff62f21e7e04..b699510799a54b7c78fb2cd6a77a7a749645d54f 100644 (file)
@@ -1726,9 +1726,6 @@ unsigned long hypercall_create_continuation(
         }
         else
         {
-            if ( supervisor_mode_kernel )
-                regs->eip &= ~31; /* re-execute entire hypercall entry stub */
-
             for ( i = 0; *p != '\0'; i++ )
             {
                 arg = next_arg(p, args);
index 7993b17e0fe1855ec303fde2a94b39b1090703e4..7a912e9e3565bacd3ed36de476f4a0a4ff81af6a 100644 (file)
@@ -1410,24 +1410,12 @@ int __init construct_dom0(
             paging_update_paging_modes(v);
     }
 
-    if ( supervisor_mode_kernel )
-    {
-        v->arch.pv_vcpu.kernel_ss &= ~3;
-        v->arch.user_regs.ss &= ~3;
-        v->arch.user_regs.es &= ~3;
-        v->arch.user_regs.ds &= ~3;
-        v->arch.user_regs.fs &= ~3;
-        v->arch.user_regs.gs &= ~3;
-        printk("Dom0 runs in ring 0 (supervisor mode)\n");
-        if ( !test_bit(XENFEAT_supervisor_mode_kernel,
-                       parms.f_supported) )
-            panic("Dom0 does not support supervisor-mode execution");
-    }
-    else
-    {
-        if ( test_bit(XENFEAT_supervisor_mode_kernel, parms.f_required) )
-            panic("Dom0 requires supervisor-mode execution");
-    }
+    /*
+     * PVH Fixme: XENFEAT_supervisor_mode_kernel has been reused in PVH with a
+     * different meaning.
+     */
+    if ( test_bit(XENFEAT_supervisor_mode_kernel, parms.f_required) )
+        panic("Dom0 requires supervisor-mode execution");
 
     rc = 0;
 
index 8bca6da738b8ec17495c963d4026df3273c80ffa..ee578c0042559aa85b29d5434bb8de80fbcec76e 100644 (file)
@@ -534,8 +534,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
         unsigned int domcr_flags;
 
         ret = -EINVAL;
-        if ( supervisor_mode_kernel ||
-             (op->u.createdomain.flags &
+        if ( (op->u.createdomain.flags &
              ~(XEN_DOMCTL_CDF_hvm_guest
                | XEN_DOMCTL_CDF_pvh_guest
                | XEN_DOMCTL_CDF_hap
index d23c4229df13c3ac9c5fb44bf64d142d19162c71..0d9e51926772778c16770e94cbaf6f1e3d9a4c20 100644 (file)
@@ -308,8 +308,6 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
                 fi.submap |= 
                     (1U << XENFEAT_writable_page_tables) |
                     (1U << XENFEAT_auto_translated_physmap);
-            if ( supervisor_mode_kernel )
-                fi.submap |= 1U << XENFEAT_supervisor_mode_kernel;
             if ( is_hardware_domain(current->domain) )
                 fi.submap |= 1U << XENFEAT_dom0;
 #ifdef CONFIG_X86
index 264e2c17f1368de67fc603fe5f9f849b6417180e..9e165db3013c228b62742c382886a28ff28446db 100644 (file)
@@ -196,8 +196,6 @@ extern unsigned long xenheap_phys_end;
 extern unsigned long frametable_virt_end;
 #endif
 
-#define supervisor_mode_kernel (0)
-
 #define watchdog_disable() ((void)0)
 #define watchdog_enable()  ((void)0)
 
index 3802721837397e6e9b70a0971e68280f0c5a0227..ad52d5b94219d74c12db0c859cdf69c69218fd4e 100644 (file)
 /* Maximum we can support with current vLAPIC ID mapping. */
 #define MAX_HVM_VCPUS 128
 
-#ifdef CONFIG_X86_SUPERVISOR_MODE_KERNEL
-# define supervisor_mode_kernel (1)
-#else
-# define supervisor_mode_kernel (0)
-#endif
-
 /* Linkage for x86 */
 #define __ALIGN .align 16,0x90
 #define __ALIGN_STR ".align 16,0x90"
index 225913ac12922c392068f676bb5caa96bfa623f1..20c47d2ddee9ca9682350824d5a576b6989c7eca 100644 (file)
     (sel) = (((sel) & 3) >= _rpl) ? (sel) : (((sel) & ~3) | _rpl); \
 })
 
-/* Stack selectors don't need fixing up if the kernel runs in ring 0. */
-#ifdef CONFIG_X86_SUPERVISOR_MODE_KERNEL
-#define fixup_guest_stack_selector(d, ss) ((void)0)
-#else
 #define fixup_guest_stack_selector(d, ss) __fixup_guest_selector(d, ss)
-#endif
-
-/*
- * Code selectors are always fixed up. It allows the Xen exit stub to detect
- * return to guest context, even when the guest kernel runs in ring 0.
- */
 #define fixup_guest_code_selector(d, cs)  __fixup_guest_selector(d, cs)
 
 /*