Message ID | 20220314112735.628330783@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <stable-owner@kernel.org> 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 0C7F3C433EF for <stable@archiver.kernel.org>; Mon, 14 Mar 2022 11:59:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239911AbiCNMA7 (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 14 Mar 2022 08:00:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240161AbiCNMAf (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 14 Mar 2022 08:00:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DF73488BC; Mon, 14 Mar 2022 04:58:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 20CB66129D; Mon, 14 Mar 2022 11:58:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA9D9C340E9; Mon, 14 Mar 2022 11:58:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647259116; bh=icEDEpDgLSl7wJF0aO509gDlWKyVm8JZ8orC63osoE4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OJaCjJZ+g+5ZUdWSdOVqyc0iDTsFsZXV6u73S9vs8hgZL75PVemVA9rVu/hm+T2Rs SyLejICFP3f9HFfmCoQ8/jrjUMX+WaVj5LCdFhJfZ+d8t2iB2fujIu4l7gordhrUkm XyXIeeajjBIIvo3lpTifZYzVkqZoocN48SNu11dM= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Krish Sadhukhan <krish.sadhukhan@oracle.com>, Borislav Petkov <bp@suse.de>, Paolo Bonzini <pbonzini@redhat.com>, Liam Merwick <liam.merwick@oracle.com> Subject: [PATCH 5.4 43/43] KVM: SVM: Dont flush cache if hardware enforces cache coherency across encryption domains Date: Mon, 14 Mar 2022 12:53:54 +0100 Message-Id: <20220314112735.628330783@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112734.415677317@linuxfoundation.org> References: <20220314112734.415677317@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -1904,7 +1904,8 @@ static void sev_clflush_pages(struct pag uint8_t *page_virtual; unsigned long i; - if (npages == 0 || pages == NULL) + if (this_cpu_has(X86_FEATURE_SME_COHERENT) || npages == 0 || + pages == NULL) return; for (i = 0; i < npages; i++) {