Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp225775iof; Mon, 6 Jun 2022 02:03:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzin2ElJ4Dpj/3ntE4ZOM3edSW+59ExZ3FhXXzViHa4LwDwatoiSwDAzHBle3NyebrXOEb4 X-Received: by 2002:a17:902:cccc:b0:15a:30ec:2f56 with SMTP id z12-20020a170902cccc00b0015a30ec2f56mr23250198ple.169.1654506233272; Mon, 06 Jun 2022 02:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654506233; cv=none; d=google.com; s=arc-20160816; b=vUxHw3zRuUFpmUEPlaWwkAA0XynTv669adj+/WX/cjJDX2CO81is7Kid9JRp4fb0Nc 9XvRM3eq8XJnVX74nd3zAHqAG1t/FYJQzFusnvDg2yxnf3u/XSjR4NXCXwcAx8hM7+cT dikht8NzbusDsB3M+vv/SAOBY5MepCf/tOfpfh22jfOMdTPWVjAE315iji0XcIikKvxj 4UEzCIt5JuMobimzT6bwcM6RnncTmEYruHRBvVj7AianajUCjtz+KYGY7RlCx8ifNnVD tN9ies4zn4o7NnIVS9dra+/rd8Y84d/JrkyLfqZvIyMBsPJH99XmDIm62Vf8bD0wCiGT Yk1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vgB5epdpMK9TzxGy/CQ/9gBMMpj541uoNavvv/bVfco=; b=T7Dwu1hCyY/9eqzQF4edlZDjuqN0lRIcqKUOTGWCpCltTEhZG1NEJQkW7nK6mQWGWJ EvOk7Hj4/hpXk1cEXuhpVrWL4ug2jl0tjkzE3OXrM10GJo5k2F/AGdYCRLZL5uxeCr1n o/iJbieg9ODziEdWxjQChIi/Eh6QAZarUfaGh5aBZ2UCd6iJ3BETYpA1DKK8HFTsgsbg CjU5r9Wuy0kaRiYZAqRK++FXd47hoYxOg2KXsXIcLw3GrWyYEIh+eCnaxU/q4GLYWFvz TeAK49w/hmEujjKoeKDKZyhW8MDycinN8ZfvK9zcWKSSy6w3T6lVxT5cDUiCWDwUS5YU pwpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="SjfE+l/m"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n7-20020a170902f60700b001635b8042dbsi20590387plg.547.2022.06.06.02.03.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 02:03:53 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="SjfE+l/m"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 64B3CF5D0E; Mon, 6 Jun 2022 01:41:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232361AbiFFIjb (ORCPT + 99 others); Mon, 6 Jun 2022 04:39:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232057AbiFFIiG (ORCPT ); Mon, 6 Jun 2022 04:38:06 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3452E21812 for ; Mon, 6 Jun 2022 01:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654504676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vgB5epdpMK9TzxGy/CQ/9gBMMpj541uoNavvv/bVfco=; b=SjfE+l/mc5uIo5nMQzrTZPOEtiUUvnPJKBwywQN/93z5f6GAhL8Kbg3JvS/q/DvWVloAK0 bQghCkKRSJKhjvGcef4EEP45JRrCPpIRgPaaMhigsQcERSx17XZL2BaYGDJzILhD82rMf0 ACjFotBdpzMM4cUiZ9w4E0bibyJ9qiE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-663-z1jOdJgSNW-WtDKKk7px5g-1; Mon, 06 Jun 2022 04:37:53 -0400 X-MC-Unique: z1jOdJgSNW-WtDKKk7px5g-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 84BA8101A54E; Mon, 6 Jun 2022 08:37:52 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.40.193.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A3141121314; Mon, 6 Jun 2022 08:37:50 +0000 (UTC) From: Vitaly Kuznetsov To: kvm@vger.kernel.org, Paolo Bonzini Cc: Sean Christopherson , Wanpeng Li , Jim Mattson , Michael Kelley , Siddharth Chandrasekaran , Yuan Yao , Maxim Levitsky , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 23/38] KVM: x86: Expose Hyper-V L2 TLB flush feature Date: Mon, 6 Jun 2022 10:36:40 +0200 Message-Id: <20220606083655.2014609-24-vkuznets@redhat.com> In-Reply-To: <20220606083655.2014609-1-vkuznets@redhat.com> References: <20220606083655.2014609-1-vkuznets@redhat.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With both nSVM and nVMX implementations in place, KVM can now expose Hyper-V L2 TLB flush feature to userspace. Reviewed-by: Maxim Levitsky 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 91310774c0b9..c74f02668bde 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c @@ -2776,6 +2776,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.3