[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8a16978a-2f02-a9bb-05b0-368e3ee8e284@amd.com>
Date: Mon, 19 May 2025 12:48:55 -0500
From: Tom Lendacky <thomas.lendacky@....com>
To: Sean Christopherson <seanjc@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org, Paolo Bonzini <pbonzini@...hat.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
dri-devel@...ts.freedesktop.org, Zheyun Shen <szy0127@...u.edu.cn>,
Kevin Loughlin <kevinloughlin@...gle.com>, Kai Huang <kai.huang@...el.com>,
Mingwei Zhang <mizhang@...gle.com>
Subject: Re: [PATCH v2 8/8] KVM: SVM: Flush cache only on CPUs running SEV
guest
On 5/16/25 16:28, Sean Christopherson wrote:
> From: Zheyun Shen <szy0127@...u.edu.cn>
>
> On AMD CPUs without ensuring cache consistency, each memory page
> reclamation in an SEV guest triggers a call to do WBNOINVD/WBINVD on all
> CPUs, thereby affecting the performance of other programs on the host.
>
> Typically, an AMD server may have 128 cores or more, while the SEV guest
> might only utilize 8 of these cores. Meanwhile, host can use qemu-affinity
> to bind these 8 vCPUs to specific physical CPUs.
>
> Therefore, keeping a record of the physical core numbers each time a vCPU
> runs can help avoid flushing the cache for all CPUs every time.
>
> Signed-off-by: Zheyun Shen <szy0127@...u.edu.cn>
> Co-developed-by: Sean Christopherson <seanjc@...gle.com>
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@....com>
> ---
> arch/x86/kvm/svm/sev.c | 46 +++++++++++++++++++++++++++++++++++-------
> arch/x86/kvm/svm/svm.h | 1 +
> 2 files changed, 40 insertions(+), 7 deletions(-)
>
Powered by blists - more mailing lists