xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: xen-devel@lists.xensource.com
Cc: jeremy@goop.org, virtualization@lists.linux-foundation.org,
	stefano.stabellini@eu.citrix.com, konrad.wilk@oracle.com
Subject: [PATCH] xen: remove CONFIG_XEN_DOM0 compile option
Date: Fri,  6 Jan 2012 17:39:50 +0100	[thread overview]
Message-ID: <1325867990-15018-1-git-send-email-drjones@redhat.com> (raw)

XEN_DOM0 is a silent option that has been automatically selected when
CONFIG_XEN is selected since 6b0661a5e6fbf. If this option was changed
to a menu configurable option then it would only give users the ability
to compile out about 100 kbytes of code. As that option makes little
sense to choose, and the option isn't menu selectable anyway, then we
can clean up some code by simply removing it. Also remove
XEN_PRIVILEGED_GUEST as it's just an alias for XEN_DOM0.

I compile tested this on a latest pull using an F16 config. The compile
succeeded and 'make oldconfig' only removed these two options as
expected.

CONFIG_XEN_DOM0=y
CONFIG_XEN_PRIVILEGED_GUEST=y

Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 arch/x86/include/asm/xen/pci.h |   21 +--------------------
 arch/x86/pci/xen.c             |    6 ------
 arch/x86/xen/Kconfig           |   10 ----------
 arch/x86/xen/Makefile          |    3 +--
 arch/x86/xen/xen-ops.h         |    7 -------
 drivers/xen/Kconfig            |    3 ++-
 drivers/xen/Makefile           |    3 +--
 drivers/xen/xenfs/Makefile     |    3 +--
 include/xen/xen.h              |   11 +++--------
 9 files changed, 9 insertions(+), 58 deletions(-)

diff --git a/arch/x86/include/asm/xen/pci.h b/arch/x86/include/asm/xen/pci.h
index 968d57d..b423889 100644
--- a/arch/x86/include/asm/xen/pci.h
+++ b/arch/x86/include/asm/xen/pci.h
@@ -13,30 +13,11 @@ static inline int pci_xen_hvm_init(void)
 	return -1;
 }
 #endif
-#if defined(CONFIG_XEN_DOM0)
+
 int __init pci_xen_initial_domain(void);
 int xen_find_device_domain_owner(struct pci_dev *dev);
 int xen_register_device_domain_owner(struct pci_dev *dev, uint16_t domain);
 int xen_unregister_device_domain_owner(struct pci_dev *dev);
-#else
-static inline int __init pci_xen_initial_domain(void)
-{
-	return -1;
-}
-static inline int xen_find_device_domain_owner(struct pci_dev *dev)
-{
-	return -1;
-}
-static inline int xen_register_device_domain_owner(struct pci_dev *dev,
-						   uint16_t domain)
-{
-	return -1;
-}
-static inline int xen_unregister_device_domain_owner(struct pci_dev *dev)
-{
-	return -1;
-}
-#endif
 
 #if defined(CONFIG_PCI_MSI)
 #if defined(CONFIG_PCI_XEN)
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index 492ade8..e298726 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -108,7 +108,6 @@ static int acpi_register_gsi_xen_hvm(struct device *dev, u32 gsi,
 				 false /* no mapping of GSI to PIRQ */);
 }
 
-#ifdef CONFIG_XEN_DOM0
 static int xen_register_gsi(u32 gsi, int gsi_override, int triggering, int polarity)
 {
 	int rc, irq;
@@ -143,7 +142,6 @@ static int acpi_register_gsi_xen(struct device *dev, u32 gsi,
 	return xen_register_gsi(gsi, -1 /* no GSI override */, trigger, polarity);
 }
 #endif
-#endif
 
 #if defined(CONFIG_PCI_MSI)
 #include <linux/msi.h>
@@ -251,7 +249,6 @@ error:
 	return irq;
 }
 
-#ifdef CONFIG_XEN_DOM0
 static bool __read_mostly pci_seg_supported = true;
 
 static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
@@ -324,7 +321,6 @@ static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
 out:
 	return ret;
 }
-#endif
 
 static void xen_teardown_msi_irqs(struct pci_dev *dev)
 {
@@ -392,7 +388,6 @@ int __init pci_xen_hvm_init(void)
 	return 0;
 }
 
