]> git.baikalelectronics.ru Git - kernel.git/commit
lguest: don't look in console features to find emerg_wr.
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 13 Feb 2015 06:43:43 +0000 (17:13 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 13 Feb 2015 06:45:51 +0000 (17:15 +1030)
commit84add489d7a96a43e91401db5b483938c0a02426
tree6291c81f9c5456dff1a1c284f8aa14a851f7e5b1
parent4712a527dd37ebf71d1726998b7dae74432e0a3b
lguest: don't look in console features to find emerg_wr.

The 1.0 spec clearly states that you must set the ACKNOWLEDGE and
DRIVER status bits before accessing the feature bits.  This is a
problem for the early console code, which doesn't really want to
acknowledge the device (the spec specifically excepts writing to the
console's emerg_wr from the usual ordering constrains).

Instead, we check that the *size* of the device configuration is
sufficient to hold emerg_wr: at worst (if the device doesn't support
the VIRTIO_CONSOLE_F_EMERG_WRITE feature), it will ignore the
writes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
arch/x86/lguest/boot.c