[Qemu-devel] [PATCH] i386/cpu/kvm: look at PMU's CPUID before setting MSRs

2017-12-27 Thread Jan Dakinevich
also could fail if KVM exposes less fixed counters then 3. It could happen if host system run inside another hypervisor, which is tweaking PMU-related CPUID. To prevent possible fail, number of fixed counters now is obtained in the same way as number of GP counters. Reviewed-by: Roman Kagan Signed-

Re: [Qemu-devel] [RFC v6 1/2] virtio: introduce `query-virtio' QMP command

2017-12-19 Thread Jan Dakinevich
ntainers and with my own e-mail. > Jan Dakinevich writes: > > > The command is intended for gathering virtio information such as > > status, feature bits, negotiation status. It is convenient and > > useful for debug purpose. > > > > The commands returns generic

[Qemu-devel] [RFC v6 2/2] virtio: add `info virtio' HMP command

2017-12-17 Thread Jan Dakinevich
The command prints data from `query-virtio' QMP in human-readable format. Cc: Denis V. Lunev Signed-off-by: Jan Dakinevich --- hmp-commands-info.hx | 14 ++ hmp.c| 74 hmp.h| 1 + 3 files change

[Qemu-devel] [RFC v6 0/2] virtio: introduce `info virtio' hmp command

2017-12-17 Thread Jan Dakinevich
From: Jan Dakinevich After some discussion, I am going to suggest reworked QMP/HMP for gathering virtio info. It would provide the following monitor output. (qemu) info virtio virtio-blk-device at :00:02.0 QOM path: /machine/peripheral-anon/device[0]/virtio-backend status: 0x0f

[Qemu-devel] [RFC v6 1/2] virtio: introduce `query-virtio' QMP command

2017-12-17 Thread Jan Dakinevich
to current machine devices. To retrieve names of device-specific features `tell_feature_name' callback in VirtioDeviceClass also was introduced. Cc: Denis V. Lunev Signed-off-by: Jan Dakinevich --- hw/block/virtio-blk.c | 20 +++ hw/char/virtio-serial-bus.c | 14 + hw/di

Re: [Qemu-devel] [RFC v5 0/2] virtio: introduce `info virtio' hmp command

2017-12-14 Thread Jan Dakinevich
On Thu, 14 Dec 2017 12:05:19 +0100 Cornelia Huck wrote: > On Tue, 12 Dec 2017 16:54:50 +0300 > Jan Dakinevich wrote: > > > I am going to reanimate works under this QMP/HMP. First of all, it > > could be meaningful to settle what output would provide the QMP. I > >

Re: [Qemu-devel] [RFC v5 0/2] virtio: introduce `info virtio' hmp command

2017-12-12 Thread Jan Dakinevich
rue}, {"name": "bad-feature", "acked": false}, {"name": "version-1", "acked": true} ], "device-features-names": [ {"name": "hotplug", "acked": true}, {"name": "change", "acked": true} ] } ] } Eric Blake, returning to your question which would probably appear again after this mail: >> +## >> +# @query-virtio: >> ... >> +## >> +{ >> +'command': 'query-virtio', >> +'data': { '*path': 'str' }, > > Do we need filterable queries, or is it better to just have the > command return info on all virtio devices at once and let the client > filter the results as desired? I think it would be better to do here. I suppose, the client which uses HMP will not be happy on filtering monitor output. -- Best regards Jan Dakinevich

[Qemu-devel] [RFC v5 1/2] virtio: introduce `query-virtio' QMP command

2017-10-24 Thread Jan Dakinevich
to current machine devices. Cc: Denis V. Lunev Signed-off-by: Jan Dakinevich --- hw/virtio/Makefile.objs | 3 + hw/virtio/virtio-qmp.c | 223 +++ hw/virtio/virtio-stub.c | 9 + qapi-schema.json| 466 4 files

[Qemu-devel] [RFC v5 2/2] virtio: add `info virtio' HMP command

2017-10-24 Thread Jan Dakinevich
The command prints data from `query-virtio' QMP in human-readable format. Cc: Denis V. Lunev Signed-off-by: Jan Dakinevich --- hmp-commands-info.hx | 14 ++ hmp.c| 122 +++ hmp.h| 1 + 3 files changed

[Qemu-devel] [RFC v5 0/2] virtio: introduce `info virtio' hmp command