-#ifdef CONFIG_XEN_DOM0
 static __init void xen_setup_acpi_sci(void)
 {
 	int rc;
@@ -539,4 +534,3 @@ int xen_unregister_device_domain_owner(struct pci_dev *dev)
 	return 0;
 }
 EXPORT_SYMBOL_GPL(xen_unregister_device_domain_owner);
-#endif
diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig
index 26c731a..3c7e89a 100644
--- a/arch/x86/xen/Kconfig
+++ b/arch/x86/xen/Kconfig
@@ -13,16 +13,6 @@ config XEN
 	  kernel to boot in a paravirtualized environment under the
 	  Xen hypervisor.
 
-config XEN_DOM0
-	def_bool y
-	depends on XEN && PCI_XEN && SWIOTLB_XEN
-	depends on X86_LOCAL_APIC && X86_IO_APIC && ACPI && PCI
-
-# Dummy symbol since people have come to rely on the PRIVILEGED_GUEST
-# name in tools.
-config XEN_PRIVILEGED_GUEST
-	def_bool XEN_DOM0
-
 config XEN_PVHVM
 	def_bool y
 	depends on XEN && PCI && X86_LOCAL_APIC
diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile
index add2c2d..b2d4c4b 100644
--- a/arch/x86/xen/Makefile
+++ b/arch/x86/xen/Makefile
@@ -13,12 +13,11 @@ CFLAGS_mmu.o			:= $(nostackp)
 obj-y		:= enlighten.o setup.o multicalls.o mmu.o irq.o \
 			time.o xen-asm.o xen-asm_$(BITS).o \
 			grant-table.o suspend.o platform-pci-unplug.o \
-			p2m.o
+			p2m.o vga.o
 
 obj-$(CONFIG_EVENT_TRACING) += trace.o
 
 obj-$(CONFIG_SMP)		+= smp.o
 obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o
 obj-$(CONFIG_XEN_DEBUG_FS)	+= debugfs.o
-obj-$(CONFIG_XEN_DOM0)		+= vga.o
 obj-$(CONFIG_SWIOTLB_XEN)	+= pci-swiotlb-xen.o
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index b095739..d9dbbca 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -90,14 +90,7 @@ static inline void xen_uninit_lock_cpu(int cpu)
 
 struct dom0_vga_console_info;
 
-#ifdef CONFIG_XEN_DOM0
 void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size);
-#else
-static inline void __init xen_init_vga(const struct dom0_vga_console_info *info,
-				       size_t size)
-{
-}
-#endif
 
 /* Declare an asm function, along with symbols needed to make it
    inlineable */
diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index 8795480..0725228 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -78,8 +78,9 @@ config XEN_DEV_EVTCHN
 
 config XEN_BACKEND
 	bool "Backend driver support"
-	depends on XEN_DOM0
 	default y
+	depends on XEN && PCI_XEN && SWIOTLB_XEN
+	depends on X86_LOCAL_APIC && X86_IO_APIC && ACPI && PCI
 	help
 	  Support for backend device drivers that provide I/O services
 	  to other virtual machines.
diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile
index 974fffd..7e61662 100644
--- a/drivers/xen/Makefile
+++ b/drivers/xen/Makefile
@@ -1,4 +1,4 @@
-obj-y	+= grant-table.o features.o events.o manage.o balloon.o
+obj-y	+= grant-table.o features.o events.o manage.o balloon.o pci.o
 obj-y	+= xenbus/
 
 nostackp := $(call cc-option, -fno-stack-protector)
@@ -17,7 +17,6 @@ obj-$(CONFIG_XEN_SYS_HYPERVISOR)	+= sys-hypervisor.o
 obj-$(CONFIG_XEN_PVHVM)			+= platform-pci.o
 obj-$(CONFIG_XEN_TMEM)			+= tmem.o
 obj-$(CONFIG_SWIOTLB_XEN)		+= swiotlb-xen.o
-obj-$(CONFIG_XEN_DOM0)			+= pci.o
 obj-$(CONFIG_XEN_PCIDEV_BACKEND)	+= xen-pciback/
 
 xen-evtchn-y				:= evtchn.o
diff --git a/drivers/xen/xenfs/Makefile b/drivers/xen/xenfs/Makefile
index 4fde944..d20c060 100644
--- a/drivers/xen/xenfs/Makefile
+++ b/drivers/xen/xenfs/Makefile
@@ -1,4 +1,3 @@
 obj-$(CONFIG_XENFS) += xenfs.o
 
