Received: by 10.192.165.156 with SMTP id m28csp1417923imm; Mon, 16 Apr 2018 21:45:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx49ibDWIfX0VRT1O/zqGqULTbCQLy6IeL7Y5EOuWsUu5yN8SGQUxFlzn04felJ1l71OFY77a X-Received: by 2002:a17:902:a985:: with SMTP id bh5-v6mr658676plb.0.1523940359096; Mon, 16 Apr 2018 21:45:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523940359; cv=none; d=google.com; s=arc-20160816; b=vWqdVdTPaWC5LtplzSELZRN/UT/mgH1VaCBYOMLWtveSwtVZNV9kC+W7OPdcRjDTAT 0pwXiy3b2EEgpJv1nckLMe2ncKSBEy00XqbQvLAeO7+C0Q5dTbFewJFDo+wEVE8wzkp9 eKIKCR7iy2pGk6Z/4PIBtB5HAl3JF7SttUnKTsvzEjACGgSO2XjP64W23UP8zO8ZePdQ 6BYDu6SE3SwGMU8xcp+odU6zy7LrQxWg/Y9jLLrHwgv62UKcmXDNpGCw1BahWXJOrosH NavpTdp7euUjv8GCasQ1/ZMoZdsM9P1wEKMtAiup5BAZLZTkw70oaF773qNmtyVLc+Ul lVuQ== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=OftbggOfxhnM04WT9QT+hCApwYZVjnVG2dhpACz+xNQ=; b=gXXkptXRR0P9MC4lQ9yTOIkgfnYRwk+RhuNJR+7Q87d2/ARkmggHyRGzMQVzn4UBnn eDXGjvVbswj9WeTUkUmOS99wiC4QQ2ClEawjM9SJ18hBUvT8zxEVrPYEdjUqJqOCwwOu P8eshitzKFce9uBi77u7aQY/FRIMQlIeiRjijMat96zYrYzJwwqCbM0Rkr4NxoRRSn9E WGIlZHUtFF/TkZzqjthFTC9A2l2tGfxDQ5FfofFZUGnjyiJPQCHqnpoIbK1tvPe2wbnS VkRar+PsgiqsuILCfhZo3Qqlv9J1yF+zOEhYgRLProlP9YGAiQiC/T5h/Ed/1P+n/5rK SeXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=a8NpOZGn; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g34-v6si13502123pld.24.2018.04.16.21.45.41; Mon, 16 Apr 2018 21:45:59 -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=pass header.i=@amazon.de header.s=amazon201209 header.b=a8NpOZGn; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751119AbeDQEoX (ORCPT + 99 others); Tue, 17 Apr 2018 00:44:23 -0400 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:51550 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750725AbeDQEoV (ORCPT ); Tue, 17 Apr 2018 00:44:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1523940261; x=1555476261; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OftbggOfxhnM04WT9QT+hCApwYZVjnVG2dhpACz+xNQ=; b=a8NpOZGnxcz9h4KFJzgZopS6QIF3w0EQeUR3HOnMSKe1szNuGm0YC3Hx 2zWo1fTF4q+gpVsYRLI9rpKjVU5uhSxhoQ5zVPLC894V8rD3/LTgqdoea 2ls6g60r5/S8viXACyqIDSm8dMZMEXRyVYWw68NH9Pu1Umq+1qjhpBHyT E=; X-IronPort-AV: E=Sophos;i="5.48,462,1517875200"; d="scan'208";a="735647716" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-2c-168cbb73.us-west-2.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 17 Apr 2018 04:44:19 +0000 Received: from u54e1ad5160425a4b64ea.ant.amazon.com (pdx2-ws-svc-lb17-vlan3.amazon.com [10.247.140.70]) by email-inbound-relay-2c-168cbb73.us-west-2.amazon.com (8.14.7/8.14.7) with ESMTP id w3H4iESp015766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Apr 2018 04:44:16 GMT Received: from u54e1ad5160425a4b64ea.ant.amazon.com (localhost [127.0.0.1]) by u54e1ad5160425a4b64ea.ant.amazon.com (8.15.2/8.15.2/Debian-3) with ESMTP id w3H4iD9A011139; Tue, 17 Apr 2018 06:44:13 +0200 Received: (from karahmed@localhost) by u54e1ad5160425a4b64ea.ant.amazon.com (8.15.2/8.15.2/Submit) id w3H4iDks011138; Tue, 17 Apr 2018 06:44:13 +0200 From: KarimAllah Ahmed To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: KarimAllah Ahmed , Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , x86@kernel.org Subject: [PATCH] x86/headers/UAPI: Move DISABLE_EXITS KVM capability bits to the UAPI Date: Tue, 17 Apr 2018 06:43:58 +0200 Message-Id: <1523940238-10863-1-git-send-email-karahmed@amazon.de> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move DISABLE_EXITS KVM capability bits to the UAPI just like the rest of capabilities. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed --- arch/x86/kvm/x86.h | 7 ------- include/uapi/linux/kvm.h | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h index 98d3503..acb1502 100644 --- a/arch/x86/kvm/x86.h +++ b/arch/x86/kvm/x86.h @@ -303,13 +303,6 @@ static inline u64 nsec_to_cycles(struct kvm_vcpu *vcpu, u64 nsec) __rem; \ }) -#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0) -#define KVM_X86_DISABLE_EXITS_HTL (1 << 1) -#define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) -#define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \ - KVM_X86_DISABLE_EXITS_HTL | \ - KVM_X86_DISABLE_EXITS_PAUSE) - static inline bool kvm_mwait_in_guest(struct kvm *kvm) { return kvm->arch.mwait_in_guest; diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index aefaf6c..077d16f 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -676,6 +676,13 @@ struct kvm_ioeventfd { __u8 pad[36]; }; +#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0) +#define KVM_X86_DISABLE_EXITS_HTL (1 << 1) +#define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) +#define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \ + KVM_X86_DISABLE_EXITS_HTL | \ + KVM_X86_DISABLE_EXITS_PAUSE) + /* for KVM_ENABLE_CAP */ struct kvm_enable_cap { /* in */ -- 2.7.4