What I want to do is predict how many instructions a hypercall entry of hypercall page (not hypercall handler) would execute before it finishes. Take HYPERVISOR_iret as an example, it precisely executes five instructions then call the hypercall handler, and it doesn't return so it just finish. But other hypercall entries expect a return value of syscall and might be interrupted during the execution, just as what you said about do_sched_up and do_xen_version, so it is hard to predict. Is there any solution to this problem? Just like syscall table, how can I predict how many instructions the syscall entries would execute before it actually go to the handler, thus accurately set traps to the syscall?
> Subject: Re: [Xen-devel] what's inside hypercall page?
> To: quizy_jones@xxxxxxxxxxx; xen-devel@xxxxxxxxxxxxxxxxxxxx
> From: jgross@xxxxxxxx
> Date: Thu, 3 Mar 2016 06:28:06 +0100
>
> On 03/03/16 01:56, quizyjones wrote:
> >> do_sched_op is self explaining: it is used for scheduling of the vcpu.
> >> A vcpu going to idle is using this hypercall. So any interrupt waking
> >> the vcpu up will seem to occur very near to the hypercall.
> >
> >> do_xen_version is often used as a very fast way to execute the check
> >> for pending events in the hypervisor (kind of polling).
> >
> >> do_multicall might run for a long time. So the hypervisor returns to
> >> the caller from time to time setting IP to the hypercall. The caller
> >> has the chance to react to interrupts and will then continue the
> >> hypercall.
> >>
> >>
> >> HTH, Juergen
> >
> >
> > Thanks for the replying. Does that mean we cannot predict when will
> > these two hypercalls finish? I want to set up an interval to monitor the
> > instructions (one time monitor per hypercall), so as to reduce the
> > performance cost. This requires an accurate prediction of instructions'
> > execution so as to avoid missing hypercalls. Is that possible? The main
> > problem is the execution of syscall (0x050f), as each hypercall behaves
> > different, how can I predict where will it go after the syscall returns?
>
> You can't predict how long a hypercall will run, as this depends on multiple
> factors, like the overall load of the host, values of parameters, ...
>
> A hypercall is by it's nature much more complicated than e.g. a simple
> arithmetic operation.
>
> What exactly do you want to achieve?
>
>
> Juergen
>
自动判断中文中文(简体)中文(香港)中文(繁体)英语日语朝鲜语德语法语俄语泰语南非语阿拉伯语阿塞拜疆语比利时语保加利亚语加泰隆语捷克语威尔士语丹麦语第维埃语希腊语世界语西班牙语爱沙尼亚语巴士克语法斯语芬兰语法罗语加里西亚语古吉拉特语希伯来语印地语克罗地亚语匈牙利语亚美尼亚语印度尼西亚语冰岛语意大利语格鲁吉亚语哈萨克语卡纳拉语孔卡尼语吉尔吉斯语立陶宛语拉脱维亚语毛利语马其顿语蒙古语马拉地语马来语马耳他语挪威语(伯克梅尔)荷兰语北梭托语旁遮普语波兰语葡萄牙语克丘亚语罗马尼亚语梵文北萨摩斯语斯洛伐克语斯洛文尼亚语阿尔巴尼亚语瑞典语斯瓦希里语叙利亚语泰米尔语泰卢固语塔加路语茨瓦纳语土耳其语宗加语鞑靼语乌克兰语乌都语乌兹别克语越南语班图语祖鲁语自动选择中文中文(简体)中文(香港)中文(繁体)英语日语朝鲜语德语法语俄语泰语南非语阿拉伯语阿塞拜疆语比利时语保加利亚语加泰隆语捷克语威尔士语丹麦语第维埃语希腊语世界语西班牙语爱沙尼亚语巴士克语法斯语芬兰语法罗语加里西亚语古吉拉特语希伯来语印地语克罗地亚语匈牙利语亚美尼亚语印度尼西亚语冰岛语意大利语格鲁吉亚语哈萨克语卡纳拉语孔卡尼语吉尔吉斯语立陶宛语拉脱维亚语毛利语马其顿语蒙古语马拉地语马来语马耳他语挪威语(伯克梅尔)荷兰语北梭托语旁遮普语波兰语葡萄牙语克丘亚语罗马尼亚语梵文北萨摩斯语斯洛伐克语斯洛文尼亚语阿尔巴尼亚语瑞典语斯瓦希里语叙利亚语泰米尔语泰卢固语塔加路语茨瓦纳语土耳其语宗加语鞑靼语乌克兰语乌都语乌兹别克语越南语班图语祖鲁语有道翻译百度翻译必应翻译谷歌翻译谷歌翻译(国内)翻译朗读复制正在查询,请稍候……重试朗读复制复制朗读复制via 译