From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v2 0/4] KVM: x86: get CPL from SS.DPL Date: Mon, 26 May 2014 14:53:24 +0200 Message-ID: <53833944.6030605@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, jan.kiszka@siemens.com, gleb@kernel.org, avi.kivity@gmail.com To: Wei Huang , kvm@vger.kernel.org Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Il 26/05/2014 00:58, Wei Huang ha scritto: > If so , my question: is there other special cases similar to task switch > which can break patch 4? I don't think so. CPL can only change when SS is loaded, i.e. for inter-privilege transfers that aren't far calls or far jumps to a conforming code segment. I count only three such cases (protected mode int, protected mode iret, call gate), none of which is implemented in the KVM emulator. In fact, the emulator doesn't implement task gates either---luckily all information about the destination task is provided by the processor in the VMCB or VMCS. Paolo