qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel@redhat.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Aleksandr Bezzubikov <zuban32s@gmail.com>
Cc: seabios@seabios.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH 2/2] pci: enable RedHat pci bridges to reserve more buses
Date: Wed, 19 Jul 2017 17:30:38 +0300	[thread overview]
Message-ID: <ff0883c0-ed89-71eb-a322-3c99c20c1db8@redhat.com> (raw)
In-Reply-To: <20170719135612.GF5722@char.us.oracle.com>

On 19/07/2017 16:56, Konrad Rzeszutek Wilk wrote:
> On Wed, Jul 19, 2017 at 04:20:14PM +0300, Aleksandr Bezzubikov wrote:
>> In case of RedHat PCI bridges reserve additional buses, which number is provided
> 
> It is "Red Hat"
>> in a vendor-specific capability.
> 
> And perhaps also a #define ?

Right, please add it to src/hw/pci_ids.h.

Thanks,
Marcel


>>
>> Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
>> ---
>>   src/fw/pciinit.c | 12 ++++++++++--
>>   1 file changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c
>> index 08221e6..b6f3a01 100644
>> --- a/src/fw/pciinit.c
>> +++ b/src/fw/pciinit.c
>> @@ -578,9 +578,17 @@ pci_bios_init_bus_rec(int bus, u8 *pci_bus)
>>           pci_bios_init_bus_rec(secbus, pci_bus);
>>   
>>           if (subbus != *pci_bus) {
>> +            u16 vendor = pci_config_readw(bdf, PCI_VENDOR_ID);
>> +            u8 res_bus = 0;
>> +            if (vendor == 0x1b36) {
>> +                u8 cap = pci_find_capability_bdf(bdf, PCI_CAP_ID_VNDR, 0);
>> +                if (cap) {
>> +                    res_bus = pci_config_readb(bdf, cap + 16);
>> +                }
>> +            }
>>               dprintf(1, "PCI: subordinate bus = 0x%x -> 0x%x\n",
>> -                    subbus, *pci_bus);
>> -            subbus = *pci_bus;
>> +                    subbus, *pci_bus + res_bus);
>> +            subbus = *pci_bus + res_bus;
>>           } else {
>>               dprintf(1, "PCI: subordinate bus = 0x%x\n", subbus);
>>           }
>> -- 
>> 2.7.4
>>
>>

  reply	other threads:[~2017-07-19 14:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 13:20 [Qemu-devel] [RFC PATCH 0/2] Allow RedHat PCI bridges reserve more buses than necessary during init Aleksandr Bezzubikov
2017-07-19 13:20 ` [Qemu-devel] [RFC PATCH 1/2] pci: add support for direct usage of bdf for capability lookup Aleksandr Bezzubikov
2017-07-19 14:24   ` Marcel Apfelbaum
2017-07-19 13:20 ` [Qemu-devel] [RFC PATCH 2/2] pci: enable RedHat pci bridges to reserve more buses Aleksandr Bezzubikov
2017-07-19 13:56   ` Konrad Rzeszutek Wilk
2017-07-19 14:30     ` Marcel Apfelbaum [this message]
2017-07-19 13:57 ` [Qemu-devel] [RFC PATCH 0/2] Allow RedHat PCI bridges reserve more buses than necessary during init Konrad Rzeszutek Wilk
2017-07-19 17:14   ` Alexander Bezzubikov
2017-07-19 18:18     ` Konrad Rzeszutek Wilk
     [not found]       ` <CAKSfGUCp=AFDjm24bMOpaSAA5FiDZXO0ZrBvuCp4wT+5EbhqDA@mail.gmail.com>
2017-07-19 18:38         ` [Qemu-devel] Fwd: " Alexander Bezzubikov
2017-07-19 18:56           ` Konrad Rzeszutek Wilk
2017-07-19 19:37             ` Marcel Apfelbaum
2017-07-20  6:52 ` [Qemu-devel] [SeaBIOS] " Gerd Hoffmann
2017-07-21  8:19   ` Marcel Apfelbaum
2017-07-21 10:04     ` Gerd Hoffmann
2017-07-21 12:15       ` Marcel Apfelbaum
2017-07-21 12:42         ` Gerd Hoffmann
2017-07-21 13:40           ` Marcel Apfelbaum
2017-07-24  8:41             ` Gerd Hoffmann
2017-07-21 17:28         ` Kevin O'Connor
2017-07-21 18:21           ` Marcel Apfelbaum
2017-07-24  8:39           ` Gerd Hoffmann

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=ff0883c0-ed89-71eb-a322-3c99c20c1db8@redhat.com \
    --to=marcel@redhat.com \
    --cc=konrad.wilk@oracle.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    --cc=zuban32s@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).