All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Jie Deng" <jie.deng@intel.com>,
	"Linux I2C" <linux-i2c@vger.kernel.org>,
	virtualization@lists.linux-foundation.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Wolfram Sang" <wsa@kernel.org>,
	"Jason Wang" <jasowang@redhat.com>,
	"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	conghui.chen@intel.com, kblaiech@mellanox.com,
	jarkko.nikula@linux.intel.com,
	"Sergey Semin" <Sergey.Semin@baikalelectronics.ru>,
	"Mike Rapoport" <rppt@kernel.org>,
	loic.poulain@linaro.org, "Tali Perry" <tali.perry1@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Bjorn Andersson" <bjorn.andersson@linaro.org>,
	yu1.wang@intel.com, shuo.a.liu@intel.com,
	"Viresh Kumar" <viresh.kumar@linaro.org>
Subject: Re: [PATCH v5] i2c: virtio: add a virtio i2c frontend driver
Date: Wed, 3 Mar 2021 17:48:39 +0000	[thread overview]
Message-ID: <YD/L9/Dj+3dSZJXa@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAK8P3a23L-Y0vzJTb5w1MkumaYAJQ6Owiq6RZ2XE=i8gBMTUZw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1600 bytes --]

On Tue, Mar 02, 2021 at 11:54:02AM +0100, Arnd Bergmann wrote:
> On Tue, Mar 2, 2021 at 10:51 AM Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > On Tue, Mar 02, 2021 at 10:42:06AM +0800, Jie Deng wrote:
> > > > > +/*
> > > > > + * Definitions for virtio I2C Adpter
> > > > > + *
> > > > > + * Copyright (c) 2021 Intel Corporation. All rights reserved.
> > > > > + */
> > > > > +
> > > > > +#ifndef _UAPI_LINUX_VIRTIO_I2C_H
> > > > > +#define _UAPI_LINUX_VIRTIO_I2C_H
> > > > Why is this a uapi header? Can't this all be moved into the driver
> > > > itself?
> >
> > Linux VIRTIO drivers provide a uapi header with structs and constants
> > that describe the device interface. This allows other software like
> > QEMU, other operating systems, etc to reuse these headers instead of
> > redefining everything.
> >
> > These files should contain:
> > 1. Device-specific feature bits (VIRTIO_<device>_F_<feature>)
> > 2. VIRTIO Configuration Space layout (struct virtio_<device>_config)
> > 3. Virtqueue request layout (struct virtio_<device>_<req/resp>)
> >
> > For examples, see <linux/virtio_net.h> and <linux/virtio_blk.h>.
> 
> Ok, makes sense. So it's not strictly uapi but just helpful for
> virtio applications to reference these. I suppose it is slightly harder
> when building qemu on other operating systems though, how does
> it get these headers on BSD or Windows?

qemu.git imports Linux headers from time to time and can use them
instead of system headers:

  https://gitlab.com/qemu-project/qemu/-/blob/master/scripts/update-linux-headers.sh

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Sergey Semin" <Sergey.Semin@baikalelectronics.ru>,
	"Bjorn Andersson" <bjorn.andersson@linaro.org>,
	loic.poulain@linaro.org, "Tali Perry" <tali.perry1@gmail.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Viresh Kumar" <viresh.kumar@linaro.org>,
	shuo.a.liu@intel.com,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	virtualization@lists.linux-foundation.org,
	"Wolfram Sang" <wsa@kernel.org>,
	"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
	jarkko.nikula@linux.intel.com,
	"Linux I2C" <linux-i2c@vger.kernel.org>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	kblaiech@mellanox.com,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	conghui.chen@intel.com, "Mike Rapoport" <rppt@kernel.org>,
	yu1.wang@intel.com
Subject: Re: [PATCH v5] i2c: virtio: add a virtio i2c frontend driver
Date: Wed, 3 Mar 2021 17:48:39 +0000	[thread overview]
Message-ID: <YD/L9/Dj+3dSZJXa@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAK8P3a23L-Y0vzJTb5w1MkumaYAJQ6Owiq6RZ2XE=i8gBMTUZw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1600 bytes --]

