On 7/15/25 9:24 AM, Akihiko Odaki wrote:
> On 2025/07/11 22:02, Paolo Abeni wrote:
>> +     */
>> +    QEMU_BUILD_BUG_ON(VIRTIO_FEATURES_DWORDS != 2);
>> +    if (virtio_128bit_features_needed(vdev)) {
> 
> There is no need to distinguish virtio_128bit_features_needed() and 
> virtio_64bit_features_needed() here.

Double checking I'm reading the above correctly. Are you suggesting to
replace this chunk with something alike:

    if (virtio_64bit_features_needed(vdev)) {
        /* The 64 highest bit has been cleared by the previous
         *  virtio_features_from_u64() and ev.
         * initialized as needed when loading
         * "virtio/128bit_features"*/
        uint64_t *val = vdev->guest_features_array;

        if (virtio_set_128bit_features_nocheck_maybe_co(vdev, val) < 0)
// ...

> For the 32-bit case, it will be simpler to have an array here and use 
> virtio_set_128bit_features_nocheck_maybe_co() instead of having 
> virtio_set_features_nocheck_maybe_co().

Again double checking I'm parsing the above correctly. You are
suggesting to dismiss the  virtio_set_features_nocheck_maybe_co() helper
entirely and use virtio_set_128bit_features_nocheck_maybe_co() even when
only 32bit features are loaded. Am I correct?

Thanks,

Paolo


Reply via email to