qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V3] e1000: Handle IO Port.


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH V3] e1000: Handle IO Port.
Date: Sat, 2 Jul 2011 19:35:08 +0200

Am 30.06.2011 um 23:35 schrieb Anthony PERARD:

This patch introduces the two IOPorts on e1000, IOADDR and IODATA. The
IOADDR is used to specify which register we want to access when we read
or write on IODATA.

This patch fixes some weird behavior that I see when I use e1000 with
QEMU/Xen, the guest memory can be corrupted by this NIC because it will write on memory that it doesn't own anymore after a reset. It's because the kernel Linux use the IOPort to reset the network card instead of the
MMIO.

Signed-off-by: Anthony PERARD <address@hidden>
---

diff --git a/hw/e1000.c b/hw/e1000.c
index 96d84f9..bd39d80 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c

@@ -971,7 +1006,7 @@ static bool is_version_1(void *opaque, int version_id)

static const VMStateDescription vmstate_e1000 = {
    .name = "e1000",
-    .version_id = 2,
+    .version_id = 3,
    .minimum_version_id = 1,
    .minimum_version_id_old = 1,
    .fields      = (VMStateField []) {
@@ -1043,6 +1078,7 @@ static const VMStateDescription vmstate_e1000 = {
        VMSTATE_UINT32_SUB_ARRAY(mac_reg, E1000State, RA, 32),
        VMSTATE_UINT32_SUB_ARRAY(mac_reg, E1000State, MTA, 128),
        VMSTATE_UINT32_SUB_ARRAY(mac_reg, E1000State, VFTA, 128),
+        VMSTATE_UINT32_V(ioport_addr, E1000State, 3),
        VMSTATE_END_OF_LIST()
    }
};

Juan, shouldn't this use a subsection instead of bumping the version?

Andreas



reply via email to

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