Re: [kvm-unit-tests PATCH] x86/memory: pass host clwb and clflushopt support information

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

 



On 20/12/2017 22:26, Eduardo Habkost wrote:
> On Tue, Dec 19, 2017 at 10:54:16AM +0800, Haozhong Zhang wrote:
>> Can I understand that testing these two cases with host/guest CPUID
>> mismatch (specially clwb and clflushopt flags) is invalid? If yes,
>> please ignore this patch.
> 
> I wouldn't say it's invalid to test what happens when the host
> and guest CPUID don't match.  The question is: is it useful to do
> so?  Are we testing different code paths when we do that?
> 
> The inability to trigger #UD if the host CPUID includes the flag
> sounds like a bug/limitation we would like to get rid of as soon
> as hardware allow us to, and not a feature we need to test for.
> 
> What's the right way to ensure memory.flat is always tested using
> "-cpu host"?

We should just add it to x86/unittests.cfg, which lets you specify the
desired QEMU arguments.  Otherwise, it's not run at all as part of my
integration tests:

diff --git a/x86/unittests.cfg b/x86/unittests.cfg
index c6a383b..22c62d5 100644
--- a/x86/unittests.cfg
+++ b/x86/unittests.cfg
@@ -142,6 +142,11 @@ arch = x86_64
 #[init]
 #file = init.flat

+[memory]
+file = memory.flat
+extra_params = -cpu host
+arch = x86_64
+
 [msr]
 file = msr.flat

Thanks,

Paolo



[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