@@ -641,7 +641,7 @@ impl UhProcessor<'_, SnpBacked> {
641
641
642
642
// The kernel does RMP update for the secure AVIC page.
643
643
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 ) ;
645
645
646
646
// Specification: "SEV-ES Guest-Hypervisor Communication Block Standartization",
647
647
// 4.1.16.1 "Backing page support".
@@ -655,7 +655,7 @@ impl UhProcessor<'_, SnpBacked> {
655
655
656
656
let savic_ctrl = SecureAvicControl :: from ( vmsa. secure_avic_control ( ) )
657
657
. 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 ) ;
659
659
* ( vmsa. secure_avic_control_mut ( ) ) = savic_ctrl;
660
660
661
661
// Advise the hypervisor.
@@ -668,12 +668,11 @@ impl UhProcessor<'_, SnpBacked> {
668
668
)
669
669
. with_vtl0_interrupt_injection ( HvSnpInterruptInjection :: HvSnpSecureAvic ) ;
670
670
671
- let vtl0_avic_gpa_number = self . runner . secure_avic_vtl0_pfn ( self . inner . cpu_index ) ;
672
671
let values: & [ ( HvX64RegisterName , u64 ) ] = & [
673
672
(
674
673
HvX64RegisterName :: SevAvicGpa ,
675
674
hvdef:: HvX64RegisterSevAvic :: new ( )
676
- . with_avic_gpa_page_number ( vtl0_avic_gpa_number )
675
+ . with_avic_gpa_page_number ( vtl0_avic_pfn )
677
676
. with_enable_secure_apic ( true )
678
677
. into ( ) ,
679
678
) ,
0 commit comments