qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philippe.mathieu.daude@gmail.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: "Fam Zheng" <fam@euphon.net>,
	"Elena Ufimtseva" <elena.ufimtseva@oracle.com>,
	kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>,
	"Eric Farman" <farman@linux.ibm.com>,
	"Jagannathan Raman" <jag.raman@oracle.com>,
	"Matthew Rosato" <mjrosato@linux.ibm.com>,
	qemu-block@nongnu.org, "David Hildenbrand" <david@redhat.com>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	vgoyal@redhat.com, "Thomas Huth" <thuth@redhat.com>,
	"Sergio Lopez" <slp@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org, qemu-s390x@nongnu.org,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"John G Johnson" <john.g.johnson@oracle.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH 2/2] Allow building vhost-user in BSD
Date: Wed, 2 Mar 2022 20:22:01 +0100	[thread overview]
Message-ID: <62af5861-15da-da1a-8546-cf3b33806c38@gmail.com> (raw)
In-Reply-To: <Yh+vniMOTFt2npIJ@redhat.com>

On 2/3/22 18:55, Daniel P. Berrangé wrote:
> On Wed, Mar 02, 2022 at 06:38:07PM +0100, Philippe Mathieu-Daudé wrote:
>> On 2/3/22 18:31, Sergio Lopez wrote:
>>> On Wed, Mar 02, 2022 at 06:18:59PM +0100, Philippe Mathieu-Daudé wrote:
>>>> On 2/3/22 18:10, Paolo Bonzini wrote:
>>>>> On 3/2/22 12:36, Sergio Lopez wrote:
>>>>>> With the possibility of using pipefd as a replacement on operating
>>>>>> systems that doesn't support eventfd, vhost-user can also work on BSD
>>>>>> systems.
>>>>>>
>>>>>> This change allows enabling vhost-user on BSD platforms too and
>>>>>> makes libvhost_user (which still depends on eventfd) a linux-only
>>>>>> feature.
>>>>>>
>>>>>> Signed-off-by: Sergio Lopez <slp@redhat.com>
>>>>>
>>>>> I would just check for !windows.
>>>>
>>>> What about Darwin / Haiku / Illumnos?
>>>
>>> It should work on every system providing pipe() or pipe2(), so I guess
>>> Paolo's right, every platform except Windows. FWIW, I already tested
>>> it with Darwin.
>>
>> Wow, nice.
>>
>> So maybe simply check for pipe/pipe2 rather than !windows?
> 
> NB that would make the check more fragile.
> 
> We already use pipe/pipe2 without checking for it, because its
> usage is confined to oslib-posix.c and we know all POSIX
> OS have it. There is no impl at all of qemu_pipe in oslib-win.c
> and the declaration is masked out too in the header file.
> 
> Thus if we check for pipe2 and windows did ever implement it,
> then we would actually break the windows build due to qemu_pipe
> not existing.
> 
> IOW, checking !windows matches our logic for picking oslib-posix.c
> in builds and so is better than checking for pipe directly.

OK I see, thanks.


  reply	other threads:[~2022-03-02 19:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 11:36 [PATCH 0/2] Enable vhost-user to be used on BSD systems Sergio Lopez
2022-03-02 11:36 ` [PATCH 1/2] Allow returning EventNotifier's wfd Sergio Lopez
2022-03-02 15:12   ` Alex Williamson
2022-03-02 15:23     ` Sergio Lopez
2022-03-02 15:38       ` Alex Williamson
2022-03-02 16:06       ` Stefan Hajnoczi
2022-03-02 17:09         ` Paolo Bonzini
2022-03-02 11:36 ` [PATCH 2/2] Allow building vhost-user in BSD Sergio Lopez
2022-03-02 17:10   ` Paolo Bonzini
2022-03-02 17:18     ` Philippe Mathieu-Daudé
2022-03-02 17:31       ` Sergio Lopez
2022-03-02 17:38         ` Philippe Mathieu-Daudé
2022-03-02 17:49           ` Sergio Lopez
2022-03-02 17:55           ` Daniel P. Berrangé
2022-03-02 19:22             ` Philippe Mathieu-Daudé [this message]
2022-03-02 18:05           ` Paolo Bonzini
2022-03-02 18:26             ` Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62af5861-15da-da1a-8546-cf3b33806c38@gmail.com \
    --to=philippe.mathieu.daude@gmail.com \
    --cc=alex.williamson@redhat.com \
    --cc=berrange@redhat.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=elena.ufimtseva@oracle.com \
    --cc=f4bug@amsat.org \
    --cc=fam@euphon.net \
    --cc=farman@linux.ibm.com \
    --cc=hreitz@redhat.com \
    --cc=jag.raman@oracle.com \
    --cc=john.g.johnson@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=mst@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=slp@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).