Code: Select all
ret = (*info->handler)(reg,info->data);
When I run it in QEMU and Bochs,nothing will be wrong.
But when I run it in VirtualBox,sometimes it will produce Divide-by-zero Error.
(Only sometimes.But it is in doIRQ function,so it is called lots of times!!!!)
The asm instruction which produced a Divide-by-zero Error is:
Code: Select all
(0) [0x000000102ddd] 0008:0000008000102ddd (unk. ctxt): mov rax, qword ptr ds:[rax] ; 488b00
(This code is from Bochs,but bochs never produced this exception.)
When this code runs,%rax is 0x80001187c0. It is also right!!!
Of course,%ds should be right,too!!
Why this instruction produced a Divide-by-zero Error????
Thanks!
(You can see the exception in attachment.)