qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Boettcher <alexander.boettcher@genode-labs.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: rth@twiddle.net, ehabkost@redhat.com
Subject: Re: [Qemu-devel] [PATCH± SVM I/O permission bitmap for user-level (ring-3) code ignored
Date: Thu, 9 Mar 2017 20:36:57 +0100	[thread overview]
Message-ID: <51941cb9-ac7a-bbe2-0185-b8c0ad587b51@genode-labs.com> (raw)
In-Reply-To: <c088c706-392f-e978-8edd-9db85a265681@redhat.com>

On 09.03.2017 13:42, Paolo Bonzini wrote:
> On 05/03/2017 19:21, Alexander Boettcher wrote:
>> the SVM I/O permission bitmap for user-level (ring-3) VM code running in
>> SVM seems to be ignored and causes a GP-fault. (Actual the IO permission
>> was granted by the kernel via the TSS I/O port permission bitmap).
>>
>> After some debugging the GP code originates from target/i386/translate.c
>> gen_check_io() within the if(s->pe && (s->cpl > s->iopl || s->vm86))
>> condition. However, the actual SVM IO permission bitmap is checked after
>> that condition, which succeeds and would permit the access.


> The code as is
> written now matches the AMD manual: "Exceptions related to virtual x86
> mode, IOPL, or the TSS-bitmap are checked before the SVM intercept
> check. All other exceptions are checked after the SVM intercept check".

I see. I will re-check, maybe we're doing things wrong in the VMM.

Thanks.
-- 
Alexander Boettcher
Genode Labs

http://www.genode-labs.com - http://www.genode.org

Genode Labs GmbH - Amtsgericht Dresden - HRB 28424 - Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

      reply	other threads:[~2017-03-09 19:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-05 18:21 [Qemu-devel] [PATCH± SVM I/O permission bitmap for user-level (ring-3) code ignored Alexander Boettcher
2017-03-09 12:42 ` Paolo Bonzini
2017-03-09 19:36   ` Alexander Boettcher [this message]

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=51941cb9-ac7a-bbe2-0185-b8c0ad587b51@genode-labs.com \
    --to=alexander.boettcher@genode-labs.com \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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;
as well as URLs for NNTP newsgroup(s).