virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alvaro Karsz <alvaro.karsz@solid-run.com>
Cc: Jens Axboe <axboe@kernel.dk>, Paolo Bonzini <pbonzini@redhat.com>,
	Chaitanya Kulkarni <chaitanyak@nvidia.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH v2] virtio_blk: add VIRTIO_BLK_F_LIFETIME feature support
Date: Sun, 4 Dec 2022 05:59:09 -0500	[thread overview]
Message-ID: <20221204055044-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAJs=3_Bma3KiOW3Cah2KWiN34TG4c=bdw1bTjB71Fo_QLaKmXw@mail.gmail.com>

On Sun, Dec 04, 2022 at 10:19:38AM +0200, Alvaro Karsz wrote:
> So, we could create a block-general lifetime ioctl with many reserved
> bytes, or create a virtio block specific ioctl without reserved bytes
> at all.


I don't see the connection. virtio would often pass through lifetime
info from the host. If other devices gain more info then it will make 
sense to add that to virtio, too.

> I think that we should keep it virtio specific, and if a new lifetime
> command is added to the spec with more fields, we could create a new
> ioctl.
> Does Everyone agree?

Depends. If we expect more types, then I think we
can solve this by passing an array of values.

> > I think if you are going to pass struct virtio_blk_lifetime to
> > userspace, better pass it as defined in the spec, in LE format.
> 
> > It's unusual for an ioctl to produce a struct that's not in CPU
> > endianness. I think the kernel should deal with endianness here.
> 
> I'm not sure how to proceed with the endianness matter..
> 
> Alvaro

If it's a generic ioctl then clearly it's native.
For a virtio specific one, we typically use LE and I would be
consistent.

-- 
MST

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

  reply	other threads:[~2022-12-04 10:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21  8:59 [PATCH v2] virtio_blk: add VIRTIO_BLK_F_LIFETIME feature support Alvaro Karsz
     [not found] ` <1bd1c77e-d8c3-b04a-4fbc-bbc85391e630@nvidia.com>
2022-11-24  6:42   ` Michael S. Tsirkin
2022-11-24 20:38     ` Stefan Hajnoczi
2022-11-24 22:02       ` Alvaro Karsz
2022-11-24 22:09       ` Alvaro Karsz
2022-11-28 19:07         ` Stefan Hajnoczi
     [not found]           ` <dc8bf007-a6f6-9824-63e1-9447335da732@nvidia.com>
2022-11-29  5:28             ` Michael S. Tsirkin
     [not found]               ` <b76ad252-3f6a-8f4b-cb2d-0a4f45860aae@nvidia.com>
2022-12-04  8:19                 ` Alvaro Karsz
2022-12-04 10:59                   ` Michael S. Tsirkin [this message]
2022-12-04 12:00                     ` Alvaro Karsz
2022-12-04 12:27                       ` Michael S. Tsirkin
2022-12-04 14:37                         ` Alvaro Karsz
2022-12-04 16:51                           ` Michael S. Tsirkin
     [not found]                   ` <ce455ec6-353b-d273-0d52-44673f4dc0cc@nvidia.com>
2022-12-05  5:43                     ` Michael S. Tsirkin
2022-11-28 20:02         ` Michael S. Tsirkin
     [not found] ` <1b8d59e1-8702-8b81-f82c-a743116da799@nvidia.com>
2022-11-24  6:46   ` Michael S. Tsirkin
2022-11-24  8:07     ` Alvaro Karsz
2022-11-24 20:35 ` Stefan Hajnoczi

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=20221204055044-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alvaro.karsz@solid-run.com \
    --cc=axboe@kernel.dk \
    --cc=chaitanyak@nvidia.com \
    --cc=pbonzini@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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).