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

Re: [PATCH] tools: Use posix_memalign instead of valloc for NetBSD


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Frediano Ziglio <freddy77@xxxxxxxxx>
  • Date: Mon, 29 Jun 2026 10:14:59 +0100
  • Arc-authentication-results: i=1; mx.google.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NeU0LTJhR86CiNsXhwb8pydAN42WeC5xjWNd41dSMzY=; fh=4UJDm7RG4Xj/YxPa9cFI1HhT4blyPjAiJc30jrNo6Wc=; b=KE781T/Zi7XP1wRDs2+AOUhBCLi1uyQ0Oz4xvOx4evJmvtYmoouu74oUPYsk34oicF RSnnqsy2PgHJ1eHGEkicvajJhR+PjzQSUFLSqOKmcu3h3JyUk6iIfZXsS/WTsWi71kSJ rXKXRoz+9PZyEMnqCwsNwi4RXn5PXRIx3WFCo4GBkztUwXQGNfV/7BJtpDYBdDrcunDe p+gkmyyKtmLFJqGVSmWF1mZAZXl0qSGOiylrY/EmkXvIfdshD6nl19tEXHGsSMi2uYGP 37/7ZmrAxH6dH6oHeBwMQs4IK9jI7EuKwqCg1swVTLcQorPdVJgtcHprUbk0S2vhmDY8 SRmA==; darn=lists.xenproject.org
  • Arc-seal: i=1; a=rsa-sha256; t=1782724511; cv=none; d=google.com; s=arc-20260327; b=Wm8SJoi/ogjsrva7JEq1p5+q7gk+bJppFNt1Gic1DMoWX+fb+YPqx58ifmBFtL0sQt tTxEIK48oKHKb9bytMlbhCvrolZE0vuUwOOTLk/bVkKb/zTM55dUkuPEf1aJbSnbYmlB DX5KmadURFR4LlmthjJBIoZE59Elq34nsxyTyl+Mv2BCtZmPN8RkoNnrWpCe3Awm80dl mchAbSPhpixKNEeBsEon1cJAx0j6W/Y3yIN20GIaf+1Ry7UnHFJqjwac1nJyqhuMsucI N1NwyJOFPEPFsgoO1Mcnn9ArYrRiAEjm31vCjc1myDTwG8xN3kyYhTh+3xFDM+9UbXj6 UeHQ==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:MIME-Version"
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, bouyer@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, Frediano Ziglio <frediano.ziglio@xxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 29 Jun 2026 09:15:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, 29 Jun 2026 at 08:01, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> On 26.06.2026 17:07, Frediano Ziglio wrote:
> > On Thu, 30 Apr 2026 at 11:48, Roger Pau Monné <roger.pau@xxxxxxxxxx> wrote:
> >>
> >> Adding Manuel that maintains the NetBSD xen-tools package.
> >>
> >> On Thu, Apr 30, 2026 at 10:55:21AM +0100, Frediano Ziglio wrote:
> >>> More similar to other implementation.
> >>> posix_memalign was adde in NetBSD 8.0, released on July 17, 2018
> >>> and went out of support on May 4, 2024.
> >>>
> >>> Signed-off-by: Frediano Ziglio <frediano.ziglio@xxxxxxxxx>
> >>> ---
> >>>  tools/include/xenctrl.h     | 5 +++++
> >>>  tools/libs/ctrl/xc_netbsd.c | 9 ++++++++-
> >>>  2 files changed, 13 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/tools/include/xenctrl.h b/tools/include/xenctrl.h
> >>> index d5dbf69c89..f4316089e7 100644
> >>> --- a/tools/include/xenctrl.h
> >>> +++ b/tools/include/xenctrl.h
> >>> @@ -1390,6 +1390,11 @@ int xc_lockprof_query(xc_interface *xch,
> >>>                        uint64_t *time,
> >>>                        xc_hypercall_buffer_t *data);
> >>>
> >>> +/**
> >>> + * Allocate memory with a given alignment.
> >>> + * The alignment must be a power of 2 and at least sizeof(void*).
> >>> + * It returns NULL on error, errno is not set.
> >>> + */
> >>>  void *xc_memalign(xc_interface *xch, size_t alignment, size_t size);
> >>>
> >>>  /**
> >>> diff --git a/tools/libs/ctrl/xc_netbsd.c b/tools/libs/ctrl/xc_netbsd.c
> >>> index 1318d4d906..d27154dce9 100644
> >>> --- a/tools/libs/ctrl/xc_netbsd.c
> >>> +++ b/tools/libs/ctrl/xc_netbsd.c
> >>> @@ -60,7 +60,14 @@ void discard_file_cache(xc_interface *xch, int fd, int 
> >>> flush)
> >>>
> >>>  void *xc_memalign(xc_interface *xch, size_t alignment, size_t size)
> >>>  {
> >>> -    return valloc(size);
> >>> +    int ret;
> >>> +    void *ptr;
> >>> +
> >>> +    ret = posix_memalign(&ptr, alignment, size);
> >>> +    if (ret != 0 || !ptr)
> >>> +        return NULL;
> >>> +
> >>> +    return ptr;
> >>>  }
> >>>
> >>>  int xc_pcidev_get_gsi(xc_interface *xch, uint32_t sbdf)
> >>> --
> >>> 2.43.0
> >>>
> >
> > I saw Manuel reply almost 2 months ago.
> > Still pending.
>
> You understand, though, that Roger can't approve this patch. That'll need to 
> be
> Anthony. Sending a ping _his_ way is certainly appropriate after this long a
> time.
>
> Jan

Okay, looking at previous exchanges I thought the maintainer was Manuel.

Frediano



 


Rackspace

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