From: "Longpeng (Mike)" <longpeng2@huawei.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: stefanha@redhat.com, lvivier@redhat.com, eblake@redhat.com,
peter.maydell@linaro.org, groug@kaod.org,
arei.gonglei@huawei.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qtest: virtio: zeroed last VRingDesc after allocate
Date: Tue, 17 Jan 2017 10:57:54 +0800 [thread overview]
Message-ID: <587D8832.7050900@huawei.com> (raw)
In-Reply-To: <20170116141307.GG14681@stefanha-x1.localdomain>
Hi Stefan,
On 2017/1/16 22:13, Stefan Hajnoczi wrote:
> On Sat, Jan 14, 2017 at 05:59:36PM +0800, Longpeng(Mike) wrote:
......
>> diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c
>> index ec30cb9..b29c69e 100644
>> --- a/tests/libqos/virtio.c
>> +++ b/tests/libqos/virtio.c
>> @@ -171,12 +171,20 @@ QVRingIndirectDesc *qvring_indirect_desc_setup(QVirtioDevice *d,
>> for (i = 0; i < elem - 1; ++i) {
>> /* indirect->desc[i].addr */
>> writeq(indirect->desc + (16 * i), 0);
>> + /* indirect->desc[i].len */
>> + writeq(indirect->desc + (16 * i) + 8, 0);
>
> The len field is 32 bits long. Please use writel().
>
>> /* indirect->desc[i].flags */
>> writew(indirect->desc + (16 * i) + 12, VRING_DESC_F_NEXT);
>> /* indirect->desc[i].next */
>> writew(indirect->desc + (16 * i) + 14, i + 1);
>> }
>>
>> + /* zeroed last element */
>> + writeq(indirect->desc + (16 * i), 0); /* addr */
>> + writeq(indirect->desc + (16 * i) + 8, 0); /*len*/
>
> Same here.
OK. I will fix it in V2.
--
Regards,
Longpeng(Mike)
prev parent reply other threads:[~2017-01-17 2:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-14 9:59 [Qemu-devel] [PATCH] qtest: virtio: zeroed last VRingDesc after allocate Longpeng(Mike)
2017-01-16 14:13 ` Stefan Hajnoczi
2017-01-17 2:57 ` Longpeng (Mike) [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=587D8832.7050900@huawei.com \
--to=longpeng2@huawei.com \
--cc=arei.gonglei@huawei.com \
--cc=eblake@redhat.com \
--cc=groug@kaod.org \
--cc=lvivier@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=stefanha@redhat.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).