Re: [Qemu-devel] [PATCH 2/3] Add a new PCI region type to supports 64 bit ranges

2012-01-03 Thread Kevin O'Connor
On Tue, Jan 03, 2012 at 04:14:58PM +0100, Gerd Hoffmann wrote: > On 12/29/11 03:56, Kevin O'Connor wrote: > > Tracking of 64bit prefmem sections separately from > > regular prefmem sections doesn't make sense, because both need to be > > allocated from the same pool when behind a bridge. > > Yea,

Re: [Qemu-devel] [PATCH 2/3] Add a new PCI region type to supports 64 bit ranges

2012-01-03 Thread Gerd Hoffmann
On 12/29/11 03:56, Kevin O'Connor wrote: > On Wed, Dec 28, 2011 at 06:26:05PM +1300, Alexey Korolev wrote: >> This patch adds PCI_REGION_TYPE_PREFMEM_64 region type and modifies types of >> variables to make it possible to work with 64 bit addresses. >> >> Why I've added just one region type PCI_RE

Re: [Qemu-devel] [PATCH 2/3] Add a new PCI region type to supports 64 bit ranges

2011-12-29 Thread Kevin O'Connor
On Thu, Dec 29, 2011 at 06:00:04PM +1300, Alexey Korolev wrote: > On 29/12/11 15:56, Kevin O'Connor wrote: > >On Wed, Dec 28, 2011 at 06:26:05PM +1300, Alexey Korolev wrote: > >>--- a/src/pciinit.c > >>+++ b/src/pciinit.c > >>@@ -22,6 +22,7 @@ enum pci_region_type { > >> PCI_REGION_TYPE_IO, >

Re: [Qemu-devel] [PATCH 2/3] Add a new PCI region type to supports 64 bit ranges

2011-12-29 Thread Michael S. Tsirkin
On Thu, Dec 29, 2011 at 06:32:37PM +1300, Alexey Korolev wrote: > > >>@@ -69,6 +72,8 @@ static enum pci_region_type pci_addr_to_type(u32 addr) > >> { > >> if (addr& PCI_BASE_ADDRESS_SPACE_IO) > >> return PCI_REGION_TYPE_IO; > >>+if (addr& PCI_BASE_ADDRESS_MEM_TYPE_64) > >>+

Re: [Qemu-devel] [PATCH 2/3] Add a new PCI region type to supports 64 bit ranges

2011-12-28 Thread Alexey Korolev
@@ -69,6 +72,8 @@ static enum pci_region_type pci_addr_to_type(u32 addr) { if (addr& PCI_BASE_ADDRESS_SPACE_IO) return PCI_REGION_TYPE_IO; +if (addr& PCI_BASE_ADDRESS_MEM_TYPE_64) +return PCI_REGION_TYPE_PREFMEM_64; This seems dangerous - a 64bit bar can be non-p

Re: [Qemu-devel] [PATCH 2/3] Add a new PCI region type to supports 64 bit ranges

2011-12-28 Thread Alexey Korolev
On 29/12/11 15:56, Kevin O'Connor wrote: On Wed, Dec 28, 2011 at 06:26:05PM +1300, Alexey Korolev wrote: This patch adds PCI_REGION_TYPE_PREFMEM_64 region type and modifies types of variables to make it possible to work with 64 bit addresses. Why I've added just one region type PCI_REGION_TYPE_

Re: [Qemu-devel] [PATCH 2/3] Add a new PCI region type to supports 64 bit ranges

2011-12-28 Thread Alexey Korolev
On 29/12/11 00:30, Michael S. Tsirkin wrote: On Wed, Dec 28, 2011 at 06:26:05PM +1300, Alexey Korolev wrote: This patch adds PCI_REGION_TYPE_PREFMEM_64 region type and modifies types of variables to make it possible to work with 64 bit addresses. Why I've added just one region type PCI_REGION_T

Re: [Qemu-devel] [PATCH 2/3] Add a new PCI region type to supports 64 bit ranges

2011-12-28 Thread Kevin O'Connor
On Wed, Dec 28, 2011 at 06:26:05PM +1300, Alexey Korolev wrote: > This patch adds PCI_REGION_TYPE_PREFMEM_64 region type and modifies types of > variables to make it possible to work with 64 bit addresses. > > Why I've added just one region type PCI_REGION_TYPE_PREFMEM_64 and haven't > added PCI_R

Re: [Qemu-devel] [PATCH 2/3] Add a new PCI region type to supports 64 bit ranges

2011-12-28 Thread Michael S. Tsirkin
On Wed, Dec 28, 2011 at 06:26:05PM +1300, Alexey Korolev wrote: > This patch adds PCI_REGION_TYPE_PREFMEM_64 region type and modifies types of > variables to make it possible to work with 64 bit addresses. > > Why I've added just one region type PCI_REGION_TYPE_PREFMEM_64 and haven't > added PCI_R

[Qemu-devel] [PATCH 2/3] Add a new PCI region type to supports 64 bit ranges

2011-12-27 Thread Alexey Korolev
This patch adds PCI_REGION_TYPE_PREFMEM_64 region type and modifies types of variables to make it possible to work with 64 bit addresses. Why I've added just one region type PCI_REGION_TYPE_PREFMEM_64 and haven't added PCI_REGION_TYPE_MEM_64? According to PCI architecture specification, the brid