@@ -969,7 +969,7 @@ pub(crate) mod tests {
969
969
entry_addr. unwrap ( ) . kernel_load
970
970
}
971
971
972
- fn vcpu_configured_for_boot ( ) -> ( VcpuHandle , vmm_sys_util :: eventfd :: EventFd ) {
972
+ fn vcpu_configured_for_boot ( ) -> ( VcpuHandle , EventFd , GuestMemoryMmap ) {
973
973
Vcpu :: register_kick_signal_handler ( ) ;
974
974
// Need enough mem to boot linux.
975
975
let mem_size = 64 << 20 ;
@@ -1021,7 +1021,7 @@ pub(crate) mod tests {
1021
1021
// Wait for vCPUs to initialize their TLS before moving forward.
1022
1022
barrier. wait ( ) ;
1023
1023
1024
- ( vcpu_handle, vcpu_exit_evt)
1024
+ ( vcpu_handle, vcpu_exit_evt, vm_mem )
1025
1025
}
1026
1026
1027
1027
#[ test]
@@ -1034,7 +1034,7 @@ pub(crate) mod tests {
1034
1034
1035
1035
#[ test]
1036
1036
fn test_vcpu_tls ( ) {
1037
- let ( _, _, mut vcpu, _ ) = setup_vcpu ( 0x1000 ) ;
1037
+ let ( _, _, mut vcpu, _mem ) = setup_vcpu ( 0x1000 ) ;
1038
1038
1039
1039
// Running on the TLS vcpu should fail before we actually initialize it.
1040
1040
unsafe {
@@ -1075,7 +1075,7 @@ pub(crate) mod tests {
1075
1075
#[ test]
1076
1076
fn test_vcpu_kick ( ) {
1077
1077
Vcpu :: register_kick_signal_handler ( ) ;
1078
- let ( _, vm, mut vcpu, _ ) = setup_vcpu ( 0x1000 ) ;
1078
+ let ( _, vm, mut vcpu, _mem ) = setup_vcpu ( 0x1000 ) ;
1079
1079
1080
1080
let mut kvm_run =
1081
1081
kvm_ioctls:: KvmRunWrapper :: mmap_from_fd ( & vcpu. kvm_vcpu . fd , vm. fd ( ) . run_size ( ) )
@@ -1130,7 +1130,7 @@ pub(crate) mod tests {
1130
1130
1131
1131
#[ test]
1132
1132
fn test_immediate_exit_shortcircuits_execution ( ) {
1133
- let ( _, _, mut vcpu, _ ) = setup_vcpu ( 0x1000 ) ;
1133
+ let ( _, _, mut vcpu, _mem ) = setup_vcpu ( 0x1000 ) ;
1134
1134
1135
1135
vcpu. kvm_vcpu . fd . set_kvm_immediate_exit ( 1 ) ;
1136
1136
// Set a dummy value to be returned by the emulate call
@@ -1155,7 +1155,7 @@ pub(crate) mod tests {
1155
1155
1156
1156
#[ test]
1157
1157
fn test_vcpu_pause_resume ( ) {
1158
- let ( vcpu_handle, vcpu_exit_evt) = vcpu_configured_for_boot ( ) ;
1158
+ let ( vcpu_handle, vcpu_exit_evt, _mem ) = vcpu_configured_for_boot ( ) ;
1159
1159
1160
1160
// Queue a Resume event, expect a response.
1161
1161
queue_event_expect_response ( & vcpu_handle, VcpuEvent :: Resume , VcpuResponse :: Resumed ) ;
@@ -1187,7 +1187,7 @@ pub(crate) mod tests {
1187
1187
1188
1188
#[ test]
1189
1189
fn test_vcpu_save_state_events ( ) {
1190
- let ( vcpu_handle, _vcpu_exit_evt) = vcpu_configured_for_boot ( ) ;
1190
+ let ( vcpu_handle, _vcpu_exit_evt, _mem ) = vcpu_configured_for_boot ( ) ;
1191
1191
1192
1192
// Queue a Resume event, expect a response.
1193
1193
queue_event_expect_response ( & vcpu_handle, VcpuEvent :: Resume , VcpuResponse :: Resumed ) ;
@@ -1220,7 +1220,7 @@ pub(crate) mod tests {
1220
1220
1221
1221
#[ test]
1222
1222
fn test_vcpu_dump_cpu_config ( ) {
1223
- let ( vcpu_handle, _) = vcpu_configured_for_boot ( ) ;
1223
+ let ( vcpu_handle, _, _mem ) = vcpu_configured_for_boot ( ) ;
1224
1224
1225
1225
// Queue a DumpCpuConfig event, expect a DumpedCpuConfig response.
1226
1226
vcpu_handle
0 commit comments