xen: remove CONFIG_XEN_DOM0 compile option
Subsystems (8)
PATCH 1/1 xen: remove CONFIG_XEN_DOM0 compile option
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=yCONFIG_XEN_PRIVILEGED_GUEST=y
--- 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(-)
arch/x86/include/asm/xen/pci.h +1 -20
@@ -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 )
arch/x86/pci/xen.c +0 -6
@@ -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
arch/x86/xen/Kconfig +0 -10
@@ -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
arch/x86/xen/Makefile +1 -2
@@ -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
arch/x86/xen/xen-ops.h +0 -7
@@ -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 */
drivers/xen/Kconfig +2 -1
@@ -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.
drivers/xen/Makefile +1 -2
@@ -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
drivers/xen/xenfs/Makefile +1 -2
@@ -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
include/xen/xen.h +3 -8
@@ -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 */
Signature · 1 line
1.7.7.5
Quoted 4 lines · Andrew Jones
XEN_DOM0is a silent option that has been automatically selected whenCONFIG_XENis selected since6b0661a5e6fbf. 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.
I think that it is less than that because backends are not tied to dom0 in any way, even though currently they cannot be compiled without XEN_DOM0.
Running a network or block backend in domU is a well known configuration.
Therefore the code compiled out only amounts to about 10K.
Quoted 5 lines
drivers/xen/Kconfig +0
-0
drivers/xen/Kconfig config XEN_DEV_EVTCHN · line 86
Quoted 10 lines
drivers/xen/Kconfig +2
-1@@ -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.
I think we can trimmer the dependency list here: after all backends can be run in unpriviledged guests as well (see driver domains). So I think it should depend only on XEN.
----- Original Message -----
Quoted 24 lines · Andrew Jones
Quoted 7 lines
XEN_DOM0is a silent option that has been automatically selected whenCONFIG_XENis selected since6b0661a5e6fbf. 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.I think that it is less than that because backends are not tied to dom0
in any way, even though currently they cannot be compiled withoutXEN_DOM0.
Running a network or block backend in domU is a well known configuration.
Therefore the code compiled out only amounts to about 10K.Quoted 6 lines
drivers/xen/Kconfig +0
-0@@ -78,8 +78,9 @@ config XEN_DEV_EVTCHN
Quoted 14 lines
drivers/xen/Kconfig config XEN_DEV_EVTCHN · line 86
Quoted 9 lines
drivers/xen/Kconfig +2
-1config 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.I think we can trimmer the dependency list here: after all backends can
be run in unpriviledged guests as well (see driver domains). So I think it should depend only on XEN.
Hmm.. Actually, with dependency lists in mind, I think a really messed this patch up. I should have either had CONFIG_XEN inherit these deps, or I should have spread them around to be required at only the specific places they're needed, and then left the stub functions in. Neither of those options seems like a good idea to me. We either force all XEN guests to always have all the deps needed for an initial domain, which is exactly the opposite of the suggestion above (trimming XEN_BACKEND deps for driver domains), or we actually make the code messier and more complicated with more #ifdefs, which are now neatly packaged with XEN_DOM0.
The driver domain concept may actually be the technical need for making XEN_DOM0 optional. If we want the ability to build a minimally configed XEN kernel to be used as a driver domain, then it doesn't seem like we'd want it to also be capable of running as an initial domain, or to be forced to have all the dependencies and code of an initial domain.
With that in mind, I propose we go back to my initial patch, relax deps for XEN_BACKEND, and double check that each individual backend has the appropriate minimal deps. In general, it should be a goal to make sure most XEN options are menu selectable and that all dep lists are minimized in order to make sure driver domains can be built with minimal configs.
Drew
Quoted 6 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 40 lines · Andrew Jones
----- Original Message -----
Quoted 24 lines · Andrew Jones
Quoted 7 lines
XEN_DOM0is a silent option that has been automatically selected whenCONFIG_XENis selected since6b0661a5e6fbf. 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.I think that it is less than that because backends are not tied to dom0
in any way, even though currently they cannot be compiled withoutXEN_DOM0.
Running a network or block backend in domU is a well known configuration.
Therefore the code compiled out only amounts to about 10K.Quoted 6 lines
drivers/xen/Kconfig +0
-0@@ -78,8 +78,9 @@ config XEN_DEV_EVTCHNQuoted 14 lines
drivers/xen/Kconfig config XEN_DEV_EVTCHN · line 86
Quoted 9 lines
drivers/xen/Kconfig +2
-1config 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.I think we can trimmer the dependency list here: after all backends can
be run in unpriviledged guests as well (see driver domains). So I think it should depend only on XEN.
Quoted 10 lines
Hmm.. Actually, with dependency lists in mind, I think a really messed this patch up. I should have either had
CONFIG_XENinherit these deps, or I should have spread them around to be required at only the specific places they're needed, and then left the stub functions in. Neither of those options seems like a good idea to me. We either force all XEN guests to always have all the deps needed for an initial domain, which is exactly the opposite of the suggestion above (trimmingXEN_BACKENDdeps for driver domains), or we actually make the code messier and more complicated with more #ifdefs, which are now neatly packaged withXEN_DOM0.
I don't think we should add "PCI_XEN && SWIOTLB_XEN && X86_LOCAL_APIC && X86_IO_APIC && ACPI && PCI" to XEN either.
However it should be possible to add only the right dependencies to the right places.
In practice it should be sufficient to:
- make PCI_XEN depend on X86_LOCAL_APIC && X86_IO_APIC && ACPI;
- make XEN_PCIDEV_FRONTEND and XEN_PCIDEV_BACKEND depend on PCI_XEN;
- remove the 'ifdef CONFIG_ACPI' from arch/x86/pci/xen.c.
Quoted 6 lines
The driver domain concept may actually be the technical need for making
XEN_DOM0optional. If we want the ability to build a minimally configed XEN kernel to be used as a driver domain, then it doesn't seem like we'd want it to also be capable of running as an initial domain, or to be forced to have all the dependencies and code of an initial domain.
In practice any decent driver domain needs PCI and ACPI support, so basically it has the same config requirement of XEN_DOM0. At that point we have already discussed that having XEN_DOM0 enabled or disabled hardly makes any differences, so we can just get rid of it.
Quoted 52 lines · Stefano Stabellini
Quoted 40 lines · Andrew Jones
----- Original Message -----
Quoted 24 lines · Andrew Jones
Quoted 7 lines
XEN_DOM0is a silent option that has been automatically selected whenCONFIG_XENis selected since6b0661a5e6fbf. 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.I think that it is less than that because backends are not tied to dom0
in any way, even though currently they cannot be compiled withoutXEN_DOM0.
Running a network or block backend in domU is a well known configuration.
Therefore the code compiled out only amounts to about 10K.Quoted 6 lines
drivers/xen/Kconfig +0
-0@@ -78,8 +78,9 @@ config XEN_DEV_EVTCHNQuoted 14 lines
drivers/xen/Kconfig config XEN_DEV_EVTCHN · line 86
Quoted 9 lines
drivers/xen/Kconfig +2
-1config 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.I think we can trimmer the dependency list here: after all backends can
be run in unpriviledged guests as well (see driver domains). So I think it should depend only on XEN.Quoted 10 lines
Hmm.. Actually, with dependency lists in mind, I think a really messed this patch up. I should have either had
CONFIG_XENinherit these deps, or I should have spread them around to be required at only the specific places they're needed, and then left the stub functions in. Neither of those options seems like a good idea to me. We either force all XEN guests to always have all the deps needed for an initial domain, which is exactly the opposite of the suggestion above (trimmingXEN_BACKENDdeps for driver domains), or we actually make the code messier and more complicated with more #ifdefs, which are now neatly packaged withXEN_DOM0.
Quoted 7 lines
I don't think we should add "
PCI_XEN&&SWIOTLB_XEN&&X86_LOCAL_APIC&&X86_IO_APIC&& ACPI && PCI" to XEN either.
However it should be possible to add only the right dependencies to the right places.
In practice it should be sufficient to:- make
PCI_XENdepend onX86_LOCAL_APIC&&X86_IO_APIC&& ACPI;
Not good. You can make non-ACPI builds with PCI.
.. and you are missing CONFIG_PCI in there.
Quoted 2 lines
- make
XEN_PCIDEV_FRONTENDandXEN_PCIDEV_BACKENDdepend onPCI_XEN;
OK. That sounds good.
Quoted 2 lines
- remove the 'ifdef
CONFIG_ACPI' fromarch/x86/pci/xen.c.
No.. same issue - non-ACPI builds can be with PCI.
Quoted 10 lines
Quoted 9 lines
The driver domain concept may actually be the technical need for making
XEN_DOM0optional. If we want the ability to build a minimally configed XEN kernel to be used as a driver domain, then it doesn't seem like we'd want it to also be capable of running as an initial domain, or to be forced to have all the dependencies and code of an initial domain.
Quoted 2 lines
In practice any decent driver domain needs PCI and ACPI support, so basically it has the same config requirement of
XEN_DOM0. At that point
Sure.. for backends. But for frontends that requirement is not always true.
Quoted 2 lines
we have already discussed that having
XEN_DOM0enabled or disabled hardly makes any differences, so we can just get rid of it.
Or in other words, substitute it as CONFIG_PCI_XEN.
But this brings a question about MCE, ACPI cpu freq and ACPI S3. Those all belong to the dom0 - not to any driver domain. So getting rid of CONFIG_XEN_DOM0 would present a problem - what would those depend on?
Quoted 13 lines · Konrad Rzeszutek Wilk
Quoted 7 lines · Stefano Stabellini
I don't think we should add "
PCI_XEN&&SWIOTLB_XEN&&X86_LOCAL_APIC&&X86_IO_APIC&& ACPI && PCI" to XEN either.
However it should be possible to add only the right dependencies to the right places.
In practice it should be sufficient to:- make
PCI_XENdepend onX86_LOCAL_APIC&&X86_IO_APIC&& ACPI;Not good. You can make non-ACPI builds with PCI.
.. and you are missing
CONFIG_PCIin there.Quoted 1 line
Quoted 8 lines
Quoted 1 line
- make
XEN_PCIDEV_FRONTENDandXEN_PCIDEV_BACKENDdepend onPCI_XEN;OK. That sounds good.
Quoted 2 lines
- remove the 'ifdef
CONFIG_ACPI' fromarch/x86/pci/xen.c.No.. same issue - non-ACPI builds can be with PCI.
Quoted 1 line
Right.. in that case we should carefully replace the 'ifdef CONFIG_XEN_DOM0' with 'ifdef CONFIG_ACPI' in arch/x86/pci/xen.c. It would effectively keep things as they are now: if ACPI and XEN are enabled together in the config file, your kernel is able to setup interrupts when running as DOM0.
Regarding X86_LOCAL_APIC and X86_IO_APIC I cannot recall anymore where these dependencies come from exactly.
Quoted 11 lines
Quoted 9 lines
Quoted 6 lines
The driver domain concept may actually be the technical need for making
XEN_DOM0optional. If we want the ability to build a minimally configed XEN kernel to be used as a driver domain, then it doesn't seem like we'd want it to also be capable of running as an initial domain, or to be forced to have all the dependencies and code of an initial domain.In practice any decent driver domain needs PCI and ACPI support, so basically it has the same config requirement of
XEN_DOM0. At that pointSure.. for backends. But for frontends that requirement is not always true.
Right but a driver domain is bound to have at least the pci backend.
Quoted 4 lines
Quoted 2 lines
we have already discussed that having
XEN_DOM0enabled or disabled hardly makes any differences, so we can just get rid of it.Or in other words, substitute it as
CONFIG_PCI_XEN.
I was just trying to assign the dependencies where they really belong and I proposed to remove the 'ifdef CONFIG_ACPI' because I didn't realize that one can build working PCI configurations on XEN without it.
The fact that PCI_XEN would be used then almost as XEN_DOM0 is used now is just a side effect, due to the fact that PCI and device interrupts initialization is what mainly differentiates dom0 from other configurations.
Quoted 3 lines
But this brings a question about MCE, ACPI cpu freq and ACPI S3. Those all belong to the dom0 - not to any driver domain. So getting rid of
CONFIG_XEN_DOM0would present a problem - what would those depend on?
They would depend on XEN and whatever else they really depend on, for example ACPI.
Quoted 18 lines · Stefano Stabellini
Quoted 17 lines · Konrad Rzeszutek Wilk
Quoted 7 lines · Stefano Stabellini
I don't think we should add "
PCI_XEN&&SWIOTLB_XEN&&X86_LOCAL_APIC&&X86_IO_APIC&& ACPI && PCI" to XEN either.
However it should be possible to add only the right dependencies to the right places.
In practice it should be sufficient to:- make
PCI_XENdepend onX86_LOCAL_APIC&&X86_IO_APIC&& ACPI;Not good. You can make non-ACPI builds with PCI.
.. and you are missing
CONFIG_PCIin there.Quoted 2 lines
- make
XEN_PCIDEV_FRONTENDandXEN_PCIDEV_BACKENDdepend onPCI_XEN;OK. That sounds good.
Quoted 1 line
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
- remove the 'ifdef
CONFIG_ACPI' fromarch/x86/pci/xen.c.No.. same issue - non-ACPI builds can be with PCI.
Quoted 1 line
Right.. in that case we should carefully replace the 'ifdef
CONFIG_XEN_DOM0' with 'ifdefCONFIG_ACPI' inarch/x86/pci/xen.c.
.. which I think I did at some point as part of cleanup and then removed them since it peppered the xen.c with tons of #ifdef CONFIG_ACPI.
What about PVonHVM. There is this nagging feeling in the back of my head that turning CONFIG_XEN_DOM0 disables the CONFIG_PVHVM option? Or something like that? Maybe it is the other way around?
It would seem we need to seperate the PVHVM from DOM0. But the extra complexity comes with Mukesh's PVonHVM Hybrid which can do dom0 stuff with PVonHVM (should be searchable on xen-devel to find the patches).
Ian also mentioned that we MUST have the XEN_PRIVILIGED option, otherwise we will cause a regression with the GRUB tools. So that must stay or we need provide a deprecation schedule for the next 3 years to remove it and have patches in the GRUB toolchains.
Either way, there is also the question of making sure that no regressions are introduced - so a lot of the CONFIG_* interdependencies will have to be checked. I think that means checking CONFIG_XEN, CONFIG_PRIVILIGED, CONFIG_PVHVM, CONFIG_PCI, CONFIG_ACPI, CONFIG_XEN_BACKEND in various combinations.
Oh, I forgot CONFIG_XEN_FRONTEND.. And I think that one can also become a module (ditto for XEN_BACKEND)
And everytime we did something to those we managed to mess them up so we should be dilligient.
----- Original Message -----
Quoted 35 lines · Stefano Stabellini
Quoted 22 lines · Konrad Rzeszutek Wilk
Quoted 21 lines
Quoted 9 lines · Stefano Stabellini
I don't think we should add "
PCI_XEN&&SWIOTLB_XEN&&X86_LOCAL_APIC&&X86_IO_APIC&& ACPI && PCI" to XEN either. However it should be possible to add only the right dependencies to the
right places.
In practice it should be sufficient to:- make
PCI_XENdepend onX86_LOCAL_APIC&&X86_IO_APIC&& ACPI;Not good. You can make non-ACPI builds with PCI.
.. and you are missing
CONFIG_PCIin there.Quoted 3 lines
- make
XEN_PCIDEV_FRONTENDandXEN_PCIDEV_BACKENDdepend onPCI_XEN;OK. That sounds good.
Quoted 1 line
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
- remove the 'ifdef
CONFIG_ACPI' fromarch/x86/pci/xen.c.No.. same issue - non-ACPI builds can be with PCI.
Quoted 1 line
Right.. in that case we should carefully replace the 'ifdef
CONFIG_XEN_DOM0' with 'ifdefCONFIG_ACPI' inarch/x86/pci/xen.c... which I think I did at some point as part of cleanup and then removed them since it peppered the
xen.cwith tons of #ifdefCONFIG_ACPI.
Quoted 7 lines
What about PVonHVM. There is this nagging feeling in the back of my head that turning
CONFIG_XEN_DOM0disables theCONFIG_PVHVMoption? Or something like that? Maybe it is the other way around?It would seem we need to seperate the PVHVM from DOM0. But the extra complexity comes with Mukesh's PVonHVM Hybrid which can do dom0 stuff with PVonHVM (should be searchable on xen-devel to find the patches).
They're currently separate, i.e. no problem with DOM0 off and PVHVM on, or vice-versa afaict. I don't know anything about the hybrid though.
Quoted 7 lines
Ian also mentioned that we MUST have the
XEN_PRIVILIGEDoption, otherwise
we will cause a regression with the GRUB tools. So that must stay or we need
provide a deprecation schedule for the next 3 years to remove it and have patches in the GRUB toolchains.
Yeah, that's a bummer.
Quoted 9 lines
Either way, there is also the question of making sure that no regressions
are introduced - so a lot of the CONFIG_* interdependencies will have to be checked. I think that means checkingCONFIG_XEN,CONFIG_PRIVILIGED,CONFIG_PVHVM,CONFIG_PCI,CONFIG_ACPI,CONFIG_XEN_BACKENDin various combinations.
I guess if we did the s/XEN_DOM0/LOCAL_APIC && IO_APIC && ACPI/ in arch/x86/pci/xen.c it would be pretty easy to review for equivalence. Then keep CONFIG_PRIVILIGED, but drop XEN_DOM0 from everywhere else and compile in the 3 files. I don't think it makes much sense to do it though. XEN_DOM0 keeps things tidier now and might be useful later.
Quoted 12 lines
Oh, I forgot
CONFIG_XEN_FRONTEND.. And I think that one can also become
a module (ditto forXEN_BACKEND)And everytime we did something to those we managed to mess them up so we should be dilligient.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 5 lines · Andrew Jones
I guess if we did the s/XEN_DOM0/LOCAL_APIC &&
IO_APIC&& ACPI/ inarch/x86/pci/xen.cit would be pretty easy to review for equivalence. Then keepCONFIG_PRIVILIGED, but dropXEN_DOM0from everywhere else and compile in the 3 files. I don't think it makes much sense to do it though.XEN_DOM0keeps things tidier now and might be useful later.
we can keep things clean with the following:
#ifdef CONFIG_LOCAL_APIC && CONFIG_IO_APIC && CONFIG_ACPI && CONFIG_PCI_XEN
#define XEN_DOM0
#endif
in include/xen/xen.h.
So in the source files we can still '#ifdef XEN_DOM0', but at the same time we can get rid of the build symbol: everybody wins.
Quoted 10 lines · Stefano Stabellini
Quoted 5 lines · Andrew Jones
I guess if we did the s/XEN_DOM0/LOCAL_APIC &&
IO_APIC&& ACPI/ inarch/x86/pci/xen.cit would be pretty easy to review for equivalence. Then keepCONFIG_PRIVILIGED, but dropXEN_DOM0from everywhere else and compile in the 3 files. I don't think it makes much sense to do it though.XEN_DOM0keeps things tidier now and might be useful later.we can keep things clean with the following:
#ifdef
CONFIG_LOCAL_APIC&&CONFIG_IO_APIC&&CONFIG_ACPI&&CONFIG_PCI_XEN
Quoted 8 lines
#define
XEN_DOM0#endif
in
include/xen/xen.h.So in the source files we can still '#ifdef
XEN_DOM0', but at the same time we can get rid of the build symbol: everybody wins.
No, really, I think this is silly. This kind of dependency information should be encoded in the Kconfig system, and not reimplemented in an ad-hoc way.
If there were a clean way to do what Andrew wants then I'd support it, but this thread has descended into a spiral of madness, which makes me think its a lost cause.
If the root complaint is that "customers think that anything set in .config is a supported feature", then the solutions are to support all the features in .config, re-educate the customers that they're wrong, or maintain a local patch to do this stuff.
J
----- Original Message -----
Quoted 36 lines · Stefano Stabellini
Quoted 16 lines · Andrew Jones
Quoted 8 lines
I guess if we did the s/XEN_DOM0/LOCAL_APIC &&
IO_APIC&& ACPI/ inarch/x86/pci/xen.cit would be pretty easy to review for equivalence.
Then keepCONFIG_PRIVILIGED, but dropXEN_DOM0from everywhere else and
compile in the 3 files. I don't think it makes much sense to do it though.XEN_DOM0keeps things tidier now and might be useful later.we can keep things clean with the following:
#ifdef
CONFIG_LOCAL_APIC&&CONFIG_IO_APIC&&CONFIG_ACPI&&CONFIG_PCI_XEN#define
XEN_DOM0Quoted 7 lines
#endif
in
include/xen/xen.h.So in the source files we can still '#ifdef
XEN_DOM0', but at the same
time we can get rid of the build symbol: everybody wins.No, really, I think this is silly. This kind of dependency information
should be encoded in theKconfigsystem, and not reimplemented in an ad-hoc way.If there were a clean way to do what Andrew wants then I'd support it,
but this thread has descended into a spiral of madness, which makes me
think its a lost cause.
Quoted 6 lines
If the root complaint is that "customers think that anything set in .config is a supported feature", then the solutions are to support all
the features in .config, re-educate the customers that they're wrong, or
maintain a local patch to do this stuff.
If only re-educating people was free, like preempting questions is. Local patches are of course always an option, and perhaps in this case it's the best one. However, I think we already made a case for better xen configurability for the driver domains, so I'm not 100% convinced my initial patch (making dom0 configurable) isn't worthy of upstream. Also, I didn't see any comments on my v2[*] of that patch, which I believe satisfies the menu complexity issue and brings in more configurability. That said, I'm about to reply to that patch myself, since there's an issue with it.
Drew
[*] http://article.gmane.org/gmane.linux.kernel.virtualization/14635
Quoted 11 lines
Quoted 6 lines
If the root complaint is that "customers think that anything set in .config is a supported feature", then the solutions are to support all
the features in .config, re-educate the customers that they're wrong, or
maintain a local patch to do this stuff.If only re-educating people was free, like preempting questions is. Local patches are of course always an option, and perhaps in this case it's the best one. However, I think we already made a case for better xen configurability for the driver domains, so I'm not 100%
Could you repost those backend patches please? At this point I am not sure which one we have discarded?
Quoted 14 lines
convinced my initial patch (making dom0 configurable) isn't worthy of upstream. Also, I didn't see any comments on my v2[*] of that patch, which I believe satisfies the menu complexity issue and brings in more configurability. That said, I'm about to reply to that patch myself, since there's an issue with it.
Drew
[*] http://article.gmane.org/gmane.linux.kernel.virtualization/14635
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
PATCH 1/4 xen kconfig: keep XEN_XENBUS_FRONTEND builtin
When XEN_XENBUS_FRONTEND gets selected as a module it can lead to unbootable configs. If we need it, then we should just build it in.
--- drivers/xen/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/xen/Kconfig +1 -1
@@ -118,7 +118,7 @@ config XEN_SYS_HYPERVISOR but will have no xen contents. config XEN_XENBUS_FRONTEND - tristate + bool config XEN_GNTDEV tristate "userspace grant access device driver"
Signature · 1 line
1.7.7.5
PATCH v2 2/4 xen kconfig: relax INPUT_XEN_KBDDEV_FRONTEND deps
PV-on-HVM guests may want to use the xen keyboard/mouse frontend, but they don't use the xen frame buffer frontend. For this case it doesn't make much sense for INPUT_XEN_KBDDEV_FRONTEND to depend on XEN_FBDEV_FRONTEND. The opposite direction always makes more sense, i.e. if you're using xenfb, then you'll want xenkbd. Switch the dependencies.
--- drivers/input/misc/Kconfig | 2 +- drivers/video/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/input/misc/Kconfig +1 -1
@@ -533,7 +533,7 @@ config INPUT_CMA3000_I2C config INPUT_XEN_KBDDEV_FRONTEND tristate "Xen virtual keyboard and mouse support" - depends on XEN_FBDEV_FRONTEND + depends on XEN default y select XEN_XENBUS_FRONTEND help
drivers/video/Kconfig +1 -1
@@ -2263,7 +2263,7 @@ config FB_VIRTUAL config XEN_FBDEV_FRONTEND tristate "Xen virtual frame buffer support" - depends on FB && XEN + depends on FB && XEN && INPUT_XEN_KBDDEV_FRONTEND select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT
Signature · 1 line
1.7.7.5
Re: [PATCH 2/4 v2] xen kconfig: relax INPUT_XEN_KBDDEV_FRONTEND deps
Quoted 4 lines · Andrew Jones
PV-on-HVM guests may want to use the xen keyboard/mouse frontend, but they don't use the xen frame buffer frontend. For this case it doesn't make much sense for
INPUT_XEN_KBDDEV_FRONTENDto depend onXEN_FBDEV_FRONTEND. The opposite direction always makes more sense, i.e.
What is the disadvantege of keeping it as is?
Quoted 2 lines
if you're using xenfb, then you'll want xenkbd. Switch the dependencies.
You are missing the CC to the proper maintainer.
Also, did you test this with PV and PVonHVM guests?
Quoted 34 lines
Signed-off-by Andrew Jones <[email protected]>--- drivers/input/misc/Kconfig | 2 +- drivers/video/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/input/misc/Kconfig +1
-1@@ -533,7 +533,7 @@ config INPUT_CMA3000_I2C config INPUT_XEN_KBDDEV_FRONTEND tristate "Xen virtual keyboard and mouse support" - depends on XEN_FBDEV_FRONTEND + depends on XEN default y select XEN_XENBUS_FRONTEND helpdrivers/video/Kconfig +1
-1@@ -2263,7 +2263,7 @@ config FB_VIRTUAL config XEN_FBDEV_FRONTEND tristate "Xen virtual frame buffer support" - depends on FB && XEN + depends on FB && XEN && INPUT_XEN_KBDDEV_FRONTEND select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLITSignature · 1 line
1.7.7.5
Re: [PATCH 2/4 v2] xen kconfig: relax INPUT_XEN_KBDDEV_FRONTEND deps
----- Original Message -----
Quoted 10 lines · Andrew Jones
Quoted 7 lines
PV-on-HVM guests may want to use the xen keyboard/mouse frontend, but
they don't use the xen frame buffer frontend. For this case it doesn't
make much sense forINPUT_XEN_KBDDEV_FRONTENDto depend onXEN_FBDEV_FRONTEND. The opposite direction always makes more sense, i.e.What is the disadvantege of keeping it as is?
If you don't want FB, but you do want KBD, then you're stuck with FB anyway, even though it isn't necessary. Perhaps I'm the only one who ever considering building a config without FB?
Quoted 6 lines
Quoted 4 lines
if you're using xenfb, then you'll want xenkbd. Switch the dependencies.
You are missing the CC to the proper maintainer.
I added them the last time you reminded me. See the following message-ids for the thread where this patch was discussed and then led to the V2 here.
[email protected] 725950ad-d5cf-4ddb-9870-a5c8d75cfa51@zmail13.collab.prod.int.phx2.redhat.com [email protected]
I've re-added them to this thread, since the multiple posting/reposting must have lost them again.
Quoted 1 line
Also, did you test this with PV and PVonHVM guests?
Testing-wise you don't really need to do much more then 'make oldconfig'. FB doesn't work on pv-on-hvm, the mod wouldn't even init if you tried as there's a
if (!xen_pv_domain())
return -ENODEV;I have tested a pv-on-hvm guest after this patch with FB off though, which worked. For PV guests using FB, they'll work the same, as you wouldn't want to change your config.
Drew
Quoted 37 lines
Quoted 36 lines
Signed-off-by Andrew Jones <[email protected]>--- drivers/input/misc/Kconfig | 2 +- drivers/video/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/input/misc/Kconfig +1
-1@@ -533,7 +533,7 @@ config INPUT_CMA3000_I2C config INPUT_XEN_KBDDEV_FRONTEND tristate "Xen virtual keyboard and mouse support" - depends on XEN_FBDEV_FRONTEND + depends on XEN default y select XEN_XENBUS_FRONTEND helpdrivers/video/Kconfig +1
-2@@ -2263,7 +2263,7 @@ config FB_VIRTUAL config XEN_FBDEV_FRONTEND tristate "Xen virtual frame buffer support" - depends on FB && XEN + depends on FB && XEN && INPUT_XEN_KBDDEV_FRONTEND select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT --1.7.7.5
PATCH v2 3/4 xen kconfig: add dom0 support help text
In reply to Andrew JonesDescribe dom0 support in the config menu and supply help text for it.
v2 adds 'if EXPERT' to keep it out of the "standard" menu.
--- arch/x86/xen/Kconfig | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
arch/x86/xen/Kconfig +6 -1
@@ -14,9 +14,14 @@ config XEN Xen hypervisor. config XEN_DOM0 - def_bool y + bool "Xen Initial Domain (Dom0) support" if EXPERT + default y depends on XEN && PCI_XEN && SWIOTLB_XEN depends on X86_LOCAL_APIC && X86_IO_APIC && ACPI && PCI + help + This allows the kernel to be used for the initial Xen domain, + Domain0. This is a privileged guest that supplies backends + and is used to manage the other Xen domains. # Dummy symbol since people have come to rely on the PRIVILEGED_GUEST # name in tools.
Signature · 1 line
1.7.7.5
PATCH 4/4 xen kconfig: describe xen tmem in the config menu
In reply to Andrew JonesAdd a description to the config menu for xen tmem.
--- drivers/xen/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/xen/Kconfig +1 -1
@@ -143,7 +143,7 @@ config SWIOTLB_XEN select SWIOTLB config XEN_TMEM - bool + bool "Xen Transcendent Memory (tmem)" default y if (CLEANCACHE || FRONTSWAP) help Shim to interface in-kernel Transcendent Memory hooks
Signature · 1 line
1.7.7.5
Re: [PATCH 4/4] xen kconfig: describe xen tmem in the config menu
Quoted 1 line · Andrew Jones
Add a description to the config menu for xen tmem.
We will have another config option asked during 'make oldconfig' right?
I thought part of this cleanup patch is to remove some of this complexity - not make it _more_ complex.
Quoted 21 lines
Signed-off-by Andrew Jones <[email protected]>--- drivers/xen/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/xen/Kconfig +1
-1@@ -143,7 +143,7 @@ config SWIOTLB_XEN select SWIOTLB config XEN_TMEM - bool + bool "Xen Transcendent Memory (tmem)" default y if (CLEANCACHE || FRONTSWAP) help Shim to interface in-kernel Transcendent Memory hooksSignature · 1 line
1.7.7.5
Re: [PATCH 4/4] xen kconfig: describe xen tmem in the config menu
----- Original Message -----
Quoted 9 lines · Andrew Jones
Quoted 1 line
Add a description to the config menu for xen tmem.
We will have another config option asked during 'make oldconfig' right?
I thought part of this cleanup patch is to remove some of this complexity - not make it _more_ complex.
Another candidate for 'if EXPERT' then, IMHO.
Quoted 22 lines
Quoted 21 lines
Signed-off-by Andrew Jones <[email protected]>--- drivers/xen/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/xen/Kconfig +1
-2@@ -143,7 +143,7 @@ config SWIOTLB_XEN select SWIOTLB config XEN_TMEM - bool + bool "Xen Transcendent Memory (tmem)" default y if (CLEANCACHE || FRONTSWAP) help Shim to interface in-kernel Transcendent Memory hooks --1.7.7.5
Re: [PATCH 1/4] xen kconfig: keep XEN_XENBUS_FRONTEND builtin
In reply to Andrew JonesQuoted 2 lines · Andrew Jones
When
XEN_XENBUS_FRONTENDgets selected as a module it can lead to unbootable configs. If we need it, then we should just build it in.
Hm, don't the frontends by themsevles load this module? So if you do 'modprobe xen-pcifront' it would load this automatically?
Quoted 21 lines
Signed-off-by Andrew Jones <[email protected]>--- drivers/xen/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/xen/Kconfig +1
-1@@ -118,7 +118,7 @@ config XEN_SYS_HYPERVISOR but will have no xen contents. config XEN_XENBUS_FRONTEND - tristate + bool config XEN_GNTDEV tristate "userspace grant access device driver"Signature · 1 line
1.7.7.5
Re: [Xen-devel] [PATCH 1/4] xen kconfig: keep XEN_XENBUS_FRONTEND builtin
----- Original Message -----
Quoted 7 lines · Andrew Jones
Quoted 2 lines
When
XEN_XENBUS_FRONTENDgets selected as a module it can lead to unbootable configs. If we need it, then we should just build it in.Hm, don't the frontends by themsevles load this module? So if you do 'modprobe xen-pcifront' it would load this automatically?
The problem is on boot, getting it there before we need xen-blkfront. I think it might solvable if you make sure your tooling pushes the xenbus module into your initrd. However we've had problems with platform_pci being a module in the past, and if I'm not mistaken that was one of the motivators for building it in (5fbdc10395cd). I see this as a similar story.
Drew
Quoted 27 lines
Quoted 20 lines
Signed-off-by Andrew Jones <[email protected]>--- drivers/xen/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/xen/Kconfig +1
-2@@ -118,7 +118,7 @@ config XEN_SYS_HYPERVISOR but will have no xen contents. config XEN_XENBUS_FRONTEND - tristate + bool config XEN_GNTDEV tristate "userspace grant access device driver" --Quoted 1 line
1.7.7.5
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Re: [Xen-devel] [PATCH 1/4] xen kconfig: keep XEN_XENBUS_FRONTEND builtin
Quoted 7 lines · Andrew Jones
----- Original Message -----
Quoted 4 lines · Andrew Jones
Quoted 2 lines
When
XEN_XENBUS_FRONTENDgets selected as a module it can lead to unbootable configs. If we need it, then we should just build it in.
Quoted 7 lines
Quoted 3 lines
Hm, don't the frontends by themsevles load this module? So if you do 'modprobe xen-pcifront' it would load this automatically?
The problem is on boot, getting it there before we need xen-blkfront. I think it might solvable if you make sure your tooling pushes the xenbus module into your initrd. However we've had problems with
So it seems we also need patches for dracut and initramfs here?
Or is it possible to make the modules (fb) try to load xenbus frontend automatically? Preferrably one would do this:
modprobe xen_fbfront
which would then automatically load xenbus_module, xen_kbdfront
Better yet if udev/kudzu figured out this automtically and loaded the modules.
Is there a mechanism to automatically have udev do all of this loading? Let CC the Debian maintainer on this converstation as he might have some ideas in this.
Quoted 1 line
platform_pcibeing a module in the past, and if I'm not mistaken
Right, but that driver is not tied in with the frontends. It just pokes at the ioport to disable QEMU HVM drivers.
Quoted 32 lines
that was one of the motivators for building it in (
5fbdc10395cd). I see this as a similar story.Drew
Quoted 27 lines
Quoted 20 lines
Signed-off-by Andrew Jones <[email protected]>--- drivers/xen/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/xen/Kconfig +1
-2@@ -118,7 +118,7 @@ config XEN_SYS_HYPERVISOR but will have no xen contents. config XEN_XENBUS_FRONTEND - tristate + bool config XEN_GNTDEV tristate "userspace grant access device driver" --Quoted 1 line
1.7.7.5
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Re: [PATCH 1/4] xen kconfig: keep XEN_XENBUS_FRONTEND builtin
Quoted 2 lines · Konrad Rzeszutek Wilk
Or is it possible to make the modules (fb) try to load xenbus frontend automatically? Preferrably one would do this:
Which modules?
Quoted 2 lines
modprobe
xen_fbfront
which would then automatically loadxenbus_module,xen_kbdfront
I think you are missing something.
| video/xen-fbfront.c: return xenbus_register_frontend(&xenfb_driver);
| xen/xenbus/xenbus_probe_frontend.c:EXPORT_SYMBOL_GPL(xenbus_register_frontend);
xen-fbfront already pulls in the module, at least in Linus' tree.
Quoted 2 lines
Better yet if udev/kudzu figured out this automtically and loaded the modules.
No workarounds for kernel problems if not absolutely necessary.
Bastian
Signature · 2 lines
Military secrets are the most fleeting of all. -- Spock, "The Enterprise Incident", stardate 5027.4
Re: [Xen-devel] [PATCH 1/4] xen kconfig: keep XEN_XENBUS_FRONTEND builtin
----- Original Message -----
Quoted 6 lines
Quoted 3 lines · Konrad Rzeszutek Wilk
Or is it possible to make the modules (fb) try to load xenbus frontend
automatically? Preferrably one would do this:
Quoted 6 lines
Which modules?
Quoted 2 lines
modprobe
xen_fbfront
which would then automatically loadxenbus_module,xen_kbdfrontI think you are missing something.
I'll look into this and see if I can get the xenbus module to work on boot with the right initrd magic. Or at least come up with a better story why it won't.
Drew
Quoted 18 lines
| video/xen-fbfront.c: return | xenbus_register_frontend(&xenfb_driver); | xen/xenbus/xenbus_probe_frontend.c:EXPORT_SYMBOL_GPL(xenbus_register_frontend);xen-fbfront already pulls in the module, at least in Linus' tree.
Quoted 2 lines
Better yet if udev/kudzu figured out this automtically and loaded the modules.
No workarounds for kernel problems if not absolutely necessary.
Bastian
--
Military secrets are the most fleeting of all.
-- Spock, "The Enterprise Incident", stardate 5027.4
Re: [Xen-devel] [PATCH 1/4] xen kconfig: keep XEN_XENBUS_FRONTEND builtin
In reply to Konrad Rzeszutek WilkQuoted 2 lines · Konrad Rzeszutek Wilk
Or is it possible to make the modules (fb) try to load xenbus frontend automatically? Preferrably one would do this:
Which modules?
Quoted 2 lines
modprobe
xen_fbfront
which would then automatically loadxenbus_module,xen_kbdfront
I think you are missing something.
| video/xen-fbfront.c: return xenbus_register_frontend(&xenfb_driver);
| xen/xenbus/xenbus_probe_frontend.c:EXPORT_SYMBOL_GPL(xenbus_register_frontend);
xen-fbfront already pulls in the module, at least in Linus' tree.
Quoted 2 lines
Better yet if udev/kudzu figured out this automtically and loaded the modules.
No workarounds for kernel problems if not absolutely necessary.
Bastian
Signature · 2 lines
Military secrets are the most fleeting of all. -- Spock, "The Enterprise Incident", stardate 5027.4
Re: [PATCH 1/4] xen kconfig: keep XEN_XENBUS_FRONTEND builtin
In reply to Andrew JonesQuoted 2 lines · Andrew Jones
When
XEN_XENBUS_FRONTENDgets selected as a module it can lead to unbootable configs. If we need it, then we should just build it in.
Hm, don't the frontends by themsevles load this module? So if you do 'modprobe xen-pcifront' it would load this automatically?
Quoted 21 lines
Signed-off-by Andrew Jones <[email protected]>--- drivers/xen/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/xen/Kconfig +1
-1@@ -118,7 +118,7 @@ config XEN_SYS_HYPERVISOR but will have no xen contents. config XEN_XENBUS_FRONTEND - tristate + bool config XEN_GNTDEV tristate "userspace grant access device driver"Signature · 1 line
1.7.7.5
Quoted 7 lines · Konrad Rzeszutek Wilk
Quoted 7 lines
Quoted 6 lines
If the root complaint is that "customers think that anything set in .config is a supported feature", then the solutions are to support all
the features in .config, re-educate the customers that they're wrong, or
maintain a local patch to do this stuff.
Quoted 7 lines
Quoted 4 lines
If only re-educating people was free, like preempting questions is. Local patches are of course always an option, and perhaps in this case it's the best one. However, I think we already made a case for better xen configurability for the driver domains, so I'm not 100%
Could you repost those backend patches please? At this point I am not sure which one we have discarded?
hm, I was thinking in terms of the XenBus ones. We had somewhere in this converstion something about seperating the backend's from depending on CONFIG_XEN_DOM0 as they can be run in any domain nowadays.
Quoted 15 lines
Quoted 15 lines
convinced my initial patch (making dom0 configurable) isn't worthy of upstream. Also, I didn't see any comments on my v2[*] of that patch, which I believe satisfies the menu complexity issue and brings in more configurability. That said, I'm about to reply to that patch myself, since there's an issue with it.
Drew
[*] http://article.gmane.org/gmane.linux.kernel.virtualization/14635
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
----- Original Message -----
Quoted 24 lines
Quoted 18 lines · Konrad Rzeszutek Wilk
Quoted 10 lines
Quoted 9 lines
If the root complaint is that "customers think that anything set in
.config is a supported feature", then the solutions are to support
all
the features in .config, re-educate the customers that they're wrong,
or
maintain a local patch to do this stuff.Quoted 7 lines
If only re-educating people was free, like preempting questions is.
Local patches are of course always an option, and perhaps in this case it's the best one. However, I think we already made a case for
better xen configurability for the driver domains, so I'm not 100%Quoted 3 lines
Could you repost those backend patches please? At this point I am not
sure which one we have discarded?
Quoted 6 lines
hm, I was thinking in terms of the XenBus ones. We had somewhere in this
converstion something about seperating the backend's from depending onCONFIG_XEN_DOM0as they can be run in any domain nowadays.
Ah, I still haven't posted anything like that. So nothing got lost :-) It's a good idea, but it's probably best done and tested by someone working with driver domains, or even with the backends at all, which I'm not.
Drew
Quoted 18 lines
Quoted 17 lines
Quoted 17 lines
convinced my initial patch (making dom0 configurable) isn't worthy
of upstream. Also, I didn't see any comments on my v2[*] of that patch, which I believe satisfies the menu complexity issue and brings in more configurability. That said, I'm about to reply to that patch myself, since there's an issue with it.Drew
[*]
http://article.gmane.org/gmane.linux.kernel.virtualization/14635_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 7 lines · Konrad Rzeszutek Wilk
Quoted 7 lines
Quoted 6 lines
If the root complaint is that "customers think that anything set in .config is a supported feature", then the solutions are to support all
the features in .config, re-educate the customers that they're wrong, or
maintain a local patch to do this stuff.
Quoted 7 lines
Quoted 4 lines
If only re-educating people was free, like preempting questions is. Local patches are of course always an option, and perhaps in this case it's the best one. However, I think we already made a case for better xen configurability for the driver domains, so I'm not 100%
Could you repost those backend patches please? At this point I am not sure which one we have discarded?
hm, I was thinking in terms of the XenBus ones. We had somewhere in this converstion something about seperating the backend's from depending on CONFIG_XEN_DOM0 as they can be run in any domain nowadays.
Quoted 15 lines
Quoted 15 lines
convinced my initial patch (making dom0 configurable) isn't worthy of upstream. Also, I didn't see any comments on my v2[*] of that patch, which I believe satisfies the menu complexity issue and brings in more configurability. That said, I'm about to reply to that patch myself, since there's an issue with it.
Drew
[*] http://article.gmane.org/gmane.linux.kernel.virtualization/14635
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 10 lines · Stefano Stabellini
Quoted 5 lines · Andrew Jones
I guess if we did the s/XEN_DOM0/LOCAL_APIC &&
IO_APIC&& ACPI/ inarch/x86/pci/xen.cit would be pretty easy to review for equivalence. Then keepCONFIG_PRIVILIGED, but dropXEN_DOM0from everywhere else and compile in the 3 files. I don't think it makes much sense to do it though.XEN_DOM0keeps things tidier now and might be useful later.we can keep things clean with the following:
#ifdef
CONFIG_LOCAL_APIC&&CONFIG_IO_APIC&&CONFIG_ACPI&&CONFIG_PCI_XEN
Quoted 8 lines
#define
XEN_DOM0#endif
in
include/xen/xen.h.So in the source files we can still '#ifdef
XEN_DOM0', but at the same time we can get rid of the build symbol: everybody wins.
No, really, I think this is silly. This kind of dependency information should be encoded in the Kconfig system, and not reimplemented in an ad-hoc way.
If there were a clean way to do what Andrew wants then I'd support it, but this thread has descended into a spiral of madness, which makes me think its a lost cause.
If the root complaint is that "customers think that anything set in .config is a supported feature", then the solutions are to support all the features in .config, re-educate the customers that they're wrong, or maintain a local patch to do this stuff.
J
Quoted 21 lines · Konrad Rzeszutek Wilk
Quoted 20 lines · Stefano Stabellini
Quoted 19 lines · Konrad Rzeszutek Wilk
Quoted 7 lines · Stefano Stabellini
I don't think we should add "
PCI_XEN&&SWIOTLB_XEN&&X86_LOCAL_APIC&&X86_IO_APIC&& ACPI && PCI" to XEN either.
However it should be possible to add only the right dependencies to the right places.
In practice it should be sufficient to:- make
PCI_XENdepend onX86_LOCAL_APIC&&X86_IO_APIC&& ACPI;Not good. You can make non-ACPI builds with PCI.
.. and you are missing
CONFIG_PCIin there.Quoted 2 lines
- make
XEN_PCIDEV_FRONTENDandXEN_PCIDEV_BACKENDdepend onPCI_XEN;OK. That sounds good.
Quoted 2 lines
- remove the 'ifdef
CONFIG_ACPI' fromarch/x86/pci/xen.c.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
No.. same issue - non-ACPI builds can be with PCI.
Quoted 1 line
Right.. in that case we should carefully replace the 'ifdef
CONFIG_XEN_DOM0' with 'ifdefCONFIG_ACPI' inarch/x86/pci/xen.c... which I think I did at some point as part of cleanup and then removed them since it peppered the
xen.cwith tons of #ifdefCONFIG_ACPI.
that's unfortunate
Quoted 3 lines
What about PVonHVM. There is this nagging feeling in the back of my head that turning
CONFIG_XEN_DOM0disables theCONFIG_PVHVMoption? Or something like that? Maybe it is the other way around?
nope, nothing I can think of.
Quoted 3 lines
It would seem we need to seperate the PVHVM from DOM0. But the extra complexity comes with Mukesh's PVonHVM Hybrid which can do dom0 stuff with PVonHVM (should be searchable on xen-devel to find the patches).
I think that at the moment PVHVM and DOM0 aren't tie to one another in any way, apart from the fact that they use the same generic infrastructure to remap interrupts and MSIs into event channels.
----- Original Message -----
Quoted 26 lines · Konrad Rzeszutek Wilk
Quoted 15 lines · Stefano Stabellini
Quoted 9 lines
I don't think we should add "
PCI_XEN&&SWIOTLB_XEN&&X86_LOCAL_APIC&&X86_IO_APIC&& ACPI && PCI" to XEN either.
However it should be possible to add only the right dependencies to the
right places.
In practice it should be sufficient to:- make
PCI_XENdepend onX86_LOCAL_APIC&&X86_IO_APIC&& ACPI;Not good. You can make non-ACPI builds with PCI.
.. and you are missing
CONFIG_PCIin there.Quoted 1 line
Quoted 9 lines
Quoted 2 lines
- make
XEN_PCIDEV_FRONTENDandXEN_PCIDEV_BACKENDdepend onPCI_XEN;OK. That sounds good.
Quoted 2 lines
- remove the 'ifdef
CONFIG_ACPI' fromarch/x86/pci/xen.c.No.. same issue - non-ACPI builds can be with PCI.
Quoted 1 line
Quoted 9 lines
Right.. in that case we should carefully replace the 'ifdef
CONFIG_XEN_DOM0' with 'ifdefCONFIG_ACPI' inarch/x86/pci/xen.c. It would effectively keep things as they are now: if ACPI and XEN are enabled together in the config file, your kernel is able to setup interrupts when running as DOM0.
RegardingX86_LOCAL_APICandX86_IO_APICI cannot recall anymore where
these dependencies come from exactly.
Here's one path
pci_xen_initial_domain [arch/x86/pci/xen.c] (#ifdef XEN_DOM0)
xen_setup_acpi_sci [arch/x86/pci/xen.c] (#ifdef XEN_DOM0)
acpi_get_override_irq [arch/x86/kernel/apic/io_apic.c]
(#ifdef X86_IO_APIC)The messiness I stated before comes in when we try to find all these paths and make sure they're appropriately #ifdef'ed with the minimal set of symbols from the set that XEN_DOM0 used to cover for us. However, without alternative implementations in the absence of particular config options, then we still need to stub the functions out at the top level. So we could simply s/r XEN_DOM0 with X86_LOCAL_APIC && X86_IO_APIC && ACPI in arch/x86/pci/xen.c, but that doesn't make much sense either, because XEN_DOM0 does a nice job keeping things neat and well documented, i.e. we can quickly tell what functions are dom0-only.
Quoted 42 lines
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
The driver domain concept may actually be the technical need for
makingXEN_DOM0optional. If we want the ability to build a minimally
configed XEN kernel to be used as a driver domain, then it doesn't
seem like we'd want it to also be capable of running as an initial
domain, or to be forced to have all the dependencies and code of an
initial domain.Quoted 7 lines
Quoted 4 lines
In practice any decent driver domain needs PCI and ACPI support, so
basically it has the same config requirement ofXEN_DOM0. At that pointSure.. for backends. But for frontends that requirement is not always true.
Right but a driver domain is bound to have at least the pci backend.
Quoted 5 lines
Quoted 3 lines
we have already discussed that having
XEN_DOM0enabled or disabled
hardly makes any differences, so we can just get rid of it.Or in other words, substitute it as
CONFIG_PCI_XEN.I was just trying to assign the dependencies where they really belong and I proposed to remove the 'ifdef
CONFIG_ACPI' because I didn't realize that one can build working PCI configurations on XEN without it.The fact that
PCI_XENwould be used then almost asXEN_DOM0is used now
is just a side effect, due to the fact that PCI and device interrupts initialization is what mainly differentiates dom0 from other configurations.
Quoted 8 lines
Quoted 5 lines
But this brings a question about MCE, ACPI cpu freq and ACPI S3. Those all belong to the dom0 - not to any driver domain. So getting rid
ofCONFIG_XEN_DOM0would present a problem - what would those depend on?They would depend on XEN and whatever else they really depend on, for example ACPI.
This brings up my comment before about me not being the best person to suggest removing XEN_DOM0. It appears this symbol is fairly useful even now for the reasons I mentioned above, and future work may once again find it the cleanest way to manage dependencies. Possibly dependencies will even expand to a point where it sufficiently diverges from the requirements of driver domains. Then users may like to be able to configure it out. I don't know.
Drew
Quoted 1 line · Andrew Jones
remove
XEN_PRIVILEGED_GUESTas it's just an alias forXEN_DOM0.
Hmm, this one is used by tools like update-grub to know when it is ok to create xen+kernel entries so I think it needs to stay, or we at least need to give lengthly warning to distros etc that it is going away.
Perhaps you can just patch it out locally?
Ian.
Quoted 237 lines
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=yCONFIG_XEN_PRIVILEGED_GUEST=ySigned-off-by Andrew Jones <[email protected]>--- 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(-)arch/x86/include/asm/xen/pci.h +1
-20@@ -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 )arch/x86/pci/xen.c +0
-6@@ -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 arch/x86/xen/Kconfig +0
-10@@ -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_APICarch/x86/xen/Makefile +1
-2@@ -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.oarch/x86/xen/xen-ops.h +0
-7@@ -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 */ drivers/xen/Kconfig +2
-1@@ -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.drivers/xen/Makefile +1
-2@@ -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.odrivers/xen/xenfs/Makefile +1
-2@@ -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.oinclude/xen/xen.h +3
-8@@ -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 */