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/
Home Products Support Community News


Re: [Xen-devel] shutdown/reboot/sysrq/vcpu-set from dom0 to HVM guest

To: Frédéric VANNIÈRE <frederic@xxxxxxxxxxx>
Subject: Re: [Xen-devel] shutdown/reboot/sysrq/vcpu-set from dom0 to HVM guest
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, 1 Sep 2010 19:03:05 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx>
Delivery-date: Wed, 01 Sep 2010 11:03:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <3B74153E-F008-4882-B7DB-151ECF6FC379@xxxxxxxxxxx>
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: <3B74153E-F008-4882-B7DB-151ECF6FC379@xxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Tue, 31 Aug 2010, Fr??d??ric VANNI??RE wrote:
> Hello,
> I'm working with HVM linux guest and found that "xl 
> reboot/shutdown/sysrq/vcpu-set DOMAIN" did not work.
> Xen : 4.0.1
> Dom0 : 2.6.32.
> DomU : 2.6.36-rc3    pv-on-hvm drivers (vbd, vif, xenbus)
> In order to make the commands working in the file 
> linux-2.6.36-rc3/drivers/xen/manage.c  I've modified the function 
> __setup_shutdown_even(void) to remove the check (this is BAD !). 

this is due to a difference between Jeremy's 2.6.32 tree and my pv on
hvm tree: xen_setup_shutdown_event calls register_xenstore_notifier.
In my tree register_xenstore_notifier calls the notifier function
immediately if xenstore is ready while on Jeremy's tree it does not.
Considering that xen_setup_shutdown_event is called from 
drivers/xen/platform-pci.c after xenbus_probe, the notifier function
will never get called.

Moving xen_setup_shutdown_event one line up, above xenbus_probe in
drivers/xen/platform-pci.c, should fix the issue but it is not the proper
fix for it.

> For the cpu-set I've modified the file 
> linux-2.6.36-rc3/drivers/xen/cpu_hotplug.c and the check fo pv_domain in 
> setup_vcpu_hotlug_event(void).  And then I can remove CPUs but not add some  :
>     xl vcpu-set DOMID 2 -> "CPU 2 is now offline / CPU 3 is now offline" 
> I've tried the same modification on ballooning driver and hvc console one but 
> it gave me a kernel panic ...

In my tree both the ballooning driver and the hvc console should work
correctly on hvm.
Regarding the pv cpu hotplug mechanism, I don't think is a good idea to
enable it on hvm: there must be an alternative fully virtualized way to
hotplug a cpu into a non-pv guest, like Windows, and that should work
for pv on hvm guests too.

BTW the pv on hvm tree I am referring to it available here:


branch name 2.6.35-rc5-pvhvm-v7.

Xen-devel mailing list