[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] questions about xen device pass-through.



Thanks Jean.I got it resolved.

But now I am facing an issue at the next step. After I assign the device back to Dom0,
there is an issue in DomU reverting back to the virtual mode.

Initially I start an Windows 7 HVM DomU and give it virtualized access to various devices.
After that I unbind some devices (Ethernet in this case), assign them to pciback  and attach them to DomU (using xm pci-attach). At this stage DomU recognizes the hotplugging and I get passthrough IO. Afterwards I detach the device from DomU (using xm pci-detach). At this stage the device gets assigned to pciback. So I unbind it from pciback and bind the device back to Dom0 using sysfs mechanisms. So Dom0 gets direct access to the device. Dom0 network works fine after this.

But after this DomU does not revert back to the virtual interface it was using earlier. In case of ethernet, I can still see a vif1.0 interface if I do a ifconfig in Dom0. But there is no network access in DomU. I tried to reconfigure the network/connection etc. inside Windows7 DomU, but could not get it working.

Please tell me I am missing some thing or should be doing it some other way.  
Let me know if I need to give some more information.

(I am just testing for ethernet right now..I am planning to try this for other kinds of devices also like VGA,USB, Wireless etc.)
 
Thanks,
Dushmanta


On Wed, Aug 17, 2011 at 6:27 PM, Jean Guyader <jean.guyader@xxxxxxxxx> wrote:
On 17 August 2011 20:55, Dushmanta Mohapatra
<dushmanta.mohapatra@xxxxxxxxx> wrote:
> Hello,
>
> I have some doubts/questions regarding device passthrough support in Xen.
> I will really appreciate some help/suggestions.
>
> (I am using a Intel Core i5 vPro based Lenovo thinkpad T520 (Intel graphics
> adapter).
> I am running Xen 4.1.1 and PVOPS based Linux 2.6.32.41 kernel as Dom0. I use
> Windows XP
> and Windows 7 as my HVM Domus. lspci details are attached.)
>
> I am trying to achieve the following: Initially allow
> direct access to the primary devices (graphics/ethernet/wireless/USB) to an
> HVM DomU. After wards,
> depending on the need I want to re-assign the direct access of these devices
> back to Dom0 and
> have the DomU access the devices in a virtual manner.
>
> So my question is: Is it possible to do it? Is it possible for VGA/
> graphics?
>
> I have tried a few things and following is what I am being able to do:
>
> I am being able to provide direct access to devices
> (wireless/ethernet/graphics etc) to HVM DomUs.
> And also I am being able to dynamically change the direct access to these
> devices between
> the various HVM DomUs (tested with WinXP and Windows 7) in case of
> ethernet/USB etc. I am being
> able to detach it from one DomU and attach it to another. (This is not
> working with VGA direct access
> though.)
>
> But I am not being able to reattach these devices back to Dom0. I have tried
> the sysfs way and initial
> boot time passthrough.
>
> I have also tried the stubdomain way, but when I do not hide the devices
> from Dom0 (at boot time) and later try to assign them to stubdomain, my Dom0
> gets rebooted automatically. I am following
> the steps mentioned in:
> http://mirror.choon.net/xen/xen-unstable.hg/docs/misc/vtd.txt
>
> So could some one  tell me if these behaviors are expected or
> if I might be doing something wrong.
>
> I will really appreciate any help. Please let me know if more information is
> needed from my side.
>

Hi,

If you detach a pass through device from a domU it gets reassigned to
dom0 automatically.
The problem you are having is that pciback in dom0 still own the
device that why it looks like
the device isn't working in dom0.

You'll have to manually unbind the device from picback and bind it to
another driver in dom0.
That can be done through the sysfs driver nodes "bind" and "unbind".

Jean

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.