[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCHv5 42/46] plat/kvm: Implement shutdown for Arm64
> -----Original Message----- > From: Simon Kuenzer <simon.kuenzer@xxxxxxxxx> > Sent: 2018年9月12日 4:27 > To: Wei Chen (Arm Technology China) <Wei.Chen@xxxxxxx>; minios- > devel@xxxxxxxxxxxxxxxxxxxx > Cc: Kaly Xin (Arm Technology China) <Kaly.Xin@xxxxxxx>; nd <nd@xxxxxxx> > Subject: Re: [Minios-devel] [UNIKRAFT PATCHv5 42/46] plat/kvm: Implement > shutdown for Arm64 > > > > On 10.08.2018 09:08, Wei Chen wrote: > > From: Wei Chen <Wei.Chen@xxxxxxx> > > > > QEMU/KVM provide a PSCI interface for virtual machine on > > Arm64 platform. So we use this interface to implement > > platform system off function. > > > > Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx> > > --- > > plat/kvm/shutdown.c | 11 ++++++++--- > > 1 file changed, 8 insertions(+), 3 deletions(-) > > > > diff --git a/plat/kvm/shutdown.c b/plat/kvm/shutdown.c > > index a513df9..56ef89c 100644 > > --- a/plat/kvm/shutdown.c > > +++ b/plat/kvm/shutdown.c > > @@ -22,7 +22,8 @@ > > */ > > > > #include <errno.h> > > -#include <x86/cpu.h> > > +#include <cpu.h> > > +#include <irq.h> > > #include <uk/print.h> > > #include <uk/plat/bootstrap.h> > > > > @@ -38,7 +39,11 @@ void ukplat_terminate(enum ukplat_gstate request > > __unused) > > * be 83 ('S', 41 << 1 | 1). > > */ > > uk_printk("Unikraft halted\n"); > > +#if defined(__X86_64__) > > outw(0x501, 41); > > Hum, we should better define the x86 asm code also as system_off with > cpu.h. Then, this file would stay architecture independent. > Yes, it's not a big problem, I will handle it incidentally in next version : ) > > +#elif defined(__ARM_64__) > > + system_off(); > > +#endif > > > > /* > > * If we got here, there is no way to initiate "shutdown" on virtio > > @@ -49,9 +54,9 @@ void ukplat_terminate(enum ukplat_gstate request __unused) > > > > static void cpu_halt(void) > > { > > - __asm__ __volatile__("cli; hlt"); > > + local_irq_disable(); > > for (;;) > > - ; > > + halt(); > > } > > > > int ukplat_suspend(void) > > _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |