From: Paolo Bonzini <pbonzini@redhat.com>
To: Oliver Upton <oupton@google.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>,
Peter Gonda <pgonda@google.com>,
Sean Christopherson <seanjc@google.com>
Subject: Re: [PATCH for-5.18] KVM: fix bad user ABI for KVM_EXIT_SYSTEM_EVENT
Date: Fri, 29 Apr 2022 15:52:02 +0200 [thread overview]
Message-ID: <ed92111b-3b80-0cde-1821-0a491dee2dcf@redhat.com> (raw)
In-Reply-To: <Ymtr2mfyujoxLsDR@google.com>
On 4/29/22 06:38, Oliver Upton wrote:
>> + __u64 data[16];
> This is out of sync with the union { flags; data; } now.
Yes, that's intentional. The flags member is mentioned below:
+Previous versions of Linux defined a `flags` member in this struct. The
+field is now aliased to `data[0]`. Userspace can assume that it is only
+written if ndata is greater than 0.
but I don't want projects to believe it is different in any way from
`data[0]`. In particular, `flags` should also be considered valid only
if the cap is present (unless crosvm wants ARM to be grandfathered in).
> IMO, we should put a giant disclaimer on all of this to*not* use the
> flags field and instead only use data. I imagine we wont want to persist
> the union forever as it is quite ugly, but necessary.
>> +/* #define KVM_CAP_VM_TSC_CONTROL 214 */
>
> This sticks out a bit. Couldn't the VM TSC control patch just use a
> different number? It seems that there will be a conflict anyway, if only to
> delete this comment.
I don't want to change cap numbers once things have landed in
kvm/next, because that's when userspace projects pick them.
Paolo
next prev parent reply other threads:[~2022-04-29 13:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-22 10:30 Paolo Bonzini
2022-04-22 19:57 ` kernel test robot
2022-04-29 4:38 ` Oliver Upton
2022-04-29 13:52 ` Paolo Bonzini [this message]
2022-04-29 14:03 ` Sean Christopherson
2022-04-29 14:05 ` Paolo Bonzini
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=ed92111b-3b80-0cde-1821-0a491dee2dcf@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oupton@google.com \
--cc=pgonda@google.com \
--cc=seanjc@google.com \
--cc=will@kernel.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
all inboxes | Powered by JetHome®