From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753564Ab3JQJdi (ORCPT ); Thu, 17 Oct 2013 05:33:38 -0400 Received: from nat28.tlf.novell.com ([130.57.49.28]:35138 "EHLO nat28.tlf.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751073Ab3JQJdg convert rfc822-to-8bit (ORCPT ); Thu, 17 Oct 2013 05:33:36 -0400 Message-Id: <525FCB0D02000078000FBBCF@nat28.tlf.novell.com> X-Mailer: Novell GroupWise Internet Agent 12.0.2 Date: Thu, 17 Oct 2013 10:33:33 +0100 From: "Jan Beulich" To: "Gleb Natapov" Cc: "Ingo Molnar" , "Thomas Gleixner" , "Linus Torvalds" , "KVM list" , "Linux Kernel Mailing List" , "Peter Anvin" Subject: Re: [PATCH, RFC] x86-64: properly handle FPU code/data selectors References: <525E9BFF02000078000FB74E@nat28.tlf.novell.com> <525ECEA102000078000FB906@nat28.tlf.novell.com> <525ED75402000078000FB95B@nat28.tlf.novell.com> <20131017092727.GN15657@redhat.com> In-Reply-To: <20131017092727.GN15657@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> On 17.10.13 at 11:27, Gleb Natapov wrote: > On Wed, Oct 16, 2013 at 05:13:40PM +0100, Jan Beulich wrote: >> > It preserves *less* state, because the upper 32 bits of rip are now >> > corrupted. Any 64-bit application that actually looks at the FP >> > rip/rdp fields now get the WRONG VALUES. >> >> But again - this isn't being done for ordinary 64-bit applications, >> this is only happening for KVM guests. And there not being a >> protocol for telling the caller whether a certain context hold >> 64-bit offsets or selector/offset pairs shouldn't be a reason to >> think of a solution to the problem. >> > KVM knows what mode guest vcpu is in. is_long_mode(vcpu) will tell you > if it is in long mode or not. No need to guess it. So what if that 64-bit guest OS is running a 32-bit app? You can only positively know the _current_ guest word size when the guest is not in long mode. Jan