qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 712b42: target-i386: Don't left shift negativ


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 712b42: target-i386: Don't left shift negative constant
Date: Wed, 28 Oct 2015 09:00:06 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 712b4243c761cb6ab6a4367a160fd2a42e2d4b76
      
https://github.com/qemu/qemu/commit/712b4243c761cb6ab6a4367a160fd2a42e2d4b76
  Author: Eduardo Habkost <address@hidden>
  Date:   2015-10-27 (Tue, 27 Oct 2015)

  Changed paths:
    M target-i386/translate.c

  Log Message:
  -----------
  target-i386: Don't left shift negative constant

Left shift of negative values is undefined behavior. Detected by clang:
  qemu/target-i386/translate.c:2423:26: runtime error:
    left shift of negative value -8

This changes the code to reverse the sign after the left shift.

Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 15e41345906d29a319cc9cdf566347bf79134d24
      
https://github.com/qemu/qemu/commit/15e41345906d29a319cc9cdf566347bf79134d24
  Author: Eduardo Habkost <address@hidden>
  Date:   2015-10-27 (Tue, 27 Oct 2015)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Enable "check" mode by default

Current default behavior of QEMU is to silently disable features that
are not supported by the host when a CPU model is requested in the
command-line. This means that in addition to risking breaking guest ABI
by default, we are silent about it.

I would like to enable "enforce" by default, but this can easily break
existing production systems because of the way libvirt makes assumptions
about CPU models today (this will change in the future, once QEMU
provide a proper interface for checking if a CPU model is runnable).

But there's no reason we should be silent about it. So, change
target-i386 to enable "check" mode by default so at least we have some
warning printed to stderr (and hopefully logged somewhere) when QEMU
disables a feature that is not supported by the host system.

Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 496fedddce9a575111df4f912fb9e361037531ed
      
https://github.com/qemu/qemu/commit/496fedddce9a575111df4f912fb9e361037531ed
  Author: Peter Maydell <address@hidden>
  Date:   2015-10-28 (Wed, 28 Oct 2015)

  Changed paths:
    M target-i386/cpu.c
    M target-i386/translate.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into 
staging

target-i386: finally enable "check" mode by default

# gpg: Signature made Wed 28 Oct 2015 14:13:10 GMT using RSA key ID 984DC5A6
# gpg: Good signature from "Eduardo Habkost <address@hidden>"

* remotes/ehabkost/tags/x86-pull-request:
  target-i386: Enable "check" mode by default
  target-i386: Don't left shift negative constant

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/739680da59de...496fedddce9a

reply via email to

[Prev in Thread] Current Thread [Next in Thread]