From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlCeh-0006Po-HQ for qemu-devel@nongnu.org; Fri, 16 May 2014 03:34:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlCeY-0001Rn-CT for qemu-devel@nongnu.org; Fri, 16 May 2014 03:34:11 -0400 Received: from mail-ee0-x22e.google.com ([2a00:1450:4013:c00::22e]:57710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlCeY-0001Rh-5o for qemu-devel@nongnu.org; Fri, 16 May 2014 03:34:02 -0400 Received: by mail-ee0-f46.google.com with SMTP id t10so1213826eei.5 for ; Fri, 16 May 2014 00:34:01 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5375BF65.1070301@redhat.com> Date: Fri, 16 May 2014 09:33:57 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1400173016-27214-1-git-send-email-pbonzini@redhat.com> <1400173016-27214-2-git-send-email-pbonzini@redhat.com> <20140515184530.GB22225@morn.localdomain> In-Reply-To: <20140515184530.GB22225@morn.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] target-i386: fix segment flags for SMM and VM86 mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: qemu-devel@nongnu.org Il 15/05/2014 20:45, Kevin O'Connor ha scritto: > On Thu, May 15, 2014 at 06:56:54PM +0200, Paolo Bonzini wrote: >> With the next patch, these need to be correct or VM86 tasks >> have the wrong CPL. The flags are basically what the Intel VMX >> documentation say is mandatory for entry into a VM86 guest. >> >> For consistency, SMM ought to have the same flags except with >> CPL=0. > > Does cpu_x86_load_seg() and x86_cpu_gdb_load_seg() then also have to > change? The former is just for user-mode emulation, but it probably doesn't hurt to fix it (I just found out about tests/tcg/runcom.c, which can be used to test this code path). For the latter you're right, thanks! Paolo