Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp790734pxb; Thu, 15 Apr 2021 06:45:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRuTjqMXqvEZpN0zHfm95W2xuUDiQaFZgKEVxCYKfB/AjJSt2HlhMwHB4qgFuKoCOTZGQV X-Received: by 2002:a17:902:8604:b029:e6:60ad:6921 with SMTP id f4-20020a1709028604b02900e660ad6921mr4004581plo.15.1618494314807; Thu, 15 Apr 2021 06:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618494314; cv=none; d=google.com; s=arc-20160816; b=FvIVjS/4NvTf7ca/O08xbpLNixj7RxGmHvw1vxysIESM3NKA7Bh0TmxkYkeL8djCuj J2F3IpTHV/k681WDfZGwdO/H2oOL74oytsFOI7Xv6P+EWaTlNFxVfzMpCViC8mfS3jB5 5tX/mfPGUQh39h1IxYBYoka7iVHySeUsDIs/FY44BufSxvvDAqZu01ZXYWEHfezKtOA1 VewlQ9PTjHBtoww//J9FtfoakiAjlTGyDFu1fsNpjMCuCjEzGgsrgwP8Y/nVcpHn3+nT vil2tEwBVLpcUbyz8euWdfqINpgPymu8ihq5XWHQpqSDUozKIdTyVc6t/MyKueIth2Ew fOrQ== 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=Fop+i/RuXhdePTbioLGYklmNIYZp+dIXzN40PKUCeVZ25tmuu4Wrzg7dxBhUy2Xr6q QVnR+YMNitnzyLdbvjP/CqEaZV4p70BK9hdBjDQL9+/95AjNhxlaRmcvaAhRbqVk25DB 71r+cXyhXYbUt7icJmbMHoWOsJYUJvm7+RHiQDrpROm6R7MWgkJKtGez03ISTLfYrY5/ hyYAcZt9YV+i2clHkSwL/NBl6FP3ooCmAcqvutJ1Cgr+YjBdtFTRNwCUwSFwr4C46lp0 lIWW8l7OnnydQZvasPzzQOIXhBTpbHb6hQNMl6LB8ixcFtPCmf1hHpO0vdT6+1VVJ8hM LKoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=H6WilJfE; 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 r37si3269223pgm.65.2021.04.15.06.45.02; Thu, 15 Apr 2021 06:45:14 -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=H6WilJfE; 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 S233363AbhDONod (ORCPT + 99 others); Thu, 15 Apr 2021 09:44:33 -0400 Received: from linux.microsoft.com ([13.77.154.182]:41546 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233391AbhDONoV (ORCPT ); Thu, 15 Apr 2021 09:44:21 -0400 Received: from viremana-dev.fwjladdvyuiujdukmejncen4mf.xx.internal.cloudapp.net (unknown [13.66.132.26]) by linux.microsoft.com (Postfix) with ESMTPSA id BBEA220B8003; Thu, 15 Apr 2021 06:43:57 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BBEA220B8003 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1618494237; bh=N+TtNg651kLEqW/yUqiR219gdHV+Nj5LUEDricdH7Go=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H6WilJfEIGRytrTncEyk/VXm+BXMAPw8LWpegMFjQOZqH8kDsb/TfoiBPzGbLPF9A 0+H9UvdDxxfpS2fsxHEkWkE7+nwCV3VBN+MxsDwKsM+HOeqSUiCJwAkYDBlcS0PnyG zbrCHpm79Y/hLmsurXiPp93Nm3B1BFaVBpJuzjjo= From: Vineeth Pillai To: Lan Tianyu , Michael Kelley , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , 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 v2 2/7] hyperv: SVM enlightened TLB flush support flag Date: Thu, 15 Apr 2021 13:43:37 +0000 Message-Id: <3fd0cdfb9a4164a3fb90351db4dc10f52a7c4819.1618492553.git.viremana@linux.microsoft.com> 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