All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests
@ 2020-07-05 11:36 Simon John
  2020-07-11 10:52 ` [Bug 1886318] " Simon John
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: Simon John @ 2020-07-05 11:36 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

The Debian Sid 5.0-6 qemu-kvm package can no longer get further than the
Clover bootloader whereas 5.0-6 and earlier worked fine.

So I built qemu master from github and it has the same problem, whereas
git tag v5.0.0 (or 4.2.1) does not, so something between v5.0.0 release
and the last few days has caused the problem.

Here's my qemu script, pretty standard macOS-Simple-KVM setup on a Xeon
host:

qemu-system-x86_64 \
    -enable-kvm \
    -m 4G \
    -machine q35,accel=kvm \
    -smp 4,sockets=1,cores=2,threads=2 \
    -cpu 
Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
\
    -device 
isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
\
    -smbios type=2 \
    -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
    -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
    -vga qxl \
    -device ich9-ahci,id=sata \
    -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
    -device ide-hd,bus=sata.2,drive=ESP \
    -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
    -device ide-hd,bus=sata.3,drive=InstallMedia \
    -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
    -device ide-hd,bus=sata.4,drive=SystemDisk \
    -usb -device usb-kbd -device usb-mouse

Perhaps something has changed in Penryn support recently, as that's
required for macos?

See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the host
when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work fine -
as does 5.5 kernel.

See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

** Affects: qemu
     Importance: Undecided
         Status: New

** Also affects: debian
   Importance: Undecided
       Status: New

** No longer affects: debian

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
@ 2020-07-11 10:52 ` Simon John
  2020-07-11 11:07 ` Simon John
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Simon John @ 2020-07-11 10:52 UTC (permalink / raw)
  To: qemu-devel

Is this not the place to report qemu bugs?

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
  2020-07-11 10:52 ` [Bug 1886318] " Simon John
@ 2020-07-11 11:07 ` Simon John
  2020-07-11 11:36 ` Mark Cave-Ayland
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Simon John @ 2020-07-11 11:07 UTC (permalink / raw)
  To: qemu-devel

qemu console screenshot, this is as far as it gets after clover:
https://i.imgur.com/HWY96Kq.png

same result with or without usb/pci passthrough, qxl/vnc, git master
HEAD or debian 5.0-6

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
  2020-07-11 10:52 ` [Bug 1886318] " Simon John
  2020-07-11 11:07 ` Simon John
@ 2020-07-11 11:36 ` Mark Cave-Ayland
  2020-07-11 21:34 ` Simon John
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Mark Cave-Ayland @ 2020-07-11 11:36 UTC (permalink / raw)
  To: qemu-devel

Indeed it is, but bear in mind it was QEMU 5.1 release feature freeze
this week so most developers are busy rebasing and fixing up bugs from
the resulting merge.

Given that you have already built QEMU from source, what would help
enormously is if you can do a "git bisect" between the v5.0.0 tag
(working) and your current master (not working) and provide the output
of "git bisect log" in this bug report. By identifying the individual
commit that broke your test case, it is much easier for developers to
understand the issue and propose a fix.


ATB,

Mark.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (2 preceding siblings ...)
  2020-07-11 11:36 ` Mark Cave-Ayland
@ 2020-07-11 21:34 ` Simon John
  2020-07-11 21:52 ` Simon John
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Simon John @ 2020-07-11 21:34 UTC (permalink / raw)
  To: qemu-devel

Thanks Mark, what an interesting exercise that was - and sorry, didn't
know 5.1 was due.

So the git bisect revealed this:

$ git bisect good
5d971f9e672507210e77d020d89e0e89165c8fc9 is the first bad commit
commit 5d971f9e672507210e77d020d89e0e89165c8fc9
Author: Michael S. Tsirkin <mst@redhat.com>
Date:   Wed Jun 10 09:47:49 2020 -0400

    memory: Revert "memory: accept mismatching sizes in memory_region_access_valid"
    
    Memory API documentation documents valid .min_access_size and .max_access_size
    fields and explains that any access outside these boundaries is blocked.
    
    This is what devices seem to assume.
    
    However this is not what the implementation does: it simply
    ignores the boundaries unless there's an "accepts" callback.
    
    Naturally, this breaks a bunch of devices.
    
    Revert to the documented behaviour.
    
    Devices that want to allow any access can just drop the valid field,
    or add the impl field to have accesses converted to appropriate
    length.
    
    Cc: qemu-stable@nongnu.org
    Reviewed-by: Richard Henderson <rth@twiddle.net>
    Fixes: CVE-2020-13754
    Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1842363
    Fixes: a014ed07bd5a ("memory: accept mismatching sizes in memory_region_access_valid")
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Message-Id: <20200610134731.1514409-1-mst@redhat.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

 memory.c | 29 +++++++++--------------------
 1 file changed, 9 insertions(+), 20 deletions(-)


** Bug watch added: Red Hat Bugzilla #1842363
   https://bugzilla.redhat.com/show_bug.cgi?id=1842363

** CVE added: https://cve.mitre.org/cgi-bin/cvename.cgi?name=2020-13754

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (3 preceding siblings ...)
  2020-07-11 21:34 ` Simon John
@ 2020-07-11 21:52 ` Simon John
  2020-07-11 22:16 ` Michael Tokarev
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Simon John @ 2020-07-11 21:52 UTC (permalink / raw)
  To: qemu-devel

Woohoo! Simply reverting that one commit
5d971f9e672507210e77d020d89e0e89165c8fc9 from today's master gets me
running again.

Not sure where that leaves us though....?

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (4 preceding siblings ...)
  2020-07-11 21:52 ` Simon John
@ 2020-07-11 22:16 ` Michael Tokarev
  2020-07-11 22:45 ` Simon John
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Michael Tokarev @ 2020-07-11 22:16 UTC (permalink / raw)
  To: qemu-devel

that's an interesting observation. Thank you for finding this one. It'd
be much faster to find one of about 10 debian patches which affects this
but full qemu bisect works too, ofcourse.

Simon, I can't reach you by email, your mailserver apparently
malfunctioning, - I sent you instructions about how and what to do, but
all my emails returned back - connections to your mailserver times out
from a few of networks I have access to.

This commit breaking macos guest is interesting, perhaps we should try
to fix that for 5.1.. :)

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (5 preceding siblings ...)
  2020-07-11 22:16 ` Michael Tokarev
@ 2020-07-11 22:45 ` Simon John
  2020-07-11 22:57 ` Simon John
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Simon John @ 2020-07-11 22:45 UTC (permalink / raw)
  To: qemu-devel

the debian patch is:

revert-memory-accept-mismatching-sizes-in-memory_region_access_valid-
CVE-2020-13754.patch

i'm currently building a deb package without it.

mailserver has a geoip block and doesn't use ipv6, synapticconsulting at
gmail dot com should work.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (6 preceding siblings ...)
  2020-07-11 22:45 ` Simon John
@ 2020-07-11 22:57 ` Simon John
  2020-07-11 23:25 ` Mark Cave-Ayland
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Simon John @ 2020-07-11 22:57 UTC (permalink / raw)
  To: qemu-devel

yup, building debian 5.0-6 package minus that single patch gives me
working macos catalina again.

now just got to figure out why any kernel newer than 5.5 crashes the
host when using pci passthrough - i don't fancy bisecting a whole
kernel!

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (7 preceding siblings ...)
  2020-07-11 22:57 ` Simon John
@ 2020-07-11 23:25 ` Mark Cave-Ayland
  2020-07-11 23:36 ` Simon John
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Mark Cave-Ayland @ 2020-07-11 23:25 UTC (permalink / raw)
  To: qemu-devel

Thanks for the bisection, that's really helpful - that particular patch
fixes the way in which memory region access sizes are treated as valid.
The obvious device to look at here is isa-apple-smc since I suspect that
has less CI coverage.

Looking at the access sizes of all 3 MemoryRegions within
hw/misc/applesmc.c I think these would now reject all non-byte accesses
- does the following patch help at all?


diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c
index 1c4addb201..7ca89e5e86 100644
--- a/hw/misc/applesmc.c
+++ b/hw/misc/applesmc.c
@@ -288,7 +288,7 @@ static const MemoryRegionOps applesmc_data_io_ops = {
     .endianness = DEVICE_NATIVE_ENDIAN,
     .impl = {
         .min_access_size = 1,
-        .max_access_size = 1,
+        .max_access_size = 4,
     },
 };
 
