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/
Home Products Support Community News


[Xen-devel] RE: [PATCH]xend: pass-through: fix "xm pci-list-assignable-d

To: Simon Horman <horms@xxxxxxxxxxxx>
Subject: [Xen-devel] RE: [PATCH]xend: pass-through: fix "xm pci-list-assignable-devices' for pv_guest
From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Date: Wed, 29 Jul 2009 10:26:21 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
Delivery-date: Tue, 28 Jul 2009 19:27:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090728105625.GA1855@xxxxxxxxxxxx>
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: <EADF0A36011179459010BDF5142A457501CB84C41C@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20090728105625.GA1855@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcoPchJbvzkW9CMjRxeGpyCYAe57bwAgR64g
Thread-topic: [PATCH]xend: pass-through: fix "xm pci-list-assignable-devices' for pv_guest
Simon Horman wrote:
>> pci_dict_to_bdf_str(new_dev)) +        pci_name =
>> '%04x:%02x:%02x.%x' % \ +          (parse_hex(new_dev['domain']),\
>> +           parse_hex(new_dev['bus']),\
>> +           parse_hex(new_dev['slot']),\
>> +           parse_hex(new_dev['func']))
>   You should be able to use pci_name = pci_dict_to_bdf_str(new_dev)
>   here instead of the above 5 lines.
Hi Simon,
Agree.  Your suggestion is good. 

>> +        if pci_name in get_all_assigned_pci_devices():
>> +            raise VmError("failed to assign device %s that has"
>> +                          " already been assigned to other domain."
>> % pci_str) 
>   Should pci_str be pci_name in the line above ?
Thanks a lot for the careful review!
Actually I corrected the mistake in my side, but I didn't send the latest 
version... :-(
I'll ack the fix you sent out just now.

-- Dexuan

Xen-devel mailing list