qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] hw: report invalid disable-legacy|modern usage


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH] hw: report invalid disable-legacy|modern usage for virtio-1-only devs
Date: Fri, 1 Feb 2019 17:19:32 -0500

On Mon, Jan 28, 2019 at 03:48:57PM -0200, Eduardo Habkost wrote:
> On Fri, Jan 18, 2019 at 01:38:26PM +0000, Daniel P. Berrangé wrote:
> > A number of virtio devices (gpu, crypto, mouse, keyboard, tablet) only
> > support the virtio-1 (aka modern) mode. Currently if the user launches
> > QEMU, setting those devices to enable legacy mode, QEMU will silently
> > create them in modern mode, ignoring the user's (mistaken) request.
> > 
> > This patch introduces proper data validation so that an attempt to
> > configure a virtio-1-only devices in legacy mode gets reported as an
> > error to the user.
> > 
> > Checking this required introduction of a new field to explicitly track
> > what operating model is to be used for a device, separately from the
> > disable_modern and disable_legacy fields that record the user's
> > requested configuration.
> > 
> > Signed-off-by: Daniel P. Berrangé <address@hidden>
> 
> This breaks the virtio-1-only devices on pc-*-2.6:
> 
>   $ ./x86_64-softmmu/qemu-system-x86_64 -device virtio-vga -machine 
> pc-i440fx-2.6
>   qemu-system-x86_64: -device virtio-vga: Unable to set disable-legacy=off on 
> a virtio-1.0 only device
> 
> Probably the simplest way to fix that is to append the following to
> hw_compat_2_6:
> 
>   { virtio-vga,        disable-modern, off },
>   { virtio-gpu-pci,    disable-modern, off },
>   { virtio-input-pci,  disable-modern, off },
>   { virtio-crypto-pci, disable-modern, off }

Daniel do you plan to take a stub at this approach?

> We could also remove the property completely from those devices
> (e.g. by moving virtio-vga to virtio_vga_info.non_transitional_name),
> but it would break compatibility in case people are explicitly
> setting "disable-modern=off" on those devices.
> 
> -- 
> Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]