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 4/4 v2] ioemu: Read pass-through vslot from xend

To: "horms@xxxxxxxxxxxx" <horms@xxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [patch 4/4 v2] ioemu: Read pass-through vslot from xend
From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Date: Wed, 25 Mar 2009 17:54:45 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Delivery-date: Wed, 25 Mar 2009 02:56:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090325034205.180386115@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: <20090325033202.059806000@xxxxxxxxxxxx> <20090325034205.180386115@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acms/MisCSuELdphQ6WNNi0kXofGTAAMsHEQ
Thread-topic: [Xen-devel] [patch 4/4 v2] ioemu: Read pass-through vslot from xend
horms@xxxxxxxxxxxx wrote:
> This reads the vslot information supplied by xend, and should be
> the final piece for this feature on the ioemu side.
> 
> There is also a xend portion of this patch which I will post
> separately. 
> 
> Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
> 
> 
> Index: ioemu-remote/xenstore.c
> ===================================================================
> --- ioemu-remote.orig/xenstore.c      2009-03-24 09:25:36.000000000 +1100
> +++ ioemu-remote/xenstore.c   2009-03-24 22:58:28.000000000 +1100
> @@ -582,6 +582,24 @@ void xenstore_parse_domain_config(int hv
> 
>              strcat(direct_pci_str, dev);
> 
> +            if (pasprintf(&buf,
> "/local/domain/0/backend/pci/%u/%u/vslot-%d", +                      
> hvm_domid, pci_devid, i) != -1) { +                free(dev);
> +                dev = xs_read(xsh, XBT_NULL, buf, &len);
> +            }
> +            if ( dev ) {
> +                if (strlen(dev) + strlen(direct_pci_str) >
> +                    DIRECT_PCI_STR_LEN - 2) {
> +                    fprintf(stderr, "qemu: too many pci pass-through
> " +                            "devices\n");
> +                    memset(direct_pci_str, 0, DIRECT_PCI_STR_LEN);
> +                    goto out;
> +                }
> +                strcat(direct_pci_str, "@");
> +                strcat(direct_pci_str, dev);
> +            }
> +
> +
>              if (pasprintf(&buf,
>                           
>                  "/local/domain/0/backend/pci/%u/%u/opts-%d",
> hvm_domid, pci_devid, i) != -1) { free(dev); 
> 
> --

Oh, I see the patches... :-)

Thanks,
-- Dexuan


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