From: "Wu Bingzheng" Subject: About VMX VMExit handler Date: Wed, 20 May 2009 15:44:06 +0800 (CST) Message-ID: <32585582.867861242805446506.JavaMail.coremail@bj163app106.163.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0188564945==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org --===============0188564945== Content-Type: multipart/alternative; boundary="----=_Part_234869_22460069.1242805446504" ------=_Part_234869_22460069.1242805446504 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 7bit Hi, In VM Exit handler, vmx_asm_vmexit_handler(), [xen-3.3.0/xen/arch/x86/hvm/vmx/entry.S:line65], it first saves guest's RIP, RSP, RFLAGS from VMCS to stack by VMREAD, then call vmx_vmexit_handler, and then recover guest's RIP, RSP and RFLAGS. 1. The VMCS is designed to save these registers, why need to save them into stack still? 2. What should I do, if I want to change the guest's RIP in vmx_vmexit_handler(), in order to let the guest load the new RIP on VM Entry? It doesn't work of changing the RIP in VMCS. Do I have to change the RIP in the stack? Thanks, Wu ------=_Part_234869_22460069.1242805446504 Content-Type: text/html; charset=gbk Content-Transfer-Encoding: quoted-printable Hi,

In VM Exit handler, vmx_asm_vmexit_handler()= , [xen-3.3.0/xen/arch/x86/hvm/vmx/entry.S:line65], it first&= nbsp;saves guest's RIP, RSP, RFLAGS from VMCS=  to stack by VMREAD, then call vmx_vmexi= t_handler, and then recover guest's RIP, RSP&= nbsp;and RFLAGS.

1. The VMCS is designed&nb= sp;to save these registers, why need to = save them into stack still?
2. What should=  I do, if I want to change the = ;guest's RIP in vmx_vmexit_handler(), in order&nbs= p;to let the guest load the new RIP = ;on VM Entry? It doesn't work of changin= g the RIP in VMCS. Do I have to&nbs= p;change the RIP in the stack?

Thanks,
W= u


=B4=A9=D4=BD=B5=D8=D5=F0=B4=F8 =BC=CD=C4=EE=E3=EB=B4=A8=B5=D8=D5=F0= =D2=BB=D6=DC=C4=EA
------=_Part_234869_22460069.1242805446504-- --===============0188564945== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0188564945==--