[PATCH v3 4/6] i386: Mask and report unavailable multi-bit feature values

2023-01-06 Thread Lei Wang
Some feature words, e.g., feature words in AMX-related CPUID leaf 0x1D and 0x1E are not bit-wise but multiple bits represents one value. Handle this situation when the values specified are not the same as which are reported by KVM. The handling includes: - The responsibility of masking bits and g

Re: [PATCH v3 4/6] i386: Mask and report unavailable multi-bit feature values

2023-02-05 Thread Yuan Yao
On Fri, Jan 06, 2023 at 12:38:24AM -0800, Lei Wang wrote: > Some feature words, e.g., feature words in AMX-related CPUID leaf 0x1D and > 0x1E are not bit-wise but multiple bits represents one value. Handle this > situation when the values specified are not the same as which are reported > by KVM. T

Re: [PATCH v3 4/6] i386: Mask and report unavailable multi-bit feature values

2023-02-08 Thread Wang, Lei
On 2/6/2023 3:43 PM, Yuan Yao wrote: > On Fri, Jan 06, 2023 at 12:38:24AM -0800, Lei Wang wrote: >> Some feature words, e.g., feature words in AMX-related CPUID leaf 0x1D and >> 0x1E are not bit-wise but multiple bits represents one value. Handle this >> situation when the values specified are not

Re: [PATCH v3 4/6] i386: Mask and report unavailable multi-bit feature values

2023-02-08 Thread Xiaoyao Li
On 2/9/2023 9:04 AM, Wang, Lei wrote: On 2/6/2023 3:43 PM, Yuan Yao wrote: On Fri, Jan 06, 2023 at 12:38:24AM -0800, Lei Wang wrote: Some feature words, e.g., feature words in AMX-related CPUID leaf 0x1D and 0x1E are not bit-wise but multiple bits represents one value. Handle this situation whe

Re: [PATCH v3 4/6] i386: Mask and report unavailable multi-bit feature values

2023-02-08 Thread Wang, Lei
On 2/9/2023 11:29 AM, Xiaoyao Li wrote: > On 2/9/2023 9:04 AM, Wang, Lei wrote: >> On 2/6/2023 3:43 PM, Yuan Yao wrote: >>> On Fri, Jan 06, 2023 at 12:38:24AM -0800, Lei Wang wrote: Some feature words, e.g., feature words in AMX-related CPUID leaf 0x1D and 0x1E are not bit-wise but multip

Re: [PATCH v3 4/6] i386: Mask and report unavailable multi-bit feature values

2023-02-08 Thread Xiaoyao Li
On 2/9/2023 12:21 PM, Wang, Lei wrote: diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 88aa780566..e638a31d34 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4377,6 +4377,28 @@ static bool x86_cpu_have_filtered_features(X86CPU *cpu)   return false;   } +static void mark

Re: [PATCH v3 4/6] i386: Mask and report unavailable multi-bit feature values

2023-02-08 Thread Wang, Lei
On 2/9/2023 1:59 PM, Xiaoyao Li wrote: > On 2/9/2023 12:21 PM, Wang, Lei wrote: >> diff --git a/target/i386/cpu.c b/target/i386/cpu.c >> index 88aa780566..e638a31d34 100644 >> --- a/target/i386/cpu.c >> +++ b/target/i386/cpu.c >> @@ -4377,6 +4377,28 @@ static bool x86_cpu_have_f

Re: [PATCH v3 4/6] i386: Mask and report unavailable multi-bit feature values

2023-02-09 Thread Xiaoyao Li
On 2/9/2023 2:15 PM, Wang, Lei wrote: On 2/9/2023 1:59 PM, Xiaoyao Li wrote: On 2/9/2023 12:21 PM, Wang, Lei wrote: diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 88aa780566..e638a31d34 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4377,6 +4377,28 @@ static bool x86_cpu_h