[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 10/12] e1000: Introducing backward compatibility c
From: |
Jason Wang |
Subject: |
[Qemu-devel] [PULL v2 10/12] e1000: Introducing backward compatibility command line parameter |
Date: |
Thu, 12 Nov 2015 16:32:28 +0800 |
From: Leonid Bloch <address@hidden>
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 <address@hidden>
Signed-off-by: Dmitry Fleytman <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
---
hw/net/e1000.c | 2 ++
include/hw/compat.h | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 793286a..c877e06 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 93e71af..896a1b0 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 \
{\
--
2.1.4
- [Qemu-devel] [PULL v2 00/12] Net patches, Jason Wang, 2015/11/12
- [Qemu-devel] [PULL v2 01/12] slirp: Fix type casts and format strings in debug code, Jason Wang, 2015/11/12
- [Qemu-devel] [PULL v2 02/12] e1000: Cosmetic and alignment fixes, Jason Wang, 2015/11/12
- [Qemu-devel] [PULL v2 03/12] e1000: Add support for migrating the entire MAC registers' array, Jason Wang, 2015/11/12
- [Qemu-devel] [PULL v2 04/12] e1000: Introduced an array to control the access to the MAC registers, Jason Wang, 2015/11/12
- [Qemu-devel] [PULL v2 05/12] e1000: Trivial implementation of various MAC registers, Jason Wang, 2015/11/12
- [Qemu-devel] [PULL v2 06/12] e1000: Fixing the received/transmitted packets' counters, Jason Wang, 2015/11/12
- [Qemu-devel] [PULL v2 07/12] e1000: Fixing the received/transmitted octets' counters, Jason Wang, 2015/11/12
- [Qemu-devel] [PULL v2 08/12] e1000: Fixing the packet address filtering procedure, Jason Wang, 2015/11/12
- [Qemu-devel] [PULL v2 09/12] e1000: Implementing various counters, Jason Wang, 2015/11/12
- [Qemu-devel] [PULL v2 10/12] e1000: Introducing backward compatibility command line parameter,
Jason Wang <=
- [Qemu-devel] [PULL v2 11/12] net: netmap: Fix compilation issue, Jason Wang, 2015/11/12
- [Qemu-devel] [PULL v2 12/12] net: netmap: use error_setg() helpers in place of error_report(), Jason Wang, 2015/11/12
- Re: [Qemu-devel] [PULL v2 00/12] Net patches, Peter Maydell, 2015/11/12