Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5755954ybi; Tue, 28 May 2019 19:28:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyprJHC101AIGc1d7OTw5pKqAc91HdzjWPObT81E7ZUBXEIuaPrgHD8GwadbBZd9+dzxyGJ X-Received: by 2002:a17:902:42e2:: with SMTP id h89mr42503704pld.271.1559096934502; Tue, 28 May 2019 19:28:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559096934; cv=none; d=google.com; s=arc-20160816; b=ldBoAFkA9///iiRsqsJwfcoVg8CAFTGv3vP/leIwYzJEJit+CnuAR2EuD2rp8/w2Ry ENxcK1HenKXC73G1uP5faT6OPqBUazbwa+9Ck99r+tjXPOb1f5P6LUrUoScLN72EjwMU Rnws41hW8fA+8qUe4UPgt0+gMOevYqwk9ew4CBw0N7ZUEUWN8bnMNHEIPl92SVBo8QB7 HHRvp35dJnXBJgTTAnper3pIWrpIqsIjrDevDs0oD+so9NBTsx054mhwUpMopGEkbg4j fsLihHDxzvg9U3ADpU8872fouGjR3tglJb9F4v68VNdQ+bEG/6w7nH1nXWOP/Gs7tEb/ HAfg== 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; bh=JJhtpX9MiqqzB9Te5/t8yfakvEWZRxywu2UMi7kBtDk=; b=UJ1nPDq9ZF8UpyGCIwaTKxU4TwQxc6sNlWuwQ0yWVe9UenEpXAlHValeCBKdVE4DsZ ouqmaG95vfr1rqwUIXKH+l60CTQS4+S7ed4yAbBhH99avKRp8gItaSV+QQScCLjOiYyM D5Fn1dJ6ntmsMAHNMiFYr/gDVX12yxeb6sYMl1+SKt+sWJ3CHKapMyWm8CVXXMfXQUEX aomtgZLqUlOVvPmFkexcojGw0/SHMdZBtQfaj6JEtF800CGlTLLWN/wT/tIRlUXgaO9D ZjzfQV9fQs9SZvqTjYva9m/tI3EpnwxE3L2xA6Ez6gzUReBGeLG5OlRNHebXfNokZHEW x5Mg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h16si223021pfo.37.2019.05.28.19.28.38; Tue, 28 May 2019 19:28:54 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726501AbfE2C1g (ORCPT + 99 others); Tue, 28 May 2019 22:27:36 -0400 Received: from mga01.intel.com ([192.55.52.88]:41957 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725816AbfE2C1g (ORCPT ); Tue, 28 May 2019 22:27:36 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2019 19:27:35 -0700 X-ExtLoop1: 1 Received: from shzintpr04.sh.intel.com (HELO [0.0.0.0]) ([10.239.4.101]) by orsmga001.jf.intel.com with ESMTP; 28 May 2019 19:27:32 -0700 Subject: Re: [PATCH v2 3/3] KVM: vmx: handle vm-exit for UMWAIT and TPAUSE To: Paolo Bonzini Cc: rkrcmar@redhat.com, corbet@lwn.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, sean.j.christopherson@intel.com, x86@kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, jingqi.liu@intel.com References: <20190524075637.29496-1-tao3.xu@intel.com> <20190524075637.29496-4-tao3.xu@intel.com> From: Tao Xu Message-ID: Date: Wed, 29 May 2019 10:25:14 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/05/2019 09:28, Paolo Bonzini wrote: > On 24/05/19 09:56, Tao Xu wrote: >> As the latest Intel 64 and IA-32 Architectures Software Developer's >> Manual, UMWAIT and TPAUSE instructions cause a VM exit if the >> “RDTSC exiting” and “enable user wait and pause” VM-execution controls >> are both 1. >> >> This patch is to handle the vm-exit for UMWAIT and TPAUSE as invalid_op. > > KVM never enables RDTSC exiting, so this is not necessary. > > Paolo > OK, but should we just drop this patch? Or add the VMX_EXIT_REASONS bits of UMWAIT and TPAUSE and handle like XSAVES/XRSTORS: "kvm_skip_emulated_instruction(vcpu);" "WARN(1, "this should never happen\n");" Looking forward to your reply. Tao