-xenfs-y			  = super.o xenbus.o privcmd.o
-xenfs-$(CONFIG_XEN_DOM0) += xenstored.o
+xenfs-y			  = super.o xenbus.o privcmd.o xenstored.o
diff --git a/include/xen/xen.h b/include/xen/xen.h
index a164024..d814ef7 100644
--- a/include/xen/xen.h
+++ b/include/xen/xen.h
@@ -1,6 +1,9 @@
 #ifndef _XEN_XEN_H
 #define _XEN_XEN_H
 
+#include <xen/interface/xen.h>
+#include <asm/xen/hypervisor.h>
+
 enum xen_domain_type {
 	XEN_NATIVE,		/* running on bare hardware    */
 	XEN_PV_DOMAIN,		/* running in a PV domain      */
@@ -18,15 +21,7 @@ extern enum xen_domain_type xen_domain_type;
 				 xen_domain_type == XEN_PV_DOMAIN)
 #define xen_hvm_domain()	(xen_domain() &&			\
 				 xen_domain_type == XEN_HVM_DOMAIN)
-
-#ifdef CONFIG_XEN_DOM0
-#include <xen/interface/xen.h>
-#include <asm/xen/hypervisor.h>
-
 #define xen_initial_domain()	(xen_pv_domain() && \
 				 xen_start_info->flags & SIF_INITDOMAIN)
-#else  /* !CONFIG_XEN_DOM0 */
-#define xen_initial_domain()	(0)
-#endif	/* CONFIG_XEN_DOM0 */
 
 #endif	/* _XEN_XEN_H */
-- 
1.7.7.5

             reply	other threads:[~2012-01-06 16:39 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-06 16:39 Andrew Jones [this message]
2012-01-06 16:59 ` [PATCH] xen: remove CONFIG_XEN_DOM0 compile option Stefano Stabellini
2012-01-09 10:37   ` [Xen-devel] " Andrew Jones
2012-01-09 11:39     ` Stefano Stabellini
2012-01-09 14:56       ` Konrad Rzeszutek Wilk
2012-01-09 16:12         ` Stefano Stabellini
2012-01-09 17:04           ` Konrad Rzeszutek Wilk
2012-01-09 17:38             ` Andrew Jones
2012-01-09 18:44               ` Stefano Stabellini
2012-01-10  0:57                 ` Jeremy Fitzhardinge
2012-01-11 15:37                   ` [Xen-devel] " Andrew Jones
2012-01-11 16:19                     ` Konrad Rzeszutek Wilk
2012-01-11 16:36                       ` [PATCH 1/4] xen kconfig: keep XEN_XENBUS_FRONTEND builtin Andrew Jones
2012-01-11 16:36                         ` [PATCH 2/4 v2] xen kconfig: relax INPUT_XEN_KBDDEV_FRONTEND deps Andrew Jones
2012-01-11 17:30                           ` Konrad Rzeszutek Wilk
2012-01-12 10:59                             ` Andrew Jones
2012-01-11 16:36                         ` [PATCH 3/4 v2] xen kconfig: add dom0 support help text Andrew Jones
2012-01-11 16:36                         ` [PATCH 4/4] xen kconfig: describe xen tmem in the config menu Andrew Jones
2012-01-11 17:35                           ` Konrad Rzeszutek Wilk
2012-01-12 10:54                             ` Andrew Jones
2012-01-11 17:28                         ` [PATCH 1/4] xen kconfig: keep XEN_XENBUS_FRONTEND builtin Konrad Rzeszutek Wilk
2012-01-12 10:49                           ` [Xen-devel] " Andrew Jones
2012-01-12 14:37                             ` Konrad Rzeszutek Wilk
2012-01-12 15:42                               ` Bastian Blank
2012-01-12 17:46                                 ` [Xen-devel] " Andrew Jones
2012-01-11 17:27                       ` [PATCH] xen: remove CONFIG_XEN_DOM0 compile option Konrad Rzeszutek Wilk
2012-01-12 10:53                         ` [Xen-devel] " Andrew Jones
2012-01-09 18:12             ` Stefano Stabellini
2012-01-09 17:26           ` Andrew Jones
2012-01-06 17:16 ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1325867990-15018-1-git-send-email-drjones@redhat.com \
    --to=drjones@redhat.com \
    --cc=jeremy@goop.org \
    --cc=konrad.wilk@oracle.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).