qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 01/26] sdbus: add a QMP command to access a SDBu


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH 01/26] sdbus: add a QMP command to access a SDBus
Date: Thu, 14 Dec 2017 10:18:44 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

Hi Kevin,

On 12/14/2017 06:06 AM, Kevin Wolf wrote:
> Am 14.12.2017 um 00:20 hat Philippe Mathieu-Daudé geschrieben:
>> Use Base64 to serialize the binary blobs in JSON.
>> So far at most 512 bytes will be transfered, which result
>> in a 684 bytes payload.
>> Since this command is intented for qtesting, this is acceptable.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> 
> Doing this kind of thing over QMP doesn't look right to me. qtests
> should access hardware the same way as real guests access the hardware
> (i.e. MMIO and I/O ports).

Yes, I agree with you, however this command does not implement a guest
access behavior (MMIO and I/O ports) but a _bus_ access.

Guests access buses via MMIO/IOP hardware frontend (bus master), bus
slave devices might be considered as backend, like the BlockBackend.

As the current iotests are meant for backend testing, this command is
meant for SDBus backend testing.

Actually with SDHCI I started to qtest the hardware frontend then
realized the backend was incorrect, so I had to go this way to fix it.
Later series do test the HCI using C qtests.

This approach should works for any buses, and start to be quite
interesting with:
- hot-plug buses to unplug/plug slaves
- multi-master buses like I2C to inject noise on the bus and see if the
host can recover/continue
- testing slave failures like a bricked SPI slave keeping some bus lines
held and checking if the HCI expose this failure to the guest (or the
guest checking the HCI for failures)

> But if for some reason the QMP maintainers were to think that this is
> acceptable in QMP, I'd argue it should at least get an x-debug- prefix
> to avoid making it a stable API that management tools may rely on.

I'd rather have the qtests using this command always run (if they take
too long they might be tagged as 'slow' tests), so I'd keep this stable.

Maybe we can prefix the qtests related QMP commands as "x-qtest-"? Else
your suggestion is fine.

Regards,

Phil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]