qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 73e1b8: target-i386: introduce kvm_put_one_ms


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 73e1b8: target-i386: introduce kvm_put_one_msr
Date: Fri, 23 Sep 2016 05:30:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 73e1b8f2f9b8a90361f9c1af306ee17bfcfd592d
      
https://github.com/qemu/qemu/commit/73e1b8f2f9b8a90361f9c1af306ee17bfcfd592d
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-09-22 (Thu, 22 Sep 2016)

  Changed paths:
    M target-i386/kvm.c

  Log Message:
  -----------
  target-i386: introduce kvm_put_one_msr

Avoid further code duplication in the next patch.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: f8d9ccf8d5f9f4b7d364100871c4c7303b546de5
      
https://github.com/qemu/qemu/commit/f8d9ccf8d5f9f4b7d364100871c4c7303b546de5
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2016-09-22 (Thu, 22 Sep 2016)

  Changed paths:
    M hw/i386/kvm/apic.c
    M target-i386/kvm.c
    M target-i386/kvm_i386.h

  Log Message:
  -----------
  kvm: apic: set APIC base as part of kvm_apic_put

The parsing of KVM_SET_LAPIC's input depends on the current value of the
APIC base MSR---which indeed is stored in APICCommonState---but for historical
reasons APIC base is set through KVM_SET_SREGS together with cr8 (which is
really just the APIC TPR) and the actual "special CPU registers".

APIC base must now be set before the actual LAPIC registers, so do that
in kvm_apic_put.  It will be set again to the same value with KVM_SET_SREGS,
but that's not a big issue.

This only happens since Linux 4.8, which checks for x2apic mode in
KVM_SET_LAPIC.  However it's really a QEMU bug; until the recent
commit 78d6a05 ("x86/lapic: Load LAPIC state at post_load", 2016-09-13)
QEMU was indeed setting APIC base (via KVM_SET_SREGS) before the other
LAPIC registers.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 95eaa78537c734fa3cb3373d47ba8c0099a36ff0
      
https://github.com/qemu/qemu/commit/95eaa78537c734fa3cb3373d47ba8c0099a36ff0
  Author: Eric Blake <address@hidden>
  Date:   2016-09-22 (Thu, 22 Sep 2016)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  iscsi: Fix divide-by-zero regression on raw SG devices

When qemu uses iscsi devices in sg mode, iscsilun->block_size
is left at 0.  Prior to commits cf081fca and similar, when
block limits were tracked in sectors, this did not matter:
various block limits were just left at 0.  But when we started
scaling by block size, this caused SIGFPE.

