qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] virtio: fix HW_COMPAT_2_6 macro for virtio-*-pc


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH] virtio: fix HW_COMPAT_2_6 macro for virtio-*-pci drivers
Date: Tue, 6 Dec 2016 17:19:52 -0200
User-agent: Mutt/1.7.1 (2016-10-04)

On Tue, Dec 06, 2016 at 06:50:47PM +0100, Greg Kurz wrote:
> Since commit "9a4c0e220d8a hw/virtio-pci: fix virtio behaviour", passing
> -device virtio-blk-pci.disable-modern=off has no effect on 2.6 machine
> types because the internal virtio-pci.disable-modern=on compat property
> always prevail.
> 
> This should ideally be fixed in the qdev properties core code, but it is
> too late in the QEMU 2.8 schedule. So this patch fixes the issue by setting
> the compat properties for every virtio-*-pci subtypes instead of the base
> virtio-pci type.
> 
> Signed-off-by: Greg Kurz <address@hidden>

So, it looks like the bug is present in many other cases...

I have hacked QEMU to print a warning in case the driver name in
compat_props refer to an abstract class or a class that have any
subclasses. The results are below:

 apic-common.legacy-instance-id set for abstract class
 apic-common.vapic set for abstract class
 i386-cpu.arat set for abstract class
 i386-cpu.check set for abstract class
 i386-cpu.cpuid-0xb set for abstract class
 i386-cpu.fill-mtrr-mask set for abstract class
 i386-cpu.full-cpuid-auto-level set for abstract class
 i386-cpu.l3-cache set for abstract class
 i386-cpu.pmu set for abstract class
 pci-device.command_serr_enable set for abstract class
 pci-device.rombar set for abstract class
 pci-device.x-pcie-lnksta-dllla set for abstract class
 powerpc64-cpu.pre-2.8-migration set for abstract class
 s390-skeys.migration-enabled set for abstract class
 spapr-pci-host-bridge.ddw set for superclass
 spapr-pci-host-bridge.dynamic-reconfiguration set for superclass
 spapr-pci-host-bridge.mem64_win_size set for superclass
 spapr-pci-host-bridge.mem_win_size set for superclass
 spapr-pci-host-bridge.pre-2.8-migration set for superclass
 usb-device.full-path set for abstract class
 usb-device.msos-desc set for abstract class
 virtio-pci.disable-legacy set for abstract class
 virtio-pci.disable-modern set for abstract class
 virtio-pci.migrate-extra set for abstract class
 virtio-pci.page-per-vq set for abstract class
 virtio-pci.virtio-pci-bus-master-bug-migration set for abstract class
 virtio-pci.x-disable-pcie set for abstract class
 x86_64-cpu.arat set for abstract class
 x86_64-cpu.check set for abstract class
 x86_64-cpu.cpuid-0xb set for abstract class
 x86_64-cpu.fill-mtrr-mask set for abstract class
 x86_64-cpu.full-cpuid-auto-level set for abstract class
 x86_64-cpu.l3-cache set for abstract class
 x86_64-cpu.pmu set for abstract class

I believe the cases where we are likely to cause real-world bugs
are virtio-pci and the *-cpu classes (because -cpu is translated
to -global).

I'm not sure what should be the right fix in 2.8. I am
considering a temporary hack to translate abstract class names in
compat_props to global properties for all subclasses, in case
they refer to an abstract class. This way we fix the bug where
-global doesn't override compat_props properly, but keep the
rules for -global untouched.

-- 
Eduardo



reply via email to

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