On 2018年01月25日 22:35, Jiri Denemark wrote:
On Fri, Jan 19, 2018 at 22:28:39 +0800, Feng, Shaohe wrote:
> On 2018年01月09日 18:40, Jiri Denemark wrote:
>> On Mon, Jan 08, 2018 at 19:06:43 +0800, Feng, Shaohe wrote:
>>> On 2018年01月05日 02:52, John Ferlan wrote:
>>>> On 12/17/2017 06:02 PM, Shaohe Feng wrote:
>>>>> We can start qemu with a "cpu,+la57" to set 57-bit vitrual
address
>>>>> space. So VM can be aware that it need to enable 5-level paging.
>>>>>
>>>>> Corresponding QEMU commits:
>>>>> al57 6c7c3c21f95dd9af8a0691c0dd29b07247984122
>>>>> ---
>>>>> src/cpu/cpu_map.xml | 3 +++
>>>>> 1 file changed, 3 insertions(+)
>>>>>
>>>> I think if you go through history of cpu_map.xml changes you'll find
>>>> when a new feature is added there are tests added as well - this would
>>>> thus seemingly need a test adjustment as well.
>>> Thanks John.
>>> Will add tests.
>> Adding such test usually means you go to tests/cputestdata/ directory
>> and run "./cpu-gather.sh | ./cpu-parse.sh" which will produce several
>> data files. Then you add a new test case in tests/cputest.c for this new
>> CPU and regenerate the files with expected results. If you do this
>> before adding the new feature, the patch which will then add it will
>> nicely show the new feature gets added into the expected results of the
>> new CPU test.
>>
>> Don't forget to install cpuid tool and make sure you have the latest
>> upstream qemu installed in the system.
>>
>> Jirka
> Hi Jirka,
>
> I went through the tests/cputestdata/ directory and found it’s for
> defining features for different CPU models.
>
> However, the la57 feature is not included in any current CPUs. So I
> think we can get waived for the tests changes?
Hmm, I expected you had access to such host for testing...
I have checked with the
KVM/qemu developer, the also have no such host.
They do their development on an simulator.
But I did set up the libvirt env, start a VM with la57 feature, and
check la57 argument in the qemu command line.
Anyway, ACK to the patch then with the following diff squashed in
(apparently you didn't run make check):
diff --git a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml
b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml
index 7ff998907d..6c2bbac190 100644
--- a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml
+++ b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml
@@ -43,6 +43,7 @@
<feature policy='require' name='clwb'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='ospke'/>
+ <feature policy='require' name='la57'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='mmxext'/>