From: "Jan Beulich" Subject: Re: [PATCH v6 07/15] VMX: add VMFUNC leaf 0 (EPTP switching) to emulator. Date: Wed, 22 Jul 2015 01:42:16 -0600 Message-ID: <55AF65780200007800093D92@prv-mh.provo.novell.com> References: <1437436691-24449-1-git-send-email-edmund.h.white@intel.com> <1437436691-24449-8-git-send-email-edmund.h.white@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1437436691-24449-8-git-send-email-edmund.h.white@intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ed White Cc: Tim Deegan , Ravi Sahita , Wei Liu , George Dunlap , Andrew Cooper , Ian Jackson , xen-devel@lists.xen.org, Jun Nakajima , tlengyel@novetta.com, Daniel De Graaf List-Id: xen-devel@lists.xenproject.org >>> On 21.07.15 at 01:58, wrote: > @@ -1838,6 +1839,19 @@ static void vmx_vcpu_update_vmfunc_ve(struct vcpu *v) > vmx_vmcs_exit(v); > } > > +static int vmx_vcpu_emulate_vmfunc(struct cpu_user_regs *regs) > +{ > + int rc = X86EMUL_EXCEPTION; > + struct vcpu *curr = current; > + > + if ( !cpu_has_vmx_vmfunc && altp2m_active(curr->domain) && > + regs->_eax == 0 && > + p2m_switch_vcpu_altp2m_by_id(curr, (uint16_t)regs->_ecx) ) Didn't you say in the other mail that you addressed all review comments? Switching from ->ecx to ->_ecx here makes no difference at all as long as you don't also drop the wrong cast. With the cast dropped Acked-by: Jan Beulich Jan