[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 08/24] Make libs/call build on NetBSD


  • To: Manuel Bouyer <bouyer@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 29 Dec 2020 12:49:50 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wYbrHp9iKJiWxaQHqD53D1XUQOZyrtsxasMWiJ7vbE0=; b=VBBx71DORQpugel38fbDayr4a0mlZX1p84oK41G9ub2ad5NqKGct8N5c91gZdB+EvP1lvhQM+NaTNMcJWruDN0MSD+ewfiBSwKHdyxa7OjNMTXayK1gfTpoXSPzR3Db9TgyO3LUn6Tn/XrFqv2A+TXHxmkWodtCE4PSeK/49k/v5ewlKdbLYnb0gzjncTVyStnhL08kUBxuXwSWEs1aRYbqYoFtV8ZEFlr/o+MOAarXTtbSoJoVJvLMXc1sKnjp2XLPjmEZ0LTPsDWY/rq+ZxS+ykM+oZYH9D7UxmZt38l0Osm7txIHuKYymfsoSCJOq3oHXpyJReQjmM/ECBJxLHg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SZlZpmRsOz5kAenm8c/dSWC9QHScEqweH6bwlBYkcsdz4uU0+u+2ZRpzled+eNDtZxkTOfHC3E/d274vOTBGGPunwSWhKGl1ebZ6pf1xDCk3i48m/QEfEVRE6zhuZ506xeJXcZmkkv/tWzqCaLoDieYnHKHadHIfHC/O8PgjMd8XLkJ+d2mBkPZjtj1DYLsIEV/cjQfVTLWIUTWD1dFowiqDxSOX2P2vmGwYeqWwlZ4fJxBepfq1P3nPmLcwlUuwu7RsmnPFTyxsDCduoQFMBd2rxMInaDf9j9i2aJreEXOnKSLjh48vWUhsAp9z/4OWlhZZUoe+3S+jD/es7S3Myg==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 29 Dec 2020 11:50:01 +0000
  • Ironport-sdr: cmBGtkSMbYjqxWc061Aam89ByexO76D+mHWT5P3fiGwNU99N2W4rto4E3Gw4CK32Z2PSI8uo+l vZPJ/sRIWAkTKkGzrR6fq9lWYwmdxWUeaA4feQquHM3ANeBjyDEm7Mtr/eO9qQLfEHoL7+yJtf jPcI1WD8GdpmKnrA91h2kx2IdmPJjW45S6gk6RG0rGAjcSlq33tjK/sOql7wB3X+Ces5IHZhip TtwKN+7TjvF+q0FOxeAAB7Qkvzb9Y2gAyaBdnOY9DL1SoNwfUkcWLHcj3FX6NivauQhMXG205S VtM=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

LGTM.

On Mon, Dec 14, 2020 at 05:36:07PM +0100, Manuel Bouyer wrote:
> ---
>  tools/libs/call/netbsd.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/tools/libs/call/netbsd.c b/tools/libs/call/netbsd.c
> index a5502da377..1a771e9928 100644
> --- a/tools/libs/call/netbsd.c
> +++ b/tools/libs/call/netbsd.c
> @@ -19,12 +19,14 @@
>   * Split from xc_netbsd.c
>   */
>  
> -#include "xc_private.h"
>  
>  #include <unistd.h>
>  #include <fcntl.h>
>  #include <malloc.h>
> +#include <errno.h>
>  #include <sys/mman.h>
> +#include <sys/ioctl.h>
> +#include "private.h"

Please leave a newline before including private.h.

>  
>  int osdep_xencall_open(xencall_handle *xcall)
>  {
> @@ -69,12 +71,13 @@ int osdep_xencall_close(xencall_handle *xcall)
>      return close(fd);
>  }
>  
> -void *osdep_alloc_hypercall_buffer(xencall_handle *xcall, size_t npages)
> +void *osdep_alloc_pages(xencall_handle *xcall, size_t npages)
>  {
> -    size_t size = npages * XC_PAGE_SIZE;
> +    size_t size = npages * PAGE_SIZE;
>      void *p;
> +    int ret;
>  
> -    ret = posix_memalign(&p, XC_PAGE_SIZE, size);
> +    ret = posix_memalign(&p, PAGE_SIZE, size);
>      if ( ret != 0 || !p )
>          return NULL;
>  
> @@ -86,14 +89,13 @@ void *osdep_alloc_hypercall_buffer(xencall_handle *xcall, 
> size_t npages)
>      return p;
>  }
>  
> -void osdep_free_hypercall_buffer(xencall_handle *xcall, void *ptr,
> -                                 size_t npages)
> +void osdep_free_pages(xencall_handle *xcall, void *ptr, size_t npages)
>  {
> -    (void) munlock(ptr, npages * XC_PAGE_SIZE);
> +    (void) munlock(ptr, npages * PAGE_SIZE);

I think you can drop the (void) cast here.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.