qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 3/7] vhost: Simplify ring verification checks


From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH v5 3/7] vhost: Simplify ring verification checks
Date: Thu, 11 Jan 2018 11:29:20 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0



On 2018年01月10日 18:23, Igor Mammedov wrote:
On Mon, 8 Jan 2018 17:54:50 +0000
"Dr. David Alan Gilbert"<address@hidden>  wrote:

* Igor Mammedov (address@hidden) wrote:
On Mon, 18 Dec 2017 20:13:36 +0000
"Dr. David Alan Gilbert (git)"<address@hidden>  wrote:
From: "Dr. David Alan Gilbert"<address@hidden>

vhost_verify_ring_mappings() were used to verify that
rings are still accessible and related memory hasn't
been moved after flatview is updated.

It was doing checks by mapping ring's GPA+len and
checking that HVA hadn't changed with new memory map.
To avoid maybe expensive mapping call, we were
identifying address range that changed and were doing
mapping only if ring was in changed range.

However it's not neccessary to perform ring's GPA
mapping as we already have its current HVA and all
we need is to verify that ring's GPA translates to
the same HVA in updated flatview.

This will allow the following patches to simplify the range
comparison that was previously needed to avoid expensive
verify_ring_mapping calls.

Signed-off-by: Igor Mammedov<address@hidden>
with modifications by:
Signed-off-by: Dr. David Alan Gilbert<address@hidden>
an additional question,

in iommu case ring_hva == ring_gpa if we look in to vhost_memory_map()
have you check if iommu case is working with new code?
No I've not; do you have a suggested way of testing it?
Not really,
CCing Jason and Peter who worked on IOMMU stuff there,
maybe the would suggest a test case.



Haven't read the thread but for IOMMU test you need:

1) enable iommu_platform for virtio device
2) enable ats for virtio device
3) boot with intel_iomu device
4) boot a guest with intel_iommu=strict (which makes the flush happens immediately)
5) do some network loads e.g netperf TCP_STREAM test

Thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]