[Qemu-devel] [PATCH RFC 0/8] i386/kvm/hyper-v: refactor and implement 'hv-stimer-direct' and 'hv-all' enlightenments

Vitaly Kuznetsov posted 8 patches 5 years, 3 months ago
Test asan passed
Test docker-clang@ubuntu passed
Test docker-mingw@fedora passed
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190125114155.32062-1-vkuznets@redhat.com
Maintainers: Marcelo Tosatti <mtosatti@redhat.com>, Richard Henderson <rth@twiddle.net>, Paolo Bonzini <pbonzini@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>
include/standard-headers/drm/drm_fourcc.h     |   63 +
include/standard-headers/linux/ethtool.h      |   19 +-
.../linux/input-event-codes.h                 |   19 +
include/standard-headers/linux/pci_regs.h     |    1 +
.../standard-headers/linux/virtio_balloon.h   |    8 +
include/standard-headers/linux/virtio_blk.h   |   54 +
.../standard-headers/linux/virtio_config.h    |    3 +
include/standard-headers/linux/virtio_gpu.h   |   18 +
include/standard-headers/linux/virtio_ring.h  |   52 +
linux-headers/asm-arm/unistd-common.h         |    1 +
linux-headers/asm-arm64/unistd.h              |    1 +
linux-headers/asm-generic/unistd.h            |   10 +-
linux-headers/asm-mips/sgidefs.h              |    8 -
linux-headers/asm-mips/unistd.h               | 1074 +----------------
linux-headers/asm-mips/unistd_n64.h           |  334 +++++
linux-headers/asm-mips/unistd_o32.h           |  374 ++++++
linux-headers/asm-powerpc/unistd.h            |  389 +-----
linux-headers/asm-powerpc/unistd_32.h         |  381 ++++++
linux-headers/asm-powerpc/unistd_64.h         |  372 ++++++
linux-headers/linux/kvm.h                     |   29 +
linux-headers/linux/vfio.h                    |   92 ++
linux-headers/linux/vhost.h                   |  113 +-
linux-headers/linux/vhost_types.h             |  128 ++
scripts/update-linux-headers.sh               |   10 +-
target/i386/cpu.c                             |    2 +
target/i386/cpu.h                             |    2 +
target/i386/hyperv-proto.h                    |    1 +
target/i386/kvm.c                             |  749 +++++++++---
28 files changed, 2533 insertions(+), 1774 deletions(-)
create mode 100644 linux-headers/asm-mips/unistd_n64.h
create mode 100644 linux-headers/asm-mips/unistd_o32.h
create mode 100644 linux-headers/asm-powerpc/unistd_32.h
create mode 100644 linux-headers/asm-powerpc/unistd_64.h
create mode 100644 linux-headers/linux/vhost_types.h
[Qemu-devel] [PATCH RFC 0/8] i386/kvm/hyper-v: refactor and implement 'hv-stimer-direct' and 'hv-all' enlightenments
Posted by Vitaly Kuznetsov 5 years, 3 months ago
The recently introduced Direct Mode for Hyper-V synthetic timers
enlightenment is only exposed through KVM_GET_SUPPORTED_HV_CPUID ioctl.
Take the opportunity and re-implement the way we handle Hyper-V
enlightenments in QEMU, add support for hv-stimer-direct and 'hv-all'
pass-through mode, add missing dependencies between enlightenments.

RFC: we could've been more conservative and only use
KVM_GET_SUPPORTED_HV_CPUID for new enlightenments. I'd also like to know
what you think about the 'pass-through' approach taken to implement
'hv-all' mode: we could've kept QEMU filling in signature, vendor,...
but we take CPUIDs passed by KVM 'as-is'.

Vitaly Kuznetsov (8):
  Update linux headers (5.0-rc2)
  i386/kvm: add support for KVM_GET_SUPPORTED_HV_CPUID
  i386/kvm: move Hyper-V CPUID filling to hyperv_handle_properties()
  i386/kvm: Implement 'hv-all' pass-through mode
  i386/kvm: hv-evmcs requires hv-vapic
  i386/kvm: hv-stimer requires hv-time and hv-synic
  i386/kvm: hv-tlbflush/ipi require hv-vpindex
  i386/kvm: add support for Direct Mode for Hyper-V synthetic timers

 include/standard-headers/drm/drm_fourcc.h     |   63 +
 include/standard-headers/linux/ethtool.h      |   19 +-
 .../linux/input-event-codes.h                 |   19 +
 include/standard-headers/linux/pci_regs.h     |    1 +
 .../standard-headers/linux/virtio_balloon.h   |    8 +
 include/standard-headers/linux/virtio_blk.h   |   54 +
 .../standard-headers/linux/virtio_config.h    |    3 +
 include/standard-headers/linux/virtio_gpu.h   |   18 +
 include/standard-headers/linux/virtio_ring.h  |   52 +
 linux-headers/asm-arm/unistd-common.h         |    1 +
 linux-headers/asm-arm64/unistd.h              |    1 +
 linux-headers/asm-generic/unistd.h            |   10 +-
 linux-headers/asm-mips/sgidefs.h              |    8 -
 linux-headers/asm-mips/unistd.h               | 1074 +----------------
 linux-headers/asm-mips/unistd_n64.h           |  334 +++++
 linux-headers/asm-mips/unistd_o32.h           |  374 ++++++
 linux-headers/asm-powerpc/unistd.h            |  389 +-----
 linux-headers/asm-powerpc/unistd_32.h         |  381 ++++++
 linux-headers/asm-powerpc/unistd_64.h         |  372 ++++++
 linux-headers/linux/kvm.h                     |   29 +
 linux-headers/linux/vfio.h                    |   92 ++
 linux-headers/linux/vhost.h                   |  113 +-
 linux-headers/linux/vhost_types.h             |  128 ++
 scripts/update-linux-headers.sh               |   10 +-
 target/i386/cpu.c                             |    2 +
 target/i386/cpu.h                             |    2 +
 target/i386/hyperv-proto.h                    |    1 +
 target/i386/kvm.c                             |  749 +++++++++---
 28 files changed, 2533 insertions(+), 1774 deletions(-)
 create mode 100644 linux-headers/asm-mips/unistd_n64.h
 create mode 100644 linux-headers/asm-mips/unistd_o32.h
 create mode 100644 linux-headers/asm-powerpc/unistd_32.h
 create mode 100644 linux-headers/asm-powerpc/unistd_64.h
 create mode 100644 linux-headers/linux/vhost_types.h

