[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87tumh24i0.wl-maz@kernel.org>
Date: Tue, 01 Jun 2021 12:44:55 +0100
From: Marc Zyngier <maz@...nel.org>
To: Zenghui Yu <yuzenghui@...wei.com>
Cc: <stable@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<gregkh@...uxfoundation.org>, <sashal@...nel.org>,
<alexandru.elisei@....com>, <wanghaibin.wang@...wei.com>
Subject: Re: [PATCH stable-5.12.y backport 2/2] KVM: arm64: Resolve all pending PC updates before immediate exit
On Tue, 01 Jun 2021 12:12:38 +0100,
Zenghui Yu <yuzenghui@...wei.com> wrote:
>
> commit e3e880bb1518eb10a4b4bb4344ed614d6856f190 upstream.
>
> Commit 26778aaa134a ("KVM: arm64: Commit pending PC adjustemnts before
> returning to userspace") fixed the PC updating issue by forcing an explicit
> synchronisation of the exception state on vcpu exit to userspace.
>
> However, we forgot to take into account the case where immediate_exit is
> set by userspace and KVM_RUN will exit immediately. Fix it by resolving all
> pending PC updates before returning to userspace.
>
> Since __kvm_adjust_pc() relies on a loaded vcpu context, I moved the
> immediate_exit checking right after vcpu_load(). We will get some overhead
> if immediate_exit is true (which should hopefully be rare).
>
> Fixes: 26778aaa134a ("KVM: arm64: Commit pending PC adjustemnts before returning to userspace")
> Signed-off-by: Zenghui Yu <yuzenghui@...wei.com>
> Signed-off-by: Marc Zyngier <maz@...nel.org>
> Link: https://lore.kernel.org/r/20210526141831.1662-1-yuzenghui@huawei.com
> Cc: stable@...r.kernel.org # 5.11
Reviewed-by: Marc Zyngier <maz@...nel.org>
M.
--
Without deviation from the norm, progress is not possible.
Powered by blists - more mailing lists