From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Zhoujian (jay)" <jianjay.zhou@huawei.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"imammedo@redhat.com" <imammedo@redhat.com>,
"Huangweidong (C)" <weidong.huang@huawei.com>,
"wangxin (U)" <wangxinxin.wang@huawei.com>,
"Gonglei (Arei)" <arei.gonglei@huawei.com>,
"Liuzhe (Ahriy, Euler)" <liuzhe13@huawei.com>
Subject: Re: [Qemu-devel] [PATCH v9] vhost: used_memslots refactoring
Date: Tue, 20 Mar 2018 05:13:39 +0200 [thread overview]
Message-ID: <20180320051202-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <B2D15215269B544CADD246097EACE7473ABF2941@DGGEMM505-MBS.china.huawei.com>
On Tue, Mar 20, 2018 at 02:09:34AM +0000, Zhoujian (jay) wrote:
> Hi Michael,
>
> > -----Original Message-----
> > From: Michael S. Tsirkin [mailto:mst@redhat.com]
> > Sent: Tuesday, March 20, 2018 9:34 AM
> > To: Zhoujian (jay) <jianjay.zhou@huawei.com>
> > Cc: qemu-devel@nongnu.org; imammedo@redhat.com; Huangweidong (C)
> > <weidong.huang@huawei.com>; wangxin (U) <wangxinxin.wang@huawei.com>; Gonglei
> > (Arei) <arei.gonglei@huawei.com>; Liuzhe (Ahriy, Euler) <liuzhe13@huawei.com>
> > Subject: Re: [PATCH v9] vhost: used_memslots refactoring
> >
> > On Mon, Mar 05, 2018 at 05:12:49PM +0800, Jay Zhou wrote:
> > > Used_memslots is shared by vhost kernel and user, it is equal to
> > > dev->mem->nregions, which is correct for vhost kernel, but not for
> > > vhost user, the latter one uses memory regions that have file
> > > descriptor. E.g. a VM has a vhost-user NIC and 8(vhost user memslot
> > > upper limit) memory slots, it will be failed to hotplug a new DIMM
> > > device since vhost_has_free_slot() finds no free slot left. It should
> > > be successful if only part of memory slots have file descriptor, so
> > > setting used memslots for vhost-user and vhost-kernel respectively.
> >
> >
> > Below should go after ---
>
> Thanks for reminding.
>
> >
> > > v7 ... v9:
> > > - rebased on the master
> > > v2 ... v6:
> > > - delete the "used_memslots" global variable, and add it
> > > for vhost-user and vhost-kernel separately
> > > - refine the function, commit log
> > > - used_memslots refactoring
> > >
> > > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > > Signed-off-by: Jay Zhou <jianjay.zhou@huawei.com>
> > > Signed-off-by: Liuzhe <liuzhe13@huawei.com>
> >
> > When built with clang this causes runtime warnings (during make check) about
> > misaligned access to structures.
> >
> > The issue is that vhost_user_prepare_msg requests VhostUserMemory which
> > compiler assumes but is then used with a pointer into a packed structure -
> > where fields are not aligned.
>
> Sorry I missed the patch you have sent to fix the alignment, I have replied
> to that thread.
I've dropped this from the pull for now. Sorry about that. Once next
pull is merged, pls rebase and post a version fixing up the alignment
issues.
Thanks for your effort!
--
MST
next prev parent reply other threads:[~2018-03-20 3:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-05 9:12 [Qemu-devel] [PATCH v9] vhost: used_memslots refactoring Jay Zhou
2018-03-05 15:37 ` Michael S. Tsirkin
2018-03-06 14:47 ` Igor Mammedov
2018-03-20 1:34 ` Michael S. Tsirkin
2018-03-20 2:09 ` Zhoujian (jay)
2018-03-20 2:51 ` Michael S. Tsirkin
2018-03-20 3:39 ` Zhoujian (jay)
2018-03-20 12:35 ` Michael S. Tsirkin
2018-03-20 14:45 ` Zhoujian (jay)
2018-03-20 3:13 ` Michael S. Tsirkin [this message]
2018-03-20 3:43 ` Zhoujian (jay)
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=20180320051202-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=imammedo@redhat.com \
--cc=jianjay.zhou@huawei.com \
--cc=liuzhe13@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=wangxinxin.wang@huawei.com \
--cc=weidong.huang@huawei.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).