From: Borislav Petkov <bp@alien8.de>
To: Gleb Natapov <gleb@redhat.com>
Cc: KVM <kvm@vger.kernel.org>, Paolo Bonzini <pbonzini@redhat.com>,
Andre Przywara <andre@andrep.de>,
"H. Peter Anvin" <hpa@zytor.com>, X86 ML <x86@kernel.org>,
Borislav Petkov <bp@suse.de>
Subject: Re: [PATCH 3/4] kvm, emulator: Rename VendorSpecific flag
Date: Wed, 26 Jun 2013 16:11:59 +0200 [thread overview]
Message-ID: <20130626141158.GE20274@pd.tnic> (raw)
In-Reply-To: <20130625111020.GO18508@redhat.com>
On Tue, Jun 25, 2013 at 02:10:20PM +0300, Gleb Natapov wrote:
> > - if (!(ctxt->d & VendorSpecific) && ctxt->only_vendor_specific_insn)
> > + if (!(ctxt->d & EmulateOnUD) && ctxt->only_vendor_specific_insn)
> Lets rename only_vendor_specific_insn to something like ->ud too.
So this thing is set only when either svm or vmx encounter an #UD and go
and emulate the instruction.
I guess this is for the case where we actually do want to inject the #UD
into the guest and not emulate the instruction.
Btw, it is only checked in x86_decode_insn so we could just as well hand
down the emulation_type from the caller x86_emulate_instruction and kill
->only_vendor_specific_insn completely like so:
if (!(ctxt->d & EmulateOnUD) && (emul_type & EMULTYPE_TRAP_UD))
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
next prev parent reply other threads:[~2013-06-26 14:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1371720647-17216-1-git-send-email-bp@alien8.de>
[not found] ` <1371720647-17216-4-git-send-email-bp@alien8.de>
2013-06-25 11:10 ` [PATCH 3/4] kvm, emulator: Rename VendorSpecific flag Gleb Natapov
2013-06-26 14:11 ` Borislav Petkov [this message]
2013-06-26 15:25 ` Gleb Natapov
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=20130626141158.GE20274@pd.tnic \
--to=bp@alien8.de \
--cc=andre@andrep.de \
--cc=bp@suse.de \
--cc=gleb@redhat.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=x86@kernel.org \
/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