On Tue, Mar 02, 2021 at 11:54:02AM +0100, Arnd Bergmann wrote:
> On Tue, Mar 2, 2021 at 10:51 AM Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > On Tue, Mar 02, 2021 at 10:42:06AM +0800, Jie Deng wrote:
> > > > > +/*
> > > > > + * Definitions for virtio I2C Adpter
> > > > > + *
> > > > > + * Copyright (c) 2021 Intel Corporation. All rights reserved.
> > > > > + */
> > > > > +
> > > > > +#ifndef _UAPI_LINUX_VIRTIO_I2C_H
> > > > > +#define _UAPI_LINUX_VIRTIO_I2C_H
> > > > Why is this a uapi header? Can't this all be moved into the driver
> > > > itself?
> >
> > Linux VIRTIO drivers provide a uapi header with structs and constants
> > that describe the device interface. This allows other software like
> > QEMU, other operating systems, etc to reuse these headers instead of
> > redefining everything.
> >
> > These files should contain:
> > 1. Device-specific feature bits (VIRTIO_<device>_F_<feature>)
> > 2. VIRTIO Configuration Space layout (struct virtio_<device>_config)
> > 3. Virtqueue request layout (struct virtio_<device>_<req/resp>)
> >
> > For examples, see <linux/virtio_net.h> and <linux/virtio_blk.h>.
> 
> Ok, makes sense. So it's not strictly uapi but just helpful for
> virtio applications to reference these. I suppose it is slightly harder
> when building qemu on other operating systems though, how does
> it get these headers on BSD or Windows?

qemu.git imports Linux headers from time to time and can use them
instead of system headers:

  https://gitlab.com/qemu-project/qemu/-/blob/master/scripts/update-linux-headers.sh

Stefan

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 183 bytes --]

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2021-03-03 20:57 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01  6:41 [PATCH v5] i2c: virtio: add a virtio i2c frontend driver Jie Deng
2021-03-01  6:41 ` Jie Deng
2021-03-01 11:54 ` Viresh Kumar
2021-03-01 12:09   ` Andy Shevchenko
2021-03-01 12:09     ` Andy Shevchenko
2021-03-01 12:10     ` Andy Shevchenko
2021-03-01 12:10       ` Andy Shevchenko
2021-03-01 15:46       ` Arnd Bergmann
2021-03-01 15:46         ` Arnd Bergmann
2021-03-02  3:46         ` Viresh Kumar
2021-03-02  3:44       ` Viresh Kumar
2021-03-02  2:21   ` Jie Deng
2021-03-02  2:21     ` Jie Deng
2021-03-02  3:43     ` Viresh Kumar
2021-03-02  6:24       ` Jie Deng
2021-03-02  7:24         ` Viresh Kumar
2021-03-02  8:17           ` Jie Deng
2021-03-02  8:17             ` Jie Deng
2021-03-02  6:28       ` Jie Deng
2021-03-02  6:28         ` Jie Deng
2021-03-01 12:07 ` Andy Shevchenko
2021-03-01 12:07   ` Andy Shevchenko
2021-03-02  7:16   ` Jie Deng
2021-03-02  7:16     ` Jie Deng
2021-03-01 15:19 ` Arnd Bergmann
2021-03-01 15:19   ` Arnd Bergmann
2021-03-02  2:42   ` Jie Deng
2021-03-02  9:51     ` Stefan Hajnoczi
2021-03-02  9:51       ` Stefan Hajnoczi
2021-03-02 10:54       ` Arnd Bergmann
2021-03-02 10:54         ` Arnd Bergmann
2021-03-03 17:48         ` Stefan Hajnoczi [this message]
2021-03-03 17:48           ` Stefan Hajnoczi
2021-03-02  4:01   ` Viresh Kumar
2021-03-02  4:22     ` Viresh Kumar
2021-03-02  5:06       ` Jie Deng
2021-03-02  5:06         ` Jie Deng
2021-03-02  5:16         ` Viresh Kumar
2021-03-02  5:42           ` Jason Wang
2021-03-02  5:42             ` Jason Wang
2021-03-02  4:42 ` Viresh Kumar
2021-03-02  5:21   ` Jie Deng
2021-03-02  5:21     ` Jie Deng
2021-03-02  5:25     ` Viresh Kumar
2021-03-03  7:54 ` Viresh Kumar
2021-03-03  8:46   ` Jie Deng
2021-03-03  8:46     ` Jie Deng
2021-03-03  9:38     ` Viresh Kumar
2021-03-04  1:47       ` Jie Deng
2021-03-04  1:47         ` Jie Deng

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=YD/L9/Dj+3dSZJXa@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=bjorn.andersson@linaro.org \
    --cc=conghui.chen@intel.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jasowang@redhat.com \
    --cc=jie.deng@intel.com \
    --cc=kblaiech@mellanox.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=mst@redhat.com \
    --cc=rppt@kernel.org \
    --cc=shuo.a.liu@intel.com \
    --cc=tali.perry1@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=viresh.kumar@linaro.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=wsa@kernel.org \
    --cc=yu1.wang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.