Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp352949pxj; Thu, 3 Jun 2021 08:16:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbpM60B94a0OYQSFBob26AaiJhR8574SO7EVDryZURvup605mXOHFYZwfTZM73p8rvpTJ7 X-Received: by 2002:a17:906:180a:: with SMTP id v10mr129590eje.22.1622733406443; Thu, 03 Jun 2021 08:16:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622733406; cv=none; d=google.com; s=arc-20160816; b=QT3oWIXhGV5NUbvQMy860AUvqa1OnPq/kPdGiDygyASLUxK+g4Qx4lN5vmXZG6cR6l +RoKW47gi3cwUxz/wLjk3VhUTJn7Ogkecl63KzgeZwD6iwoimlLB/nrKLJHMVUm7J9+6 Q13rJj0SIO4nQsHR7EmJF/C7kMe8pGk7ufC11GdM1ONFndPN//mTNuUAfAfG+NF4IQAi syVjkO8Zh9ycq0XDz5wUqcpytOELUqVgxtmOlJK6eDQpJO7yE7JMeheRsBumBjHGHjR5 l9l5wHRb6su+f/XCyfKYCmgWG3NUzj5tkcHPqzD2mZmwCPgM+z0fsbPyrIOFiU1NCcuA 7J+g== 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:dkim-filter; bh=N+TtNg651kLEqW/yUqiR219gdHV+Nj5LUEDricdH7Go=; b=Q5YBIhQsZhSXRzMANLcKbrCoRM6I2mwAwNNZTCIfdgjLpXFYtAD7rpHY0o9sD7KuG3 9yy5Ja7RjwJJQoq3DH/XXvcVv64/paEbZB4H5jXhwW6yy/DxK6vM4al4wxzlvT7QU5zW VySziZldFgqiHZUR2znnkb3hK2f2TdF1l4W7mQ/R9DH6CkyLx2HsTkV2X0kakzjMVTVe q6sKOuNfrMtgCbr8QEaNSSfyEbG6gCD4dRTxy0oLFJvr+owAmdlatT/eqQORgN8uv4GN +fUFwqP2PqmyLwzwoQSa/8kIsuUJhW7Ksoddz7qe5IVeOYXv8Yq65T5+fQiPmwM/LOc9 1fYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=IgqCOHo1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn12si2623205edb.519.2021.06.03.08.16.23; Thu, 03 Jun 2021 08:16:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=IgqCOHo1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231992AbhFCPQl (ORCPT + 99 others); Thu, 3 Jun 2021 11:16:41 -0400 Received: from linux.microsoft.com ([13.77.154.182]:45642 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231901AbhFCPQf (ORCPT ); Thu, 3 Jun 2021 11:16:35 -0400 Received: from viremana-dev.fwjladdvyuiujdukmejncen4mf.xx.internal.cloudapp.net (unknown [13.66.132.26]) by linux.microsoft.com (Postfix) with ESMTPSA id E6E1C20B8006; Thu, 3 Jun 2021 08:14:50 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E6E1C20B8006 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1622733290; bh=N+TtNg651kLEqW/yUqiR219gdHV+Nj5LUEDricdH7Go=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IgqCOHo18HUpYyyzQ7NepbyjsgISB2f3SLPY1UIb6Rx4g2kX3A3c5SoQeMER1dLe4 oIjYAggX7A2Eu/RSjMx8CO1fGqVeyRSjs02V4eoAt4AsIxIPpnPLZEhzzpy8up1sem SomJVAZgY0W61eHhLVzdVPNtbBycyUuYa+gFw5xU= From: Vineeth Pillai To: Lan Tianyu , Michael Kelley , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Tom Lendacky , Wanpeng Li , Jim Mattson , Joerg Roedel , Wei Liu , Stephen Hemminger , Haiyang Zhang Cc: Vineeth Pillai , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "K. Y. Srinivasan" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Subject: [PATCH v5 2/7] hyperv: SVM enlightened TLB flush support flag Date: Thu, 3 Jun 2021 15:14:35 +0000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bit 22 of HYPERV_CPUID_FEATURES.EDX is specific to SVM and specifies support for enlightened TLB flush. With this enlightenment enabled, ASID invalidations flushes only gva->hpa entries. To flush TLB entries derived from NPT, hypercalls should be used (HvFlushGuestPhysicalAddressSpace or HvFlushGuestPhysicalAddressList) Signed-off-by: Vineeth Pillai --- arch/x86/include/asm/hyperv-tlfs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h index 606f5cc579b2..005bf14d0449 100644 --- a/arch/x86/include/asm/hyperv-tlfs.h +++ b/arch/x86/include/asm/hyperv-tlfs.h @@ -133,6 +133,15 @@ #define HV_X64_NESTED_GUEST_MAPPING_FLUSH BIT(18) #define HV_X64_NESTED_MSR_BITMAP BIT(19) +/* + * This is specific to AMD and specifies that enlightened TLB flush is + * supported. If guest opts in to this feature, ASID invalidations only + * flushes gva -> hpa mapping entries. To flush the TLB entries derived + * from NPT, hypercalls should be used (HvFlushGuestPhysicalAddressSpace + * or HvFlushGuestPhysicalAddressList). + */ +#define HV_X64_NESTED_ENLIGHTENED_TLB BIT(22) + /* HYPERV_CPUID_ISOLATION_CONFIG.EAX bits. */ #define HV_PARAVISOR_PRESENT BIT(0) -- 2.25.1