public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: [PATCH v2 0/2]  Trap and propagate divide errors when emulating DIV
Date: Thu, 26 Aug 2010 11:58:59 +0300	[thread overview]
Message-ID: <1282813141-20473-1-git-send-email-avi@redhat.com> (raw)

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(-)


             reply	other threads:[~2010-08-26  8:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26  8:58 Avi Kivity [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1282813141-20473-1-git-send-email-avi@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox