Hi Andrew, On 10/09/19 18:22, Andrew Fish wrote:
> I thought the thing we were discussing was compiler flags. > Specifically -mno-mmx -mno-sse. It seems to me if OVMF requires > -mno-mmx -mno-sse then it is a bug in the tools_def.txt definition > for those compilers? As far as I can tell -mno-implicit-float should > prevent the optimizer from using floating point. The -mno-mmx > -mno-sse flags most change how floating point code gets compiled [1]. > it looks like -mno-mmx -mno-sse just down grade floating point > instructions that get used. Thus it seems like either we have some > code doing float and that code should set -mno-mmx -mno-sse, or the > -mno-mmx -mno-sse should be set generically. The origin of those build flags in OVMF is commit 4a8266f570ef ("OvmfPkg: Work around issue seen with kvm + grub2 (efi)", 2010-12-31): OvmfPkg: Work around issue seen with kvm + grub2 (efi) When OVMF is run with kvm and grub2 (efi), an exception occurs when mmx/sse registers are accessed. As a work around, this change eliminates firmware usage of these register types. First, only the BaseMemoryLib implementation MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf is used. Second, the GCC compiler is passes the additional '-mno-mmx -mno-sse' parameters. The eternal problem with this kind of workaround is that we never know when it becomes safe to remove. It would be nice to understand the exact details around the problem. Given that the commit is from 2010, I assume the issue is difficult to reproduce with recent components (KVM, grub2). On the other hand, if we just remove the flags (which we should, in a perfect world), someone could report a bug in three months: "my host distro upgraded the OVMF package to the next edk2-stableYYYYMM tag, and now my virtual machine, which runs a distro from 2009, no longer boots". (We've seen similar reports before.) Thanks Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#48706): https://edk2.groups.io/g/devel/message/48706 Mute This Topic: https://groups.io/mt/34464936/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-