From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by mx.groups.io with SMTP id smtpd.web12.4961.1632560257460722705 for ; Sat, 25 Sep 2021 01:57:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GU8AKNlv; spf=pass (domain: gmail.com, ip: 209.85.167.52, mailfrom: crudo.daniele@gmail.com) Received: by mail-lf1-f52.google.com with SMTP id y28so50523563lfb.0 for ; Sat, 25 Sep 2021 01:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=NPkpuFklbhBtLW+Tp+KTcJ8hZOEmh2DC5mlFMAQsKSw=; b=GU8AKNlvFg9Ou9/UeGltiUBA1Ptahyb82WcEF5m5BRIh8LVCX3ars3+YWYasDXyXn6 DQV1RckvR9M3wCULgntK0w3tQOaxDD91LdEqdUPbzzUGywl4/vYdlTXr3T0SPRUd5HUB vobTDtsyN84QsCRUH20HSMGW5Tr2SsfaxykTdta2eFnOwAZwklBWLgrGRpUSlb6gZbWj 74heYBHNIQ6nvsc8V3nRio/rkXkZLkgX1fEVWGPgv55iPrDmHPT3Mo7ZPiFVjbntSrA3 9Ya+wnxQRlmBizkViGuMwi8RNGWSYGtHld89a8ajbBGQE14tAARR6HVRFFvZQ5v6XGr3 WfIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=NPkpuFklbhBtLW+Tp+KTcJ8hZOEmh2DC5mlFMAQsKSw=; b=kjznKtKBxkhwVLq+Es5o/tiULZ5Z4KxbFRzgkqTQNvMu/wKR+ozinWVcQNI0OOhW5g iuaS94HNq5akkhwz2SHrLBAUkspXGLmoyhmBSgjqdeqYjyFEdvjI1cIOpGvus966ofAz l3dQc7LZqfZgYHNz9t+CrEmKMJwh4F9Q31c3b2/s5yfUIS1gB9aNqq4hSAQ2hqUzsD/4 769rHa7b54wOgTfwSviQBFWg8zFYbOCeBjQq7/t44nJaSQxCWnsevCdSbbqWVT3bM+Yk svyAmOArs5fTXMw+Z1Rd8ekhQKy2R14QYZOw4u/Ox8xH/1eIQVwGD9msddePVRzc+nAC Sc4w== X-Gm-Message-State: AOAM5336n76iLaOme621qKYtelCkmtOnooHpXDeJOB3Q9kK8I7MK5674 itzEc0lXnXZGzrZ2yJUUU7mWQtYGLjqzVSwnkVME91mxcS8= X-Google-Smtp-Source: ABdhPJxo7awciv8PfmWMxsSk5znAfBj3Z6a1+Smvdp03YYge9VZ7F81dRkJH/7VhTNG4Rxle5y90EF5Re4xwCEZdypo= X-Received: by 2002:a05:6512:3e1e:: with SMTP id i30mr13562057lfv.639.1632560255371; Sat, 25 Sep 2021 01:57:35 -0700 (PDT) MIME-Version: 1.0 From: "Daniele Crudo" Date: Sat, 25 Sep 2021 10:57:24 +0200 Message-ID: Subject: OVMF_CODE/VARS unable to reboot a mac os vm during installation (only first stage) To: edk2-devel-groups-io Content-Type: multipart/alternative; boundary="000000000000188e7605ccce0e33" --000000000000188e7605ccce0e33 Content-Type: text/plain; charset="UTF-8" Hi, forwarding this also to the mailing list: https://bugzilla.tianocore.org/show_bug.cgi?id=3640 ----> Hello, it's been about a year I'm experiencing a strange issue, not a stopper, so I started only recently to investigate. I found that it's OVMF. System: x86_64 manjaro 21.1.3 (only cli), qemu 6.1.0, libvirt 7.7.0 Issue: after an ota delta update from within the virtual machine (mac os big sur and monterey were tested), from system preferences, or after the installation from a mac os installer disc, the virtual machine doesn't automatically reboot, ONLY after the first stage. Installation and updates in mac os have several stages, unfortunately I don't know in details what's going on during each stage. This is what happens (OTA delta update in the guest): system preferences (in the vm) --> software updates: start to download the ota delta update, download finishes, mac os prepares installation, then asks to reboot. Mac os seems to start the reboot, signal to gpu (passed through) is lost, but it never starts again: virsh is reporting that the virtual machine is running. After 30+ minutes I need to force the shutdown of the virtual machine (virsh reboot/virsh shutdown have no effect, only virsh destroy is able to force the shutdown) and manually start the vm again. After this force shutdown/manual start, the installation completes without issues, mac os is rebooted automatically and automatically completes all the other installation stages. After an installation from a mac os installer disc (empty virtual hd, or empty passed through sata controller+ssd): Installation starts with a gui, after some minutes (less than 10 min) it reboots. then after some time (about 20 minutes) it tries to restart. Mac os seems to start the reboot, signal to gpu (passed through) is lost, but it never starts again: virsh is reporting that the virtual machine is running. After 30+ minutes I need to force the shutdown of the virtual machine (virsh reboot nor virsh shutdown have no effect, only virsh destroy is able to force the shutdown) and manually start again. After this force shutdown/manual start, the installation completes without issues, mac os is reboot automatically and automatically completes all the other stages. Side note: reboot/shutdown work without issue in other cases, it's only after the first stage of a mac os installation. Note that I tested also a very basic mac os vm, without any passthrough. What I did: tested different versions of qemu, from 5.1.0 to 6.1.0. tested different versions of libvirt, from 6.5.0 to 7.7.0. tested different versions of OVMF. OVMF is the culprit. I tested only release versions, compiled by me in kali linux, GCC5. After compilation I use OVMF_CODE.fd and OVMF_VARS.fd for my virtual machine: OVMF version 202011 (stable): it works, reboots mac os after first stage, no issue. OVMF version 202102 (stable): it doesn't work as expected, doesn't reboot mac os after first stage, as explained. OVMF version 202105 (stable): it doesn't work as expected, doesn't reboot mac os after first stage, as explained. OVMF version 202108 (stable): it doesn't work as expected, doesn't reboot mac os after first stage, as explained. The latest working OVMF version is 202011 stable, it seems something broke it between 202011 and 202102 stable. Strange thing, as I said, is that it doesn't reboot only after this first installation stage (it's not random, it's always), everything seems normal when the vm is rebooted from the installed os. I don't know if it matters, but last lines in the vm bootloader, before the forced shutdown after the first installation stage, complain about system being shutdown and applesmc (which is emulated). I'm available to perform more tests if guided, please take into account that 1 test lasts about 45-50 minutes, because every time I need to install the os from scratch to reach the end of the 1st stage of installation. Thank you for your attention. --000000000000188e7605ccce0e33 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, forwa=
rding this also to the mailing list:
https://bugzilla.tianocore.org/show_bug.cgi?id=3D3640
---->
Hello,
it's been about a year I'm experiencing a strange issue, not a stop=
per, so I started only recently to investigate.
I found that it's OVMF.

