2018-09-20 14:34:11

by Jason Andryuk

[permalink] [raw]
Subject: [PATCH] xen: Make XEN_BACKEND selectable by DomU

XEN_BACKEND doesn't actually depend on XEN_DOM0. DomUs can serve
backends to other DomUs. One example is a service VM providing network
backends.

The original Kconfig defaulted Dom0 to y and it could be disabled. DomU
could not select the option. With the new Kconfig, we default y for
Dom0 and n for DomU. Either can then toggle the selection.

Signed-off-by: Jason Andryuk <[email protected]>
---
OpenXT runs network backends in a network service DomU that shares out
PCI NICs.

drivers/xen/Kconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index b459edfacff3..af1bf99318c6 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -101,8 +101,7 @@ config XEN_DEV_EVTCHN

config XEN_BACKEND
bool "Backend driver support"
- depends on XEN_DOM0
- default y
+ default y if XEN_DOM0
help
Support for backend device drivers that provide I/O services
to other virtual machines.
--
2.17.1



2018-09-20 14:55:15

by Jan Beulich

[permalink] [raw]
Subject: Re: [Xen-devel] [PATCH] xen: Make XEN_BACKEND selectable by DomU

>>> On 20.09.18 at 16:32, <[email protected]> wrote:
> --- a/drivers/xen/Kconfig
> +++ b/drivers/xen/Kconfig
> @@ -101,8 +101,7 @@ config XEN_DEV_EVTCHN
>
> config XEN_BACKEND
> bool "Backend driver support"
> - depends on XEN_DOM0
> - default y
> + default y if XEN_DOM0

Why not the simpler "default XEN_DOM0"?

Jan



2018-09-20 15:31:55

by Jason Andryuk

[permalink] [raw]
Subject: Re: [Xen-devel] [PATCH] xen: Make XEN_BACKEND selectable by DomU

On Thu, Sep 20, 2018 at 10:54 AM Jan Beulich <[email protected]> wrote:
>
> >>> On 20.09.18 at 16:32, <[email protected]> wrote:
> > --- a/drivers/xen/Kconfig
> > +++ b/drivers/xen/Kconfig
> > @@ -101,8 +101,7 @@ config XEN_DEV_EVTCHN
> >
> > config XEN_BACKEND
> > bool "Backend driver support"
> > - depends on XEN_DOM0
> > - default y
> > + default y if XEN_DOM0
>
> Why not the simpler "default XEN_DOM0"?

I didn't realize you could do that. :) Yes, that's nicer.

Thanks,
Jason