Re: [RFC PATCH v2 7/7] KVM: KVM: don't break vcpu 'halt' state due to apfs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Gleb Natapov
Date: Monday, November 1, 2010 - 11:56 pm

On Tue, Nov 02, 2010 at 10:30:10AM +0800, Xiao Guangrong wrote:
No, we will not. If nmi/interrupt and apfs completed event occur at the same
time kvm_vcpu_block() will exit with KVM_REQ_UNHALT set, but cpu will
not be unhalted because of list_empty_careful(&vcpu->async_pf.done)
check. Vcpu then will process pending apf completion and enter
kvm_vcpu_block() again which will immediately exit because
kvm_arch_vcpu_runnable() will return true since there is pending
nmi/interrupt. This time vcpu will be unhalted.

Because kvm_arch_vcpu_runnable() does not check for pending exceptions.
Since now we do not unhalt vcpu when apf completion happens we need to
unhalt it here. But, as I said, the patch is untested.

--
			Gleb.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v2 1/7] KVM: fix tracing kvm_try_async_get_page, Xiao Guangrong, (Mon Nov 1, 1:58 am)
[PATCH v2 2/7] KVM: cleanup aysnc_pf tracepoints, Xiao Guangrong, (Mon Nov 1, 1:59 am)
[PATCH v2 4/7] KVM: avoid unnecessary wait for a async pf, Xiao Guangrong, (Mon Nov 1, 2:01 am)
Re: [RFC PATCH v2 7/7] KVM: KVM: don't break vcpu 'halt' s ..., Gleb Natapov, (Mon Nov 1, 11:56 pm)