From: "Jan Beulich" Subject: Re: [PATCH 7/9] x86/pvh: Handle hypercalls for 32b PVH guests Date: Tue, 23 Jun 2015 14:35:38 +0100 Message-ID: <55897CCA0200007800088588@mail.emea.novell.com> References: <1434769773-5157-1-git-send-email-boris.ostrovsky@oracle.com> <1434769773-5157-8-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1434769773-5157-8-git-send-email-boris.ostrovsky@oracle.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: Boris Ostrovsky Cc: elena.ufimtseva@oracle.com, Keir Fraser , Andrew Cooper , tim@xen.org, xen-devel@lists.xen.org, roger.pau@citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 20.06.15 at 05:09, wrote: > @@ -4959,8 +4979,10 @@ int hvm_do_hypercall(struct cpu_user_regs *regs) > return viridian_hypercall(regs); > > if ( (eax >= NR_hypercalls) || > - (is_pvh_domain(currd) ? !pvh_hypercall64_table[eax] > - : !hvm_hypercall32_table[eax]) ) > + (is_pvh_vcpu(curr) ? ((mode == 8) ? Please no switch back to the more expensive is_pvh_vcpu(). > + !pvh_hypercall64_table[eax] : > + !pvh_hypercall32_table[eax]) > + : !hvm_hypercall32_table[eax]) ) This should be done consistently - either all four variants get checked, or pvh_hypercall64_table[] simply get replaced by pvh_hypercall32_table[]. Jan