On Mon, Aug 13, 2018 at 10:18:24AM +0000, Zhao, Yakui wrote:
-----Original Message-----
From: acrn-dev@... [mailto:acrn-dev@...]
On Behalf Of Eddie Dong
Sent: Monday, August 13, 2018 4:04 PM
To: acrn-dev@...; Xu, Anthony <anthony.xu@...>
Subject: Re: [acrn-dev] [PATCH v2 1/3] HV: Add the emulation of CPUID with
0x16 leaf
Hi Yakui,
ACRN doesn't emulate CPUID >=0x80000000U at all.
So for CPUID >=0x80000000U, ACRN just read from hardware in
guest_cpuid().
init_vcpuid_entry doesn't need to handle CPUID >=0x80000000U.
After Eddie's suggestion is followed to add the limit check(>=0x15
CPUID), the mentioned check is not needed any more.
I keep them so that the init_vcpuid_entry still can return the zero
entry for the out-of-range CPUID input.
If you think that the check is redundant, I can remove them.
The vcpuid base on these assumption:
(1) if we don't plan to support this feature, we could filter it.
(2) if the leaf greater than the limit (base or enternal), we should return the value in the limit leaf.
(3) If we plan to emulate some feature, like the cpu frequency, we could add an emulate entry for it.
So init_vcpuid_entry only needs to take care the leaf which needs to emulate/fliter/disable
some features. I don't think what you did about leaf over 0x80000000U lie in this scope.
Thanks.
If it is physical out of ranger, returning what hardware returns is better than
fixed-zero.
We want the code to be slim to save FuSa effort.
OK. I will remove them.
Thx Eddie