2017-10-24 Thread Jan Dakinevich
17-09/msg07565.html v2: http://lists.nongnu.org/archive/html/qemu-devel/2017-09/msg07527.html v1: http://lists.nongnu.org/archive/html/qemu-devel/2017-09/msg07247.html Jan Dakinevich (2): virtio: introduce `query-virtio' QMP command virtio: add `info virtio' HMP command hmp-commands-i

Re: [Qemu-devel] [PATCH v4 1/2] virtio: introduce `query-virtio' QMP command

2017-10-05 Thread Jan Dakinevich
On 10/04/2017 07:00 PM, Eric Blake wrote: > On 10/04/2017 09:26 AM, Jan Dakinevich wrote: > >>>>>> +{ >>>>>> +'struct': 'VirtioInfo', >>>>>> +'data': { >>>>>> +'f

Re: [Qemu-devel] [PATCH v4 1/2] virtio: introduce `query-virtio' QMP command

2017-10-04 Thread Jan Dakinevich
On 10/03/2017 07:29 PM, Dr. David Alan Gilbert wrote: > * Jan Dakinevich (jan.dakinev...@virtuozzo.com) wrote: >> >> >> On 10/03/2017 05:02 PM, Eric Blake wrote: >>> On 10/03/2017 07:47 AM, Jan Dakinevich wrote: >>>> The command is intended for g

Re: [Qemu-devel] [PATCH v4 1/2] virtio: introduce `query-virtio' QMP command

2017-10-03 Thread Jan Dakinevich
On 10/03/2017 05:02 PM, Eric Blake wrote: > On 10/03/2017 07:47 AM, Jan Dakinevich wrote: >> The command is intended for gathering virtio information such as status, >> feature bits, negotiation status. It is convenient and useful for debug >> purpose. >> >> Th

[Qemu-devel] [PATCH v4 1/2] virtio: introduce `query-virtio' QMP command

2017-10-03 Thread Jan Dakinevich
to current machine devices. To retrieve names of device-specific features `get_feature_name' callback in VirtioDeviceClass also was introduced. Cc: Denis V. Lunev Signed-off-by: Jan Dakinevich --- hw/block/virtio-blk.c | 21 + hw/char/virtio-serial-bus.c | 15 +++ hw/di

[Qemu-devel] [PATCH v4 2/2] virtio: add `info virtio' HMP command

2017-10-03 Thread Jan Dakinevich
The command prints data from `query-virtio' QMP in human-readable format. Cc: Denis V. Lunev Signed-off-by: Jan Dakinevich --- hmp-commands-info.hx | 14 ++ hmp.c| 79 hmp.h| 1 + 3 files change

[Qemu-devel] [PATCH v4 0/2] virtio: introduce `info virtio' hmp command

2017-10-03 Thread Jan Dakinevich
07247.html Jan Dakinevich (2): virtio: introduce `query-virtio' QMP command virtio: add `info virtio' HMP command hmp-commands-info.hx| 14 ++ hmp.c | 79 ++ hmp.h | 1 + hw/block/virtio-bl

Re: [Qemu-devel] [PATCH v2] virtio: introduce `info virtio' hmp command

2017-09-27 Thread Jan Dakinevich
n wrote: On Wed, Sep 27, 2017 at 06:09:42PM +0300, Jan Dakinevich wrote: The command is intended for exposing device specific virtio feature bits and their negotiation status. It is convenient and useful for debug purpose. Names of features are taken from a devices via get_feature_name() within V

[Qemu-devel] [PATCH v3] virtio: introduce `info virtio' hmp command

2017-09-27 Thread Jan Dakinevich
mmand will print only hexadecimal value of feature mask. Cc: Denis V. Lunev Signed-off-by: Jan Dakinevich --- v3: * Avoid signed int * Use virtio_vdev_has_feature()/virtio_host_has_feature() v2: http://lists.nongnu.org/archive/html/qemu-devel/2017-09/msg07527.html v1: http://lists.nongnu.org/ar

