[Qemu-devel] [PATCH v2 0/4] VT-d: some enhancements on iotlb

Peter Xu posted 4 patches 6 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1499844982-5738-1-git-send-email-peterx@redhat.com
Test FreeBSD passed
Test checkpatch failed
Test s390x passed
There is a newer version of this series
hw/i386/intel_iommu.c          | 103 +++++++++++++++++++++++++----------------
hw/i386/intel_iommu_internal.h |  11 +----
hw/i386/trace-events           |   1 -
include/hw/i386/intel_iommu.h  |  10 ++--
4 files changed, 71 insertions(+), 54 deletions(-)
[Qemu-devel] [PATCH v2 0/4] VT-d: some enhancements on iotlb
Posted by Peter Xu 6 years, 8 months ago
v2:
- rebase to master
- removed all "info iommu" patches for now
  (is it bad to introduce new HMP commands without QMP? I thought not,
   but in case I missed anything, please kindly let me know...)

Patch 1: fixes a very rare PT path issue on iova value. It didn't
break anything since it's merely not touched (only if when IOMMU
enabled, then set one device to PT), but still better fix it.

Patch 2: introduce "x-iotlb-size" to tune iotlb size, or to turn it
off (e.g., when we want to measure how iotlb affects one payload).

Patch 3: some refine on iotlb entry.

Patch 4: implemented MRU list algorithm for iotlb.

Please review. Thanks,

Peter Xu (4):
  intel_iommu: fix VTD_PAGE_MASK
  intel_iommu: let iotlb size tunable
  intel_iommu: use access_flags for iotlb
  intel_iommu: implement mru list for iotlb

 hw/i386/intel_iommu.c          | 103 +++++++++++++++++++++++++----------------
 hw/i386/intel_iommu_internal.h |  11 +----
 hw/i386/trace-events           |   1 -
 include/hw/i386/intel_iommu.h  |  10 ++--
 4 files changed, 71 insertions(+), 54 deletions(-)

-- 
2.7.4


Re: [Qemu-devel] [PATCH v2 0/4] VT-d: some enhancements on iotlb
Posted by no-reply@patchew.org 6 years, 8 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 1499844982-5738-1-git-send-email-peterx@redhat.com
Subject: [Qemu-devel] [PATCH v2 0/4] VT-d: some enhancements on iotlb

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
0363bbd intel_iommu: implement mru list for iotlb
661bf52 intel_iommu: use access_flags for iotlb
a571ac1 intel_iommu: let iotlb size tunable
3d04c28 intel_iommu: fix VTD_PAGE_MASK

=== OUTPUT BEGIN ===
Checking PATCH 1/4: intel_iommu: fix VTD_PAGE_MASK...
ERROR: Macros with complex values should be enclosed in parenthesis
#38: FILE: hw/i386/intel_iommu_internal.h:387:
+#define VTD_PAGE_MASK               ~(VTD_PAGE_SIZE - 1)

total: 1 errors, 0 warnings, 16 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 2/4: intel_iommu: let iotlb size tunable...
Checking PATCH 3/4: intel_iommu: use access_flags for iotlb...
Checking PATCH 4/4: intel_iommu: implement mru list for iotlb...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
Re: [Qemu-devel] [PATCH v2 0/4] VT-d: some enhancements on iotlb
Posted by Peter Xu 6 years, 8 months ago
On Wed, Jul 12, 2017 at 12:47:22AM -0700, no-reply@patchew.org wrote:
> Hi,
> 
> This series seems to have some coding style problems. See output below for
> more information:
> 
> Type: series
> Message-id: 1499844982-5738-1-git-send-email-peterx@redhat.com
> Subject: [Qemu-devel] [PATCH v2 0/4] VT-d: some enhancements on iotlb
> 
> === TEST SCRIPT BEGIN ===
> #!/bin/bash
> 
> BASE=base
> n=1
> total=$(git log --oneline $BASE.. | wc -l)
> failed=0
> 
> git config --local diff.renamelimit 0
> git config --local diff.renames True
> 
> commits="$(git log --format=%H --reverse $BASE..)"
> for c in $commits; do
>     echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
>     if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
>         failed=1
>         echo
>     fi
>     n=$((n+1))
> done
> 
> exit $failed
> === TEST SCRIPT END ===
> 
> Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
> Switched to a new branch 'test'
> 0363bbd intel_iommu: implement mru list for iotlb
> 661bf52 intel_iommu: use access_flags for iotlb
> a571ac1 intel_iommu: let iotlb size tunable
> 3d04c28 intel_iommu: fix VTD_PAGE_MASK
> 
> === OUTPUT BEGIN ===
> Checking PATCH 1/4: intel_iommu: fix VTD_PAGE_MASK...
> ERROR: Macros with complex values should be enclosed in parenthesis
> #38: FILE: hw/i386/intel_iommu_internal.h:387:
> +#define VTD_PAGE_MASK               ~(VTD_PAGE_SIZE - 1)
> 
> total: 1 errors, 0 warnings, 16 lines checked

Oops. I forgot this one (after weeks). Will repost.

-- 
Peter Xu