Skip to contentSkip to conversation

xend: pass slot for pass-through devices to qemu-xen

PATCH In review Simon Horman 3 participants 7 messages Mar 23, 2009 – Mar 25, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xend: pass slot for pass-through devices to qemu-xen

My patch "xend: specify the slot for pass-through devices" which was included in xen-unstable.hg as changeset 19418:538a64b1ed63 had an omission.

The code included parsing of slots from the configuration file. And it stored this information in xend. However, it failed to pass this information on to qemu-xen.

The patch that was posted and applied doesn't break anything, it just doesn't achieve anything either.

Apologies for this omission, it was removed to test possible regressions, and unfortunately wasn't replaced in the version that I posted.

---

There are qemu-xen companion patches for this change which have been posted as "ioemu: specify the slot for pass-through devices"

tools/python/xen/xend/server/pciif.py +2 -2
Index: xen-unstable.hg/tools/python/xen/xend/server/pciif.py
===================================================================
@@ -87,8 +87,8 @@ class PciController(DevController):
             if vslt is not None:
                 vslots = vslots + vslt + ";"
 
-            back['dev-%i' % pcidevid] = "%04x:%02x:%02x.%01x" % \
-                                        (domain, bus, slot, func)
+            back['dev-%i' % pcidevid] = "%04x:%02x:%02x.%01x@%02x" % \
+                                        (domain, bus, slot, func, vslot)
             back['uuid-%i' % pcidevid] = pci_config.get('uuid', '')
             pcidevid += 1
#1 lore raw

I would like to withdraw this patch for now as it partially breaks hotplug. I will try to come up with a better solution and post it soon.

Quoted 42 lines · Simon Horman

My patch "xend: specify the slot for pass-through devices" which was included in xen-unstable.hg as changeset 19418:538a64b1ed63 had an omission.

The code included parsing of slots from the configuration file. And it stored this information in xend. However, it failed to pass this information on to qemu-xen.

The patch that was posted and applied doesn't break anything, it just doesn't achieve anything either.

Apologies for this omission, it was removed to test possible regressions, and unfortunately wasn't replaced in the version that I posted.

---

There are qemu-xen companion patches for this change which have been posted as "ioemu: specify the slot for pass-through devices"

Index: xen-unstable.hg/tools/python/xen/xend/server/pciif.py
===================================================================

tools/python/xen/xend/server/pciif.py +2 -2
@@ -87,8 +87,8 @@ class PciController(DevController):
             if vslt is not None:
                 vslots = vslots + vslt + ";"
 
-            back['dev-%i' % pcidevid] = "%04x:%02x:%02x.%01x" % \
-                                        (domain, bus, slot, func)
+            back['dev-%i' % pcidevid] = "%04x:%02x:%02x.%01x@%02x" % \
+                                        (domain, bus, slot, func, vslot)
             back['uuid-%i' % pcidevid] = pci_config.get('uuid', '')
             pcidevid += 1
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 3 lines
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en
#2 lore raw

Simon Horman writes ("Re: [Xen-devel] [patch] xend: pass slot for pass-through devices to qemu-xen"):

Quoted 3 lines

I would like to withdraw this patch for now as it partially breaks hotplug. I will try to come up with a better solution and post it soon.

Should any of the related changes in qemu-xen-unstable be backed out ?

Ian.

#3 lore raw
Quoted 6 lines · Ian Jackson

Simon Horman writes ("Re: [Xen-devel] [patch] xend: pass slot for pass-through devices to qemu-xen"):

Quoted 3 lines

I would like to withdraw this patch for now as it partially breaks hotplug. I will try to come up with a better solution and post it soon.

Should any of the related changes in qemu-xen-unstable be backed out ?

I don't think that is necessary, I will double-check.

Signature · 3 lines
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en
#4 lore raw
Quoted 9 lines · Simon Horman
Quoted 6 lines · Ian Jackson

Simon Horman writes ("Re: [Xen-devel] [patch] xend: pass slot for pass-through devices to qemu-xen"):

Quoted 3 lines

I would like to withdraw this patch for now as it partially breaks hotplug. I will try to come up with a better solution and post it soon.

Should any of the related changes in qemu-xen-unstable be backed out ?

I don't think that is necessary, I will double-check.

Hi Ian,

I just checked against:

qemu-xen-unstable
545882583159e9cc53cde5965277967092459f37
cirrus: Do not clear vram area to 0xff when not yet allocated.

xen-unstable
19425:0477f9061c8a
x86: Build fixes and cleanups after Intel MCA changes.

While specifying the vslot for non-hotplug pass-through devices does not work (as expected), the other aspects of pass-through and hot-plug seem to be functional.

I have small patches for both xen-unstable and qemu-xen-unstable to fix the outstanding user configuration of the vslot for pass-through problem. (The problem being that the user may specify the vslot but neither xend nor qemu-dm will take any notice). I will do some more testing with a view to sending them out later today.

Signature · 3 lines
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en
#5 lore raw
Quoted 30 lines · Simon Horman
Quoted 11 lines · Simon Horman
Quoted 8 lines · Ian Jackson

Simon Horman writes ("Re: [Xen-devel] [patch] xend: pass slot for
pass-through devices to qemu-xen"):

Quoted 3 lines

I would like to withdraw this patch for now as it partially breaks hotplug. I will try to come up with a better solution and post it soon.

Should any of the related changes in qemu-xen-unstable be backed out ?

I don't think that is necessary, I will double-check.

Hi Ian,

I just checked against:

qemu-xen-unstable
545882583159e9cc53cde5965277967092459f37
cirrus: Do not clear vram area to 0xff when not yet allocated.

xen-unstable
19425:0477f9061c8a
x86: Build fixes and cleanups after Intel MCA changes.

While specifying the vslot for non-hotplug pass-through devices does not work (as expected), the other aspects of pass-through and hot-plug seem to be functional.

Quoted 5 lines

I have small patches for both xen-unstable and qemu-xen-unstable to fix the outstanding user configuration of the vslot for pass-through problem. (The problem being that the user may specify the vslot but neither xend nor qemu-dm will take any notice). I will do some more testing with a view to sending them out later today.

Oh, I just saw this mail. :-)

BTW, when you send out the patches, could you please also update the Xen VT-d HOWTO(http://wiki.xensource.com/xenwiki/VTdHowTo) accordingly? You may need to ask Stephen Spector(in the CC) for the edit permission to the wiki.

Thanks!

-- Dexuan

#6 lore raw
Quoted 3 lines · Dexuan

BTW, when you send out the patches, could you please also update the Xen VT-d HOWTO(http://wiki.xensource.com/xenwiki/VTdHowTo) accordingly? You may need to ask Stephen Spector(in the CC) for the edit permission to the wiki.

Sure. I'll contact Stephen off-list.

Signature · 3 lines
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en