mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-21 05:02:24 +00:00
DM: reboot: clear the data of 0xcf9 if cold reboot
Linux kernel CF9 reboot is doing things like: - read value from 0xcf9 - mask out the value according to the reboot type (warm vs cold) - BIT OR the value with reboot code - write the value to 0xcf9 If there are two reboot event and the first one is cold reboot and the second one is warm reboot, vsbl query reboot type after the second one and will get code reboot instead of warm reboot. We should clear the data of 0xcf9 if guest request cold reboot. Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
parent
66ddb67bdd
commit
23efb5a0e9
@ -71,6 +71,11 @@ reset_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes,
|
||||
error = vm_suspend(ctx, VM_SUSPEND_RESET);
|
||||
assert(error == 0 || errno == EALREADY);
|
||||
}
|
||||
|
||||
/* cold reset should clear the value in 0xcf9 */
|
||||
if (reset_control & 0x8) {
|
||||
reset_control = 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user