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

2011-06-30 Thread Anthony PERARD
On Thu, Jun 30, 2011 at 22:09, Peter Maydell wrote: > On 30 June 2011 20:28, Anthony PERARD wrote: >> @@ -202,6 +201,11 @@ rxbufsize(uint32_t v) >>  static void >>  set_ctrl(E1000State *s, int index, uint32_t val) >>  { >> +    DBGOUT(IO, "set ctrl = %08x\n", val); >> +    if (val & E1000_CTRL_RS

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

2011-06-30 Thread Peter Maydell
On 30 June 2011 20:28, Anthony PERARD wrote: > @@ -202,6 +201,11 @@ rxbufsize(uint32_t v) >  static void >  set_ctrl(E1000State *s, int index, uint32_t val) >  { > +    DBGOUT(IO, "set ctrl = %08x\n", val); > +    if (val & E1000_CTRL_RST) { > +        s->mac_reg[CTRL] = val; > +        e1000_rese

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

2011-06-30 Thread 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 i