Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection

2017-06-09 Thread Paolo Bonzini
On 09/06/2017 07:30, Wanpeng Li wrote: > 2017-06-08 19:52 GMT+08:00 Paolo Bonzini : >> >> 3) add an async_page_fault member to vcpu->arch.exception > > Do you think we should also add an async_page_fault field to > x86_exception, then pass down to kvm_inject_page_fault()

Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection

2017-06-09 Thread Paolo Bonzini
On 09/06/2017 07:30, Wanpeng Li wrote: > 2017-06-08 19:52 GMT+08:00 Paolo Bonzini : >> >> 3) add an async_page_fault member to vcpu->arch.exception > > Do you think we should also add an async_page_fault field to > x86_exception, then pass down to kvm_inject_page_fault() through >

Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection

2017-06-08 Thread Wanpeng Li
2017-06-08 19:52 GMT+08:00 Paolo Bonzini : > > 3) add an async_page_fault member to vcpu->arch.exception Do you think we should also add an async_page_fault field to x86_exception, then pass down to kvm_inject_page_fault() through x86_exception? Maybe we should modify

Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection

2017-06-08 Thread Wanpeng Li
2017-06-08 19:52 GMT+08:00 Paolo Bonzini : > > 3) add an async_page_fault member to vcpu->arch.exception Do you think we should also add an async_page_fault field to x86_exception, then pass down to kvm_inject_page_fault() through x86_exception? Maybe we should modify

Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection

2017-06-08 Thread Paolo Bonzini
On 08/06/2017 14:32, Wanpeng Li wrote: >>> I change the >>> condition to "nr == PF_VECTOR && error_code == 0" to intercept async_pf, >>> however, >>> the below bug will be splatted: >> Right, because error_code == 0 is a valid error code. >> >> For stable releases, this should be enough: > >

Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection

2017-06-08 Thread Paolo Bonzini
On 08/06/2017 14:32, Wanpeng Li wrote: >>> I change the >>> condition to "nr == PF_VECTOR && error_code == 0" to intercept async_pf, >>> however, >>> the below bug will be splatted: >> Right, because error_code == 0 is a valid error code. >> >> For stable releases, this should be enough: > >

Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection

2017-06-08 Thread Wanpeng Li
2017-06-08 19:52 GMT+08:00 Paolo Bonzini : > > > On 08/06/2017 11:30, Wanpeng Li wrote: >> However, I found that "nr == PF_VECTOR && vmx->apf_reason != 0" never be true >> in nested_vmx_check_exception(). SVM depends on the similar stuff in >> nested_svm_intercept() which

Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection

2017-06-08 Thread Wanpeng Li
2017-06-08 19:52 GMT+08:00 Paolo Bonzini : > > > On 08/06/2017 11:30, Wanpeng Li wrote: >> However, I found that "nr == PF_VECTOR && vmx->apf_reason != 0" never be true >> in nested_vmx_check_exception(). SVM depends on the similar stuff in >> nested_svm_intercept() which makes me confusing how it

Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection

2017-06-08 Thread Paolo Bonzini
On 08/06/2017 11:30, Wanpeng Li wrote: > However, I found that "nr == PF_VECTOR && vmx->apf_reason != 0" never be true > in nested_vmx_check_exception(). SVM depends on the similar stuff in > nested_svm_intercept() which makes me confusing how it can works. In > addition, >

Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection

2017-06-08 Thread Paolo Bonzini
On 08/06/2017 11:30, Wanpeng Li wrote: > However, I found that "nr == PF_VECTOR && vmx->apf_reason != 0" never be true > in nested_vmx_check_exception(). SVM depends on the similar stuff in > nested_svm_intercept() which makes me confusing how it can works. In > addition, >

[PATCH RFC] KVM: async_pf: fix async_pf exception injection

2017-06-08 Thread Wanpeng Li
INFO: task gnome-terminal-:1734 blocked for more than 120 seconds. Not tainted 4.12.0-rc4+ #8 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. gnome-terminal- D0 1734 1015 0x Call Trace: __schedule+0x3cd/0xb30 schedule+0x40/0x90

[PATCH RFC] KVM: async_pf: fix async_pf exception injection

2017-06-08 Thread Wanpeng Li
INFO: task gnome-terminal-:1734 blocked for more than 120 seconds. Not tainted 4.12.0-rc4+ #8 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. gnome-terminal- D0 1734 1015 0x Call Trace: __schedule+0x3cd/0xb30 schedule+0x40/0x90