Re: [kvm-unit-tests PATCH 5/7] lib: arm: Fallback to psci_system_off() in exit()

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

 



On 1/24/19 1:35 PM, Andrew Jones wrote:
> On Thu, Jan 24, 2019 at 02:00:20PM +0100, Andrew Jones wrote:
>> [..]
>> chr_testdev_init() ensures vcon is NULL if it fails to initialize.
>> chr_testdev_exit() immediately returns if vcon is NULL. This was
>> done by design to allow fallback exits to be placed below the
>> chr_testdev_exit call, e.g. halt().
>>
>> We should be able to drop patch 3/7 and change exit() to this
>>
>>   void exit(int code)
>>   {
>>       chr_testdev_exit(code);
>>       psci_system_off();
>>       halt(code);
>>       __builtin_unreachable();
>>   }
>>
> There's also a framework for exits that can't return status codes. powerpc
> uses it. Before exiting with psci_system_off we need to make this print
> statement
>
>  printf("\nEXIT: STATUS=%d\n", ((code) << 1) | 1); 
>
> And run_qemu in arm/run needs to be changed to run_qemu_status. It's
> hacky, but maybe we can live with it until kvmtool offers some sort of
> debug exit.
>
> Thanks,
> drew

I can make the change, but if I understand the scripts/arch-run.bash code
correctly, run_qemu() will check if QEMU was terminated because of a signal and
adjust the return code to take that into account. Using run_qemu_status() means
that check won't be made when the tests are run under QEMU, is that acceptable?




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux