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

Re: [PATCH 10/24] Make libs/evtchn build on NetBSD


  • To: Manuel Bouyer <bouyer@xxxxxxxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 4 Jan 2021 18:15:24 +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=l+lJ+kYmXHrmJtASUrorOoVPOX6FxQ1g932D2st4rA4=; b=oM9bZy9rVl0DBRuaWiWIK9/7JPDJMFwUAiZ5qyExQJgyDyiYyYu03+xfOdYnSizDoCtLE5Mh1TWsUKAekqMLbLUsd2BM33/yR9LpUK2SxN55WXGwsaofwByXve/7MNJqWEE/xwJ27kRA/mpbC8a/Kj4kyMZJtcVV02x4xdORtQRVap0fdjVnZL784zSDiszT4R3LuegnKii/+UlzbFIP327FFN+O9SJXgjAzTLWXp3TWDKFcCPJLCwiqiMiHMOKy2UUphjLu4fILw8IXUdADPwTnXpZxAUEeWjhz6Ei4UXtyik05u4SQc95lH8MTdDzYgIZaA6MU3K7VSZ74K/L//w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RnMZ2BUiwqOT1AX3XbjhQ/lV5jyFFIZbkZGw0Wwb0DtFaiI0MNeAVhO0XjgDRR8ReRfqTNxQSw0azt9oksWw2dq7diR5Gr79ufDp+nZx91HdrZepM3twV6UgBNbaVdQxwGQvvE0UNmKJbjFgBishfGZQUrYPSHpclNFQK84z7pmNfT80FOOXfNyeBIMyWeXIms3eqg/Lm1615OiRvDVIovDQbHC5ImQ0Fjhf22Z+KxjaFh/JN3RvZMi4R6j5XWrjKtaDw0emXrRz0YNIdbTgG6p4JDnP1EztgTIf8h335pwyWKhGEzX2tYKtSJU6Mkj0D8bqnPv2bZ946UW8URBjag==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 04 Jan 2021 17:15:40 +0000
  • Ironport-sdr: PeRZbu+4DbBiNnlCaWPibRl2HtbZSl0YRyI9TmPh3+izfIvJ72Hsyq1xyGvmJWMyPD65Y8Yev2 hlpCrffLOKpMz+HJ/uG/nA7hE/Kfpf16ICrzVCJTznKmjxiDj0+kNnw7+17y/9MTUPz7gw2Lt1 MdfPgBY2xppUjjUg9G69/Xnt+kS5a/t9gUadstGSurXPONrqxDMSCSiGOOBUpUF9BJOehuHDgC bJdTfgQpz+kW2n9x82600l+iB+Up+Xs7K7C7p+VYdG2mXGpmYAwGff6zxiCuKwICDSa26W8iVg mi0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Jan 04, 2021 at 11:26:45AM +0100, Manuel Bouyer wrote:
> On Tue, Dec 29, 2020 at 12:52:43PM +0100, Roger Pau Monné wrote:
> > On Mon, Dec 14, 2020 at 05:36:09PM +0100, Manuel Bouyer wrote:
> > > ---
> > >  tools/libs/evtchn/netbsd.c | 8 ++++----
> > >  1 file changed, 4 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/tools/libs/evtchn/netbsd.c b/tools/libs/evtchn/netbsd.c
> > > index 8b8545d2f9..6d4ce28011 100644
> > > --- a/tools/libs/evtchn/netbsd.c
> > > +++ b/tools/libs/evtchn/netbsd.c
> > > @@ -25,10 +25,10 @@
> > >  
> > >  #include <sys/ioctl.h>
> > >  
> > > -#include <xen/sys/evtchn.h>
> > > -
> > >  #include "private.h"
> > >  
> > > +#include <xen/xenio3.h>
> > > +
> > >  #define EVTCHN_DEV_NAME  "/dev/xenevt"
> > >  
> > >  int osdep_evtchn_open(xenevtchn_handle *xce)
> > > @@ -131,7 +131,7 @@ xenevtchn_port_or_error_t 
> > > xenevtchn_pending(xenevtchn_handle *xce)
> > >      int fd = xce->fd;
> > >      evtchn_port_t port;
> > >  
> > > -    if ( read_exact(fd, (char *)&port, sizeof(port)) == -1 )
> > > +    if ( read(fd, (char *)&port, sizeof(port)) == -1 )
> > >          return -1;
> > >  
> > >      return port;
> > > @@ -140,7 +140,7 @@ xenevtchn_port_or_error_t 
> > > xenevtchn_pending(xenevtchn_handle *xce)
> > >  int xenevtchn_unmask(xenevtchn_handle *xce, evtchn_port_t port)
> > >  {
> > >      int fd = xce->fd;
> > > -    return write_exact(fd, (char *)&port, sizeof(port));
> > > +    return write(fd, (char *)&port, sizeof(port));
> > 
> > I'm afraid we will need some context as to why {read/write}_exact
> > doesn't work here.
> 
> It just doesn't exists on NetBSD

But those are not part of libc or any external library, they are
implemented in tools/libs/ctrl/xc_private.c and should be available to
the NetBSD build AFAICT.

They are just helpers build on top of the standard read/write calls.

Roger.



 


Rackspace

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