diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-09 09:45:00 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-09 09:45:00 -0400 |
commit | 66da65005aa819e0b8d3a08f5ec1491b7690cb67 (patch) | |
tree | 001471fc80938e6e13c6ecf356503d4c65043d5a /arch/x86/boot/compressed/idt_64.c | |
parent | 6cd88243c7e03845a450795e134b488fc2afb736 (diff) | |
parent | 1a12b25274b9e54b0d2d59e21620f8cf13b268cb (diff) | |
download | linux-66da65005aa819e0b8d3a08f5ec1491b7690cb67.tar.bz2 |
Merge tag 'kvm-riscv-fixes-5.19-1' of https://github.com/kvm-riscv/linux into HEAD
KVM/riscv fixes for 5.19, take #1
- Typo fix in arch/riscv/kvm/vmid.c
- Remove broken reference pattern from MAINTAINERS entry
Diffstat (limited to 'arch/x86/boot/compressed/idt_64.c')
-rw-r--r-- | arch/x86/boot/compressed/idt_64.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/x86/boot/compressed/idt_64.c b/arch/x86/boot/compressed/idt_64.c index 9b93567d663a..6debb816e83d 100644 --- a/arch/x86/boot/compressed/idt_64.c +++ b/arch/x86/boot/compressed/idt_64.c @@ -39,7 +39,23 @@ void load_stage1_idt(void) load_boot_idt(&boot_idt_desc); } -/* Setup IDT after kernel jumping to .Lrelocated */ +/* + * Setup IDT after kernel jumping to .Lrelocated. + * + * initialize_identity_maps() needs a #PF handler to be setup + * in order to be able to fault-in identity mapping ranges; see + * do_boot_page_fault(). + * + * This #PF handler setup needs to happen in load_stage2_idt() where the + * IDT is loaded and there the #VC IDT entry gets setup too. + * + * In order to be able to handle #VCs, one needs a GHCB which + * gets setup with an already set up pagetable, which is done in + * initialize_identity_maps(). And there's the catch 22: the boot #VC + * handler do_boot_stage2_vc() needs to call early_setup_ghcb() itself + * (and, especially set_page_decrypted()) because the SEV-ES setup code + * cannot initialize a GHCB as there's no #PF handler yet... + */ void load_stage2_idt(void) { boot_idt_desc.address = (unsigned long)boot_idt; |