1. 12 9月, 2014 5 次提交
  2. 11 9月, 2014 3 次提交
    • M
      blockdev: Refuse to drive_del something added with blockdev-add · 48f364dd
      Markus Armbruster 提交于
      For some device models, the guest can prevent unplug.  Some users need a
      way to forcibly revoke device model access to the block backend then, so
      the underlying images can be safely used for something else.
      
      drive_del lets you do that.  Unfortunately, it conflates revoking access
      with destroying the backend.
      
      Commit 9063f814 made drive_del immediately destroy the root BDS.  Nice:
      the device name becomes available for reuse immediately.  Not so nice:
      the device model's pointer to the root BDS dangles, and we're prone to
      crash when the memory gets reused.
      
      Commit d22b2f41 fixed that by hiding the root BDS instead of destroying
      it.  Destruction only happens on unplug.  "Hiding" means removing it
      from bdrv_states and graph_bdrv_states; see bdrv_make_anon().
      
      This "destroy on revoke" is a misfeature we don't want to carry
      forward to blockdev-add, just like "destroy on unplug" (commit
      2d246f01).  So make drive_del fail on anything added with blockdev-add.
      
      We'll add separate QMP commands to revoke device model access and to
      destroy backends.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      48f364dd
    • L
      block: extend BLOCK_IO_ERROR with reason string · 624ff573
      Luiz Capitulino 提交于
      BLOCK_IO_ERROR events are logged by libvirt, which helps with
      post mortem analysis of guests. However, one information that
      we miss today is a human readable string describing the cause
      of the I/O error.
      
      This commit adds that string it to BLOCK_IO_ERROR. Note that
      this string is a debugging aid for humans, meaning that it
      should not parsed by applications.
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      624ff573
    • S
      dataplane: fix virtio_blk_data_plane_create() op blocker error path · 745a9bb9
      Stefan Hajnoczi 提交于
      Commit 3718d8ab ("block: Replace in_use
      with operation blocker") broke the error path because it consumed
      local_err instead of propagating it.
      
      The caller has no way to know that the function failed.  This caused
      virtio-blk to start "successfully" even though there was a fatal
      dataplane error.
      
      Steps to reproduce:
      
        $ qemu-system-x86_64 -enable-kvm -object iothread,id=iothread0 \
                             -drive if=none,id=drive0,file=a.img \
        (qemu) drive_mirror drive0 /tmp/foo.img
        (qemu) device_add virtio-blk-pci,iothread=iothread0,drive=drive0
      
      Expected result:
      
        Since the mirror block job is using drive0 it is not possible to start
        virtio-blk data-plane.
      
        device_add fails and the PCI adapter is not added.
      
      Actual result:
      
        device_add completes and the PCI adapter is added.
      
      Cc: Fam Zheng <famz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      745a9bb9
  3. 10 9月, 2014 13 次提交
  4. 09 9月, 2014 2 次提交
  5. 08 9月, 2014 17 次提交
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · 1bc0e405
      Peter Maydell 提交于
      Block pull request
      
      # gpg: Signature made Mon 08 Sep 2014 11:49:31 BST using RSA key ID 81AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      
      * remotes/stefanha/tags/block-pull-request: (24 commits)
        ide: Add resize callback to ide/core
        IDE: Fill the IDENTIFY request consistently
        vmdk: fix buf leak in vmdk_parse_extents()
        vmdk: fix vmdk_parse_extents() extent_file leaks
        ide: Add wwn support to IDE-ATAPI drive
        qtest/ide: Uninitialize PC allocator
        libqos: add a simple first-fit memory allocator
        MAINTAINERS: update sheepdog maintainer
        qemu-nbd: fix indentation and coding style
        qemu-nbd: add option to set detect-zeroes mode
        rename parse_enum_option to qapi_enum_parse and make it public
        block/archipelago: Use QEMU atomic builtins
        qemu-img: fix rebase src_cache option documentation
        qemu-img: clarify src_cache option documentation
        libqos: Added EVENT_IDX support
        libqos: Added MSI-X support
        libqos: Added test case for configuration changes in virtio-blk test
        libqos: Added indirect descriptor support to virtio implementation
        libqos: Added basic virtqueue support to virtio implementation
        tests: Add virtio device initialization
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      1bc0e405
    • P
      Merge remote-tracking branch 'remotes/agraf/tags/signed-ppc-for-upstream' into staging · 2d6838e8
      Peter Maydell 提交于
      Patch queue for ppc - 2014-09-08
      
      Alexander Graf (11):
            PPC: KVM: Fix g3beige and mac99 when HV is loaded
            PPC: mac99: Move NVRAM to page boundary when necessary
            KVM: Add helper to run KVM_CHECK_EXTENSION on vm fd
            PPC: KVM: Use vm check_extension for pv hcall
            PPC: mac99: Fix core99 timer frequency
            PPC: mac_nvram: Remove unused functions
            PPC: mac_nvram: Allow 2 and 4 byte accesses
            PPC: mac_nvram: Split NVRAM into OF and OSX parts
            PPC: Mac: Move tbfreq into local variable
            PPC: Cuda: Use cuda timer to expose tbfreq to guest
            PPC: Fix default config ordering and add eTSEC for ppc64
      
      Alexey Kardashevskiy (7):
            spapr: Move DT memory node rendering to a helper
            spapr: Use DT memory node rendering helper for other nodes
            spapr: Refactor spapr_populate_memory() to allow memoryless nodes
            spapr: Split memory nodes to power-of-two blocks
            spapr: Add a helper for node0_size calculation
            spapr: Fix ibm, associativity for memory nodes
            spapr_pci: Fix config space corruption
      
      Anton Blanchard (2):
            spapr-vlan: Don't touch last entry in buffer list
            hypervisor property clashes with hypervisor node
      
      Benjamin Herrenschmidt (2):
            loader: Add load_image_size() to replace load_image()
            spapr: Locate RTAS and device-tree based on real RMA
      
      Bharat Bhushan (4):
            ppc: debug stub: Get trap instruction opcode from KVM
            ppc: synchronize excp_vectors for injecting exception
            ppc: Add software breakpoint support
            ppc: Add hw breakpoint watchpoint support
      
      Gonglei (1):
            spapr: fix possible memory leak
      
      Greg Kurz (1):
            spapr_pci: map the MSI window in each PHB
      
      Nikunj A Dadhania (3):
            ppc: spapr-rtas - implement os-term rtas call
            spapr: add uuid/host details to device tree
            ppc/spapr: Fix MAX_CPUS to 255
      
      Peter Maydell (1):
            hw/ppc/spapr_hcall.c: Fix typo in function names
      
      Tom Musta (20):
            linux-user: Fix Stack Pointer Bug in PPC setup_rt_frame
            linux-user: Split PPC Trampoline Encoding from Register Save
            linux-user: Enable Signal Handlers on PPC64
            linux-user: Properly Dereference PPC64 ELFv1 Signal Handler Pointer
            linux-user: Implement do_setcontext for PPC64
            linux-user: Handle PPC64 ELFv2 Function Pointers
            target-ppc: Bug Fix: rlwinm
            target-ppc: Bug Fix: rlwnm
            target-ppc: Bug Fix: rlwimi
            target-ppc: Bug Fix: mullwo
            target-ppc: Bug Fix: mullw
            target-ppc: Bug Fix: mulldo OV Detection
            target-ppc: Bug Fix: srawi
            target-ppc: Bug Fix: srad
            target-ppc: Special Case of rlwimi Should Use Deposit
            target-ppc: Optimize rlwinm MB=0 ME=31
            target-ppc: Optimize rlwnm MB=0 ME=31
            target-ppc: Clean Up mullw
            target-ppc: Clean up mullwo
            target-ppc: Implement mulldo with TCG
      
      # gpg: Signature made Mon 08 Sep 2014 11:51:15 BST using RSA key ID 03FEDC60
      # gpg: Can't check signature: public key not found
      
      * remotes/agraf/tags/signed-ppc-for-upstream: (52 commits)
        hypervisor property clashes with hypervisor node
        PPC: Fix default config ordering and add eTSEC for ppc64
        spapr_pci: map the MSI window in each PHB
        target-ppc: Implement mulldo with TCG
        target-ppc: Clean up mullwo
        target-ppc: Clean Up mullw
        target-ppc: Optimize rlwnm MB=0 ME=31
        target-ppc: Optimize rlwinm MB=0 ME=31
        target-ppc: Special Case of rlwimi Should Use Deposit
        spapr-vlan: Don't touch last entry in buffer list
        spapr_pci: Fix config space corruption
        PPC: Cuda: Use cuda timer to expose tbfreq to guest
        PPC: Mac: Move tbfreq into local variable
        PPC: mac_nvram: Split NVRAM into OF and OSX parts
        PPC: mac_nvram: Allow 2 and 4 byte accesses
        PPC: mac_nvram: Remove unused functions
        PPC: mac99: Fix core99 timer frequency
        PPC: KVM: Use vm check_extension for pv hcall
        KVM: Add helper to run KVM_CHECK_EXTENSION on vm fd
        target-ppc: Bug Fix: srad
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      2d6838e8
    • A
      hypervisor property clashes with hypervisor node · 85423d90
      Anton Blanchard 提交于
      dtc fails on a recent QEMU snapshot:
      
      ERROR (name_properties): "name" property in /hypervisor#1 is incorrect ("hypervisor" instead of base node name)
      
      Looking at the device tree we have a hypervisor property:
      
      # lsprop hypervisor
      hypervisor       "kvm"
      
      But we also have a hypervisor node, with a name that doesn't match:
      
      # lsprop hypervisor#1/
      name             "hypervisor"
      compatible       "linux,kvm"
      linux,phandle    7e5eb5d8 (2120136152)
      
      Commit c08ce91d309c (spapr: add uuid/host details to device tree)
      looks to have collided with an earlier patch. Remove the hypervisor
      property.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      85423d90
    • A
      PPC: Fix default config ordering and add eTSEC for ppc64 · 4a761ffa
      Alexander Graf 提交于
      We messed up the ordering in our default configs for PPC. The top entries
      are generic entries, then come sections that indicate that features are only
      in because of a special feature (such as PReP).
      
      Fix the ordering again and while at it add eTSEC support to the ppc64 target
      so that we can spawn eTSEC adapters with qemu-system-ppc64.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      4a761ffa
    • G
      spapr_pci: map the MSI window in each PHB · 8c46f7ec
      Greg Kurz 提交于
      On sPAPR, virtio devices are connected to the PCI bus and use MSI-X.
      Commit cc943c36 has modified MSI-X
      so that writes are made using the bus master address space and follow
      the IOMMU path.
      
      Unfortunately, the IOMMU address space address space does not have an
      MSI window: the notification is silently dropped in unassigned_mem_write
      instead of reaching the guest... The most visible effect is that all
      virtio devices are non-functional on sPAPR since then. :(
      
      This patch does the following:
      1) map the MSI window into the IOMMU address space for each PHB
         - since each PHB instantiates its own IOMMU address space, we
           can safely map the window at a fixed address (SPAPR_PCI_MSI_WINDOW)
         - no real need to keep the MSI window setup in a separate function,
           the spapr_pci_msi_init() code moves to spapr_phb_realize().
      
      2) kill the global MSI window as it is not needed in the end
      Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      8c46f7ec
    • T
      target-ppc: Implement mulldo with TCG · 22ffad31
      Tom Musta 提交于
      Optimize mulldo by using the muls2_i64 operation rather than a helper.  Eliminate
      the obsolete helper code.
      Signed-off-by: NTom Musta <tommusta@gmail.com>
      Suggested-by: NRichard Henderson <rth@twiddle.net>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      22ffad31
    • T
      target-ppc: Clean up mullwo · 26977876
      Tom Musta 提交于
      Simplify the implementation of mullwo.  For 64 bit CPUs, the result is
      the concatenation of the upper and lower parts of the muls2_i32 operation,
      which may be slightly better than deposit.  For 32 bit CPUs, the lower part
      of the muls_i32 operation is moved into the target GPR.
      Signed-off-by: NTom Musta <tommusta@gmail.com>
      Suggested-by: NRichard Henderson <rth@twiddle.net>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      26977876
    • T
      target-ppc: Clean Up mullw · 03039e5e
      Tom Musta 提交于
      Eliminate the unecessary ext32s TCG operation and make the multiplication
      operation explicitly 32 bit.
      Signed-off-by: NTom Musta <tommusta@gmail.com>
      Suggested-by: NRichard Henderson <rth@twiddle.net>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      03039e5e
    • T
      target-ppc: Optimize rlwnm MB=0 ME=31 · 57fca134
      Tom Musta 提交于
      Optimize the special case of rlwnm where MB=0 and ME=31.  This can
      be implemented using a ROTL.
      Suggested-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NTom Musta <tommusta@gmail.com>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      57fca134
    • T
      target-ppc: Optimize rlwinm MB=0 ME=31 · 8979c2f6
      Tom Musta 提交于
      Optimize the special case of rlwinm where MB=0 and ME=31.  This can
      be implemented as a 32-bit ROTL.
      Signed-off-by: NTom Musta <tommusta@gmail.com>
      Suggested-by: NRichard Henderson <rth@twiddle.net>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      8979c2f6
    • T
      target-ppc: Special Case of rlwimi Should Use Deposit · ab92678d
      Tom Musta 提交于
      The special case of rlwimi where MB <= ME and SH = 31-ME can be implemented
      with a single TCG deposit operation.  This replaces the less general case
      of SH = MB = 0 and ME = 31.
      Signed-off-by: NTom Musta <tommusta@gmail.com>
      Suggested-by: NRichard Henderson <rth@twiddle.net>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      ab92678d
    • A
      spapr-vlan: Don't touch last entry in buffer list · 439ce140
      Anton Blanchard 提交于
      The last 8 bytes of the buffer list is defined to contain the number
      of dropped frames. At the moment we use it to store rx entries,
      which trips up ethtool -S:
      
      rx_no_buffer: 9223380832981355136
      
      Fix this by skipping the last buffer list entry.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      439ce140
    • A
      spapr_pci: Fix config space corruption · 32420522
      Alexey Kardashevskiy 提交于
      When disabling MSI/MSIX via "ibm,change-msi" RTAS call, no check was made
      if MSI or MSIX is actually supported and the MSI message was reset
      unconditionally. If this happened on a device which does not support MSI
      (but does support MSIX, otherwise "ibm,change-msi" would not be called),
      this device would have PCIDevice::msi_cap field (MSI capability offset)
      set to zero and writing a vector would actually clear PCI status.
      
      This clears MSI message only if MSI or MSIX is present on a device.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      32420522
    • A
      PPC: Cuda: Use cuda timer to expose tbfreq to guest · b981289c
      Alexander Graf 提交于
      Mac OS X calibrates a number of frequencies on bootup based on reading
      tb values on bootup and comparing them to via cuda timer values.
      
      The only variable we can really steer well (thanks to KVM) is the cuda
      frequency. So let's use that one to fake Mac OS X into believing the
      bus frequency is tbfreq * 4. That way Mac OS X will automatically
      calculate the correct timebase frequency.
      
      With this patch and the patch set I posted earlier I can successfully
      run Mac OS X 10.2, 10.3 and 10.4 guests with -M mac99 on TCG and KVM.
      Suggested-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      b981289c
    • A
      PPC: Mac: Move tbfreq into local variable · caae6c96
      Alexander Graf 提交于
      We already expose the real CPU's tb frequency to the guest via fw_cfg. Soon
      we will need to also expose it to the MacIO, so let's move it to a variable
      that we can leverage every time we need the frequency.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      caae6c96
    • A
      PPC: mac_nvram: Split NVRAM into OF and OSX parts · 2d9907a3
      Alexander Graf 提交于
      Mac OS X (at least with -M mac99) searches for a valid NVRAM partition
      of a special Apple type. If it can't find that partition in the first
      half of NVRAM, it will look at the second half.
      
      There are a few implications from this. The first is that we need to
      split NVRAM into 2 halves - one for Open Firmware use, the other one for
      Mac OS X. Without this split Mac OS X will just loop endlessly over the
      second half trying to find a partition.
      
      The other implication is that we should provide a specially crafted Mac
      OS X compatible NVRAM partition on the second half that Mac OS X can
      happily use as it sees fit.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      2d9907a3
    • A
      PPC: mac_nvram: Allow 2 and 4 byte accesses · b19eae18
      Alexander Graf 提交于
      The NVRAM in our Core99 machine really supports 2byte and 4byte accesses
      just as well as 1byte accesses. In fact, Mac OS X uses those.
      
      Add support for higher register size granularities.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      b19eae18