From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [kvm-commits] kvm: add host hypercall support for vmx (rev 4374) Date: Thu, 01 Feb 2007 15:08:17 +0200 Message-ID: <45C1E641.9060203@qumranet.com> References: <20070201122904.77002A0014@il.qumranet.com> <20070201130116.GA1100@rhun.haifa.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Muli Ben-Yehuda Return-path: In-Reply-To: <20070201130116.GA1100-WD1JZD8MxeCTrf4lBMg6DdBPR1lH4CV8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Muli Ben-Yehuda wrote: > Hi Avi, > > You might want to consider setting the reply-to on kvm-commits to > kvm-devel. > > At qumranet we're used to reply-to-committer, so... > On Thu, Feb 01, 2007 at 02:29:04PM +0200, Avi Kivity wrote: > > >> Modified: kvm/trunk/kernel/vmx.c >> ============================================================================== >> --- kvm/trunk/kernel/vmx.c (original) >> +++ kvm/trunk/kernel/vmx.c Thu Feb 1 14:29:04 2007 >> @@ -1654,6 +1654,19 @@ static int handle_halt(struct kvm_vcpu * >> return 0; >> } >> >> +static int handle_vmcall(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) >> +{ >> + kvm_run->exit_reason = KVM_EXIT_DEBUG; >> + printk(KERN_DEBUG "got vmcall at RIP %08lx\n", vmcs_readl(GUEST_RIP)); >> + printk(KERN_DEBUG "vmcall params: %08lx, %08lx, %08lx, %08lx\n", >> + vcpu->regs[VCPU_REGS_RAX], >> + vcpu->regs[VCPU_REGS_RCX], >> + vcpu->regs[VCPU_REGS_RDX], >> + vcpu->regs[VCPU_REGS_RBP]); >> + vcpu->regs[VCPU_REGS_RAX] = 0; >> + vmcs_writel(GUEST_RIP, vmcs_readl(GUEST_RIP)+3); >> + return 1; >> > > I noticed that the svm 'vmcall_interception' doesn't set > kvm_run->exit_reason - is the setting here superflous or needed? and > if it's needed, is it also needed in svm? > A 'return 1' means there won't be an exit to userspace, so kvm_run won't be used at all. So the assignment here is superfluous - probably a debug artifact. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642