On Tue, Aug 19, 2025 at 10:58:34PM +0800, Wang Xin wrote: > Date: Tue, 19 Aug 2025 22:58:34 +0800 > From: Wang Xin <wangxinxin.w...@huawei.com> > Subject: [PATCH] target/i386: Add support save/load exception error_code > X-Mailer: git-send-email 2.50.1.windows.1 > > From: WangXin <wangxinxin.w...@huawei.com> > > 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.w...@huawei.com> > Signed-off-by: Tuo Xie <xie...@huawei.com>
Reviewed-by: Zhao Liu <zhao1....@intel.com>