Re: [Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-07 Thread Laszlo Ersek
On 08/07/15 22:40, Kevin O'Connor wrote: > On Thu, Aug 06, 2015 at 04:59:15PM +0200, Marc Marí wrote: >> On Thu, 6 Aug 2015 10:47:21 -0400 >> "Kevin O'Connor" wrote: >>> Also, it's very unusual to see 32bit writes to an unaligned IO address >>> - I think two pad bytes should be added so that the o

Re: [Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-07 Thread Kevin O'Connor
On Thu, Aug 06, 2015 at 04:59:15PM +0200, Marc Marí wrote: > On Thu, 6 Aug 2015 10:47:21 -0400 > "Kevin O'Connor" wrote: > > Also, it's very unusual to see 32bit writes to an unaligned IO address > > - I think two pad bytes should be added so that the offset for the dma > > address is at position

Re: [Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-07 Thread Eric Blake
On 08/06/2015 03:32 PM, Laszlo Ersek wrote: > (If you wanted to poke fun at me, you could say that I just repeated > what Kevin had said, only worse. Thing is, I really don't recall seeing > his message. Let me search my mailbox for a substring from your above > quote... Yep, I don't have that mes

Re: [Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-07 Thread Marc Marí
On Thu, 6 Aug 2015 23:32:50 +0200 Laszlo Ersek wrote: > On 08/06/15 23:11, Marc Marí wrote: > > On Thu, 6 Aug 2015 22:49:12 +0200 > > Laszlo Ersek wrote: > > > > [...] > > > >>> +static void fw_cfg_dma_mem_write(void *opaque, hwaddr addr, > >>> + uint64_t value,

Re: [Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-06 Thread Marc Marí
On Thu, 6 Aug 2015 22:49:12 +0200 Laszlo Ersek wrote: [...] > > +static void fw_cfg_dma_mem_write(void *opaque, hwaddr addr, > > + uint64_t value, unsigned size) > > +{ > > +FWCfgState *s = opaque; > > + > > +s->dma_addr = be64_to_cpu(value); > > +fw_c

Re: [Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-06 Thread Laszlo Ersek
On 08/06/15 23:11, Marc Marí wrote: > On Thu, 6 Aug 2015 22:49:12 +0200 > Laszlo Ersek wrote: > > [...] > >>> +static void fw_cfg_dma_mem_write(void *opaque, hwaddr addr, >>> + uint64_t value, unsigned size) >>> +{ >>> +FWCfgState *s = opaque; >>> + >>> +s

Re: [Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-06 Thread Laszlo Ersek
On 08/06/15 13:01, Marc Marí wrote: > Based on the specifications on docs/specs/fw_cfg.txt > > This interface is an addon. The old interface can still be used as usual. > > For x86 arch, this addon will use one extra port (0x512). For ARM, it will > use 8 more bytes, following the actual implemen

Re: [Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-06 Thread Marc Marí
On Thu, 6 Aug 2015 10:47:21 -0400 "Kevin O'Connor" wrote: > On Thu, Aug 06, 2015 at 01:01:16PM +0200, Marc Marí wrote: > > Based on the specifications on docs/specs/fw_cfg.txt > > > > This interface is an addon. The old interface can still be used as > > usual. > > > > For x86 arch, this addon

Re: [Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-06 Thread Kevin O'Connor
On Thu, Aug 06, 2015 at 01:01:16PM +0200, Marc Marí wrote: > Based on the specifications on docs/specs/fw_cfg.txt > > This interface is an addon. The old interface can still be used as usual. > > For x86 arch, this addon will use one extra port (0x512). For ARM, it will > use 8 more bytes, follow

[Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-06 Thread Marc Marí
Based on the specifications on docs/specs/fw_cfg.txt This interface is an addon. The old interface can still be used as usual. For x86 arch, this addon will use one extra port (0x512). For ARM, it will use 8 more bytes, following the actual implementation. Based on Gerd Hoffman's initial impleme