1. 13 6月, 2017 15 次提交
  2. 12 6月, 2017 3 次提交
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging · 5093f028
      Peter Maydell 提交于
      # gpg: Signature made Wed 07 Jun 2017 19:55:32 BST
      # gpg:                using RSA key 0x9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha/tags/tracing-pull-request:
        simpletrace: Improve the error message if event is not declared
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      5093f028
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · 2a8469aa
      Peter Maydell 提交于
      # gpg: Signature made Wed 07 Jun 2017 19:06:51 BST
      # gpg:                using RSA key 0x9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha/tags/block-pull-request:
        configure: split c and cxx extra flags
        coroutine-lock: do not touch coroutine after another one has been entered
        .gdbinit: load QEMU sub-commands when gdb starts
        coccinelle: fix typo in comment
        oslib: strip trailing '\n' from error_setg() string argument
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      2a8469aa
    • P
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · 475df9d8
      Peter Maydell 提交于
      Block layer patches
      
      # gpg: Signature made Fri 09 Jun 2017 12:47:31 BST
      # gpg:                using RSA key 0x7F09B272C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6
      
      * remotes/kevin/tags/for-upstream:
        block: fix external snapshot abort permission error
        block/qcow.c: Fix memory leak in qcow_create()
        qemu-iotests: Test automatic commit job cancel on hot unplug
        commit: Fix use after free in completion
        qemu-iotests: Block migration test
        migration/block: Clean up BBs in block_save_complete()
        migration: Inactivate images after .save_live_complete_precopy()
        block: Fix anonymous BBs in blk_root_inactivate()
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      475df9d8
  3. 09 6月, 2017 8 次提交
  4. 08 6月, 2017 14 次提交
    • M
      test-char: start a /char/serial test · 27d4c378
      Marc-André Lureau 提交于
      Quite limited test, to check that the chardev can be created with a
      path and with the tty alias.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      27d4c378
    • M
      chardev: don't use alias names in parse_compat() · 73119c28
      Marc-André Lureau 提交于
      "parport" is considered "old" since commit 88a946d3, when "parallel"
      was added. Similarly for "tty" in commit d59044ef.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      73119c28
    • M
      char: fix alias devices regression · d203c643
      Marc-André Lureau 提交于
      Fix regression from commit 4d43a603, where the serial and parallel
      headers got removed from char.c, which broke the alias table.
      
      Move the HAVE_CHARDEV_SERIAL/HAVE_CHARDEV_PARPORT to osdep.h instead
      of being in separate headers.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      d203c643
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · bbfa326f
      Peter Maydell 提交于
      * virtio-scsi use-after-free fix (Fam)
      * SMM fixes and improvements for TCG (myself, Mihail)
      * irqchip and AddressSpaceDispatch cleanups and fixes (Peter)
      * Coverity fix (Stefano)
      * NBD cleanups and fixes (Vladimir, Eric, myself)
      * RTC accuracy improvements and code cleanups (Guangrong+Yunfang)
      * socket error reporting improvement (Daniel)
      * GDB XML description for SSE registers (Abdallah)
      * kvmclock update fix (Denis)
      * SMM memory savings (Gonglei)
      * -cpu 486 fix (myself)
      * various bugfixes (Roman, Peter, myself, Thomas)
      * rtc-test improvement (Guangrong)
      * migration throttling fix (Felipe)
      * create docs/ subdirectories (myself)
      
      # gpg: Signature made Wed 07 Jun 2017 17:22:07 BST
      # gpg:                using RSA key 0xBFFBD25F78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
      # 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: (31 commits)
        docs: create config/, devel/ and spin/ subdirectories
        cpus: reset throttle_thread_scheduled after sleep
        kvm: don't register smram_listener when smm is off
        nbd: make it thread-safe, fix qcow2 over nbd
        target/i386: Add GDB XML description for SSE registers
        i386/kvm: do not zero out segment flags if segment is unusable or not present
        edu: fix memory leak on msi_broken platforms
        linuxboot_dma: compile for i486
        kvmclock: update system_time_msr address forcibly
        nbd: Fully initialize client in case of failed negotiation
        sockets: improve error reporting if UNIX socket path is too long
        i386: fix read/write cr with icount option
        target/i386: use multiple CPU AddressSpaces
        target/i386: enable A20 automatically in system management mode
        virtio-scsi: Unset hotplug handler when unrealize
        exec: simplify phys_page_find() params
        nbd/client.c: use errp instead of LOG
        nbd: add errp to read_sync, write_sync and drop_sync
        nbd: add errp parameter to nbd_wr_syncv()
        nbd: read_sync and friends: return 0 on success
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      bbfa326f
    • P
      docs: create config/, devel/ and spin/ subdirectories · ac06724a
      Paolo Bonzini 提交于
      Developer documentation should be its own manual.  As a start, move all
      developer-oriented files to a separate directory.
      
      Also move non-text files to their own directories: docs/config/ for
      QEMU -readconfig input, and docs/spin/ for formal models to be used
      with the SPIN model checker.
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ac06724a
    • F
      cpus: reset throttle_thread_scheduled after sleep · 90bb0c04
      Felipe Franciosi 提交于
      Currently, the throttle_thread_scheduled flag is reset back to 0 before
      sleeping (as part of the throttling logic). Given that throttle_timer
      (well, any timer) may tick with a slight delay, it so happens that under
      heavy throttling (ie. close or on CPU_THROTTLE_PCT_MAX) the tick may
      schedule a further cpu_throttle_thread() work item after the flag reset,
      but before the previous sleep completed. This results on the vCPU thread
      sleeping continuously for potentially several seconds in a row.
      
      The chances of that happening can be drastically minimised by resetting
      the flag after the sleep.
      Signed-off-by: NFelipe Franciosi <felipe@nutanix.com>
      Signed-off-by: NMalcolm Crossley <malcolm@nutanix.com>
      Message-Id: <1495229390-18909-1-git-send-email-felipe@nutanix.com>
      Acked-by: NJason J. Herne <jjherne@linux.vnet.ibm.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      90bb0c04
    • G
      kvm: don't register smram_listener when smm is off · d870cfde
      Gonglei 提交于
      If the user set disable smm by '-machine smm=off', we
      should not register smram_listener so that we can
      avoid waster memory in kvm since the added sencond
      address space.
      
      Meanwhile we should assign value of the global kvm_state
      before invoking the kvm_arch_init(), because
      pc_machine_is_smm_enabled() may use it by kvm_has_mm().
      Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Message-Id: <1496316915-121196-1-git-send-email-arei.gonglei@huawei.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      d870cfde
    • P
      nbd: make it thread-safe, fix qcow2 over nbd · 6bdcc018
      Paolo Bonzini 提交于
      NBD is not thread safe, because it accesses s->in_flight without
      a CoMutex.  Fixing this will be required for multiqueue.
      CoQueue doesn't have spurious wakeups but, when another coroutine can
      run between qemu_co_queue_next's wakeup and qemu_co_queue_wait's
      re-locking of the mutex, the wait condition can become false and
      a loop is necessary.
      
      In fact, it turns out that the loop is necessary even without this
      multi-threaded scenario.  A particular sequence of coroutine wakeups
      is happening ~80% of the time when starting a guest with qcow2 image
      served over NBD (i.e. qemu-nbd --format=raw, and QEMU's -drive option
      has -format=qcow2).  This patch fixes that issue too.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6bdcc018
    • A
      target/i386: Add GDB XML description for SSE registers · b8158192
      Abdallah Bouassida 提交于
      Add an XML description for SSE registers (XMM+MXCSR) for both X86
      and X86-64 architectures in the GDB stub:
      - configure: Define gdb_xml_files for the X86 targets (32 and 64bit).
      - gdb-xml/i386-32bit-sse.xml & gdb-xml/i386-64bit-sse.xml: The XML files
      that contain a description of the XMM + MXCSR registers.
      - gdb-xml/i386-32bit.xml & gdb-xml/i386-64bit.xml: wrappers that include
      the XML file of the core registers and the other XML file of the SSE registers.
      - target/i386/cpu.c: Modify the gdb_core_xml_file to the new XML wrapper,
        modify the gdb_num_core_regs to fit the registers number defined in each
        XML file.
      Signed-off-by: NAbdallah Bouassida <abdallah.bouassida@lauterbach.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b8158192
    • R
      i386/kvm: do not zero out segment flags if segment is unusable or not present · d45fc087
      Roman Pen 提交于
      This is a fix for the problem [1], where VMCB.CPL was set to 0 and interrupt
      was taken on userspace stack.  The root cause lies in the specific AMD CPU
      behaviour which manifests itself as unusable segment attributes on SYSRET[2].
      
      Here in this patch flags are not touched even segment is unusable or is not
      present, therefore CPL (which is stored in DPL field) should not be lost and
      will be successfully restored on kvm/svm kernel side.
      
      Also current patch should not break desired behavior described in this commit:
      
      4cae9c97 ("target-i386: kvm: clear unusable segments' flags in migration")
      
      since present bit will be dropped if segment is unusable or is not present.
      
      This is the second part of the whole fix of the corresponding problem [1],
      first part is related to kvm/svm kernel side and does exactly the same:
      segment attributes are not zeroed out.
      
      [1] Message id: CAJrWOzD6Xq==b-zYCDdFLgSRMPM-NkNuTSDFEtX=7MreT45i7Q@mail.gmail.com
      [2] Message id: 5d120f358612d73fc909f5bfa47e7bd082db0af0.1429841474.git.luto@kernel.org
      Signed-off-by: NRoman Pen <roman.penyaev@profitbricks.com>
      Signed-off-by: NMikhail Sennikovskii <mikhail.sennikovskii@profitbricks.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Michael Chapman <mike@very.puzzling.org>
      Cc: qemu-devel@nongnu.org
      Message-Id: <20170601085604.12980-1-roman.penyaev@profitbricks.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      d45fc087
    • P
      edu: fix memory leak on msi_broken platforms · c25a67f0
      Paolo Bonzini 提交于
      If msi_init fails, the thread has already been created and the
      mutex/condvar are not destroyed.  Initialize everything only
      after the point where pci_edu_realize cannot fail.
      Reported-by: NMarkus Armbruster <armbru@redhat.com>
      Cc: Peter Xu <peterx@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c25a67f0
    • P
      linuxboot_dma: compile for i486 · 7e018385
      Paolo Bonzini 提交于
      The ROM uses the cmovne instruction, which is new in Pentium Pro and does not
      work when running QEMU with "-cpu 486".  Avoid producing that instruction.
      Suggested-by: NRichard W.M. Jones <rjones@redhat.com>
      Suggested-by: NThomas Huth <thuth@redhat.com>
      Reported-by: NRob Landley <rob@landley.net>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7e018385
    • D
      kvmclock: update system_time_msr address forcibly · e2b6c171
      Denis Plotnikov 提交于
      Do an update of system_time_msr address every time before reading
      the value of tsc_timestamp from guest's kvmclock page.
      
      There is no other code paths which ensure that qemu has an up-to-date
      value of system_time_msr. So, force this update on guest's tsc_timestamp
      reading.
      
      This bug causes effect on those nested setups which turn off TPR access
      interception for L2 guests and that access being intercepted by L0 doesn't
      show up in L1.
      Linux bootstrap initiate kvmclock before APIC initializing causing TPR access.
      That's why on L1 guests, having TPR interception turned on for L2, the effect
      of the bug is not revealed.
      
      This patch fixes this problem by making sure it knows the correct
      system_time_msr address every time it is needed.
      Signed-off-by: NDenis Plotnikov <dplotnikov@virtuozzo.com>
      Message-Id: <1496054944-25623-1-git-send-email-dplotnikov@virtuozzo.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e2b6c171
    • E
      nbd: Fully initialize client in case of failed negotiation · df8ad9f1
      Eric Blake 提交于
      If a non-NBD client connects to qemu-nbd, we would end up with
      a SIGSEGV in nbd_client_put() because we were trying to
      unregister the client's association to the export, even though
      we skipped inserting the client into that list.  Easy trigger
      in two terminals:
      
      $ qemu-nbd -p 30001 --format=raw file
      $ nmap 127.0.0.1 -p 30001
      
      nmap claims that it thinks it connected to a pago-services1
      server (which probably means nmap could be updated to learn the
      NBD protocol and give a more accurate diagnosis of the open
      port - but that's not our problem), then terminates immediately,
      so our call to nbd_negotiate() fails.  The fix is to reorder
      nbd_co_client_start() to ensure that all initialization occurs
      before we ever try talking to a client in nbd_negotiate(), so
      that the teardown sequence on negotiation failure doesn't fault
      while dereferencing a half-initialized object.
      
      While debugging this, I also noticed that nbd_update_server_watch()
      called by nbd_client_closed() was still adding a channel to accept
      the next client, even when the state was no longer RUNNING.  That
      is fixed by making nbd_can_accept() pay attention to the current
      state.
      
      Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1451614Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20170527030421.28366-1-eblake@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      df8ad9f1