Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5764082ybi; Tue, 28 May 2019 19:40:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyrq485ii8cm8LbgACmCuThHxVqPpxuY9CTSB/VG6QzV5A5WE8Pq9RDs805u5hFatNTH8y X-Received: by 2002:a63:b547:: with SMTP id u7mr57328448pgo.322.1559097620487; Tue, 28 May 2019 19:40:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559097620; cv=none; d=google.com; s=arc-20160816; b=VJR8/c8DS30hZp81ZL2DtU8lpQ2i5TZBlesYRVhCLal8xNepxoeMqNmTBfWywDDl8l HVxt5lNXhkYKo3grHFAdIsNICjyvkQwhqtZqn1594NYCzg8gA/uDksur+mjYMhZds2cU 5lypYv6NgSK0Kd8/7GtjIasCmHZ29muqVeFOa/e8qBnKRY6h2eNosYQ2NHnhEaJOLiyQ qmd9JGypUF/i619To1PMLUlP44TokvPGKp6Aa6tQKh6zK/SaBlSvZoTaCMh/lzgFzmMc hS9uMJiWePYhppVVlBIf+HCTPCEVGsoTKr4vRS750wOwzumEHgRZXc7dldRWvdzDqoer cBcg== 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=pP3fYcLgKNcn4ZGi02aByM6WGyk5AzcIbGUQ+cLa/MU=; b=gt9yVdqeSLwgMhCBkPcpk2wkZSy6Gx4Uv4ZpPbFXpLVmMDYSjJG6QYRZVzWvqz3CGp BjU2Bb76w0fZfCztz1vV+1tu3a57xBQ7dImYdM6YKB3Kl6k8bjo8v1GtUiDOlc5j0wBe s4PwPX3K7RO3GwtmOHDxJl6Mqyx2myJzOZzAoqr9RA7j2jxh1pd3KK0e7gLBVICsRWZc vyvu35kECJIfHTkekT5tkz3AYUIR7OxV76bRX58BCc+Sdt302ZKDOI9YQca8/zvcIckp rfxa4np6nPxhtthUmtkMVhzCjkSUXu3lgDry84+qyKZHhybeJ709F0JE0SzVXTXCz4RC y7ig== 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 n11si8418319pgl.111.2019.05.28.19.40.03; Tue, 28 May 2019 19:40:20 -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 S1726504AbfE2Ci5 (ORCPT + 99 others); Tue, 28 May 2019 22:38:57 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:54558 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726008AbfE2Ci5 (ORCPT ); Tue, 28 May 2019 22:38:57 -0400 Received: by mail-wm1-f65.google.com with SMTP id i3so444898wml.4 for ; Tue, 28 May 2019 19:38:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=pP3fYcLgKNcn4ZGi02aByM6WGyk5AzcIbGUQ+cLa/MU=; b=aV7svqWPdVPrvme5LITbLeWiK6I3ZePWOZa3QtXfdsWXBMgWhpYkl07TxvqwYOMZTX 2lCB3L8GvbPYlslgWXBZ/x+iDIl82d1JePQJxYyDhKHs0R0SKr4EgQrU1jQ6OcCqOfRb 1Qq+pLSmP5UrTL7AToJUomU/hFrKN2Tz4agYwlW4XT4DdSGtShgu8GZ81i3KkLCk8urn 7OAt100CDKHYD4Z7KEqSGlLpYoInbH5M0qK+MxLz+0ltaoGePWIc+BYjtzPU5lyNN0Tw nm0dhnK/ySdpEv8o+tZFp8sMQiTUvfqUlnq4Z8QM4l4o/KTMaSENiwEwpToG5lnPZib+ ptPQ== X-Gm-Message-State: APjAAAVy89+5AolfsMDMRsA7VXkDG/kaXG9PUAEVjV84Puc5Gr4I6ZXP sVfSAfIHapQKLSTbZrH96QV65w== X-Received: by 2002:a05:600c:214d:: with SMTP id v13mr4998628wml.12.1559097534873; Tue, 28 May 2019 19:38:54 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c43e:46a8:e962:cee8? ([2001:b07:6468:f312:c43e:46a8:e962:cee8]) by smtp.gmail.com with ESMTPSA id q9sm3063089wmq.9.2019.05.28.19.38.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 May 2019 19:38:54 -0700 (PDT) Subject: Re: [PATCH v2 1/3] KVM: x86: add support for user wait instructions To: Tao Xu 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-2-tao3.xu@intel.com> <419f62f3-69a8-7ec0-5eeb-20bed69925f2@redhat.com> From: Paolo Bonzini Message-ID: Date: Wed, 29 May 2019 04:38:53 +0200 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 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 29/05/19 04:05, Tao Xu wrote: >> > > Thank you Paolo, but I have another question. I was wondering if it is > appropriate to enable X86_FEATURE_WAITPKG when QEMU uses "-overcommit > cpu-pm=on"? "-overcommit" only establishes the behavior of KVM, it doesn't change the cpuid bits. So you'd need "-cpu" as well. Paolo > Or just enable X86_FEATURE_WAITPKG when QEMU add the feature > "-cpu host,+waitpkg"? User wait instructions is the wait or pause > instructions may be executed at any privilege level, but can use > IA32_UMWAIT_CONTROL to set the maximum time.