File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1987,7 +1987,8 @@ impl cpu::Vcpu for KvmVcpu {
19871987 /// Triggers the running of the current virtual CPU returning an exit reason.
19881988 ///
19891989 fn run ( & self ) -> std:: result:: Result < cpu:: VmExit , cpu:: HypervisorCpuError > {
1990- match self . fd . lock ( ) . unwrap ( ) . run ( ) {
1990+ let mut lock = self . fd . lock ( ) . unwrap ( ) ;
1991+ match lock. run ( ) {
19911992 Ok ( run) => match run {
19921993 #[ cfg( target_arch = "x86_64" ) ]
19931994 VcpuExit :: IoIn ( addr, data) => {
@@ -2066,7 +2067,11 @@ impl cpu::Vcpu for KvmVcpu {
20662067 } ,
20672068
20682069 Err ( ref e) => match e. errno ( ) {
2069- libc:: EAGAIN | libc:: EINTR => Ok ( cpu:: VmExit :: Ignore ) ,
2070+ libc:: EINTR => {
2071+ lock. set_kvm_immediate_exit ( 0 ) ;
2072+ Ok ( cpu:: VmExit :: Ignore )
2073+ }
2074+ libc:: EAGAIN => Ok ( cpu:: VmExit :: Ignore ) ,
20702075 _ => Err ( cpu:: HypervisorCpuError :: RunVcpu ( anyhow ! (
20712076 "VCPU error {:?}" ,
20722077 e
Original file line number Diff line number Diff line change @@ -1113,7 +1113,6 @@ impl CpuManager {
11131113 error ! ( "Unexpected VM exit on \" immediate_exit\" run" ) ;
11141114 break ;
11151115 }
1116- vcpu. lock ( ) . as_ref ( ) . unwrap ( ) . vcpu . set_immediate_exit ( false ) ;
11171116 }
11181117
11191118 vcpu_run_interrupted. store ( true , Ordering :: SeqCst ) ;
You can’t perform that action at this time.
0 commit comments