WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: 'Jeremy Fitzhardinge' <jeremy@xxxxxxxx>
Subject: [Xen-devel] RE: [PATCH v2] pv-ops: register xen pci notifier
From: "Han, Weidong" <weidong.han@xxxxxxxxx>
Date: Thu, 30 Jul 2009 14:05:25 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "'xen-devel@xxxxxxxxxxxxxxxxxxx'" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "'Keir.Fraser@xxxxxxxxxxxxx'" <Keir.Fraser@xxxxxxxxxxxxx>, "'jbarnes@xxxxxxxxxxxxxxxx'" <jbarnes@xxxxxxxxxxxxxxxx>
Delivery-date: Wed, 29 Jul 2009 23:06:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A7080AB.50105@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1248835104-5875-1-git-send-email-weidong.han@xxxxxxxxx> <4A7080AB.50105@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcoQbmN4xLjKhPPvRQ+qyjFjW6HkGAAbOcBQ
Thread-topic: [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

<Prev in Thread] Current Thread [Next in Thread>