Thread (118 messages) 118 messages, 7 authors, 2020-07-23

Re: [PATCH v4 51/75] x86/sev-es: Handle MMIO events

From: Mike Stunes <hidden>
Date: 2020-07-22 22:53:08
Also in: kvm, lkml

quoted hunk ↗ jump to hunk
On Jul 22, 2020, at 1:05 AM, Joerg Roedel [off-list ref] wrote:

Hmm, I have a theory ...

On Tue, Jul 21, 2020 at 09:01:44PM +0000, Mike Stunes wrote:
quoted
If I remove the call to probe_roms from setup_arch, or remove the calls to romchecksum from probe_roms, this kernel boots normally.

Please let me know of other tests I should run or data that I can collect. Thanks!
... can you please try the attached diff?
diff --git a/arch/x86/kernel/sev-es.c b/arch/x86/kernel/sev-es.c
index 251d0aabc55a..e1fea7a38019 100644
--- a/arch/x86/kernel/sev-es.c
+++ b/arch/x86/kernel/sev-es.c
@@ -389,7 +389,8 @@ static bool vc_slow_virt_to_phys(struct ghcb *ghcb, struct es_em_ctxt *ctxt,
	pgd_t *pgd;
	pte_t *pte;

-	pgd = pgd_offset(current->active_mm, va);
+	pgd = __va(read_cr3_pa());
+	pgd = &pgd[pgd_index(va)];
	pte = lookup_address_in_pgd(pgd, va, &level);
	if (!pte) {
		ctxt->fi.vector     = X86_TRAP_PF;
Thanks Joerg! With that change in place, this kernel boots normally. What was the problem?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help