Then, in a later patch, commit a5b8dd2c added an assertion to
bdrv_open_common() that request_alignment is always non-zero;
which was not true for SG mode.  Rather than relax that assertion,
we can just provide a sane value (we don't know of any SG device
with a block size smaller than qemu's default sizing of 512 bytes).

One possible solution for SG mode is to just blindly skip ALL
of iscsi_refresh_limits(), since we already short circuit so
many other things in sg mode.  But this patch takes a slightly
more conservative approach, and merely guarantees that scaling
will succeed, while still using multiples of the original size
where possible.  Resulting limits may still be zero in SG mode
(that is, we mostly only fix block_size used as a denominator
or which affect assertions, not all uses).

Reported-by: Holger Schranz <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
CC: address@hidden

Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9e14037f05e99ca3b8a33d8be9a2a636bbf09326
      
https://github.com/qemu/qemu/commit/9e14037f05e99ca3b8a33d8be9a2a636bbf09326
  Author: Lin Ma <address@hidden>
  Date:   2016-09-22 (Thu, 22 Sep 2016)

  Changed paths:
    M backends/msmouse.c

  Log Message:
  -----------
  msmouse: Fix segfault caused by free the chr before chardev cleanup.

Segfault happens when leaving qemu with msmouse backend:

 #0  0x00007fa8526ac975 in raise () at /lib64/libc.so.6
 #1  0x00007fa8526add8a in abort () at /lib64/libc.so.6
 #2  0x0000558be78846ab in error_exit (err=16, msg=0x558be799da10 ...
 #3  0x0000558be7884717 in qemu_mutex_destroy (mutex=0x558be93be750) at ...
 #4  0x0000558be7549951 in qemu_chr_free_common (chr=0x558be93be750) at ...
 #5  0x0000558be754999c in qemu_chr_free (chr=0x558be93be750) at ...
 #6  0x0000558be7549a20 in qemu_chr_delete (chr=0x558be93be750) at ...
 #7  0x0000558be754a8ef in qemu_chr_cleanup () at qemu-char.c:4643
 #8  0x0000558be755843e in main (argc=5, argv=0x7ffe925d7118, ...

The chr was freed by msmouse close callback before chardev cleanup,
Then qemu_mutex_destroy triggered raise().

Because freeing chr is handled by qemu_chr_free_common, Remove the free from
msmouse_chr_close to avoid double free.

Fixes: c1111a24a3358ecd2f17be7c8b117cfe8bc5e5f8
Cc: address@hidden
Signed-off-by: Lin Ma <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 6867783a804b5b7eb34a2e6f0d43d0eaf88ad2de
      
https://github.com/qemu/qemu/commit/6867783a804b5b7eb34a2e6f0d43d0eaf88ad2de
  Author: Thomas Huth <address@hidden>
  Date:   2016-09-22 (Thu, 22 Sep 2016)

  Changed paths:
    A scripts/show-fixed-bugs.sh

  Log Message:
  -----------
  scripts: Add a script to check for bug URLs in the git log

Basic idea of this script is to check the git log for URLs
to the QEMU bugtracker at launchpad.net and to figure out
whether the related bug has been marked there as "Fix released"
(i.e. closed) already. So this script can e.g. be used after
each public release of QEMU to check whether there are any
bug tickets that could be moved from "Fix committed" (or another
state if the author of the patch forgot to update the bug ticket)
to "Fix released".

Signed-off-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 68c6efe07a4729b54947658df4fceed84f3d0fef
      
https://github.com/qemu/qemu/commit/68c6efe07a4729b54947658df4fceed84f3d0fef
  Author: Herongguang (Stephen) <address@hidden>
  Date:   2016-09-22 (Thu, 22 Sep 2016)

  Changed paths:
    M target-i386/kvm.c

  Log Message:
  -----------
  kvm: fix events.flags (KVM_VCPUEVENT_VALID_SMM) overwritten by 0

Fix events.flags (KVM_VCPUEVENT_VALID_SMM) overwritten by 0.

Signed-off-by: He Rongguang <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 6de68ffd7cfd1648cbd46ed5c38a7fdefa8797a9
      
https://github.com/qemu/qemu/commit/6de68ffd7cfd1648cbd46ed5c38a7fdefa8797a9
  Author: Peter Maydell <address@hidden>
  Date:   2016-09-23 (Fri, 23 Sep 2016)

  Changed paths:
    M backends/msmouse.c
    M block/iscsi.c
    M hw/i386/kvm/apic.c
    A scripts/show-fixed-bugs.sh
    M target-i386/kvm.c
    M target-i386/kvm_i386.h

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

* More KVM LAPIC fixes
* fix divide-by-zero regression on libiscsi SG devices
* fix qemu-char segfault
* add scripts/show-fixed-bugs.sh

# gpg: Signature made Thu 22 Sep 2016 19:20:57 BST
# gpg:                using RSA key 0xBFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <address@hidden>"
# gpg:                 aka "Paolo Bonzini <address@hidden>"
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream:
  kvm: fix events.flags (KVM_VCPUEVENT_VALID_SMM) overwritten by 0
  scripts: Add a script to check for bug URLs in the git log
  msmouse: Fix segfault caused by free the chr before chardev cleanup.
  iscsi: Fix divide-by-zero regression on raw SG devices
  kvm: apic: set APIC base as part of kvm_apic_put
  target-i386: introduce kvm_put_one_msr

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


Compare: https://github.com/qemu/qemu/compare/e678c56f169b...6de68ffd7cfd

reply via email to

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