1. 23 9月, 2016 3 次提交
    • T
      scripts: Add a script to check for bug URLs in the git log · 6867783a
      Thomas Huth 提交于
      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: NThomas Huth <thuth@redhat.com>
      Message-Id: <1474486942-18754-1-git-send-email-thuth@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6867783a
    • L
      msmouse: Fix segfault caused by free the chr before chardev cleanup. · 9e14037f
      Lin Ma 提交于
      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: c1111a24
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NLin Ma <lma@suse.com>
      Message-Id: <20160915143158.4796-1-lma@suse.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9e14037f
    • E
      iscsi: Fix divide-by-zero regression on raw SG devices · 95eaa785
      Eric Blake 提交于
      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: NHolger Schranz <holger@fam-schranz.de>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      CC: qemu-stable@nongnu.org
      
      Message-Id: <1473283640-15756-1-git-send-email-eblake@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      95eaa785
  2. 22 9月, 2016 2 次提交
    • D
      kvm: apic: set APIC base as part of kvm_apic_put · f8d9ccf8
      Dr. David Alan Gilbert 提交于
      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 78d6a05d ("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: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f8d9ccf8
    • P
      target-i386: introduce kvm_put_one_msr · 73e1b8f2
      Paolo Bonzini 提交于
      Avoid further code duplication in the next patch.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      73e1b8f2
  3. 20 9月, 2016 8 次提交
    • R
      build-sys: fix make install regression · a008535b
      Riku Voipio 提交于
      Since bd6092e4 Replace qmp-commands.hx by docs/qmp-commands.txt
      make install fails if building out of source-tree.
      
      Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
      Cc: Markus Armbruster <armbru@redhat.com>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 1474362094-2293-1-git-send-email-riku.voipio@linaro.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a008535b
    • P
      Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging · 9b8595bc
      Peter Maydell 提交于
      x86 queue, 2016-09-19
      
      # gpg: Signature made Mon 19 Sep 2016 19:38:05 BST
      # gpg:                using RSA key 0x2807936F984DC5A6
      # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
      # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6
      
      * remotes/ehabkost/tags/x86-pull-request:
        linux-user-i386: Fix crash on cpuid
        kvm/apic: drop debugging
        target-i386: Use struct X86XSaveArea in fpu_helper.c
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9b8595bc
    • M
      linux-user-i386: Fix crash on cpuid · fa5376dd
      Marc-André Lureau 提交于
      Running cpuid instructions with a simple run like:
      i386-linux-user/qemu-i386 tests/tcg/sha1-i386
      
      Results in the following assert:
       #0  0x00007ffff64246f5 in raise () from /lib64/libc.so.6
       #1  0x00007ffff64262fa in abort () from /lib64/libc.so.6
       #2  0x00007ffff7937ec5 in g_assertion_message () from /lib64/libglib-2.0.so.0
       #3  0x00007ffff7937f5a in g_assertion_message_expr () from /lib64/libglib-2.0.so.0
       #4  0x000055555561b54c in apicid_bitwidth_for_count (count=0) at /home/elmarco/src/qemu/include/hw/i386/topology.h:58
       #5  0x000055555561b58a in apicid_smt_width (nr_cores=0, nr_threads=0) at /home/elmarco/src/qemu/include/hw/i386/topology.h:67
       #6  0x000055555561b5c3 in apicid_core_offset (nr_cores=0, nr_threads=0) at /home/elmarco/src/qemu/include/hw/i386/topology.h:82
       #7  0x000055555561b5e3 in apicid_pkg_offset (nr_cores=0, nr_threads=0) at /home/elmarco/src/qemu/include/hw/i386/topology.h:89
       #8  0x000055555561dd86 in cpu_x86_cpuid (env=0x555557999550, index=4, count=3, eax=0x7fffffffcae8, ebx=0x7fffffffcaec, ecx=0x7fffffffcaf0, edx=0x7fffffffcaf4) at /home/elmarco/src/qemu/target-i386/cpu.c:2405
       #9  0x0000555555638e8e in helper_cpuid (env=0x555557999550) at /home/elmarco/src/qemu/target-i386/misc_helper.c:106
       #10 0x000055555599dc5e in static_code_gen_buffer ()
       #11 0x00005555555952f8 in cpu_tb_exec (cpu=0x5555579912d0, itb=0x7ffff4371ab0) at /home/elmarco/src/qemu/cpu-exec.c:166
       #12 0x0000555555595c8e in cpu_loop_exec_tb (cpu=0x5555579912d0, tb=0x7ffff4371ab0, last_tb=0x7fffffffd088, tb_exit=0x7fffffffd084, sc=0x7fffffffd0a0) at /home/elmarco/src/qemu/cpu-exec.c:517
       #13 0x0000555555595e50 in cpu_exec (cpu=0x5555579912d0) at /home/elmarco/src/qemu/cpu-exec.c:612
       #14 0x00005555555c065b in cpu_loop (env=0x555557999550) at /home/elmarco/src/qemu/linux-user/main.c:297
       #15 0x00005555555c25b2 in main (argc=2, argv=0x7fffffffd848, envp=0x7fffffffd860) at /home/elmarco/src/qemu/linux-user/main.c:4803
      
      The fields are set in qemu_init_vcpu() with softmmu, but it's a stub
      with linux-user.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      fa5376dd
    • M
      kvm/apic: drop debugging · 1560fcfa
      Michael S. Tsirkin 提交于
      commit 78d6a05d
          ("x86/lapic: Load LAPIC state at post_load")
      has some debugging leftovers.
      
      Drop them.
      
      Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      1560fcfa
    • R
      target-i386: Use struct X86XSaveArea in fpu_helper.c · 3f32bd21
      Richard Henderson 提交于
      This avoids a double hand-full of magic numbers in the
      xsave and xrstor helper functions.
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      3f32bd21
    • P
      Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-09-19' into staging · 33e1666b
      Peter Maydell 提交于
      QAPI patches for 2016-09-19
      
      # gpg: Signature made Mon 19 Sep 2016 17:27:42 BST
      # gpg:                using RSA key 0x3870B400EB918653
      # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
      # gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"
      # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653
      
      * remotes/armbru/tags/pull-qapi-2016-09-19:
        Replace qmp-commands.hx by docs/qmp-commands.txt
        qmp-commands.hx: fix some styling
        build-sys: remove qmp-commands-old.h
        monitor: use qmp_dispatch()
        tests: add a test to check invalid args
        qapi: check invalid arguments on no-args commands
        qapi: remove the "middle" mode
        monitor: remove mhandler.cmd_new
        monitor: implement 'qmp_query_commands' without qmp_cmds
        monitor: use qmp_find_command() (using generated qapi code)
        qapi: export the marshallers
        qmp: Hack to keep commands configuration-specific
        qapi: Support unregistering QMP commands
        monitor: register gen:false commands manually
        monitor: simplify invalid_qmp_mode()
        qapi-schema: add 'device_add'
        qapi-schema: use generated marshaller for 'qmp_capabilities'
        build-sys: define QEMU_VERSION_{MAJOR, MINOR, MICRO}
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      33e1666b
    • M
      Replace qmp-commands.hx by docs/qmp-commands.txt · bd6092e4
      Marc-André Lureau 提交于
      The only remaining function of qmp-commands.hx is to let us generate
      qmp-commands.txt from it.  Replace qmp-commands.hx by qmp-commands.txt.
      
      We intend to move the documentation into the QAPI schema and generate
      qapi-commands.txt from it, but not right now.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20160912091913.15831-19-marcandre.lureau@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      bd6092e4
    • P
      Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2016-09-19-2' into staging · 3d47a139
      Peter Maydell 提交于
      Merge qcrypto 2016/09/19 v2
      
      # gpg: Signature made Mon 19 Sep 2016 16:30:52 BST
      # gpg:                using RSA key 0xBE86EBB415104FDF
      # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>"
      # gpg:                 aka "Daniel P. Berrange <berrange@redhat.com>"
      # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF
      
      * remotes/berrange/tags/pull-qcrypto-2016-09-19-2:
        crypto: add trace points for TLS cert verification
        crypto: support more hash algorithms for pbkdf
        crypto: increase default pbkdf2 time for luks to 2 seconds
        crypto: remove bogus /= 2 for pbkdf iterations
        crypto: use correct derived key size when timing pbkdf
        crypto: clear out buffer after timing pbkdf algorithm
        crypto: make PBKDF iterations configurable for LUKS format
        crypto: use uint64_t for pbkdf iteration count parameters
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3d47a139
  4. 19 9月, 2016 27 次提交