Received: by 10.213.65.68 with SMTP id h4csp1369837imn; Mon, 19 Mar 2018 02:07:57 -0700 (PDT) X-Google-Smtp-Source: AG47ELvFrNbktTsAXqF+FWJJ0FMqCTn2HJLNISqbwu/GOShtMxMpw1a2kJbGjQegiTxzMW6kq95A X-Received: by 2002:a17:902:8f8c:: with SMTP id z12-v6mr2038830plo.400.1521450477183; Mon, 19 Mar 2018 02:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521450477; cv=none; d=google.com; s=arc-20160816; b=Y30H8x8bjSOphNyD/CC0PpRlFOJZFc0XK7MA4X65RIKekq+IgpF060F551Tw2dO2xn Qn5hsoenTGaM91y8HfaGRmaCD98AB+HZFVHxFjvgky+XpIV21H92shhUJahcs7e21YuN B44Hsh0tmVnEdbGg5eXYHUnQFBMSXtMTnZ1oRiXsEjQP5946t9dCbgzhNMFlOiaQMDGV fxiCCm3BXQgyCb9wZA5tVnWWjStaQbLHgOuS63KLjj8F+kNIdOsh93ePr6NIs6SSiCq2 pEHngZ0gsWLAOoXwBEkP8iQ3Sg2HNVRc0rEo2snFOeqqhLhCczHG77b0/Yj+wYSt4W+X GmwQ== 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:dkim-signature :arc-authentication-results; bh=uBmgCRo8GetL4E5Zvu4pqCH5avKU0dm5ZLNV1us+PVo=; b=nBCZ8ffHq1BJasE0qaxT1DrQX1pC6g9oPdda3YZGZsTntQ9xT0iatrdxuUrWaD+pdJ Y5tSAIaj/C1B9lrOzJ6yTonbNbQUZ0zAUY8KUEqh890kOwGqfRcnMqAmEOvqj3c92xvC vNIYvbAf7KH7eVi5+N2vqHk309rCdCbsrB2t22SRIA90GkUSu5dF6mYxEIXTU2yJZq5S 3LpTFT7WoebMWi2beYIlJbOs/Opg0LQbVl3PNfgiN/U6+Fw3kH45fWL/mtb5id+3KeL4 +dhvwwmfoa8HkCq91MHxj66aC2sxIcwH1R/prdPR46Mkw99XrOxrpRSGr5UBWcvZBgJP RQwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=kxT1nJfu; 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 s4-v6si10656835plq.178.2018.03.19.02.07.43; Mon, 19 Mar 2018 02:07:57 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=kxT1nJfu; 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 S1755299AbeCSJFX (ORCPT + 99 others); Mon, 19 Mar 2018 05:05:23 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:40004 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751747AbeCSJFS (ORCPT ); Mon, 19 Mar 2018 05:05:18 -0400 Received: by mail-wm0-f49.google.com with SMTP id t6so14090565wmt.5; Mon, 19 Mar 2018 02:05:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uBmgCRo8GetL4E5Zvu4pqCH5avKU0dm5ZLNV1us+PVo=; b=kxT1nJfu7MP2hUon5I4Gc63qQlqqQqPYbTAiw1i9px6NLnlDdMSNge8MXKhYzA7SGL GgBRnsNod+TncwpzTcGJS6LfG4nbXyWFMDBF8fAoJ3BFAbsvAT7r15+boNU607BmMiNN 0Rf6ODL4LtP4baaGcI9GoDHQjU9pgi3FpUF8i7s6rEehlKVEW6amBhr72JpigjZrQsRD lLofmuK98evDWXxIh+/e2zsZdIHrwrXoDRd0ryJfYmRZFwM8tw6YJqS/CW6re5y+2TE+ 3it1aTIa6Omnz7D6+X5YbDkR1cAqx/7O3ctxFR4fR74jhzXpXtpR2YASybipHiulKqum sMeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uBmgCRo8GetL4E5Zvu4pqCH5avKU0dm5ZLNV1us+PVo=; b=GtG3ry1cTUrWFWVutN+SYpJD30raZMDHAceoVrRY8MutJca4y4d3H1fgRvoV7sJEYV 2K3zOZFHOwxpr2tbwDEKRuuQfQe3uhUgWB9u19MuOVmA3ziXPjYhiHZ/XFOhkyAA99Yc tqV2zsKUUUqLg18sVd0aGsiG//QR8JTnCSKnk9FgiuA9dNVzgEXg93l9MBHf5hqZhKc3 uqbYNkw8N6li2lBpmaJLazqQMs0ca97TjcjcrxRkwOldNOZm90997cSqbezFHgRtPV2S bnBcy1sgLL9s7HnV1F6cwEtdEzYX2H785awJVCLuGvG7pkPCvZmBOrrQ4kDOXVOB5jFy oPBw== X-Gm-Message-State: AElRT7EuNwA9qTzc4I9xhy4h5FckYGFay4l1gUYQTmhRZq1s8//abs5+ PNWzokecl6TMkJoCqHKurVgfvE/r X-Received: by 10.80.143.33 with SMTP id 30mr9265389edy.148.1521450317574; Mon, 19 Mar 2018 02:05:17 -0700 (PDT) Received: from [10.201.49.203] (nat-pool-mxp-u.redhat.com. [149.6.153.187]) by smtp.googlemail.com with ESMTPSA id g12sm640933edb.59.2018.03.19.02.05.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Mar 2018 02:05:16 -0700 (PDT) Subject: Re: [PATCH v5 11/11] KVM: x86: Disable Intel Processor Trace when VMXON in L1 guest To: "Kang, Luwei" , "kvm@vger.kernel.org" Cc: "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "x86@kernel.org" , "rkrcmar@redhat.com" , "linux-kernel@vger.kernel.org" , "joro@8bytes.org" References: <1520165241-15819-1-git-send-email-luwei.kang@intel.com> <1520165241-15819-12-git-send-email-luwei.kang@intel.com> <82D7661F83C1A047AF7DC287873BF1E167EFC16F@SHSMSX101.ccr.corp.intel.com> From: Paolo Bonzini Message-ID: <6a7c53f0-8c47-0fe1-27f2-141a15ebdcff@redhat.com> Date: Mon, 19 Mar 2018 10:05:15 +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: <82D7661F83C1A047AF7DC287873BF1E167EFC16F@SHSMSX101.ccr.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/03/2018 08:31, Kang, Luwei wrote: >>> + if (pt_mode == PT_MODE_HOST_GUEST) { >> This would be vmx_pt_supported(), but I think it's better to remove that function and just test pt_mode == >> PT_MODE_HOST_GUEST everywhere (or !=). > Hi Paolo, > There have so many vmx_pt_supported() invoked in MSRs read/write (patch 9) patch and I think it can be replaced by pt_mode check. > But I think this function need to be reserved in patch 5(cpuid emulation). What is your opinion? Yes, the function pointer needs to stay. Paolo