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

Re: [Minios-devel] [UNIKRAFT PATCH v3 5/8] plat: Add global struct to keep x86 CPU information



Hi Yuri,

On 1/2/19 3:19 PM, Yuri Volchkov wrote:
@@ -150,6 +153,10 @@ void _liblinuxuplat_entry(int argc, char *argv[])
        int ret;
        void *pret;
+#if defined __X86_64__
+       _init_cpufeatures();
+#endif
Would it make sense to add a stub-function _init_cpufeatures for arm?

That's a good question. I actually am not sure whether an equivalent of it (checking CPU features with CPUID and saving that information for later use) would make sense on Arm. How do you get your CPU's capabilities on Arm? I just checked quickly, and there's a "cpuid" instruction, but it seems to be much less intricate than the x86 one and, crucially, a privileged instruction, so wouldn't work for Linux userspace anyway. Or do you use the device tree?

How do you even get CPU feature information on Arm as a non-privileged user? After all, there are legitimate use cases for that, like figuring out which instruction sets or registers are available, so a user can choose at runtime which optimized version of code to run?

Bottom line: of course I could add a dummy function like that to make the boot process similar, but I'm trying to think of whether that's even the right way to do it on Arm...

Cheers,
Florian

--
Dr. Florian Schmidt
フローリアン・シュミット
Research Scientist,
Systems and Machine Learning Group
NEC Laboratories Europe
Kurfürsten-Anlage 36, D-69115 Heidelberg
Tel.     +49 (0)6221 4342-265
Fax:     +49 (0)6221 4342-155
e-mail:  florian.schmidt@xxxxxxxxx
============================================================
Registered at Amtsgericht Mannheim, Germany, HRB728558

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.