Re: [PATCH v2 10/12] KVM: selftests / xen: map shared_info using HVA rather than GFN

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

 



On 18/09/2023 14:19, David Woodhouse wrote:
On Mon, 2023-09-18 at 11:21 +0000, Paul Durrant wrote:

-                               ret = pthread_create(&thread, NULL, &juggle_shinfo_state, (void *)vm);
+                               if (has_shinfo_hva)
+                                       ret = pthread_create(&thread, NULL,
+                                                            &juggle_shinfo_state_hva, (void *)vm);
+                               else
+                                       ret = pthread_create(&thread, NULL,
+                                                            &juggle_shinfo_state_gfn, (void *)vm);
                                 TEST_ASSERT(ret == 0, "pthread_create() failed: %s", strerror(ret));


This means you don't exercise the GFN-based path (which all current VMM
implementations use) on newer kernels. Could you have a single
juggle_shinfo_state() function as before, but make it repeatedly set
and clear the shinfo using *both* HVA and GFN (if the former is
available, of course).

The guidance is to use HVA if the feature is available; a VMM should not really be mixing and matching. That said, setting it either way should be equivalent.


While you're at it, it looks like the thread leaves the shinfo
*deactivated*, which might come as a surprise to anyone who adds tests
at the end near the existing TEST_DONE. Can we make it leave the shinfo
*active* instead?

Ok.

  Paul



[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