From: Kouya Shimura Subject: [PATCH] xend: notify xenpv device model that console info is ready Date: Tue, 23 Feb 2010 16:03:48 +0900 Message-ID: <7k7hq4ph63.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="KMzgwZtyfs" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org --KMzgwZtyfs Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Sometimes PV domain with vfb doesn't boot up. /sbin/kudzu is stuck. After investigation, I've found that the evtchn for console is not bound at all. Normal sequence of evtchn initialization in qemu-dm for xenpv is: 1) watch xenstore backpath (/local/domain/0/backend/console//0) 2) read console info (/local/domain//console/{type, ring-ref, port..}) 3) bind the evtchn to the port. But in some case, xend writes to the backpath before the console info is prepared, and never write to the backpath again. So the qemu-dm fails at 2) and never reach to 3). When this happens, manually xenstore-write command on Domain-0 resumes the guest. Signed-off-by: Kouya Shimura --KMzgwZtyfs Content-Type: text/x-patch Content-Disposition: inline; filename="notify_xenpv_ioemu.patch" Content-Transfer-Encoding: 7bit diff -r 4ba4323889b9 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Mon Feb 22 18:47:22 2010 +0000 +++ b/tools/python/xen/xend/XendDomainInfo.py Tue Feb 23 14:50:40 2010 +0900 @@ -1642,6 +1642,11 @@ class XendDomainInfo: console_uuid = serial_consoles[0].get('uuid') self.info.console_update(console_uuid, 'location', self.console_port) + # Notify xenpv device model that console info is ready + if not self.info.is_hvm() and self.info.has_rfb(): + console_ctrl = self.getDeviceController('console') + # The value is unchanged. Just for xenstore watcher + console_ctrl.writeBackend(0, 'uuid', console_uuid) # Update VNC port if it exists and write to xenstore --KMzgwZtyfs Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --KMzgwZtyfs--