From: Leonid Bloch Date: Wed, 11 Nov 2015 13:52:47 +0000 (+0200) Subject: e1000: Introducing backward compatibility command line parameter X-Git-Tag: v2.5.0-rc0~7^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ba63ec8594a5dd412182aced07b4bf042403766a;p=thirdparty%2Fqemu.git e1000: Introducing backward compatibility command line parameter This follows the previous patches, where support for migrating the entire MAC registers' array, and some new MAC registers were introduced. This patch introduces the e1000-specific boolean parameter "extra_mac_registers", which is on by default. Setting it to off will enable migration to older versions of QEMU, but will disable the read and write access to the new registers, that were introduced since adding the ability to migrate the entire MAC array. Example for usage to enable backward compatibility and to disable the new MAC registers: qemu-system-x86_64 -device e1000,extra_mac_registers=off,... ... As mentioned above, the default value is "on". Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 793286a844f..c877e06c5d8 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -1854,6 +1854,8 @@ static Property e1000_properties[] = { compat_flags, E1000_FLAG_AUTONEG_BIT, true), DEFINE_PROP_BIT("mitigation", E1000State, compat_flags, E1000_FLAG_MIT_BIT, true), + DEFINE_PROP_BIT("extra_mac_registers", E1000State, + compat_flags, E1000_FLAG_MAC_BIT, true), DEFINE_PROP_END_OF_LIST(), }; diff --git a/include/hw/compat.h b/include/hw/compat.h index 93e71afb4ae..896a1b05082 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -6,7 +6,11 @@ .driver = "virtio-blk-device",\ .property = "scsi",\ .value = "true",\ - }, + },{\ + .driver = "e1000",\ + .property = "extra_mac_registers",\ + .value = "off",\ + }, #define HW_COMPAT_2_3 \ {\