-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plat/*: Signal shutdown cause on QEMU #1019
Conversation
20c5662
to
7594d1a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @mschlumpp, this looks good. Lemme test it. I left some minor comments.
plat/common/x86/cpu_native.c
Outdated
*/ | ||
static void qemu_debug_exit(int value) | ||
{ | ||
outw(0x501, value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to have a macro for 0x501
- this doesn't tell me anything?
plat/common/x86/cpu_native.c
Outdated
* will be 85 ('S', 42 << 1 | 1). | ||
*/ | ||
if (request == UKPLAT_CRASH) | ||
qemu_debug_exit(42); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to have a macro for 42
- this doesn't tell me anything? Why 42
? What magic is this?
plat/common/x86/cpu_native.c
Outdated
*/ | ||
outw(0x501, 41); | ||
qemu_debug_exit(41); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to have a macro for 41
- this doesn't tell me anything? Why 41
? What magic is this?
@razvand thinks he can hear what numbers say to him, it's that bad |
This uses the `isa-debug-exit` device to pass an exit code to QEMU. By default this device is not available but can be enabled using the `-device isa-debug-exit` switch on the QEMU command-line. Github-Fixes: unikraft#1018 Signed-off-by: Marco Schlumpp <marco@unikraft.io>
7594d1a
to
def271c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!!!!!
Reviewed-by: Sergiu Moga sergiu@unikraft.io
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @mschlumpp.
Reviewed-by: Razvan Deaconescu razvand@unikraft.io
Approved-by: Razvan Deaconescu razvand@unikraft.io
Prerequisite checklist
checkpatch.uk
on your commit series before opening this PR;Base target
x86_64
kvm
Additional configuration
Description of changes
This uses the
isa-debug-exit
device to pass an exit code to QEMU. By default this device is not available but can be enabled using the-device isa-debug-exit
switch on the QEMU command-line.@craciunoiuc @nderjung