From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751149AbdE3QFt (ORCPT ); Tue, 30 May 2017 12:05:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50398 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750999AbdE3QFs (ORCPT ); Tue, 30 May 2017 12:05:48 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6FC7164DAD Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=pbonzini@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6FC7164DAD Subject: Re: [RFC] KVM: SVM: do not drop VMCB CPL to 0 if SS is not present To: Roman Penyaev Cc: Mikhail Sennikovskii , Gleb Natapov , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Lutomirski References: From: Paolo Bonzini Message-ID: Date: Tue, 30 May 2017 18:05:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 30 May 2017 16:05:47 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/05/2017 17:58, Roman Penyaev wrote: > Indeed, what is left is eventually take it from SS.RPL. J. Ahah! :) But I only suggested that in specific cases. > But jokes aside, with your last patch you seems fixed a race problem > when "CS.RPL is not equal to the CPL in the few instructions between > setting CR0.PE and reloading CS". Yes, exactly. The symptom was a crash (triple fault) when you kept interrupting with "info cpus" a guest that repeatedly went to protected mode and back to real mode. > We will have CPL in var->dpl, and it seems ok. All we need is not > to lose it on the way kernel->userspace->kernel. You're right. So what do you think of the other suggestion (svm.c doesn't clear attributes for unusable registers, QEMU only clears P for unusable registers)? Thanks, Paolo