From: "Jan Beulich" Subject: Re: [PATCH 19/24] PVH xen: add hypercall support for PVH Date: Thu, 18 Jul 2013 14:56:15 +0100 Message-ID: <51E8101F02000078000E608C@nat28.tlf.novell.com> References: <1374114788-27652-1-git-send-email-mukesh.rathor@oracle.com> <1374114788-27652-20-git-send-email-mukesh.rathor@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Uzogs-0000g5-Fb for xen-devel@lists.xenproject.org; Thu, 18 Jul 2013 13:56:18 +0000 In-Reply-To: <1374114788-27652-20-git-send-email-mukesh.rathor@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: Mukesh Rathor Cc: xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 18.07.13 at 04:33, Mukesh Rathor wrote: > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -3188,6 +3188,16 @@ static long hvm_vcpu_op( > case VCPUOP_register_vcpu_time_memory_area: > rc = do_vcpu_op(cmd, vcpuid, arg); > break; > + > + case VCPUOP_is_up: > + case VCPUOP_up: > + case VCPUOP_initialise: > + if ( is_pvh_vcpu(current) ) > + rc = do_vcpu_op(cmd, vcpuid, arg); > + else > + rc = -ENOSYS; > + break; > + As said before, this white listing has to be a temporary thing, and hence ought to have a fixme note. > @@ -3349,16 +3379,21 @@ int hvm_do_hypercall(struct cpu_user_regs *regs) > regs->r10, regs->r8, regs->r9); > > curr->arch.hvm_vcpu.hcall_64bit = 1; > - regs->rax = hvm_hypercall64_table[eax](regs->rdi, > - regs->rsi, > - regs->rdx, > - regs->r10, > - regs->r8, > - regs->r9); > + if ( is_pvh_vcpu(curr) ) > + regs->rax = pvh_hypercall64_table[eax](regs->rdi, regs->rsi, > + regs->rdx, regs->r10, > + regs->r8, regs->r9); > + else > + regs->rax = hvm_hypercall64_table[eax](regs->rdi, regs->rsi, > + regs->rdx, regs->r10, > + regs->r8, regs->r9); > curr->arch.hvm_vcpu.hcall_64bit = 0; > + Adding a stray blank line. > } > else Jan