From: "Michael S. Tsirkin" <mst@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: Asias He <asias.hejun@gmail.com>,
Pekka Enberg <penberg@kernel.org>,
Sasha Levin <levinsasha928@gmail.com>,
Ingo Molnar <mingo@elte.hu>, Cyrill Gorcunov <gorcunov@gmail.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH v2 1/2] kvm tools: Fix VHOST_SET_MEM_TABLE failure
Date: Fri, 13 Jul 2012 02:27:24 +0300 [thread overview]
Message-ID: <20120712232724.GD9317@redhat.com> (raw)
In-Reply-To: <4FFE88A3.8010408@redhat.com>
On Thu, Jul 12, 2012 at 11:19:47AM +0300, Avi Kivity wrote:
> On 07/12/2012 05:46 AM, Asias He wrote:
> > On Thu, Jul 12, 2012 at 12:09 AM, Avi Kivity <avi@redhat.com> wrote:
> >> On 07/11/2012 07:08 PM, Asias He wrote:
> >>> VHOST_SET_MEM_TABLE failed: Operation not supported
> >>>
> >>> In vhost_set_memory(), We have
> >>>
> >>> if (mem.padding)
> >>> return -EOPNOTSUPP;
> >>>
> >>> So, we need to zero struct vhost_memory.
> >>>
> >>
> >> Is this due to a change in vhost?
> >
> > Seems we have this bit in the very beginning (commit 3a4d5c94).
>
> Okay, so it's a documentation problem. Michael, where is the
> documentation for vhost-net?
Most fields are documented in include/linux/vhost.h
Yes the approach vhost consistently takes is to require all unused
fields to be zeroed out.
> Note we have to initialize it with memset();
We can also use = {} if we want to avoid naming it.
> presumably when we
> repurpose it the name will change, and anonymous unions are not very
> portable.
Looks like in the new C standard they are :)
I'm not sure what we'll do, exactly, if we need to reuse this padding
for something else, but not breaking build for old userspace
will be a priority.
> --
> error compiling committee.c: too many arguments to function
>
prev parent reply other threads:[~2012-07-12 23:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 16:08 [PATCH v2 1/2] kvm tools: Fix VHOST_SET_MEM_TABLE failure Asias He
2012-07-11 16:08 ` [PATCH v2 2/2] kvm tools: Do not poll ioeventfd if vhost is enabled Asias He
2012-07-11 16:09 ` [PATCH v2 1/2] kvm tools: Fix VHOST_SET_MEM_TABLE failure Avi Kivity
2012-07-12 2:46 ` Asias He
2012-07-12 8:19 ` Avi Kivity
2012-07-12 23:27 ` Michael S. Tsirkin [this message]
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=20120712232724.GD9317@redhat.com \
--to=mst@redhat.com \
--cc=asias.hejun@gmail.com \
--cc=avi@redhat.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=mingo@elte.hu \
--cc=penberg@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 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.