File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/vmm/src/arch/aarch64/gic/gicv3 Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -143,9 +143,10 @@ impl GICv3 {
143143 flags : 0 ,
144144 } ;
145145 assert_eq ! ( kvm_bindings:: kvm_device_type_KVM_DEV_TYPE_ARM_VGIC_ITS, 8 ) ;
146- assert_eq ! ( kvm_bindings:: KVM_DEV_ITS_ADDR_TYPE ) ;
146+ assert_eq ! ( kvm_bindings:: KVM_VGIC_ITS_ADDR_TYPE , 4 ) ;
147147
148148 let msi_address = Self :: get_msi_address ( gic_device. vcpu_count ( ) ) ;
149+ assert_eq ! ( msi_address % 0x10000 , 0 ) ;
149150 info ! (
150151 "MSI address for VM with {} vCPUs: {msi_address:#x}" ,
151152 gic_device. vcpu_count( )
@@ -160,9 +161,10 @@ impl GICv3 {
160161 & its_fd,
161162 kvm_bindings:: KVM_DEV_ARM_VGIC_GRP_ADDR ,
162163 u64:: from ( kvm_bindings:: KVM_VGIC_ITS_ADDR_TYPE ) ,
163- Self :: get_msi_address ( gic_device. vcpu_count ( ) ) as * const u64 as u64 ,
164+ & Self :: get_msi_address ( gic_device. vcpu_count ( ) ) as * const u64 as u64 ,
164165 0 ,
165- ) ?;
166+ )
167+ . inspect_err ( |err| info ! ( "setting ITS address failed: {err:#?}" ) ) ?;
166168
167169 Self :: set_device_attribute (
168170 & its_fd,
You can’t perform that action at this time.
0 commit comments