All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, aik@ozlabs.ru, agraf@suse.de,
	mdroth@linux.vnet.ibm.com, qemu-ppc@nongnu.org,
	david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [PATCH v3 2/6] spapr_pci: encode missing 64-bit memory address space
Date: Wed, 06 May 2015 11:14:32 +0530	[thread overview]
Message-ID: <87pp6ejm4f.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <20150505162833.3d0141e2@thh440s>

Thomas Huth <thuth@redhat.com> writes:

> On Tue,  5 May 2015 14:23:52 +0530
> Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> wrote:
>
>> The properties reg/assigned-resources need to encode 64-bit memory
>> address space as part of phys.hi dword.
>> 
>>   00 if configuration space
>>   01 if IO region,
>>   10 if 32-bit MEM region
>>   11 if 64-bit MEM region
>> 
>> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
>> ---
>>  hw/ppc/spapr_pci.c | 10 +++++++++-
>>  1 file changed, 9 insertions(+), 1 deletion(-)
>> 
>> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
>> index 4df3a33..ea1a092 100644
>> --- a/hw/ppc/spapr_pci.c
>> +++ b/hw/ppc/spapr_pci.c
>> @@ -786,7 +786,13 @@ typedef struct ResourceProps {
>>   * phys.hi = 0xYYXXXXZZ, where:
>>   *   0xYY = npt000ss
>>   *          |||   |
>> - *          |||   +-- space code: 1 if IO region, 2 if MEM region
>> + *          |||   +-- space code
>> + *          |||               |
>> + *          |||               +  00 if configuration space
>> + *          |||               +  01 if IO region,
>> + *          |||               +  10 if 32-bit MEM region
>> + *          |||               +  11 if 64-bit MEM region
>> + *          |||
>>   *          ||+------ for non-relocatable IO: 1 if aliased
>>   *          ||        for relocatable IO: 1 if below 64KB
>>   *          ||        for MEM: 1 if below 1MB
>> @@ -846,6 +852,8 @@ static void populate_resource_props(PCIDevice *d, ResourceProps *rp)
>>          reg->phys_hi = cpu_to_be32(dev_id | b_rrrrrrrr(pci_bar(d, i)));
>>          if (d->io_regions[i].type & PCI_BASE_ADDRESS_SPACE_IO) {
>>              reg->phys_hi |= cpu_to_be32(b_ss(1));
>> +        } else if (d->io_regions[i].type & PCI_BASE_ADDRESS_MEM_TYPE_64) {
>> +            reg->phys_hi |= cpu_to_be32(b_ss(3));
>>          } else {
>>              reg->phys_hi |= cpu_to_be32(b_ss(2));
>>          }
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
>
> BTW, does this also require the new version of SLOF already?

Not yet, only after patch 4/6 newer SLOF would be needed.

This fixes the hotplug case for device requesting 64-bit bars, like
nec-usb-xhci.

Regards,
Nikunj

  reply	other threads:[~2015-05-06  5:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05  8:53 [Qemu-devel] [PATCH v3 0/6] spapr_pci: DT field fixes and PCI DT node creation in QEMU Nikunj A Dadhania
2015-05-05  8:53 ` [Qemu-devel] [PATCH v3 1/6] spapr_pci: remove duplicate macros Nikunj A Dadhania
2015-05-05 13:53   ` Thomas Huth
2015-05-06  5:41     ` Nikunj A Dadhania
2015-05-07  0:55       ` David Gibson
2015-05-07  4:55         ` Nikunj A Dadhania
2015-05-05  8:53 ` [Qemu-devel] [PATCH v3 2/6] spapr_pci: encode missing 64-bit memory address space Nikunj A Dadhania
2015-05-05 14:28   ` Thomas Huth
2015-05-06  5:44     ` Nikunj A Dadhania [this message]
2015-05-06  7:01       ` Thomas Huth
2015-05-06  8:23         ` Nikunj A Dadhania
2015-05-05  8:53 ` [Qemu-devel] [PATCH v3 3/6] spapr_pci: encode class code including Prog IF register Nikunj A Dadhania
2015-05-05 12:55   ` David Gibson
2015-05-05 14:50     ` Thomas Huth
2015-05-05  8:53 ` [Qemu-devel] [PATCH v3 4/6] spapr_pci: enumerate and add PCI device tree Nikunj A Dadhania
2015-05-05 15:32   ` Thomas Huth
2015-05-06  5:56     ` Nikunj A Dadhania
2015-05-05  8:53 ` [Qemu-devel] [PATCH v3 5/6] spapr_pci: fix boot-time device tree fields for pci hotplug Nikunj A Dadhania
2015-05-05 13:09   ` David Gibson
2015-05-06  5:57     ` Nikunj A Dadhania
2015-05-05  8:53 ` [Qemu-devel] [PATCH v3 6/6] spapr_pci: populate ibm,loc-code Nikunj A Dadhania
2015-05-05 16:03   ` Thomas Huth
2015-05-06  6:14     ` Nikunj A Dadhania
2015-05-07  0:32       ` David Gibson
2015-05-07  4:56         ` Nikunj A Dadhania
  -- strict thread matches above, loose matches on Subject: below --
2015-05-05  8:43 [Qemu-devel] [PATCH v3 0/6] spapr_pci: DT field fixes and PCI DT node creation in QEMU Nikunj A Dadhania
2015-05-05  8:43 ` [Qemu-devel] [PATCH v3 2/6] spapr_pci: encode missing 64-bit memory address space Nikunj A Dadhania

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pp6ejm4f.fsf@linux.vnet.ibm.com \
    --to=nikunj@linux.vnet.ibm.com \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=david@gibson.dropbear.id.au \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.