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

[Xen-devel] regarding devices in domU - bug or feature ....

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] regarding devices in domU - bug or feature ....
From: Himanshu Raj <rhim@xxxxxxxxxxxxx>
Date: Mon, 5 Dec 2005 11:16:14 -0500
Delivery-date: Mon, 05 Dec 2005 17:43:43 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
Hi Folks,

I am trying to develop device driver for a device as a module. There is a front
end in domU and a back end in dom0. At the domU creation time, a write in 
xenstore
corresponding to creation of BE device spurs my driver which creates appropriate
data structures etc for BE, totally regardless to the FE driver.
After domU finishes booting, I load the FE driver which talks to BE driver
and yada yada.

Problem comes when I unload the FE driver. It calls xenbus_unregister_driver,
which ends up calling xenbus_dev_remove. This sets the xenbus state for that 
device to XenbusStateClosed. My back end driver then thinks that FE device has
gone away and removes the BE device. Needless to say, further loads of FE driver
are useless. If I remove that piece of code (which acts on XenbusStateClosed),
then the BE device hangs around even after the domU has shut down.

IMHO, shouldn't there be a similar job of device *removal* done by xm shutdown
as it is done by xm create? Then proper device removal will only happen when
a guest shuts down, rather when its driver is unloaded. Or there is something
totally wrong with the way I understand this issue.

Best regards,
Himanshu

-- 
-------------------------------------------------------------------------
Himanshu Raj
PhD Student, GaTech (www.cc.gatech.edu/~rhim)
I prefer to receive attachments in an open, non-proprietary format.
-------------------------------------------------------------------------

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] regarding devices in domU - bug or feature ...., Himanshu Raj <=