-- 
2.20.1


Re: [Qemu-devel] [PATCH RFC 0/8] i386/kvm/hyper-v: refactor and implement 'hv-stimer-direct' and 'hv-all' enlightenments
Posted by no-reply@patchew.org 5 years, 3 months ago
Patchew URL: https://patchew.org/QEMU/20190125114155.32062-1-vkuznets@redhat.com/



Hi,

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

Subject: [Qemu-devel] [PATCH RFC 0/8] i386/kvm/hyper-v: refactor and implement 'hv-stimer-direct' and 'hv-all' enlightenments
Type: series
Message-id: 20190125114155.32062-1-vkuznets@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
dabb4951b0 i386/kvm: add support for Direct Mode for Hyper-V synthetic timers
223e993ccd i386/kvm: hv-tlbflush/ipi require hv-vpindex
3051f4d3de i386/kvm: hv-stimer requires hv-time and hv-synic
6ca6a10f0a i386/kvm: hv-evmcs requires hv-vapic
c8aeebcffd i386/kvm: Implement 'hv-all' pass-through mode
79a00f19c1 i386/kvm: move Hyper-V CPUID filling to hyperv_handle_properties()
69c92de59b i386/kvm: add support for KVM_GET_SUPPORTED_HV_CPUID
345a0718e2 Update linux headers (5.0-rc2)

=== OUTPUT BEGIN ===
1/8 Checking commit 345a0718e21e (Update linux headers (5.0-rc2))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#1646: 
new file mode 100644

ERROR: code indent should never use tabs
#3980: FILE: scripts/update-linux-headers.sh:126:
+^Icp "$tmpdir/include/asm/unistd_n64.h" "$output/linux-headers/asm-mips/"$

WARNING: line over 80 characters
#3983: FILE: scripts/update-linux-headers.sh:129:
+        cp "$tmpdir/include/asm/unistd_32.h" "$output/linux-headers/asm-powerpc/"

WARNING: line over 80 characters
#3984: FILE: scripts/update-linux-headers.sh:130:
+       cp "$tmpdir/include/asm/unistd_64.h" "$output/linux-headers/asm-powerpc/"

ERROR: code indent should never use tabs
#3984: FILE: scripts/update-linux-headers.sh:130:
+^Icp "$tmpdir/include/asm/unistd_64.h" "$output/linux-headers/asm-powerpc/"$

total: 2 errors, 3 warnings, 3838 lines checked

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

2/8 Checking commit 69c92de59b5d (i386/kvm: add support for KVM_GET_SUPPORTED_HV_CPUID)
3/8 Checking commit 79a00f19c1c4 (i386/kvm: move Hyper-V CPUID filling to hyperv_handle_properties())
4/8 Checking commit c8aeebcffd5a (i386/kvm: Implement 'hv-all' pass-through mode)
5/8 Checking commit 6ca6a10f0a12 (i386/kvm: hv-evmcs requires hv-vapic)
6/8 Checking commit 3051f4d3de1e (i386/kvm: hv-stimer requires hv-time and hv-synic)
7/8 Checking commit 223e993ccd15 (i386/kvm: hv-tlbflush/ipi require hv-vpindex)
8/8 Checking commit dabb4951b005 (i386/kvm: add support for Direct Mode for Hyper-V synthetic timers)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20190125114155.32062-1-vkuznets@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [Qemu-devel] [PATCH RFC 0/8] i386/kvm/hyper-v: refactor and implement 'hv-stimer-direct' and 'hv-all' enlightenments
Posted by Vitaly Kuznetsov 5 years, 3 months ago
no-reply@patchew.org writes:

> === OUTPUT BEGIN ===
> 1/8 Checking commit 345a0718e21e (Update linux headers (5.0-rc2))
> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
> #1646: 
> new file mode 100644
>
> ERROR: code indent should never use tabs
> #3980: FILE: scripts/update-linux-headers.sh:126:
> +^Icp "$tmpdir/include/asm/unistd_n64.h" "$output/linux-headers/asm-mips/"$
>
> WARNING: line over 80 characters
> #3983: FILE: scripts/update-linux-headers.sh:129:
> +        cp "$tmpdir/include/asm/unistd_32.h" "$output/linux-headers/asm-powerpc/"
>
> WARNING: line over 80 characters
> #3984: FILE: scripts/update-linux-headers.sh:130:
> +       cp "$tmpdir/include/asm/unistd_64.h" "$output/linux-headers/asm-powerpc/"
>
> ERROR: code indent should never use tabs
> #3984: FILE: scripts/update-linux-headers.sh:130:
> +^Icp "$tmpdir/include/asm/unistd_64.h" "$output/linux-headers/asm-powerpc/"$
>

I saw these before submitting, however, these are linux headers and we
take them as-is with scripts/update-linux-headers.sh: I don't think it
is worth it to modify these headers just to silence patchew.

-- 
Vitaly