mbox series

[RFC,0/5] expose negotiated virtio features in r/o properties

Message ID 20181214165657.749-1-rkagan@virtuozzo.com (mailing list archive)
Headers show
Series expose negotiated virtio features in r/o properties | expand

Message

Roman Kagan Dec. 14, 2018, 4:57 p.m. UTC
This series is an attempt to make virtio features acknowledged by the
guest visible as read-only QOM properties.  One potential usecase of
this is debugging; another is when the upper layer needs to do something
only when/if the guest has acknowledged the support for a feature (e.g.
hot-plug a VFIO device once the guest claims VIRTIO_NET_F_STANDBY
support).

Being an RFC, it's incomplete and fails checkpatch, but I'd be intersted
to know if the approach is sane and worthwhile before I invest more time
in it.

Roman Kagan (5):
  qom: preserve get/set presence in aliased properties
  qmp: further consolidate listing of device and object properties
  qdev-properties: add r/o 64bit bitfield property
  virtio: drop DEFINE_VIRTIO_COMMON_FEATURES
  virtio: expose negotiated features in r/o properties

 include/hw/qdev-properties.h    |  9 ++++
 include/hw/virtio/virtio-scsi.h |  2 +-
 include/hw/virtio/virtio.h      | 18 +++----
 hw/char/virtio-serial-bus.c     |  6 ++-
 hw/core/qdev-properties.c       |  9 +++-
 hw/net/virtio-net.c             | 88 +++++++++++++++++--------------
 hw/scsi/virtio-scsi.c           |  4 +-
 hw/virtio/virtio.c              | 11 +++-
 qmp.c                           | 92 ++++++++-------------------------
 qom/object.c                    |  4 +-
 10 files changed, 113 insertions(+), 130 deletions(-)

Comments

no-reply@patchew.org Dec. 23, 2018, 11:05 a.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20181214165657.749-1-rkagan@virtuozzo.com/



Hi,

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

Message-id: 20181214165657.749-1-rkagan@virtuozzo.com
Type: series
Subject: [Qemu-devel] [RFC PATCH 0/5] expose negotiated virtio features in r/o properties

=== 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
Switched to a new branch 'test'
a786b7b virtio: expose negotiated features in r/o properties
0c6bf38 virtio: drop DEFINE_VIRTIO_COMMON_FEATURES
32e832d qdev-properties: add r/o 64bit bitfield property
86475cf qmp: further consolidate listing of device and object properties
09f1169 qom: preserve get/set presence in aliased properties

=== OUTPUT BEGIN ===
Checking PATCH 1/5: qom: preserve get/set presence in aliased properties...
Checking PATCH 2/5: qmp: further consolidate listing of device and object properties...
Checking PATCH 3/5: qdev-properties: add r/o 64bit bitfield property...
Checking PATCH 4/5: virtio: drop DEFINE_VIRTIO_COMMON_FEATURES...
Checking PATCH 5/5: virtio: expose negotiated features in r/o properties...
ERROR: Macros with complex values should be enclosed in parenthesis
#218: FILE: include/hw/virtio/virtio.h:261:
+#define DEFINE_VIRTIO_FEATURE_BIT(_name, _state, _field, _bit, _defval) \
+    DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval),            \
+    DEFINE_VIRTIO_FEATURE_BIT_NEGOTIATED(_name, _bit)

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


The full log is available at
http://patchew.org/logs/20181214165657.749-1-rkagan@virtuozzo.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com