@@ -298,7 +298,7 @@ static const MemoryRegionOps applesmc_cmd_io_ops = {
     .endianness = DEVICE_NATIVE_ENDIAN,
     .impl = {
         .min_access_size = 1,
-        .max_access_size = 1,
+        .max_access_size = 4,
     },
 };
 
@@ -308,7 +308,7 @@ static const MemoryRegionOps applesmc_err_io_ops = {
     .endianness = DEVICE_NATIVE_ENDIAN,
     .impl = {
         .min_access_size = 1,
-        .max_access_size = 1,
+        .max_access_size = 4,
     },
 };
 

ATB,

Mark.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (8 preceding siblings ...)
  2020-07-11 23:25 ` Mark Cave-Ayland
@ 2020-07-11 23:36 ` Simon John
  2020-07-12  8:34 ` Mark Cave-Ayland
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Simon John @ 2020-07-11 23:36 UTC (permalink / raw)
  To: qemu-devel

Hi Mark, no that doesn't work sorry, same error.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (9 preceding siblings ...)
  2020-07-11 23:36 ` Simon John
@ 2020-07-12  8:34 ` Mark Cave-Ayland
  2020-07-12  8:53 ` Simon John
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Mark Cave-Ayland @ 2020-07-12  8:34 UTC (permalink / raw)
  To: qemu-devel

No worries - I didn't spot that those memory regions were implemented as
single-byte registers which means the access size won't matter anyway.

I had a quick look at your command line again and the only other obvious
thing I spotted was that a 64-bit access to the q35 "blackhole" region
might also be affected by this change in logic. Does the diff below help
at all?


diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index b67cb9c29f..e703979488 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -281,8 +281,6 @@ static const MemoryRegionOps blackhole_ops = {
     .read = blackhole_read,
     .write = blackhole_write,
     .endianness = DEVICE_NATIVE_ENDIAN,
-    .valid.min_access_size = 1,
-    .valid.max_access_size = 4,
     .impl.min_access_size = 4,
     .impl.max_access_size = 4,
     .endianness = DEVICE_LITTLE_ENDIAN,


ATB,

Mark.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (10 preceding siblings ...)
  2020-07-12  8:34 ` Mark Cave-Ayland
@ 2020-07-12  8:53 ` Simon John
  2020-07-12  9:48 ` Mark Cave-Ayland
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Simon John @ 2020-07-12  8:53 UTC (permalink / raw)
  To: qemu-devel

No that doesn't make any difference either, nor does combining the two
patches :-(

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (11 preceding siblings ...)
  2020-07-12  8:53 ` Simon John
@ 2020-07-12  9:48 ` Mark Cave-Ayland
  2020-07-12 10:32 ` Simon John
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Mark Cave-Ayland @ 2020-07-12  9:48 UTC (permalink / raw)
  To: qemu-devel

In that case please disregard those patches. Can you try this diff below
which will log any invalid accesses and see if anything appears on
stderr?


diff --git a/memory.c b/memory.c
index 9200b20130..5d1a6d4477 100644
--- a/memory.c
+++ b/memory.c
@@ -1354,10 +1354,12 @@ bool memory_region_access_valid(MemoryRegion *mr,
 {
     if (mr->ops->valid.accepts
         && !mr->ops->valid.accepts(mr->opaque, addr, size, is_write, attrs)) {
+        fprintf(stderr, "invalid accepts: %s  addr %"PRIx64 " size: %d\n", mr->name, addr, size);
         return false;
     }
 
     if (!mr->ops->valid.unaligned && (addr & (size - 1))) {
+        fprintf(stderr, "invalid aligned: %s  addr %"PRIx64 " size: %d\n", mr->name, addr, size);
         return false;
     }
 
@@ -1368,6 +1370,7 @@ bool memory_region_access_valid(MemoryRegion *mr,
 
     if (size > mr->ops->valid.max_access_size
         || size < mr->ops->valid.min_access_size) {
+        fprintf(stderr, "invalid size: %s  addr %"PRIx64 " size: %d\n", mr->name, addr, size);
         return false;
     }
     return true;


ATB,

Mark.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (12 preceding siblings ...)
  2020-07-12  9:48 ` Mark Cave-Ayland
@ 2020-07-12 10:32 ` Simon John
  2020-07-12 10:38 ` Simon John
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Simon John @ 2020-07-12 10:32 UTC (permalink / raw)
  To: qemu-devel

i get this over and over (and only this):

invalid size: acpi-tmr addr 0 size: 2

which seems to reside in hw/acpi/core.c

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (13 preceding siblings ...)
  2020-07-12 10:32 ` Simon John
@ 2020-07-12 10:38 ` Simon John
  2020-07-12 10:39 ` Simon John
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Simon John @ 2020-07-12 10:38 UTC (permalink / raw)
  To: qemu-devel

on a hunch, i applied this, and now macos boots (as 2 from acpi-tmr fits
in the 1-4 range):

diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index f6d9ec4f13..05ff29b9d7 100644
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -527,7 +527,7 @@ static void acpi_pm_tmr_write(void *opaque, hwaddr addr, uint64_t val,
 static const MemoryRegionOps acpi_pm_tmr_ops = {
     .read = acpi_pm_tmr_read,
     .write = acpi_pm_tmr_write,
-    .valid.min_access_size = 4,
+    .valid.min_access_size = 1,
     .valid.max_access_size = 4,
     .endianness = DEVICE_LITTLE_ENDIAN,
 };

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (14 preceding siblings ...)
  2020-07-12 10:38 ` Simon John
@ 2020-07-12 10:39 ` Simon John
  2020-07-12 11:05 ` Mark Cave-Ayland
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Simon John @ 2020-07-12 10:39 UTC (permalink / raw)
  To: qemu-devel

all i get on stderr with my patch is:

invalid accepts: (null)  addr fe03601c size: 4

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (15 preceding siblings ...)
  2020-07-12 10:39 ` Simon John
@ 2020-07-12 11:05 ` Mark Cave-Ayland
  2020-07-12 12:02 ` Simon John
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Mark Cave-Ayland @ 2020-07-12 11:05 UTC (permalink / raw)
  To: qemu-devel

Great work Simon! I'm not an ACPI expert but that certainly seems a
plausible solution - I'll have to defer the final review to someone else
though.

The quickest way to get this reviewed is to follow the procedure at
https://wiki.qemu.org/Contribute/SubmitAPatch which is basically send a
"git format-patch" email to the qemu-devel mailing list. Adding as CC
the appropriate maintainers shown by running
"./scripts/get_maintainer.pl /path/to/my.patch" as indicated in Section
2.1 "CC the relevant maintainer" will help ensure it gets the attention
of the right people.


ATB,

Mark.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (16 preceding siblings ...)
  2020-07-12 11:05 ` Mark Cave-Ayland
@ 2020-07-12 12:02 ` Simon John
  2020-07-12 12:17 ` Michael Tokarev
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Simon John @ 2020-07-12 12:02 UTC (permalink / raw)
  To: qemu-devel

urgh, that was complicated, think i got it right!

need to look for "[PATCH] Allow acpi-tmr size=2" to show up in qemu-
devel

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (17 preceding siblings ...)
  2020-07-12 12:02 ` Simon John
@ 2020-07-12 12:17 ` Michael Tokarev
  2020-07-14 12:16 ` Mark Cave-Ayland
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Michael Tokarev @ 2020-07-12 12:17 UTC (permalink / raw)
  To: qemu-devel

I think we should add debugging patch by Mark to qemu too, — I suspect
there will be more cases like this, since this check were turned off for
a few years.  Maybe not as printf's but as logging, I dunno, but the
info it collects is really a must-have.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (18 preceding siblings ...)
  2020-07-12 12:17 ` Michael Tokarev
@ 2020-07-14 12:16 ` Mark Cave-Ayland
  2020-07-14 12:39 ` Simon John
  2020-08-20 14:45 ` Thomas Huth
  21 siblings, 0 replies; 23+ messages in thread
From: Mark Cave-Ayland @ 2020-07-14 12:16 UTC (permalink / raw)
  To: qemu-devel

Hi Simon,

Just in case you're not getting emails to the git@ email address on the
patch, there has been more follow up and discussion on the qemu-devel@
list:

https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg04006.html
https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg04621.html
https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg04637.html


ATB,

Mark.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (19 preceding siblings ...)
  2020-07-14 12:16 ` Mark Cave-Ayland
@ 2020-07-14 12:39 ` Simon John
  2020-08-20 14:45 ` Thomas Huth
  21 siblings, 0 replies; 23+ messages in thread
From: Simon John @ 2020-07-14 12:39 UTC (permalink / raw)
  To: qemu-devel

Hi Mark,

Yes I am getting the emails from qemu-devel thanks (seems pretty slow
though - the website is faster) I replied to a couple but its over my
head mostly now!

I didn't notice Michael had done a v2 patch for 5.1, that's fine with
me.

I wonder if we can get the debian 5.0 package updated with a patch, or
if we have to wait for 5.1 to be packaged with the fix already included
from upstream?

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  New

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests
  2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
                   ` (20 preceding siblings ...)
  2020-07-14 12:39 ` Simon John
@ 2020-08-20 14:45 ` Thomas Huth
  21 siblings, 0 replies; 23+ messages in thread
From: Thomas Huth @ 2020-08-20 14:45 UTC (permalink / raw)
  To: qemu-devel

Patch has been included here:
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=dba04c3488c4699f5

** Changed in: qemu
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1886318

Title:
  Qemu after v5.0.0 breaks macos guests

Status in QEMU:
  Fix Released

Bug description:
  The Debian Sid 5.0-6 qemu-kvm package can no longer get further than
  the Clover bootloader whereas 5.0-6 and earlier worked fine.

  So I built qemu master from github and it has the same problem,
  whereas git tag v5.0.0 (or 4.2.1) does not, so something between
  v5.0.0 release and the last few days has caused the problem.

  Here's my qemu script, pretty standard macOS-Simple-KVM setup on a
  Xeon host:

  qemu-system-x86_64 \
      -enable-kvm \
      -m 4G \
      -machine q35,accel=kvm \
      -smp 4,sockets=1,cores=2,threads=2 \
      -cpu 
  Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc 
  \
      -device 
  isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" 
  \
      -smbios type=2 \
      -drive if=pflash,format=raw,readonly,file="/tmp/OVMF_CODE.fd" \
      -drive if=pflash,format=raw,file="/tmp/macos_catalina_VARS.fd" \
      -vga qxl \
      -device ich9-ahci,id=sata \
      -drive id=ESP,if=none,format=raw,file=/tmp/ESP.img \
      -device ide-hd,bus=sata.2,drive=ESP \
      -drive id=InstallMedia,format=raw,if=none,file=/tmp/BaseSystem.img \
      -device ide-hd,bus=sata.3,drive=InstallMedia \
      -drive id=SystemDisk,if=none,format=raw,file=/tmp/macos_catalina.img \
      -device ide-hd,bus=sata.4,drive=SystemDisk \
      -usb -device usb-kbd -device usb-mouse

  Perhaps something has changed in Penryn support recently, as that's
  required for macos?

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247

  Also on a related note, kernel 5.6/5.7 (on Debian) hard crashes the
  host when I try GPU passthrough on macos, whereas Ubuntu20/Win10 work
  fine - as does 5.5 kernel.

  See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961676

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1886318/+subscriptions


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2020-08-20 14:52 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-05 11:36 [Bug 1886318] [NEW] Qemu after v5.0.0 breaks macos guests Simon John
2020-07-11 10:52 ` [Bug 1886318] " Simon John
2020-07-11 11:07 ` Simon John
2020-07-11 11:36 ` Mark Cave-Ayland
2020-07-11 21:34 ` Simon John
2020-07-11 21:52 ` Simon John
2020-07-11 22:16 ` Michael Tokarev
2020-07-11 22:45 ` Simon John
2020-07-11 22:57 ` Simon John
2020-07-11 23:25 ` Mark Cave-Ayland
2020-07-11 23:36 ` Simon John
2020-07-12  8:34 ` Mark Cave-Ayland
2020-07-12  8:53 ` Simon John
2020-07-12  9:48 ` Mark Cave-Ayland
2020-07-12 10:32 ` Simon John
2020-07-12 10:38 ` Simon John
2020-07-12 10:39 ` Simon John
2020-07-12 11:05 ` Mark Cave-Ayland
2020-07-12 12:02 ` Simon John
2020-07-12 12:17 ` Michael Tokarev
2020-07-14 12:16 ` Mark Cave-Ayland
2020-07-14 12:39 ` Simon John
2020-08-20 14:45 ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.