[xen master] x86/viridian: set shutdown_code in response to CrashNotify

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen master] x86/viridian: set shutdown_code in response to CrashNotify

patchbot
commit c217412e9d4df1a8b10e0cbdae5c8a24d83f1cdd
Author:     Paul Durrant <[hidden email]>
AuthorDate: Fri Aug 10 16:43:42 2018 +0100
Commit:     Andrew Cooper <[hidden email]>
CommitDate: Thu Sep 6 16:38:11 2018 +0100

    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 <[hidden email]>
    Acked-by: Andrew Cooper <[hidden email]>
---
 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 e84c4f4ab5..a23d0876c4 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);
+
         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],
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog