From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
jgg@mellanox.com, aarcange@redhat.com, jglisse@redhat.com,
linux-mm@kvack.org,
James Bottomley <James.Bottomley@hansenpartnership.com>,
Christoph Hellwig <hch@infradead.org>,
David Miller <davem@davemloft.net>,
linux-arm-kernel@lists.infradead.org,
linux-parisc@vger.kernel.org
Subject: Re: [PATCH 2/2] vhost: re-introducing metadata acceleration through kernel virtual address
Date: Mon, 9 Sep 2019 15:23:58 +0800 [thread overview]
Message-ID: <4ee20058-0beb-111c-6750-556965423f04@redhat.com> (raw)
In-Reply-To: <20190909004504-mutt-send-email-mst@kernel.org>
On 2019/9/9 下午12:45, Michael S. Tsirkin wrote:
>>> Since idx can be speculated, I guess we need array_index_nospec here?
>> So we have
>>
>> ACQUIRE(mmu_lock)
>>
>> get idx
>>
>> RELEASE(mmu_lock)
>>
>> ACQUIRE(mmu_lock)
>>
>> read array[idx]
>>
>> RELEASE(mmu_lock)
>>
>> Then I think idx can't be speculated consider we've passed RELEASE +
>> ACQUIRE?
> I don't think memory barriers have anything to do with speculation,
> they are architectural.
>
Oh right. Let me add array_index_nospec() in next version.
Thanks
next prev parent reply other threads:[~2019-09-09 7:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-05 12:27 [PATCH 0/2] Revert and rework on the metadata accelreation Jason Wang
2019-09-05 12:27 ` [PATCH 1/2] Revert "vhost: access vq metadata through kernel virtual address" Jason Wang
2019-09-06 13:46 ` Michael S. Tsirkin
2019-09-09 7:16 ` Jason Wang
2019-09-05 12:27 ` [PATCH 2/2] vhost: re-introducing metadata acceleration through kernel virtual address Jason Wang
2019-09-08 11:05 ` Michael S. Tsirkin
2019-09-09 2:18 ` Jason Wang
2019-09-09 2:30 ` Jason Wang
2019-09-09 4:45 ` Michael S. Tsirkin
2019-09-09 7:23 ` Jason Wang [this message]
2019-09-05 13:59 ` [PATCH 0/2] Revert and rework on the metadata accelreation Jason Gunthorpe
2019-09-06 10:02 ` Jason Wang
2019-09-06 13:15 ` David Miller
2019-09-09 7:18 ` Jason Wang
2019-09-09 12:15 ` Michael S. Tsirkin
2019-09-07 15:03 ` Jason Gunthorpe
2019-09-09 2:29 ` Jason Wang
2019-09-06 3:21 ` [PATCH 2/2] vhost: re-introducing metadata acceleration through kernel virtual address Hillf Danton
2019-09-06 12:51 ` Jason Wang
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=4ee20058-0beb-111c-6750-556965423f04@redhat.com \
--to=jasowang@redhat.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=aarcange@redhat.com \
--cc=davem@davemloft.net \
--cc=hch@infradead.org \
--cc=jgg@mellanox.com \
--cc=jglisse@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-parisc@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--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