Prasad Pandit <ppan...@redhat.com> writes:

> Hi,
>
> On Tue, 6 May 2025 at 00:34, Fabiano Rosas <faro...@suse.de> wrote:
>> >> # Running /ppc64/migration/multifd+postcopy/tcp/plain/cancel
>> >> # Using machine type: pseries-10.0
>> >> # starting QEMU: exec ./qemu-system-ppc64 -qtest
>> >> # {
>> >> #     "error": {
>> >> #         "class": "GenericError",
>> >> #         "desc": "Postcopy is not supported: Userfaultfd not available: 
>> >> Function not implemented"
>> >> #     }
>> >> # }
>> >
> ===
> [ ~]#
> ...
> PPC KVM module is not loaded. Try modprobe kvm_hv.
> qemu-system-ppc64: -accel kvm: failed to initialize kvm: Invalid argument
> qemu-system-ppc64: -accel kvm: ioctl(KVM_CREATE_VM) failed: Invalid argument
> PPC KVM module is not loaded. Try modprobe kvm_hv.
> qemu-system-ppc64: -accel kvm: failed to initialize kvm: Invalid argument

The tests should fallback to TCG and that should be enough to reproduce
this issue. I don't think you even need a ppc machine, the CI uses a
x86_64 container.

> [ ~]#
>
> [ ~]# modprobe kvm-hv
> modprobe: ERROR: could not insert 'kvm_hv': No such device
> [ ~]#
> [ ~]# ls -l /dev/kvm /dev/userfaultfd
> crw-rw-rw-. 1 root kvm  10, 232 May  6 07:06 /dev/kvm
> crw----rw-. 1 root root 10, 123 May  6 06:30 /dev/userfaultfd
> [ ~]#
> ===
>
> * I tried to reproduce this issue across multiple Power9 and Power10
> machines, but I -qtest could not run due to above errors.
>

There are several considerations to take into account with ppc64le, you
probably have either a distro version that doesn't provide the KVM
module or a machine that doesn't have KVM support at all.

>> We're missing a check on has_uffd for the multifd+postcopy tests.
>
> * If it is about missing the 'e->has_uffd' check, does that mean
> Postcopy tests are skipped on this machine because 'e->has_uffd' is
> false?
>

I haven't verified, but yes, the ones that check has_uffd should be
skipped.

I don't think you need to go to the extent to reproduce this. Look at
migrate_caps_check(), whenever postcopy-ram is enabled for the first
time, it will call postcopy_ram_supported_by_host(), so it follows that
any test that enables postcopy-ram must first check env->has_uffd.

>
> Thank you.
> ---
>   - Prasad

Reply via email to