Skip to content

Commit 86af935

Browse files
committed
must be a PFN
1 parent d4145a5 commit 86af935

File tree

1 file changed

+3
-4
lines changed
  • openhcl/virt_mshv_vtl/src/processor/snp

1 file changed

+3
-4
lines changed

openhcl/virt_mshv_vtl/src/processor/snp/mod.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ impl UhProcessor<'_, SnpBacked> {
641641

642642
// The kernel does RMP update for the secure AVIC page.
643643

644-
let savic_page_ptr = self.runner.secure_avic_page_ptr(vtl) as u64;
644+
let vtl0_avic_pfn = self.runner.secure_avic_vtl0_pfn(self.inner.cpu_index);
645645

646646
// Specification: "SEV-ES Guest-Hypervisor Communication Block Standartization",
647647
// 4.1.16.1 "Backing page support".
@@ -655,7 +655,7 @@ impl UhProcessor<'_, SnpBacked> {
655655

656656
let savic_ctrl = SecureAvicControl::from(vmsa.secure_avic_control())
657657
.with_secure_avic_en(1)
658-
.with_guest_apic_backing_page_ptr(savic_page_ptr);
658+
.with_guest_apic_backing_page_ptr(vtl0_avic_pfn);
659659
*(vmsa.secure_avic_control_mut()) = savic_ctrl;
660660

661661
// Advise the hypervisor.
@@ -668,12 +668,11 @@ impl UhProcessor<'_, SnpBacked> {
668668
)
669669
.with_vtl0_interrupt_injection(HvSnpInterruptInjection::HvSnpSecureAvic);
670670

671-
let vtl0_avic_gpa_number = self.runner.secure_avic_vtl0_pfn(self.inner.cpu_index);
672671
let values: &[(HvX64RegisterName, u64)] = &[
673672
(
674673
HvX64RegisterName::SevAvicGpa,
675674
hvdef::HvX64RegisterSevAvic::new()
676-
.with_avic_gpa_page_number(vtl0_avic_gpa_number)
675+
.with_avic_gpa_page_number(vtl0_avic_pfn)
677676
.with_enable_secure_apic(true)
678677
.into(),
679678
),

0 commit comments

Comments
 (0)