[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/3] V4 qemu-xen-trad: Correctly expose PCH ISA bridge for IGD passthrough



On Mon, Jun 17, 2013 at 8:54 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>>> On 17.06.13 at 14:42, "G.R." <firemeteor@xxxxxxxxxxxxxxxxxxxxx> wrote:
>> The i915 driver probes chip version through PCH ISA bridge device / vendor
>> ID.
>> Previously, the PCH ISA bridge is exposed as PCI-PCI bridge in qemu-xen-trad,
>> which breaks the assumption of the driver. This change fixes the issue by
>> correctly exposing the ISA bridge to domU.
>>
>> Note the PIIX3 ISA bridge is still present on the bus (dropping it seems
>> break qemu all-together), i915 driver still need to be updated to handle
>> this.
>>
>> Change since last version:
>>   1. Introduce helper function to avoid exposing PCI_Bus / PCI_Bridge
>> definition to public.
>>
>> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>,
>>                Rui Guo <firemeteor@xxxxxxxxxxxxxxxxxxxxx>
>> Tested-by: Rui Guo <firemeteor@xxxxxxxxxxxxxxxxxxxxx>
>
> I'm fine with this version, but does the above indeed reflect
> reality? I.e. wasn't it you who wrote the patch in its current
> form?
>

Ah! Thanks for pointing this out...
I just keep carrying this sign-off lines from the original version.
So I think I should use these lines for signing-off:
 Signed-off-by: Rui Guo <firemeteor@xxxxxxxxxxxxxxxxxxxxx>
 Tested-by: Rui Guo <firemeteor@xxxxxxxxxxxxxxxxxxxxx>

Do I need to resend the whole thing out?

Rui

> Jan
>
>> --- a/hw/pci.c
>> +++ b/hw/pci.c
>> @@ -938,6 +938,16 @@ PCIBus *pci_bridge_init(PCIBus *bus, int devfn,
>> uint16_t vid, uint16_t did,
>>      return s->bus;
>>  }
>>
>> +PCIBus *pci_isa_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t 
>> did,
>> +                            uint8_t rid, pci_map_irq_fn map_irq, const char 
>> *name)
>> +{
>> +    PCIBus *s = pci_bridge_init(bus, devfn, vid, did, rid, map_irq, name);
>> +
>> +    pci_config_set_class(s->parent_dev->config, PCI_CLASS_BRIDGE_ISA);
>> +    s->parent_dev->config[PCI_HEADER_TYPE] = 0x80;
>> +    return s;
>> +}
>> +
>>  int pt_chk_bar_overlap(PCIBus *bus, int devfn, uint32_t addr,
>>                          uint32_t size, uint8_t type)
>>  {
>> --- a/hw/pci.h
>> +++ b/hw/pci.h
>> @@ -271,6 +271,9 @@ void pci_info(void);
>>  PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did,
>>                          uint8_t rid, pci_map_irq_fn map_irq, const char 
>> *name);
>>
>> +PCIBus *pci_isa_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t 
>> did,
>> +                            uint8_t rid, pci_map_irq_fn map_irq, const char 
>> *name);
>> +
>>  #define NR_PCI_FUNC          8
>>  #define NR_PCI_DEV           32
>>  #define NR_PCI_DEVFN         (NR_PCI_FUNC * NR_PCI_DEV)
>> --- a/hw/pt-graphics.c
>> +++ b/hw/pt-graphics.c
>> @@ -3,6 +3,7 @@
>>   */
>>
>>  #include "pass-through.h"
>> +#include "pci.h"
>>  #include "pci/header.h"
>>  #include "pci/pci.h"
>>
>> @@ -40,9 +41,11 @@ void intel_pch_init(PCIBus *bus)
>>      did = pt_pci_host_read(pci_dev_1f, PCI_DEVICE_ID, 2);
>>      rid = pt_pci_host_read(pci_dev_1f, PCI_REVISION, 1);
>>
>> -    if ( vid == PCI_VENDOR_ID_INTEL )
>> -        pci_bridge_init(bus, PCI_DEVFN(0x1f, 0), vid, did, rid,
>> -                        pch_map_irq, "intel_bridge_1f");
>> +    if (vid == PCI_VENDOR_ID_INTEL) {
>> +        pci_isa_bridge_init(bus, PCI_DEVFN(0x1f, 0), vid, did, rid,
>> +                            pch_map_irq, "intel_bridge_1f");
>> +
>> +    }
>>  }
>>
>>  uint32_t igd_read_opregion(struct pt_dev *pci_dev)
>
>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.