On December 20, 2016 4:54 PM, Tian, Kevin wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: Tuesday, December 20, 2016 4:35 PM >> >> >>> On 20.12.16 at 06:37, <kevin.t...@intel.com> wrote: >> >> From: Xuquan (Quan Xu) [mailto:xuqu...@huawei.com] >> >> Sent: Friday, December 16, 2016 5:40 PM >> >> - if (pt_vector != -1) >> >> - vmx_set_eoi_exit_bitmap(v, pt_vector); >> >> + if ( pt_vector != -1 ) { >> >> + if ( intack.vector > pt_vector ) >> >> + vmx_set_eoi_exit_bitmap(v, intack.vector); >> >> + else >> >> + vmx_set_eoi_exit_bitmap(v, pt_vector); >> >> + } >> > >> > Above can be simplified as one line change: >> > if ( pt_vector != -1 ) >> > vmx_set_eoi_exit_bitmap(v, intack.vector); >> >> Hmm, I don't understand. Did you mean to use max() here? Or else how >> is this an equivalent of the originally proposed code? >> > >Original code is not 100% correct. The purpose is to set EOI exit bitmap for >any vector which may block injection of pt_vector - give chance to recognize >pt_vector in future intack and then do pt intr post. The simplified code >achieves this effect same as original code if intack.vector >= vector. I cannot >come up a case why intack.vector might be smaller than vector. If this case >happens, we still need enable exit bitmap for intack.vector instead of >pt_vector for said purpose while original code did it wrong. >
Thanks for explaining this to me too!! Your modification is better.. Quan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel