Re: [PATCH] xen/pvhvm: add soft reset on kexec/kdump support

From: Boris Ostrovsky
Date: Tue Sep 29 2015 - 09:11:05 EST

On 09/29/2015 07:39 AM, Vitaly Kuznetsov wrote:
Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> writes:

On 09/25/2015 03:35 PM, Konrad Rzeszutek Wilk wrote:
On Fri, Sep 25, 2015 at 03:19:57PM -0400, Boris Ostrovsky wrote:
On 09/25/2015 03:01 PM, Konrad Rzeszutek Wilk wrote:
On Fri, Sep 25, 2015 at 01:17:40PM -0400, Boris Ostrovsky wrote:
On 09/25/2015 12:07 PM, Vitaly Kuznetsov wrote:
Also, I am not sure I see how this new op will be used in the
hypervisor --- currently AFAICS it is only processed under
is_hardware_domain(). Are there other patches that will support HVM
Please see my Xen series:
(last 'full' submission).

All patches from my 'toolstack-assisted approach to PVHVM guest kexec'
are already merged to xen.git (first 10 are already in 'master' and the
last one is in 'staging').

OK, so I was looking at the right tree. Then I don't understand how
SHUTDOWN_soft_reset would be reached for a non-privileged domain. The only
path that I see is

if ( is_hardware_domain(d) )

Is there another path to handle this op?
e1bd9812966de9a16f30a58e7162b80bd6af361b libxc: support XEN_DOMCTL_soft_reset operation
c57e6ebd8c3e490e353e68d96abec1dad01e72f5 (lib)xl: soft reset support

That's toolstack issuing hypercalls from dom0.

I am asking about (non-privileged) guest itself calling SCHEDOP_shutdown.
The hypervisor ends up calling:
__domain_finalise_shutdown which sends an VIRQ_DOM_EXC to dom0 which
makes the toolstack do all of those operations.
OK. But the I don't see anyone checking that 'reason' (or
'shutdown_code') is SHUTDOWN_soft_reset. In other words, the guest can
do 'xen_reboot(23)' or 'xen_reboot(154)'. Or, it seems, even
'xen_reboot(SHUTDOWN_reboot)'? The only value it shouldn't be is
Xen hypervisor doesn't analyzie the reason, it is being analyzed by the
toolstack (XEN_DOMCTL_getdomaininfo returns this info encoded in flags
with XEN_DOMINF_shutdownshift shift).


My problem was that I didn't realize that toolstack generates macros for shutdown reasons from libxl_types.idl and I couldn't see who looks for SHUTDOWN_soft_reset.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at