Re: [kvm-unit-tests PATCH v3] runtime: Allow to specify properties for accelerator

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

 



Hi Drew,

On 6/19/23 18:44, Andrew Jones wrote:
On Fri, Jun 16, 2023 at 10:41:29AM +1000, Gavin Shan wrote:

On 6/15/23 23:39, Nico Boehr wrote:
Quoting Gavin Shan (2023-06-15 08:21:48)
There are extra properties for accelerators to enable the specific
features. For example, the dirty ring for KVM accelerator can be
enabled by "-accel kvm,dirty-ring-size=65536". Unfortuntely, the
extra properties for the accelerators aren't supported. It makes
it's impossible to test the combination of KVM and dirty ring
as the following error message indicates.

    # cd /home/gavin/sandbox/kvm-unit-tests/tests
    # QEMU=/home/gavin/sandbox/qemu.main/build/qemu-system-aarch64 \
      ACCEL=kvm,dirty-ring-size=65536 ./its-migration
       :
    BUILD_HEAD=2fffb37e
    timeout -k 1s --foreground 90s /home/gavin/sandbox/qemu.main/build/qemu-system-aarch64 \
    -nodefaults -machine virt -accel kvm,dirty-ring-size=65536 -cpu cortex-a57             \
    -device virtio-serial-device -device virtconsole,chardev=ctd -chardev testdev,id=ctd   \
    -device pci-testdev -display none -serial stdio -kernel _NO_FILE_4Uhere_ -smp 160      \
    -machine gic-version=3 -append its-pending-migration # -initrd /tmp/tmp.gfDLa1EtWk
    qemu-system-aarch64: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Invalid argument

Allow to specify extra properties for accelerators. With this, the
"its-migration" can be tested for the combination of KVM and dirty
ring.

Signed-off-by: Gavin Shan <gshan@xxxxxxxxxx>

Maybe get_qemu_accelerator could be renamed now, since it doesn't actually "get"
anything, so maybe check_qemu_accelerator?

In any case, I gave it a quick run on s390x with kvm and tcg and nothing seems
to break, hence for the changes in s390x:

Tested-by: Nico Boehr <nrb@xxxxxxxxxxxxx>
Acked-by: Nico Boehr <nrb@xxxxxxxxxxxxx>


Thanks for a quick try and comment for this. I guess it's fine to keep the
function name as get_qemu_accelator() because $ACCEL is split into $ACCEL
and $ACCEL_PROPS inside it, even it don't print the accelerator name at
return. However, I'm also fine with check_qemu_accelerator(). Lets see
what's Drew's comment on this and I can post v4 to have the modified
function name, or an followup patch to modify the function name.

I suggested naming it set_qemu_accelerator() in the v2 review.


My bad, it will be renamed to set_qemu_accelerator() in v4 :)

Thanks,
Gavin




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux