diff options
author | Xin Wang <wangxinxin.wang@huawei.com> | 2025-08-19 22:58:34 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-08-20 22:47:43 +0200 |
commit | 27535e9ccae89db5856bfb5e3357f44645812143 (patch) | |
tree | 812966926119e4e66150668e0d31833cf7c162b1 /rust/qemu-api | |
parent | 88f72048d2f5835a1b9eaba690c7861393aef283 (diff) | |
download | qemu-27535e9ccae89db5856bfb5e3357f44645812143.zip qemu-27535e9ccae89db5856bfb5e3357f44645812143.tar.gz qemu-27535e9ccae89db5856bfb5e3357f44645812143.tar.bz2 |
target/i386: Add support for save/load of exception error code
For now, qemu save/load CPU exception info(such as exception_nr and
has_error_code), while the exception error_code is ignored. This will
cause the dest hypervisor reinject a vCPU exception with error_code(0),
potentially causing a guest kernel panic.
For instance, if src VM stopped with an user-mode write #PF (error_code 6),
the dest hypervisor will reinject an #PF with error_code(0) when vCPU resume,
then guest kernel panic as:
BUG: unable to handle page fault for address: 00007f80319cb010
#PF: supervisor read access in user mode
#PF: error_code(0x0000) - not-present page
RIP: 0033:0x40115d
To fix it, support save/load exception error_code.
Signed-off-by: Xin Wang <wangxinxin.wang@huawei.com>
Link: https://lore.kernel.org/r/20250819145834.3998-1-wangxinxin.wang@huawei.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api')
0 files changed, 0 insertions, 0 deletions