public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2]  Trap and propagate divide errors when emulating DIV
@ 2010-08-26  8:58 Avi Kivity
  2010-08-26  8:59 ` [PATCH v2 1/2] KVM: x86 emulator: add macros for executing instructions that may trap Avi Kivity
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Avi Kivity @ 2010-08-26  8:58 UTC (permalink / raw)
  To: Marcelo Tosatti, kvm

KVM recently started emulating DIV and IDIV.  However, those instructions
trap when given the right operands.  Since figuring out when to trap or not
is difficult, we just execute the instruction and see if the processor trapped
or not.

Avi Kivity (2):
  x86: allow kernel exception fixup for divide errors (#DE)
    - dropped
  KVM: x86 emulator: add macros for executing instructions that may
    trap
  KVM: x86 emulator: trap and propagate #DE from DIV and IDIV
    - propagate return code to x86_emulate_insn()

 arch/x86/kvm/emulate.c |   63 ++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 59 insertions(+), 4 deletions(-)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-26 19:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-26  8:58 [PATCH v2 0/2] Trap and propagate divide errors when emulating DIV Avi Kivity
2010-08-26  8:59 ` [PATCH v2 1/2] KVM: x86 emulator: add macros for executing instructions that may trap Avi Kivity
2010-08-26  8:59 ` [PATCH v2 2/2] KVM: x86 emulator: trap and propagate #DE from DIV and IDIV Avi Kivity
2010-08-26 18:15 ` [PATCH v2 0/2] Trap and propagate divide errors when emulating DIV Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox