From: Thomas Tai <thomas.tai@oracle.com>
To: maz@kernel.org, james.morse@arm.com,
julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com,
linux-arm-kernel@lists.infradead.org,
kvmarm@lists.cs.columbia.edu
Cc: thomas.tai@oracle.com
Subject: [PATCH] KVM: arm64: Fixes ARM VM hangs at boot
Date: Wed, 30 Sep 2020 16:12:39 -0600 [thread overview]
Message-ID: <20200930221239.488744-1-thomas.tai@oracle.com> (raw)
When using the latest kernel v5.9-rc7 on an ARM server, VMs could
hang at boot with no output. The commit a0e50aa3f4a8 removed
asm(ALTERNATIVE("isb", "nop", ARM64_WORKAROUND_SPECULATIVE_AT)),
it looks like isb is still needed for non
ARM64_WORKAROUND_SPECULATIVE_AT host when switching to guest.
The code fragment for the original patch:
- /* __load_guest_stage2() includes an ISB for the workaround. */
- __load_guest_stage2(kvm);
- asm(ALTERNATIVE("isb", "nop", ARM64_WORKAROUND_SPECULATIVE_AT));
+ __load_guest_stage2(mmu);
The code should have been:
- /* __load_guest_stage2() includes an ISB for the workaround. */
- __load_guest_stage2(kvm);
- asm(ALTERNATIVE("isb", "nop", ARM64_WORKAROUND_SPECULATIVE_AT));
+ __load_guest_stage2(mmu);
+ asm(ALTERNATIVE("isb", "nop", ARM64_WORKAROUND_SPECULATIVE_AT));
ie, the workaround is still needed.
Fixes: a0e50aa3f4a8 ("KVM: arm64: Factor out stage 2 page table data from
struct kvm")
Signed-off-by: Thomas Tai <thomas.tai@oracle.com>
---
arch/arm64/kvm/hyp/nvhe/tlb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/kvm/hyp/nvhe/tlb.c b/arch/arm64/kvm/hyp/nvhe/tlb.c
index 69eae60..536496e 100644
--- a/arch/arm64/kvm/hyp/nvhe/tlb.c
+++ b/arch/arm64/kvm/hyp/nvhe/tlb.c
@@ -32,6 +32,7 @@ static void __tlb_switch_to_guest(struct kvm_s2_mmu *mmu,
}
__load_guest_stage2(mmu);
+ asm(ALTERNATIVE("isb", "nop", ARM64_WORKAROUND_SPECULATIVE_AT));
}
static void __tlb_switch_to_host(struct tlb_inv_context *cxt)
--
1.8.3.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2020-09-30 22:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 22:12 Thomas Tai [this message]
2020-10-01 8:30 ` [PATCH] KVM: arm64: Fixes ARM VM hangs at boot Marc Zyngier
2020-10-01 12:59 ` Thomas Tai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200930221239.488744-1-thomas.tai@oracle.com \
--to=thomas.tai@oracle.com \
--cc=james.morse@arm.com \
--cc=julien.thierry.kdev@gmail.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=suzuki.poulose@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).