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

Re: [Xen-devel] [PATCH] libxl: Allow PV guests to add a PCI device with

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] libxl: Allow PV guests to add a PCI device without an IOMMU
From: Mihir Nanavati <mihirn@xxxxxxxxx>
Date: Fri, 30 Jul 2010 17:27:00 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 30 Jul 2010 09:27:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19538.62497.937964.257710@xxxxxxxxxxxxxxxxxxxxxxxx>
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: <AANLkTimEK-iQ6Btrd3qo2Qpoohj359T=Y40pSiVinNkd@xxxxxxxxxxxxxx> <19538.62497.937964.257710@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Stylistically, I'd be happy to follow any suggestions you have - would
just switching it to
errno != ENOSYS be sufficient?

I think the content is ok - in HVM it effectively becomes if(rc < 0)
and in PV guests it becomes if(rc < 0 && errno != ENOSYS) which should
be correct. Or am I missing something?

~M

On Fri, Jul 30, 2010 at 4:47 PM, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> wrote:
> Mihir Nanavati writes ("[Xen-devel] [PATCH] libxl: Allow PV guests to add a 
> PCI device without an IOMMU"):
>> Added a check which allows adding and removal of PCI devices for PV
>> guests in the absence of an IOMMU
>
> +        if (rc < 0 && (hvm || ENOSYS != errno)) {
>                               ^^^^^^^^^^^^^^^^
> Nowadays we have compilers which spot the mistake that this
> unnatural and hard-to-read idiom is intended to avoid.
>
> As to the substance I'm not sure I'm confident that it's right ...
>
> Ian.
>
>

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

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