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

Re: [PATCH] NetBSD: use system-provided headers


  • To: Manuel Bouyer <bouyer@xxxxxxxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 15 Jan 2021 17:01:35 +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=fNzDnZS+9OVinH3EFa9o0u3gNsTH4gJSjGgvA/aD2Xk=; b=HMm81+ZDidMM7amCetZ6FC6ipxLZOcmpgOdHH10aWeBgx/iDaaoMrt3VBoTwR16rHn+qNMxsFHfSe0y0TN2rID/nCdtLoBbFup/Q654Io17QlDAUu6jHhqamhnI41BGidRpXCoV79ausZdPKf53CLS3pgp1D7MEhXaFsAo1mvDTBETogYOh1m8JyfBfBS8tKWbBQ6dscRW+4MBO5BA0NFmHFifyxs5SAfv24mlXJ7sXZ7daCWAWu5fXiNgQmN+0wb2BIsmdszlr2KQfE8jK/WtZd2z0+hUY+qnZmhPDrzu7HSqtqRpRBzOzZdh+93FRgfuGQLC06mlQjPHletE/5/A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W8K+AitqvXH7Itc+8uDhIJ1ZKvBjp+MOuZhLEoqus2fauiL9Rm0P05yAfJxphn2f/MstHSd5wxSPf7TnBvQwKf2mOXazmJytCpOqroPmEy9b521O97VYjaeTa4ITOI6TQgY4Z4OBnY79/XmuMetrmnA+FJ32Br+/Ye000EXDPyEykidIBbLvTw11jiqxXJumVGHJ2K6GM2RgiEL1YyK2LP+wctwBD9dyDFL2db1fRXq7Bv69v43zhofYKrLaFc22LYXEXTL9ewsDFG+RTAhtrRnFW/8JvO4S9cF4BuSoptOCjG99w0v6VUAby2+p6bCc52YHCPyIEC7lCHpRnEEN2w==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Manuel Bouyer <bouyer@xxxxxxxxxx>, "Elena Ufimtseva" <elena.ufimtseva@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, "Wei Liu" <wl@xxxxxxx>
  • Delivery-date: Fri, 15 Jan 2021 16:02:04 +0000
  • Ironport-sdr: 7YrfxHQqDkOymvRSWfmCAcBCvlJHaGmAjqP7l54cnYBN+BWI04UA+4sKVzC78ckqycDi29FOpP E0K54+mEZgeSZDTjR7JyQydGBrVJRqSOEDmH+YpIVLollsjiapIWMvrEu+7M5+sZIUt9kuKny/ RTtx0YjssSf87K42S9y83cJduJykxyi6ThQZ6GVzvt8mt9n0/qAI20sCbVKD1s20iLY00P6vwk BD/XDeNvuZJKmGSDAYOIrj12FEbhf9+TVUrqgmN3YRCu2KkyKyDtDwJyxlSdBVwMXrrODmZgSh +Lk=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Jan 12, 2021 at 07:12:27PM +0100, Manuel Bouyer wrote:
> From: Manuel Bouyer <bouyer@xxxxxxxxxx>
> 
> On NetBSD use the system-provided headers for ioctl and related definitions,
> they are up to date and have more chances to match the kernel's idea of
> the ioctls and structures.
> Remove now-unused NetBSD/evtchn.h and NetBSD/privcmd.h.
> Don't fail install if xen/sys/*.h are not present.
> 
> Signed-off-by: Manuel Bouyer <bouyer@xxxxxxxxxx>
> ---
>  tools/debugger/gdbsx/xg/xg_main.c      |   4 +
>  tools/include/Makefile                 |   2 +-
>  tools/include/xen-sys/NetBSD/evtchn.h  |  86 --------------------
>  tools/include/xen-sys/NetBSD/privcmd.h | 106 -------------------------
>  tools/libs/call/private.h              |   4 +
>  tools/libs/ctrl/xc_private.h           |   4 +
>  tools/libs/foreignmemory/private.h     |   6 ++
>  7 files changed, 19 insertions(+), 193 deletions(-)
>  delete mode 100644 tools/include/xen-sys/NetBSD/evtchn.h
>  delete mode 100644 tools/include/xen-sys/NetBSD/privcmd.h
> 
> diff --git a/tools/debugger/gdbsx/xg/xg_main.c 
> b/tools/debugger/gdbsx/xg/xg_main.c
> index a4e8653168..ce95648e7e 100644
> --- a/tools/debugger/gdbsx/xg/xg_main.c
> +++ b/tools/debugger/gdbsx/xg/xg_main.c
> @@ -49,7 +49,11 @@
>  #include "xg_public.h"
>  #include <xen/version.h>
>  #include <xen/domctl.h>
> +#ifdef __NetBSD__
> +#include <xen/xenio.h>
> +#else
>  #include <xen/sys/privcmd.h>
> +#endif
>  #include <xen/foreign/x86_32.h>
>  #include <xen/foreign/x86_64.h>
>  
> diff --git a/tools/include/Makefile b/tools/include/Makefile
> index 4d4ec5f974..5e90179e66 100644
> --- a/tools/include/Makefile
> +++ b/tools/include/Makefile
> @@ -68,7 +68,7 @@ install: all
>       $(INSTALL_DATA) xen/foreign/*.h $(DESTDIR)$(includedir)/xen/foreign
>       $(INSTALL_DATA) xen/hvm/*.h $(DESTDIR)$(includedir)/xen/hvm
>       $(INSTALL_DATA) xen/io/*.h $(DESTDIR)$(includedir)/xen/io
> -     $(INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(includedir)/xen/sys
> +     $(INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(includedir)/xen/sys || true

This will mask real error on non-NetBSD OSes. My make-foo is very bad,
but maybe you could do something like:

if [ "$(XEN_OS)" != "NetBSD" ]; then \
        $(INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(includedir)/xen/sys; \
fi

Or maybe check whether the directory is not empty before attempting
the install?

Thanks, Roger.



 


Rackspace

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