@@ -149,27 +149,27 @@ static bool pm1ab_io_read(struct acrn_vcpu *vcpu, uint16_t addr, size_t width)
149
149
return true;
150
150
}
151
151
152
- #define POWEROFF_TIMEOUT (5 * 60U ) /* default poweroff timeout is 5 minutes */
152
+ #define POWEROFF_TIMEOUT (300U ) /* default poweroff timeout is 5 minutes */
153
153
/* wait for other vm shutdown done. If POWEROFF_TIMEOUT passed and there are
154
154
* still some VMs active, we will force platform power off.
155
155
*
156
156
* TODO:
157
157
* - Let user configure whether we wait for ever till all VMs powered off or
158
158
* force shutdown once pre-defined timeout hit.
159
159
*/
160
- static inline void wait_for_other_vm_shutdown (struct acrn_vm * self_vm )
160
+ static inline void wait_for_other_vm_shutdown (const struct acrn_vm * self_vm )
161
161
{
162
162
uint16_t vm_id ;
163
163
bool ready_for_s5 ;
164
- uint32_t timeout = POWEROFF_TIMEOUT ;
164
+ uint32_t timeout = ( uint32_t ) POWEROFF_TIMEOUT ;
165
165
struct acrn_vm * vm ;
166
166
167
167
while (timeout != 0U ) {
168
168
ready_for_s5 = true;
169
169
for (vm_id = 0U ; vm_id < CONFIG_MAX_VM_NUM ; vm_id ++ ) {
170
170
vm = get_vm_from_vmid (vm_id );
171
171
172
- if ((vm != self_vm ) && !is_poweroff_vm (vm )) {
172
+ if ((vm != self_vm ) && ( !is_poweroff_vm (vm ) )) {
173
173
ready_for_s5 = false;
174
174
}
175
175
}
@@ -184,9 +184,10 @@ static inline void wait_for_other_vm_shutdown(struct acrn_vm *self_vm)
184
184
}
185
185
}
186
186
187
- static inline void enter_s5 (struct acrn_vm * vm , uint32_t pm1a_cnt_val , uint32_t pm1b_cnt_val )
187
+ static inline void enter_s5 (const struct acrn_vm * vm , uint32_t pm1a_cnt_val , uint32_t pm1b_cnt_val )
188
188
{
189
189
wait_for_other_vm_shutdown (vm );
190
+ pr_err ("yfwyfw: before enter s5" );
190
191
host_enter_s5 (vm -> pm .sx_state_data , pm1a_cnt_val , pm1b_cnt_val );
191
192
}
192
193
0 commit comments