Received: by 10.213.65.68 with SMTP id h4csp530325imn; Fri, 16 Mar 2018 10:32:09 -0700 (PDT) X-Google-Smtp-Source: AG47ELvd4hrNu20CYpfMdu+qT1qQlKXUlhnQJUDE4rfTP5TERbV031UMGrF7f4bVQhvrUXi18OB/ X-Received: by 2002:a17:902:7401:: with SMTP id g1-v6mr3074377pll.4.1521221529840; Fri, 16 Mar 2018 10:32:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521221529; cv=none; d=google.com; s=arc-20160816; b=Ov/CdAGtA5IWqKDOBaTpdr1cUH6bUrEOAb9vglBAgAIqyvTBiAWehYmgz5G040UWLi asSN9qklg+NbZ6snp8okhHT/5M/XrIpQh/rvoz6pMz3AY6z3iF9fajlzLl9Dg2jUI6yX hVpxOS7N41gp43dktUgq0fDcijcaTBJlWdmHLYzaHeBfmJkx65h9JVHokXV3hSs2jmTv BpLeFEBVBEddJacRp6tLwBQA0lgLQk1j4NFU1xxfZvMOWRpqzORA6bV1ToIaZ92wN8NN jBk38gZ4tAhSIXfhZgiIG4n/jlBo39/5zui3s7XioNhs63EQywvfxjCLjIyPnRIa0LER qhlQ== 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=r+Ru0sBdTrlMNgtWjLlQlsD4lctdgF1IXoEax2+kjL4=; b=gq+qFcSpVlhQCYJZ4oD0xwdd61GM3MEOubWyK1gnxokfyZ8NkuylOT5C0aSNpgGPqY liWyvyCekcizfBKMKTVBgBBau9QMFFa+OKKGWJK+vUsRv4BR2zOj/7Vg+rG7BaO8OVZg tPTI6gTw90kcjahXKQc9kK5OCbUEWUe0LglVqhTrOu99NL46dL3uPyWL3gk4XKn6Fc7E bnWQWKWKN7pl0oEQSDq/YkZdNhQ15/MQ16EsicNwurv9YdeGIXwgOP/tnimm0ztwTaao WEFtASKinzXucil05GrfZj+5+tYcfJL/AopF+6xR/6w6a0LyfOy/4OiKvzNm060xg7aP dHzA== 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 s3-v6si6347327plb.4.2018.03.16.10.31.55; Fri, 16 Mar 2018 10:32:09 -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 S932793AbeCPRap (ORCPT + 99 others); Fri, 16 Mar 2018 13:30:45 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39958 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751064AbeCPRan (ORCPT ); Fri, 16 Mar 2018 13:30:43 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1FD4042A1F66; Fri, 16 Mar 2018 17:30:43 +0000 (UTC) Received: from [10.36.116.50] (ovpn-116-50.ams2.redhat.com [10.36.116.50]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 88A1F2026E04; Fri, 16 Mar 2018 17:30:41 +0000 (UTC) Subject: Re: [PATCH v5 11/11] KVM: x86: Disable Intel Processor Trace when VMXON in L1 guest To: Luwei Kang , 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> From: Paolo Bonzini Message-ID: Date: Fri, 16 Mar 2018 18:30:40 +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: <1520165241-15819-12-git-send-email-luwei.kang@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 16 Mar 2018 17:30:43 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 16 Mar 2018 17:30:43 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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 04/03/2018 13:07, Luwei Kang 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 !=). Paolo > + vmx->pt_desc.guest.ctl = 0; > + vmcs_write64(GUEST_IA32_RTIT_CTL, 0); > + pt_set_intercept_for_msr(vmx, 1); > + } > +