[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH] plat/common: perform ACPI poweroff on shutdown for x86



Hi Simon,

sure, I can do that. I'll submit a v2 shortly.

On 3/29/19 3:38 PM, Simon Kuenzer wrote:
Hey,

thanks a lot for this fix. Can you move your ACPI shutdown block before using 
the ISA debug exit. The ACPI shutdown is actual the clean way to bring the 
guest down. If this one fails, then another try with the ISA device is fine. 
The reason is that on QEMU returns _not_ 0 when brought down with ISA exit.

Thanks a lot,

Simon

On 22.03.19, 15:01, "Minios-devel on behalf of Florian Schmidt" 
<minios-devel-bounces@xxxxxxxxxxxxxxxxxxxx on behalf of florian.schmidt@xxxxxxxxx> wrote:

     Note that this is hypervisor/emulator-specific and currently only
     supports QEMU (and whoever is compatible with QEMU).
Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>
     ---
      plat/common/x86/cpu_native.c | 9 +++++++++
      1 file changed, 9 insertions(+)
diff --git a/plat/common/x86/cpu_native.c b/plat/common/x86/cpu_native.c
     index 57ea3a21..b3f13dff 100644
     --- a/plat/common/x86/cpu_native.c
     +++ b/plat/common/x86/cpu_native.c
     @@ -57,4 +57,13 @@ void system_off(void)
         * be 83 ('S', 41 << 1 | 1).
         */
        outw(0x501, 41);
     +
     +  /*
     +   * Otherwise, perform an ACPI shutdown by writing (SLP_TYPa | SLP_EN)
     +   * to PM1a_CNT. Generally speaking, we'd have to jump through a lot
     +   * hoops to collect those values, however, for QEMU, those are static.
     +   * Should be harmless if we're not running on QEMU, especially
     +   * considering we're already shutting down, so who cares if we crash.
     +   */
     +  outw(0x604, 0x2000);
      }
     --
     2.21.0
_______________________________________________
     Minios-devel mailing list
     Minios-devel@xxxxxxxxxxxxxxxxxxxx
     https://lists.xenproject.org/mailman/listinfo/minios-devel


--
Dr. Florian Schmidt
フローリアン・シュミット
Research Scientist,
Systems and Machine Learning Group
NEC Laboratories Europe
Kurfürsten-Anlage 36, D-69115 Heidelberg
Tel.     +49 (0)6221 4342-265
Fax:     +49 (0)6221 4342-155
e-mail:  florian.schmidt@xxxxxxxxx
============================================================
Registered at Amtsgericht Mannheim, Germany, HRB728558

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.