From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEj5x-0004hh-NK for qemu-devel@nongnu.org; Fri, 23 Jan 2015 13:36:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEj5u-000661-Hq for qemu-devel@nongnu.org; Fri, 23 Jan 2015 13:36:37 -0500 Received: from fldsmtpe04.verizon.com ([140.108.26.143]:44080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEj5u-00065w-D1 for qemu-devel@nongnu.org; Fri, 23 Jan 2015 13:36:34 -0500 From: Don Slutz Message-ID: <54C294B0.20505@terremark.com> Date: Fri, 23 Jan 2015 13:36:32 -0500 MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] fix QEMU build on Xen/ARM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini , qemu-devel@nongnu.org Cc: xen-devel@lists.xensource.com, Ian Campbell , dslutz@verizon.com, Paul Durrant On 01/23/15 07:19, Stefano Stabellini wrote: > xen_get_vmport_regs_pfn should take a xen_pfn_t argument, not an > unsigned long argument (in fact xen_pfn_t is defined as uint64_t on > ARM). > > Also use xc_hvm_param_get instead of the deprecated xc_get_hvm_param. > > Signed-off-by: Stefano Stabellini > > --- > I have tested this on x86_64 with a xen that has HVM_PARAM_VMPORT_REGS_PFN defined. And the change looks good to me, so Reviewed-by: Don Slutz -Don Slutz > Changes in v2: > - properly handle return codes and set *vmport_regs_pfn before returning. > > diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h > index 519696f..38f29fb 100644 > --- a/include/hw/xen/xen_common.h > +++ b/include/hw/xen/xen_common.h > @@ -168,14 +168,19 @@ void xen_shutdown_fatal_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); > > #ifdef HVM_PARAM_VMPORT_REGS_PFN > static inline int xen_get_vmport_regs_pfn(XenXC xc, domid_t dom, > - unsigned long *vmport_regs_pfn) > + xen_pfn_t *vmport_regs_pfn) > { > - return xc_get_hvm_param(xc, dom, HVM_PARAM_VMPORT_REGS_PFN, > - vmport_regs_pfn); > + int rc; > + uint64_t value; > + rc = xc_hvm_param_get(xc, dom, HVM_PARAM_VMPORT_REGS_PFN, &value); > + if (rc >= 0) { > + *vmport_regs_pfn = (xen_pfn_t) value; > + } > + return rc; > } > #else > static inline int xen_get_vmport_regs_pfn(XenXC xc, domid_t dom, > - unsigned long *vmport_regs_pfn) > + xen_pfn_t *vmport_regs_pfn) > { > return -ENOSYS; > } > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don Slutz Subject: Re: [PATCH v2] fix QEMU build on Xen/ARM Date: Fri, 23 Jan 2015 13:36:32 -0500 Message-ID: <54C294B0.20505@terremark.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: Stefano Stabellini , qemu-devel@nongnu.org Cc: xen-devel@lists.xensource.com, Ian Campbell , dslutz@verizon.com, Paul Durrant List-Id: xen-devel@lists.xenproject.org On 01/23/15 07:19, Stefano Stabellini wrote: > xen_get_vmport_regs_pfn should take a xen_pfn_t argument, not an > unsigned long argument (in fact xen_pfn_t is defined as uint64_t on > ARM). > > Also use xc_hvm_param_get instead of the deprecated xc_get_hvm_param. > > Signed-off-by: Stefano Stabellini > > --- > I have tested this on x86_64 with a xen that has HVM_PARAM_VMPORT_REGS_PFN defined. And the change looks good to me, so Reviewed-by: Don Slutz -Don Slutz > Changes in v2: > - properly handle return codes and set *vmport_regs_pfn before returning. > > diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h > index 519696f..38f29fb 100644 > --- a/include/hw/xen/xen_common.h > +++ b/include/hw/xen/xen_common.h > @@ -168,14 +168,19 @@ void xen_shutdown_fatal_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); > > #ifdef HVM_PARAM_VMPORT_REGS_PFN > static inline int xen_get_vmport_regs_pfn(XenXC xc, domid_t dom, > - unsigned long *vmport_regs_pfn) > + xen_pfn_t *vmport_regs_pfn) > { > - return xc_get_hvm_param(xc, dom, HVM_PARAM_VMPORT_REGS_PFN, > - vmport_regs_pfn); > + int rc; > + uint64_t value; > + rc = xc_hvm_param_get(xc, dom, HVM_PARAM_VMPORT_REGS_PFN, &value); > + if (rc >= 0) { > + *vmport_regs_pfn = (xen_pfn_t) value; > + } > + return rc; > } > #else > static inline int xen_get_vmport_regs_pfn(XenXC xc, domid_t dom, > - unsigned long *vmport_regs_pfn) > + xen_pfn_t *vmport_regs_pfn) > { > return -ENOSYS; > } >