All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: "Gleb Natapov" <gleb@kernel.org>,
	"Borislav Petkov" <bp@alien8.de>,
	lkml <linux-kernel@vger.kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Steven Rostedt" <rostedt@goodmis.org>, x86-ml <x86@kernel.org>,
	kvm@vger.kernel.org, "Jörg Rödel" <joro@8bytes.org>
Subject: Re: [PATCH] KVM: SVM: Fix CPL export via SS.DPL
Date: Mon, 30 Jun 2014 17:01:49 +0200	[thread overview]
Message-ID: <53B17BDD.5030301@redhat.com> (raw)
In-Reply-To: <53B02CEB.7010607@web.de>

Il 29/06/2014 17:12, Jan Kiszka ha scritto:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> We import the CPL via SS.DPL since ae9fedc793. However, we fail to
> export it this way so far. This caused spurious guest crashes, e.g. of
> Linux when accessing the vmport from guest user space which triggered
> register saving/restoring to/from host user space.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> Just in time for the next match :D
>
>  arch/x86/kvm/svm.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index ec8366c..b5e994a 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -1462,6 +1462,7 @@ static void svm_get_segment(struct kvm_vcpu *vcpu,
>  		 */
>  		if (var->unusable)
>  			var->db = 0;
> +		var->dpl = to_svm(vcpu)->vmcb->save.cpl;
>  		break;
>  	}
>  }
>

Thanks.  In theory this is not necessary, the SS.DPL should be the same 
as the CPL according to the manuals (the manual say that the SS.DPL 
"should match" the CPL, and that's the only reason why I included the 
import in ae9fedc793).  But apparently this is not the case.

Paolo

  parent reply	other threads:[~2014-06-30 15:02 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25 15:32 __schedule #DF splat Borislav Petkov
2014-06-25 20:26 ` Borislav Petkov
2014-06-27 10:18   ` Borislav Petkov
2014-06-27 11:41     ` Paolo Bonzini
2014-06-27 11:55       ` Borislav Petkov
2014-06-27 12:01         ` Paolo Bonzini
2014-06-27 12:10           ` Borislav Petkov
2014-06-28 11:44             ` Borislav Petkov
2014-06-29  6:46               ` Gleb Natapov
2014-06-29  9:56                 ` Jan Kiszka
2014-06-29 10:24                   ` Gleb Natapov
2014-06-29 10:31                     ` Jan Kiszka
2014-06-29 10:53                       ` Gleb Natapov
2014-06-29 10:59                         ` Jan Kiszka
2014-06-29 11:51                           ` Borislav Petkov
2014-06-29 12:22                             ` Jan Kiszka
2014-06-29 13:14                               ` Borislav Petkov
2014-06-29 13:42                                 ` Gleb Natapov
2014-06-29 14:01                                   ` Borislav Petkov
2014-06-29 14:27                                     ` Gleb Natapov
2014-06-29 14:32                                       ` Jan Kiszka
2014-06-29 14:51                                         ` Jan Kiszka
2014-06-29 15:12                                           ` [PATCH] KVM: SVM: Fix CPL export via SS.DPL Jan Kiszka
2014-06-29 18:00                                             ` Borislav Petkov
2014-06-30 15:01                                             ` Paolo Bonzini [this message]
2014-06-30 15:03                                               ` Jan Kiszka
2014-06-30 15:15                                                 ` Borislav Petkov
2014-06-30 15:25                                                   ` Gleb Natapov
2014-06-30 15:26                                                 ` Paolo Bonzini
2014-06-29 13:46                                 ` __schedule #DF splat Borislav Petkov

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=53B17BDD.5030301@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bp@alien8.de \
    --cc=gleb@kernel.org \
    --cc=jan.kiszka@web.de \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.