From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_ILLEGAL_IP,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BE81C04AB6 for ; Wed, 29 May 2019 02:27:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7E43D206E0 for ; Wed, 29 May 2019 02:27:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726399AbfE2C1g (ORCPT ); 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: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@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