WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: 答复: [Xen-devel] Why using hypercall_page ?

To: 'Wu Bingzheng' <wubingzheng@xxxxxxxxx>, 'Li Yaqiong' <liyaq04@xxxxxxxxxx>
Subject: RE: 答复: [Xen-devel] Why using hypercall_page ?
From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Date: Thu, 23 Oct 2008 10:02:13 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc: "'xen-devel@xxxxxxxxxxxxxxxxxxx'" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 22 Oct 2008 19:05:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1224726386.6141.8.camel@wub>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AEC88FCA8B5E43A994773AA7A161DF1C@xxxxxxxxxxxxx> <1224726386.6141.8.camel@wub>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ack0sUXXlfOUg0PNTPSl5FZwicsN8wAAPRiw
Thread-topic: 答复: [Xen-devel] Why using hypercall_page ?
Yes, I think Kevin and Techie have explained it clearly.
BTW, for HVM guest's hypercall, we don't use int 0x82 or the sysXXX 
instructions; we use VMCALL inside VMX guest or something similar (VMMCALL? I'm 
not sure) inside SVM guest.
Even for PV guest, the hypercall stub codes may have different 
formats/versions...
We can see these differences in the function hypercall_page_initialise().

So considering compatibility and portability, it's really not OK for a guest to 
assume the underlying stub codes or doing hard coding.
Using the hypercall-page method, various guests can use one unified method to 
invoke hypercalls.

Thanks,
-- Dexuan


-----Original Message-----
From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Wu Bingzheng
Sent: 2008年10月23日 9:46
To: Li Yaqiong
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: 答复: [Xen-devel] Why using hypercall_page ?

I think that's the reason too.

Thank you very much.

Wu

在 2008-10-23四的 09:31 +0800,Li Yaqiong写道:
> As you know, the old Intel/AMD x86 cpus use INT to invoke kernel's
> service. But the newer CPUs introduce two instruction pairs:
> syscall/sysret, syscenter/sysexit. So, because the hypercall page is
> filled by Xen, it can hide the difference of this two types. Guest OS
> only take one uniform format to invoke a hypercall.
> I gusee this is the reason.
>
> -Techie
>
> -----邮件原件-----
> 发件人: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] 代表 Wu Bingzheng
> 发送时间: 2008年10月23日 9:18
> 收件人: xen-devel@xxxxxxxxxxxxxxxxxxx
> 主题: [Xen-devel] Why using hypercall_page ?
>
> Hello,
>
> I am studing Xen hypercall now. I found that hypercall is invoked via
> hypercall_page, which is only filled with (in
> no-hypervisor-kernel-mode ):
>
> mov $i, %eax
> int $0x82
> ret
>
> Why not invoked the hypercall directly by "int $0x82" ? What's the
> advantage of using hypercall_page?
>
> Thanks,
> Wu
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>
>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>