[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/hvm/viridian: set shutdown_code in response to CrashNotify
> -----Original Message----- > From: Andrew Cooper > Sent: 10 August 2018 16:57 > To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx > Cc: Jan Beulich <jbeulich@xxxxxxxx> > Subject: Re: [PATCH] x86/hvm/viridian: set shutdown_code in response to > CrashNotify > > On 10/08/18 16:43, Paul Durrant wrote: > > When Windows writes the CrashNotify bit in the CRASH_CTL MSR then we > know > > it is crashing, so set the domain shutdown code appropriately. > > > > Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> > > --- > > Cc: Jan Beulich <jbeulich@xxxxxxxx> > > Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > > --- > > xen/arch/x86/hvm/viridian.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/xen/arch/x86/hvm/viridian.c b/xen/arch/x86/hvm/viridian.c > > index 486065182c..294cf486cc 100644 > > --- a/xen/arch/x86/hvm/viridian.c > > +++ b/xen/arch/x86/hvm/viridian.c > > @@ -645,6 +645,10 @@ int wrmsr_viridian_regs(uint32_t idx, uint64_t val) > > if ( !ctl.u.CrashNotify ) > > break; > > > > + spin_lock(&d->shutdown_lock); > > + d->shutdown_code = SHUTDOWN_crash; > > + spin_unlock(&d->shutdown_lock); > > How does the domain eventually shut down? I assume it shuts down when the guest writes to the PIIX. > It feels slightly odd to have > a shutdown code before the domain has finished executing code. > That's the norm. The PV drivers (if they are installed) set it via a schedop. This just makes sure it is set even if the PV drivers aren't there. Paul > ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |