Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4837916pxy; Tue, 27 Apr 2021 13:56:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgMUwaQ931DGoUsJMmURCQmy8hZfsCe8atQpdKk/PkkTAhlQ67D54gBnH1YWEMupWDjzEr X-Received: by 2002:a17:903:1c2:b029:ec:a5b6:f840 with SMTP id e2-20020a17090301c2b02900eca5b6f840mr25982745plh.24.1619557001061; Tue, 27 Apr 2021 13:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619557001; cv=none; d=google.com; s=arc-20160816; b=jgk4MprSLah0w14y1Z0aSEna9pIjAueKFVrHMUJtMS3b9Mob5uo6T79B4Xx7yJgcRf 4GTLE3R5BBVDeYO5ndyGztQbxlRLiC4N2xobn6QO6i07vxUxMbFz0d4/Ry9NisWXO/rN eIa3cBxPkwgR7ZcP1Up2U580bEaKVnWlmlgA9ADHTdP/PU/0tCaEA+88ZbMhpYcURKDW wb34V9xjYC2YBhhNfNRSIOjvbHOuEqZJLAwEQLeYrw4BJTG/O6VZcZQsIs7CjPIZA5Vp qQ4lcNH2QLJnl/z74na32JynB8LwuJNoGpy2FKgppzBOKtVQjNRWej8are3wUmx0elEH +qjQ== 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=EhdKH7psVQRZDRmie+YjLYQRgj8mgz6okLMcVC2BWbNxc8u0HCh0lK8XPrwc8G422h nuRCt4fG8bOZJ+MZjIL5mZ+xgLq0nDYZJYHxJB19qYRQI9HBb4I9QruN1/Xuqff9dd6v vol1KhvKNT+XuXbYcwXQkka986+nw1eJbVz2rDfP3m6vW4zG3qLY85vFNhIXXmixILK7 WbFVfNBOi+CUozk87EnaWXzQfSKFLhjmI0/u/fV54Ofb098pIRwfRGcvQUPkw4V/hSJd 1mXwxFRDhtGJ6OsLoGH4+CweLSdvPnMrpi3hMSez6MwkM1r3XzqO4HvELyRMXzg4UDSz bnuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="Mw/leQAA"; 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 a7si1048072pls.73.2021.04.27.13.56.05; Tue, 27 Apr 2021 13:56:41 -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="Mw/leQAA"; 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 S239203AbhD0U4D (ORCPT + 99 others); Tue, 27 Apr 2021 16:56:03 -0400 Received: from linux.microsoft.com ([13.77.154.182]:35580 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239043AbhD0Uzt (ORCPT ); Tue, 27 Apr 2021 16:55:49 -0400 Received: from viremana-dev.fwjladdvyuiujdukmejncen4mf.xx.internal.cloudapp.net (unknown [13.66.132.26]) by linux.microsoft.com (Postfix) with ESMTPSA id F1B3320B8002; Tue, 27 Apr 2021 13:55:05 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com F1B3320B8002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1619556906; bh=N+TtNg651kLEqW/yUqiR219gdHV+Nj5LUEDricdH7Go=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mw/leQAAUaqye9+XGI0trTjkKXYdvQNWm6Sf1LkemCV3G7F10D2ThQwIF3pBCDa7b 389Rnz6EMU8+Z1af7ecGsAXEqEND6j+CBNvyhouYdoW59ATCVWS+93XiMsIRPxVZQv ESQAjVmn0b5JwQoLmJR3u5DV1EWMwmerFetdZAFY= 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 v4 2/7] hyperv: SVM enlightened TLB flush support flag Date: Tue, 27 Apr 2021 20:54:51 +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