x86/viridian: set shutdown_code in response to CrashNotify

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@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Paul Durrant authored and Andrew Cooper committed 2018-09-06 16:38:11 +01:00
1 parent 340ac8a94a
commit c217412e9d
1 file changed
+4
+4
View File
@@ -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);
gprintk(XENLOG_WARNING, "VIRIDIAN CRASH: %lx %lx %lx %lx %lx\n",
v->arch.hvm.viridian.crash_param[0],
v->arch.hvm.viridian.crash_param[1],
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.