Skip to contentSkip to conversation

Can't build in the virtio console driver on x86_64 when the other virtio drivers are modular

DISCUSSION Chuck Ebbert 2 participants 7 messages Feb 24, 2011 – Feb 28, 2011 virtio core

lore
Share & tools
lore
#0 lore raw

The virtio configuration options are inconsistent. According to this, every options that needs virtio will select it:

# Virtio always gets selected by whoever wants it. config VIRTIO
tristate

Note that it's not user-selectable, so any config file that tries to set it will be ignored when kconfig loads those options. And yet we have a whole set of options that depend on VIRTIO, like VIRTIO_CONSOLE for example. This makes it impossible to have VIRTIO_PCI modular and VIRTIO_CONSOLE built-in on x86_64, because:

1. VIRTIO_PCI selects VIRTIO and sets it to M
2. VIRTIO_CONSOLE gets forced to M because one of its dependencies is M

So either VIRTIO (and VIRTIO_RING) need to be user-selectable, or all of the options that depend on VIRTIO need to be changed to select it instead.

(For even more fun, LGUEST_GUEST on i386 forces VIRTIO, VIRTIO_RING and VIRTIO_CONSOLE all to Y.)

#1 lore raw
Quoted 7 lines · Chuck Ebbert

The virtio configuration options are inconsistent. According to this, every options that needs virtio will select it:

# Virtio always gets selected by whoever wants it. config VIRTIO
tristate

Quoted 5 lines

Note that it's not user-selectable, so any config file that tries to set it will be ignored when kconfig loads those options. And yet we have a whole set of options that depend on VIRTIO, like VIRTIO_CONSOLE for example. This makes it impossible to have VIRTIO_PCI modular and VIRTIO_CONSOLE built-in on x86_64, because:

Any reason to have VIRTIO_PCI modular instead of built in (on x86-64, virtio-console won't work without virtio-pci anyway)?

Amit

#2 lore raw
In reply to Chuck Ebbert
Quoted 7 lines · Chuck Ebbert

The virtio configuration options are inconsistent. According to this, every options that needs virtio will select it:

# Virtio always gets selected by whoever wants it. config VIRTIO
tristate

Quoted 5 lines

Note that it's not user-selectable, so any config file that tries to set it will be ignored when kconfig loads those options. And yet we have a whole set of options that depend on VIRTIO, like VIRTIO_CONSOLE for example. This makes it impossible to have VIRTIO_PCI modular and VIRTIO_CONSOLE built-in on x86_64, because:

Any reason to have VIRTIO_PCI modular instead of built in (on x86-64, virtio-console won't work without virtio-pci anyway)?

Amit

#3 lore raw
Quoted 8 lines · On Fri, 25 Feb 2011 11:38:15 +0530 Amit Shah <[email protected]> wrote:
Quoted 7 lines · Chuck Ebbert

The virtio configuration options are inconsistent. According to this, every options that needs virtio will select it:

# Virtio always gets selected by whoever wants it. config VIRTIO
tristate

Quoted 9 lines
Quoted 5 lines

Note that it's not user-selectable, so any config file that tries to set it will be ignored when kconfig loads those options. And yet we have a whole set of options that depend on VIRTIO, like VIRTIO_CONSOLE for example. This makes it impossible to have VIRTIO_PCI modular and VIRTIO_CONSOLE built-in on x86_64, because:

Any reason to have VIRTIO_PCI modular instead of built in (on x86-64, virtio-console won't work without virtio-pci anyway)?

None that I know of offhand, other than not building in things unless absolutely necessary. There's no dependency of any kind there, so it's even possible to build a kernel with VIRTIO_CONSOLE enabled and VIRTIO_PCI completely disabled.

#4 lore raw
In reply to Amit Shah
Quoted 8 lines · On Fri, 25 Feb 2011 11:38:15 +0530 Amit Shah <[email protected]> wrote:
Quoted 7 lines · Chuck Ebbert

The virtio configuration options are inconsistent. According to this, every options that needs virtio will select it:

# Virtio always gets selected by whoever wants it. config VIRTIO
tristate

Quoted 9 lines
Quoted 5 lines

Note that it's not user-selectable, so any config file that tries to set it will be ignored when kconfig loads those options. And yet we have a whole set of options that depend on VIRTIO, like VIRTIO_CONSOLE for example. This makes it impossible to have VIRTIO_PCI modular and VIRTIO_CONSOLE built-in on x86_64, because:

Any reason to have VIRTIO_PCI modular instead of built in (on x86-64, virtio-console won't work without virtio-pci anyway)?

None that I know of offhand, other than not building in things unless absolutely necessary. There's no dependency of any kind there, so it's even possible to build a kernel with VIRTIO_CONSOLE enabled and VIRTIO_PCI completely disabled.

#5 lore raw
Quoted 17 lines · Chuck Ebbert
Quoted 14 lines · On Fri, 25 Feb 2011 11:38:15 +0530 Amit Shah <[email protected]> wrote:
Quoted 12 lines · Chuck Ebbert

The virtio configuration options are inconsistent. According to this, every options that needs virtio will select it:

# Virtio always gets selected by whoever wants it. config VIRTIO
tristate

Note that it's not user-selectable, so any config file that tries to set it will be ignored when kconfig loads those options. And yet we have a whole set of options that depend on VIRTIO, like VIRTIO_CONSOLE for example. This makes it impossible to have VIRTIO_PCI modular and VIRTIO_CONSOLE built-in on x86_64, because:

Quoted 8 lines
Quoted 3 lines

Any reason to have VIRTIO_PCI modular instead of built in (on x86-64, virtio-console won't work without virtio-pci anyway)?

None that I know of offhand, other than not building in things unless absolutely necessary. There's no dependency of any kind there, so it's even possible to build a kernel with VIRTIO_CONSOLE enabled and VIRTIO_PCI completely disabled.

Yes, that's that way because not all architectures need virtio-pci to have virtio-console functional (eg. s390, which doesn't have a PCI bus).

So if you're only interested in the x86-64 arch, you could compile in virtio-pci and virtio-console and this should happily work.

Amit

#6 lore raw
In reply to Chuck Ebbert
Quoted 17 lines · Chuck Ebbert
Quoted 14 lines · On Fri, 25 Feb 2011 11:38:15 +0530 Amit Shah <[email protected]> wrote:
Quoted 12 lines · Chuck Ebbert

The virtio configuration options are inconsistent. According to this, every options that needs virtio will select it:

# Virtio always gets selected by whoever wants it. config VIRTIO
tristate

Note that it's not user-selectable, so any config file that tries to set it will be ignored when kconfig loads those options. And yet we have a whole set of options that depend on VIRTIO, like VIRTIO_CONSOLE for example. This makes it impossible to have VIRTIO_PCI modular and VIRTIO_CONSOLE built-in on x86_64, because:

Quoted 8 lines
Quoted 3 lines

Any reason to have VIRTIO_PCI modular instead of built in (on x86-64, virtio-console won't work without virtio-pci anyway)?

None that I know of offhand, other than not building in things unless absolutely necessary. There's no dependency of any kind there, so it's even possible to build a kernel with VIRTIO_CONSOLE enabled and VIRTIO_PCI completely disabled.

Yes, that's that way because not all architectures need virtio-pci to have virtio-console functional (eg. s390, which doesn't have a PCI bus).

So if you're only interested in the x86-64 arch, you could compile in virtio-pci and virtio-console and this should happily work.

Amit