System: x86_64 manjaro 21.1.3 (only cli), qemu 6.1.0, libvirt 7.7.0

Issue:

after an ota delta update from within the virtual machine (mac os big sur a=
nd monterey were tested), from system preferences, or after the installatio=
n from a mac os installer disc, the virtual machine doesn't automatical=
ly reboot, ONLY after the first stage.
Installation and updates in mac os have several stages, unfortunately I don=
't know in details what's going on during each stage.

This is what happens (OTA delta update in the guest):

system preferences (in the vm) --> software updates: start to download t=
he ota delta update,
download finishes, mac os prepares installation, then asks to reboot.
Mac os seems to start the reboot, signal to gpu (passed through) is lost, b=
ut it never starts again: virsh is reporting that the virtual machine is ru=
nning.
After 30+ minutes I need to force the shutdown of the virtual machine (virs=
h reboot/virsh shutdown have no effect, only virsh destroy is able to force=
 the shutdown) and manually start the vm again.
After this force shutdown/manual start, the installation completes without =
issues, mac os is rebooted automatically and automatically completes all th=
e other installation stages.

After an installation from a mac os installer disc (empty virtual hd, or em=
pty passed through sata controller+ssd):

Installation starts with a gui, after some minutes (less than 10 min) it re=
boots. then after some time (about 20 minutes) it tries to restart.
Mac os seems to start the reboot, signal to gpu (passed through) is lost, b=
ut it never starts again: virsh is reporting that the virtual machine is ru=
nning.
After 30+ minutes I need to force the shutdown of the virtual machine (virs=
h reboot nor virsh shutdown have no effect, only virsh destroy is able to f=
orce the shutdown) and manually start again.
After this force shutdown/manual start, the installation completes without =
issues, mac os is reboot automatically and automatically completes all the =
other stages.

Side note:
reboot/shutdown work without issue in other cases, it's only after the =
first stage of a mac os installation.
Note that I tested also a very basic mac os vm, without any passthrough.

What I did:
tested different versions of qemu, from 5.1.0 to 6.1.0.
tested different versions of libvirt, from 6.5.0 to 7.7.0.
tested different versions of OVMF.

OVMF is the culprit.
I tested only release versions, compiled by me in kali linux, GCC5.
After compilation I use OVMF_CODE.fd and OVMF_VARS.fd for my virtual machin=
e:

OVMF version 202011 (stable): it works, reboots mac os after first stage, n=
o issue.
OVMF version 202102 (stable): it doesn't work as expected, doesn't =
reboot mac os after first stage, as explained.
OVMF version 202105 (stable): it doesn't work as expected, doesn't =
reboot mac os after first stage, as explained.
OVMF version 202108 (stable): it doesn't work as expected, doesn't =
reboot mac os after first stage, as explained.

The latest working OVMF version is 202011 stable, it seems something broke =
it between 202011 and 202102 stable.
Strange thing, as I said, is that it doesn't reboot only after this fir=
st installation stage (it's not random, it's always), everything se=
ems normal when the vm is rebooted from the installed os.
I don't know if it matters, but last lines in the vm bootloader, before=
 the forced shutdown after the first installation stage, complain about sys=
tem being shutdown and applesmc (which is emulated).

I'm available to perform more tests if guided, please take into account=
 that 1 test lasts about 45-50 minutes, because every time I need to instal=
l the os from scratch to reach the end of the 1st stage of installation.

Thank you for your attention.
--000000000000188e7605ccce0e33--