Re: [Qemu-devel] [PATCH v2] virtio: introduce `info virtio' hmp command

2017-09-27 Thread Jan Dakinevich
On 09/27/2017 06:53 PM, Dr. David Alan Gilbert wrote: > * Jan Dakinevich (jan.dakinev...@virtuozzo.com) wrote: >> The command is intended for exposing device specific virtio feature bits >> and their negotiation status. It is convenient and useful for debug >> purpose. &g

[Qemu-devel] [PATCH v2] virtio: introduce `info virtio' hmp command

2017-09-27 Thread Jan Dakinevich
mmand will print only hexadecimal value of feature mask. Cc: Denis V. Lunev Signed-off-by: Jan Dakinevich --- v2: * Moved hmp_info_virtio and stuff to hmp.c to avoid build error * Added printing of device status * Listed common virtio features v1: http://lists.nongnu.org/archive/html/qemu-devel/20

[Qemu-devel] [PATCH] virtio: introduce `info virtio' hmp command

2017-09-26 Thread Jan Dakinevich
mmand will print only hexadecimal value of feature mask. Cc: Denis V. Lunev Signed-off-by: Jan Dakinevich --- The patch suggests an another approach for this: "virtio: show guest features in 'info qtree'" http://lists.nongnu.org/archive/html/qemu-devel/2016-05/msg01609.html

[Qemu-devel] [PATCH] 9pfs: fix readdir() for 9p2000.u

2017-09-19 Thread Jan Dakinevich
o,version=9p2000.u console=ttyS0" \ -fsdev local,id=fsdev0,path=$PWD/rootfs,security_model=passthrough \ -device virtio-9p-pci,fsdev=fsdev0,mount_tag=/dev/root This patch mostly uses your commit message, because it is much more informative than I could ever suggest. -- Best regards Jan

Re: [Qemu-devel] [PATCH] 9pfs: fix readdir() for 9p2000.u

2017-09-18 Thread Jan Dakinevich
if (err < 0) { > break; > } > +v9fs_path_free(&path); > + > +v9fs_path_sprintf(&path, "%s", dent->d_name); > err = stat_to_v9stat(pdu, &path, &stbuf, &v9stat); > if (err < 0) { > break; > -- Best regards Jan Dakinevich

[Qemu-devel] [PATCH] 9pfs: fix name_to_path assertion in v9fs_complete_rename()

2017-09-16 Thread Jan Dakinevich
The third parameter of v9fs_co_name_to_path() must not contain `/' character. The issue is most likely related to 9p2000.u protocol only. Signed-off-by: Jan Dakinevich --- hw/9pfs/9p.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/hw/9pfs/9

[Qemu-devel] [PATCH v2] 9pfs: check the size of transport buffer before marshaling

2017-09-16 Thread Jan Dakinevich
: Jan Dakinevich --- hw/9pfs/9p.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 144c330..4d4ed85 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -1754,17 +1754,26 @@ static int coroutine_fn v9fs_do_readdir_with_stat(V9fsPDU

Re: [Qemu-devel] [PATCH] 9pfs: check the size of transport buffer before marshaling

2017-09-16 Thread Jan Dakinevich
rz wrote: On Thu, 14 Sep 2017 19:31:36 +0300 Jan Dakinevich wrote: v9fs_do_readdir_with_stat() and v9fs_do_readdir() stores as much data in the buffer as can fit unless marshaling erorr occurs. However, after commit 23a006d the behavior pdu_marshal was changed, and on error the routine ass

[Qemu-devel] [PATCH] 9pfs: check the size of transport buffer before marshaling

2017-09-14 Thread Jan Dakinevich
-by: Jan Dakinevich --- hw/9pfs/9p.c | 44 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 1e38109..8e0b87e 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -1679,6 +1679,16 @@ static void

[Qemu-devel] [PATCH] virtio-9p: don't break device on marshaling fail

2017-09-13 Thread Jan Dakinevich
Fix regression from commit 8d37de41cab145cbba250a8f1f1372b0a5cdf26f. The situation when pdu_marshal returns an error should be considered valid. At least `v9fs_do_readdir_with_stat' relies on that to place in responce buffer as much data as can fit. Signed-off-by: Jan Dakinevich --- hw