Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-16 Thread Peter Maydell
On 16 September 2013 07:14, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 10:41:26PM +0100, Peter Maydell wrote: >> On 15 September 2013 22:07, Michael S. Tsirkin wrote: >> > On Sun, Sep 15, 2013 at 09:40:37PM +0100, Peter Maydell wrote: >> >> "native" means "if the device's MMIO callback d

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 10:41:26PM +0100, Peter Maydell wrote: > On 15 September 2013 22:07, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 09:40:37PM +0100, Peter Maydell wrote: > >> "native" means "if the device's MMIO callback does 'return 0x12345678;' > >> for a 32 bit read then the gue

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Peter Maydell
On 15 September 2013 22:07, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 09:40:37PM +0100, Peter Maydell wrote: >> "native" means "if the device's MMIO callback does 'return 0x12345678;' >> for a 32 bit read then the guest CPU should see 0x12345678". That's >> almost always what you want fo

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 09:40:37PM +0100, Peter Maydell wrote: > On 15 September 2013 21:25, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 06:32:13PM +0100, Peter Maydell wrote: > >> On 15 September 2013 18:30, Michael S. Tsirkin wrote: > >> > On Sun, Sep 15, 2013 at 07:16:41PM +0300, Mar

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Peter Maydell
On 15 September 2013 21:25, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 06:32:13PM +0100, Peter Maydell wrote: >> On 15 September 2013 18:30, Michael S. Tsirkin wrote: >> > On Sun, Sep 15, 2013 at 07:16:41PM +0300, Marcel Apfelbaum wrote: >> >> +static const MemoryRegionOps master_abort_m

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 06:32:13PM +0100, Peter Maydell wrote: > On 15 September 2013 18:30, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 07:16:41PM +0300, Marcel Apfelbaum wrote: > >> +static const MemoryRegionOps master_abort_mem_ops = { > >> +.read = master_abort_mem_read, > >> +

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Marcel Apfelbaum
On Sun, 2013-09-15 at 18:32 +0100, Peter Maydell wrote: > On 15 September 2013 18:30, Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2013 at 07:16:41PM +0300, Marcel Apfelbaum wrote: > >> +static const MemoryRegionOps master_abort_mem_ops = { > >> +.read = master_abort_mem_read, > >> +.writ

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Marcel Apfelbaum
On Sun, 2013-09-15 at 20:30 +0300, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 07:16:41PM +0300, Marcel Apfelbaum wrote: > > A MemoryRegion with negative priority was created and > > it spans over all the pci address space. > > It "intercepts" the accesses to unassigned pci > > address spac

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Peter Maydell
On 15 September 2013 18:30, Michael S. Tsirkin wrote: > On Sun, Sep 15, 2013 at 07:16:41PM +0300, Marcel Apfelbaum wrote: >> +static const MemoryRegionOps master_abort_mem_ops = { >> +.read = master_abort_mem_read, >> +.write = master_abort_mem_write, >> +.endianness = DEVICE_NATIVE_EN

Re: [Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 07:16:41PM +0300, Marcel Apfelbaum wrote: > A MemoryRegion with negative priority was created and > it spans over all the pci address space. > It "intercepts" the accesses to unassigned pci > address space and will follow the pci spec: > 1. returns -1 on read > 2. does not

[Qemu-devel] [PATCH v4 3/3] hw/pci: handle downstream pci master abort

2013-09-15 Thread Marcel Apfelbaum
A MemoryRegion with negative priority was created and it spans over all the pci address space. It "intercepts" the accesses to unassigned pci address space and will follow the pci spec: 1. returns -1 on read 2. does nothing on write Note: setting the RECEIVED MASTER ABORT bit in the STATUS regis