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

[Xen-devel] RE: [PATCH v2] pv-ops: register xen pci notifier



Jeremy Fitzhardinge wrote:
> On 07/28/09 19:38, Weidong Han wrote:
>> Register the notifier to handle hot-plug devices and SR-IOV devices
>> for Xen hypervisor. When a device is hot added or removed, it adds
>> or removes it to Xen via hypercalls.
>> 
>> Changes in v2:
>> Remove inline #ifdef and the awkward dangling else/#endif
>> construction, and rather than using memset, use variable declaration
>> and initializer to assign the elements in xen_add_device.
>> 
> 
> That looks much better.  Just one tiny nit:
> 
>> +
>> +    if (HANDLE_PCI_IOV && pci_dev->is_virtfn) {
>> +            struct physdev_manage_pci_ext manage_pci_ext = {
>> +                    .bus            = pci_dev->bus->number,
>> +                    .devfn          = pci_dev->devfn,
>> +                    .is_extfn       = 0,
>> +                    .is_virtfn      = 1,
>> +                    .physfn.bus     = pci_dev->physfn->bus->number,
>> +                    .physfn.devfn   = pci_dev->physfn->devfn,
>> +            };
>> +
>> +            r = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_add_ext,
>> +                    &manage_pci_ext); +     } else if 
>> (pci_ari_enabled(pci_dev->bus) &&
>> PCI_SLOT(pci_dev->devfn)) { +                struct physdev_manage_pci_ext
>> manage_pci_ext = { +                 .bus            = pci_dev->bus->number,
>> +                    .devfn          = pci_dev->devfn,
>> +                    .is_extfn       = 1,
>> +                    .is_virtfn      = 0,
>> +                    .physfn.bus     = 0,
>> +                    .physfn.devfn   = 0,
>> 
> 
> It isn't necessarily to explicitly initialize elements to 0; that will
> happen implicitly as a result of using an initializer.
> 

Will remove the unnecessary initialization, and send out the updated patch 
soon. Thanks.

Regards,
Weidong


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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