Received: by 10.213.65.68 with SMTP id h4csp566664imn; Thu, 22 Mar 2018 03:53:12 -0700 (PDT) X-Google-Smtp-Source: AG47ELslTg/t5rc6ZUC/dN5LvJpQbrViwp5mhP2UEf5zaeNX8c7v/02q2oBjoCSeP4APBrz+1YNj X-Received: by 10.99.3.140 with SMTP id 134mr1273872pgd.92.1521715992474; Thu, 22 Mar 2018 03:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521715992; cv=none; d=google.com; s=arc-20160816; b=MVX87iTNsvr+Xbv+sNonxDWaNOU6jLWEUTYblhxsrvvK+Tk9tHpTh7uoIyHTf7WR5q SILQFHKF5hTKk6XD5Ujv0JJzGyFRm13mU0sl4FN++iNhF8Al74p7P6j12z+r0H119Enq 2NEgnC7OYlcOJb7N93YgRqSr+boBGm+m13FOW/5vIwGC05c3XKTj0qwF4SZzHriIQBeB MB8WAPKZATzy5BiEmhufBWSFcEqGfc3+w/1mlqJIarggS530u74mCsEM0JfRGMsF0Ze5 dp6QFnF52K9uZf57aexZuI+ZR0Oxr++dGa8UZWvthIS7nQZEN6bJ5FkhK9niFy7rT6aI EfnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=W3V53W/mxHfRVeYKOnHhHrhzubiPHIKbO7XgiyI6gcc=; b=LFZBXwc7oF1AIGQJOznI4ko8R5u4T3l+CRbbyXAec2E0obZwHVy3YCPocpee6xyndj B02oa19TkMyaNJKg2IPjbe5wW9J8CcBEB2la9+gxhuGOD9Ki25RhSWSfHunL02g/+btV XkGf9zsVLPXN3mu84whr+bEB26e3ntymCKxdtNUl1jMAMDPgeEOoDKKXzuqvLFRTix4C foGYbGVD1wcjayY6vLjhhn2OG/7Q9eEd6Zcl1uRo443T0FkRs+UVSXmVfV532aSk91Te bj0PdnXsNuyVO78iFs62XvWysaPYsvHXj7UAzMotm0xgTHZitQkSM0uN/4WN3HVvpoKv LfHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y10-v6si6550601plt.533.2018.03.22.03.52.57; Thu, 22 Mar 2018 03:53:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754116AbeCVKmf (ORCPT + 99 others); Thu, 22 Mar 2018 06:42:35 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:51274 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753177AbeCVKmb (ORCPT ); Thu, 22 Mar 2018 06:42:31 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9D1634074CA8; Thu, 22 Mar 2018 10:42:30 +0000 (UTC) Received: from [10.36.117.117] (ovpn-117-117.ams2.redhat.com [10.36.117.117]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9F20110B2B29; Thu, 22 Mar 2018 10:42:27 +0000 (UTC) Subject: Re: [PATCH] KVM: X86: Fix the decoding of segment overrides in 64bit mode To: Andrew Cooper , Wanpeng Li , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= References: <1521707651-9375-1-git-send-email-wanpengli@tencent.com> <49454fe4-16e2-4d8b-7ad5-9e488afc786e@citrix.com> From: Paolo Bonzini Message-ID: Date: Thu, 22 Mar 2018 11:42:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <49454fe4-16e2-4d8b-7ad5-9e488afc786e@citrix.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 22 Mar 2018 10:42:30 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 22 Mar 2018 10:42:30 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'pbonzini@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/03/2018 11:19, Andrew Cooper wrote: > On 22/03/2018 10:07, Paolo Bonzini wrote: >> On 22/03/2018 09:34, Wanpeng Li wrote: >>> From: Wanpeng Li >>> >>> Explicit segment overides other than %fs and %gs are documented as ignored by >>> both Intel and AMD. >>> >>> In practice, this means that: >>> >>> * Explicit uses of %ss don't actually yield #SS[0] for non-canonical >>> memory references. >>> * Explicit uses of %{e,c,d}s don't override %rbp/%rsp-based memory references >>> to yield #GP[0] for non-canonical memory references. >>> >>> Cc: Paolo Bonzini >>> Cc: Radim Krčmář >>> Signed-off-by: Wanpeng Li > > When porting fixes from other projects, it is customary to identify so > in the commit message.  In this case, the fix you've ported is > http://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=b7dce29d9faf3597d009c853ed1fcbed9f7a7f68 > > Here is an example of how Xen ports fixes from Linux for the drivers > that we share.  > http://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=4e131596f1defec9407b6e60d584a696beaf5d7e Thanks Andrew. The code is of course completely different, but the commit message is 1:1. Wanpeng, please acknowledge Jan in v2! >> Testcase, please... > > If you want to crib from one, this is the testcase I made for Xen. > > http://xenbits.xen.org/docs/xtf/test-memop-seg.html How does it ensure that the code is executed through the emulator and not by the processor? > With the impending KVM/PVH work which is ongoing, it will soon be easy > to run Xen's HVM test suite unmodified under KVM, but we're not quite > there yet. What does the test suite use for console I/O? Paolo