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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CC49C433FE for ; Mon, 7 Mar 2022 14:53:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243508AbiCGOyL (ORCPT ); Mon, 7 Mar 2022 09:54:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243709AbiCGOw5 (ORCPT ); Mon, 7 Mar 2022 09:52:57 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5C8A48A6DC for ; Mon, 7 Mar 2022 06:51:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646664684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3smDROMP8QMSLDecB2DTW8XgUBKKv8Df2PL4vzKcmzw=; b=EbP4OA25ODB4gIF/eUvJGien1o66XiP3Q0QYJVvzXVTq6GP+LVbgBdFa8KUlba2cNGnCTV QCXZgXrYngXBUbrWnJJDJLIupboNrjhqBMlH0z8cWxIAG+sHHKLsa3SooeHC9+qxHzQErA qbSvWLb1J40EsN80BdNBQ6h5aj+Qzd4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-456-IbXWloJJNCO6R6dPZ7MaZA-1; Mon, 07 Mar 2022 09:51:21 -0500 X-MC-Unique: IbXWloJJNCO6R6dPZ7MaZA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44BEF1854E27; Mon, 7 Mar 2022 14:51:20 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.40.193.244]) by smtp.corp.redhat.com (Postfix) with ESMTP id 176A07FFEF; Mon, 7 Mar 2022 14:51:17 +0000 (UTC) From: Vitaly Kuznetsov To: kvm@vger.kernel.org Cc: Paolo Bonzini , Sean Christopherson , Wanpeng Li , Jim Mattson , linux-hyperv@vger.kernel.org, Siddharth Chandrasekaran , linux-kernel@vger.kernel.org Subject: [PATCH RFC 19/19] KVM: x86: Expose Hyper-V Direct TLB flush feature Date: Mon, 7 Mar 2022 15:50:23 +0100 Message-Id: <20220307145023.1913205-20-vkuznets@redhat.com> In-Reply-To: <20220307145023.1913205-1-vkuznets@redhat.com> References: <20220307145023.1913205-1-vkuznets@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With both nSVM and nVMX implementations in place, KVM can export Hyper-V Direct TLB flush feature to userspace. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index 31acc08a6b23..d52de033ce36 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c @@ -2815,6 +2815,7 @@ int kvm_get_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid, case HYPERV_CPUID_NESTED_FEATURES: ent->eax = evmcs_ver; + ent->eax |= HV_X64_NESTED_DIRECT_FLUSH; ent->eax |= HV_X64_NESTED_MSR_BITMAP; break; -- 2.35.1