On 3/9/24 6:06 AM, Chang S. Bae wrote:
On 3/7/2024 10:37 AM, Muhammad Usama Anjum wrote:We are logging that data size/offset are invalid if either eax or ebx are
-static void check_cpuid_xtiledata(void)
+static int check_cpuid_xtiledata(void)
{
uint32_t eax, ebx, ecx, edx;
@@ -153,12 +160,16 @@ static void check_cpuid_xtiledata(void)
* eax: XTILEDATA state component size
* ebx: XTILEDATA state component offset in user buffer
*/
- if (!eax || !ebx)
- fatal_error("xstate cpuid: invalid tile data size/offset: %d/%d",
- eax, ebx);
+ if (!eax || !ebx) {
+ ksft_print_msg("xstate cpuid: invalid tile data size/offset:
%d/%d\n",
+ eax, ebx);
+ return -1;
+ }
xtiledata.size = eax;
xtiledata.xbuf_offset = ebx;
+
+ return 0;
}
I don't think it is okay to silently skip the test here. If the feature is
available, the tile data size and offset should not be zero.
invalid and then we are skipping. Not sure what you are asking me to change.