mbox series

[0/2] xen-hvm: use new resource mapping API

Message ID 20180509154604.25530-1-paul.durrant@citrix.com
Headers show
Series xen-hvm: use new resource mapping API | expand

Message

Paul Durrant May 9, 2018, 3:46 p.m. UTC
This series modifies QEMU to use the new guest resource mapping API
(available in Xen 4.11+) to map ioreq pages.

Paul Durrant (2):
  xen-hvm: create separate function for ioreq server initialization
  xen-hvm: try to use xenforeignmemory_map_resource() to map ioreq pages

 configure                   |   5 ++
 hw/i386/xen/trace-events    |   1 +
 hw/i386/xen/xen-hvm.c       | 114 ++++++++++++++++++++++++++++++++------------
 include/hw/xen/xen_common.h |  14 ++++++
 4 files changed, 104 insertions(+), 30 deletions(-)

Comments

no-reply@patchew.org May 9, 2018, 4:01 p.m. UTC | #1
Hi,

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

Type: series
Message-id: 20180509154604.25530-1-paul.durrant@citrix.com
Subject: [Qemu-devel] [PATCH 0/2] xen-hvm: use new resource mapping API

=== 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
git config --local diff.algorithm histogram

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
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/20180509154604.25530-1-paul.durrant@citrix.com -> patchew/20180509154604.25530-1-paul.durrant@citrix.com
 * [new tag]               patchew/20180509154849.27979-1-richard.henderson@linaro.org -> patchew/20180509154849.27979-1-richard.henderson@linaro.org
 * [new tag]               patchew/20180509154949.8206-1-mreitz@redhat.com -> patchew/20180509154949.8206-1-mreitz@redhat.com
Switched to a new branch 'test'
16691ff49e xen-hvm: try to use xenforeignmemory_map_resource() to map ioreq pages
d4bcd68252 xen-hvm: create separate function for ioreq server initialization

=== OUTPUT BEGIN ===
Checking PATCH 1/2: xen-hvm: create separate function for ioreq server initialization...
Checking PATCH 2/2: xen-hvm: try to use xenforeignmemory_map_resource() to map ioreq pages...
ERROR: spaces required around that '*' (ctx:WxV)
#164: FILE: include/hw/xen/xen_common.h:128:
+    xenforeignmemory_handle *fmem, domid_t domid, unsigned int type,
                             ^

total: 1 errors, 0 warnings, 138 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.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Paul Durrant May 9, 2018, 4:05 p.m. UTC | #2
> -----Original Message-----
> From: no-reply@patchew.org [mailto:no-reply@patchew.org]
> Sent: 09 May 2018 17:02
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: famz@redhat.com; qemu-devel@nongnu.org; xen-
> devel@lists.xenproject.org; Paul Durrant <Paul.Durrant@citrix.com>
> Subject: Re: [Qemu-devel] [PATCH 0/2] xen-hvm: use new resource mapping
> API
> 
> Hi,
> 
> This series seems to have some coding style problems. See output below for
> more information:
> 
> Type: series
> Message-id: 20180509154604.25530-1-paul.durrant@citrix.com
> Subject: [Qemu-devel] [PATCH 0/2] xen-hvm: use new resource mapping
> API
> 
> === 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
> git config --local diff.algorithm histogram
> 
> 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
> From https://github.com/patchew-project/qemu
>  * [new tag]               patchew/20180509154604.25530-1-
> paul.durrant@citrix.com -> patchew/20180509154604.25530-1-
> paul.durrant@citrix.com
>  * [new tag]               patchew/20180509154849.27979-1-
> richard.henderson@linaro.org -> patchew/20180509154849.27979-1-
> richard.henderson@linaro.org
>  * [new tag]               patchew/20180509154949.8206-1-mreitz@redhat.com ->
> patchew/20180509154949.8206-1-mreitz@redhat.com
> Switched to a new branch 'test'
> 16691ff49e xen-hvm: try to use xenforeignmemory_map_resource() to map
> ioreq pages
> d4bcd68252 xen-hvm: create separate function for ioreq server initialization
> 
> === OUTPUT BEGIN ===
> Checking PATCH 1/2: xen-hvm: create separate function for ioreq server
> initialization...
> Checking PATCH 2/2: xen-hvm: try to use
> xenforeignmemory_map_resource() to map ioreq pages...
> ERROR: spaces required around that '*' (ctx:WxV)
> #164: FILE: include/hw/xen/xen_common.h:128:
> +    xenforeignmemory_handle *fmem, domid_t domid, unsigned int type,
>                              ^
> 
> total: 1 errors, 0 warnings, 138 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.

This style warning appears to be spurious.

  Paul

> 
> === OUTPUT END ===
> 
> Test command exited with code: 1
> 
> 
> ---
> Email generated automatically by Patchew [http://patchew.org/].
> Please send your feedback to patchew-devel@redhat.com
Eric Blake May 9, 2018, 5:26 p.m. UTC | #3
On 05/09/2018 11:05 AM, Paul Durrant wrote:

>> xenforeignmemory_map_resource() to map ioreq pages...
>> ERROR: spaces required around that '*' (ctx:WxV)
>> #164: FILE: include/hw/xen/xen_common.h:128:
>> +    xenforeignmemory_handle *fmem, domid_t domid, unsigned int type,
>>                               ^
>>
>> total: 1 errors, 0 warnings, 138 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.
> 
> This style warning appears to be spurious.

Yep, and it's because xenforeignmemory_handle doesn't follow our usual 
conventions for a type name.  See commit 5ac067a if you want to add it 
to the list of whitelisted exception type names, to silence messages 
like this.
Paul Durrant May 10, 2018, 8:29 a.m. UTC | #4
> -----Original Message-----
> From: Eric Blake [mailto:eblake@redhat.com]
> Sent: 09 May 2018 18:26
> To: Paul Durrant <Paul.Durrant@citrix.com>; qemu-devel@nongnu.org
> Cc: xen-devel@lists.xenproject.org; famz@redhat.com
> Subject: Re: [Qemu-devel] [PATCH 0/2] xen-hvm: use new resource mapping
> API
> 
> On 05/09/2018 11:05 AM, Paul Durrant wrote:
> 
> >> xenforeignmemory_map_resource() to map ioreq pages...
> >> ERROR: spaces required around that '*' (ctx:WxV)
> >> #164: FILE: include/hw/xen/xen_common.h:128:
> >> +    xenforeignmemory_handle *fmem, domid_t domid, unsigned int
> type,
> >>                               ^
> >>
> >> total: 1 errors, 0 warnings, 138 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.
> >
> > This style warning appears to be spurious.
> 
> Yep, and it's because xenforeignmemory_handle doesn't follow our usual
> conventions for a type name.  See commit 5ac067a if you want to add it
> to the list of whitelisted exception type names, to silence messages
> like this.

Thanks Eric. I'll send a v2 series with a suitable additional patch.

  Cheers,

    Paul

> 
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3266
> Virtualization:  qemu.org | libvirt.org