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

2011-06-30 Thread Anthony PERARD
On Tue, Jun 28, 2011 at 06:49, Paolo Bonzini wrote: > On 06/27/2011 08:07 PM, Peter Maydell wrote: >> >> >  +    int ioport_base; >> >  +    uint32_t ioport_reg[2]; >> >> I think ioport_reg[] needs to go in the VMStateDescription as well. >> I don't know enough about the PCI subsystem to know whet

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

2011-06-30 Thread Anthony PERARD
On Mon, Jun 27, 2011 at 19:07, Peter Maydell wrote: > On 27 June 2011 17:34, Anthony PERARD wrote: >> @@ -83,6 +86,8 @@ typedef struct E1000State_st { >>     NICState *nic; >>     NICConf conf; >>     int mmio_index; >> +    int ioport_base; >> +    uint32_t ioport_reg[2]; > > I think ioport_reg[

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

2011-06-27 Thread Paolo Bonzini
On 06/27/2011 08:07 PM, Peter Maydell wrote: > +int ioport_base; > +uint32_t ioport_reg[2]; I think ioport_reg[] needs to go in the VMStateDescription as well. I don't know enough about the PCI subsystem to know whether that's also true of ioport_base or whether the the map function is

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

2011-06-27 Thread Peter Maydell
On 27 June 2011 17:34, Anthony PERARD wrote: > @@ -83,6 +86,8 @@ typedef struct E1000State_st { >     NICState *nic; >     NICConf conf; >     int mmio_index; > +    int ioport_base; > +    uint32_t ioport_reg[2]; I think ioport_reg[] needs to go in the VMStateDescription as well. I don't know en

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

2011-06-27 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

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

2010-10-12 Thread anthony . perard
From: 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. It also check the RDLEN register when a packet is received, if the value is 0, the receive descriptor buffer is