Created attachment 1839834 [details] The SLIC table read on pure hardware and in a virtual machine in fedora 34 and fedora 35. Description of problem: The QEMU emulator incorrectly interprets the contents of the SLIC table. See attached image. Version-Release number of selected component (if applicable): Fedora 34 has: kernel-5.14.15-200.fc34.x86_64 qemu-system-x86-5.2.0-8.fc34.x86_64 Fedora 35 has: kernel-5.14.15-300.fc35.x86_64 qemu-system-x86-6.1.0-9.fc35.x86_64 How reproducible: Steps to Reproduce: 1. Install Fedora 34 2. Install virtualization group: dnf group install virtualization 4. Place SLIC binary image(slic.bin) into the direcrory /var/lib/libvirt/images 3. Create Virtual Machine with Virtual Machine Manager. 4. Modify xml description of virtual machine: ... <os> ... <acpi> <table type='slic'>/var/lib/libvirt/images/slic.bin</table> </acpi> </os> ... 5. Install Microsoft Windows 7 64-bit into Virtual machine. 6. Place sertificate into Windows 7. 7. Run with admin rights: slmgr.vbs /ilc <sertificate> slmgr.vbs /ipk <key> 8. Windows 7 will be activated ! 9. Save Virtual Machine Image and it's xml description anywere. 10. Install Fedora 35 11. Install virtualization group. 12. Place saved Virtual Machine Image and slic.bin into the directory /var/lib/libvirt/images/ 13. Register virtual machine: virsh -c qemu:///system define <xml_file> 15. Run virtual machine - Windows 7 will lose it activation.
I think this bug is better reported upstream. Since there's a difference between the two versions you might try: - Does it reproduce with upstream qemu - If yes, bisect between qemu 5.2 and 6.1 to see what change introduce the problem
Created attachment 1839839 [details] SLIC binary image
Created attachment 1839840 [details] Sertificate for Windows 7 activation
Created attachment 1839841 [details] Key for Windows 7 activation
Created attachment 1839842 [details] Executable for reading SLIC under Windows 7
I have created a problem report: https://gitlab.com/qemu-project/qemu/-/issues/707
A solution to the problem may have been found. I can't apply the patch to the qemu-6.1.0 source code on my own.
Created attachment 1850582 [details] Working patch The problem has been solved. Please distribute it with updates for Fedora 35.
Dmitry, when the patch is applied upstream, please reference the commit here and I'll backport it to fedora
Commit 748c030f: https://gitlab.com/qemu-project/qemu/-/commit/748c030f360a940fe0c9382c8ca1649096c3a80d
3 months have passed. Fedora 36 has been released, but the source code of the QEMU package (qemu-6.2.0-9.fc36.src.rpm) does not contain the developed patch. Is it difficult to apply the patch created by the developers of the QEMU package ? The current version of Fedora OS (Fedora 36) continues to contain the error described here !
This is run by volunteers, and qemu builds take a long time (many hours) and if they go wrong someone has to babysit them. You can become a volunteer yourself if you want and then you'll be able to add the patch: https://docs.fedoraproject.org/en-US/project/join/ Anyway I will add the patch soon.
Putting back to NEW state. Cherry picking only 748c030f360a940fe0c9382c8ca1649096c3a80d as outlined above appears like it may be causing test hangs. We believe these could be related to this patch because "bios-tables-test" does not run in the modified code. Looking at the patch, it seems some of the earlier patches are also required, but I don't know which ones.
I have confirmed with a local mock build that just cherry-picking the single patch causes bios-tables-test to silently hang.
I do not know how the tests are written, but the test is also a program that can be incorrectly written. If you do the following: 1. Make the changes that are specified in the patch ( https://gitlab.com/qemu-project/qemu/-/commit/748c030f360a940fe0c9382c8ca1649096c3a80d ) 2. Build QEMU from sources with the command: rpm-build -bb --without=check qemu.spec 3. Reinstall QEMU from *.rpm packages with the command: rpm --reinstall <all-installed-qemu-rpm's> Then the slic file will be interpreted correctly and Windows 7 will not lose activation. All changes were made to the current source codes (qemu-6.2.0-9.fc36.src.rpm), without the use of any other patches. It really works !!!
One needs to backport whole set if tests are run: 408ca92634 tests: acpi: test short OEM_ID/OEM_TABLE_ID values in test_oem_fields() 5adc3aba87 tests: acpi: update expected blobs 748c030f36 acpi: fix OEM ID/OEM Table ID padding d1e4a46541 tests: acpi: whitelist nvdimm's SSDT and FACP.slic expected blobs a849522f72 tests: acpi: manually pad OEM_ID/OEM_TABLE_ID for test_oem_fields() test if 'tests: acpi: update expected blobs' doesn't apply to your source tree, one needs to follow procedure to regenerate blobs as described at the beginning of tests/qtest/bios-tables-test.c
FEDORA-2022-6ae3d4f991 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-6ae3d4f991
FEDORA-2022-6ae3d4f991 has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-6ae3d4f991` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-6ae3d4f991 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-6ae3d4f991 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.