diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-10-22 16:39:49 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-10-22 16:39:49 +0100 |
commit | 8f4699d873bef81cec95db6da53d4c33f8caf4b9 (patch) | |
tree | 249e2a7bb71c26b66643162f98e2659d83c79d4d /hw/i386 | |
parent | 895b810c1220fff7fb5cca5c428b881b6e30f0ac (diff) | |
parent | 84ebe3755f88be4c3733e997641fafd050a58810 (diff) |
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block patches
# gpg: Signature made Mon 20 Oct 2014 13:04:09 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
* remotes/kevin/tags/for-upstream: (28 commits)
block: Make device model's references to BlockBackend strong
block: Lift device model API into BlockBackend
blockdev: Convert qmp_eject(), qmp_change_blockdev() to BlockBackend
block/qapi: Convert qmp_query_block() to BlockBackend
blockdev: Fix blockdev-add not to create DriveInfo
blockdev: Drop superfluous DriveInfo member id
pc87312: Drop unused members of PC87312State
ide: Complete conversion from BlockDriverState to BlockBackend
hw: Convert from BlockDriverState to BlockBackend, mostly
virtio-blk: Rename VirtIOBlkConf variables to conf
virtio-blk: Drop redundant VirtIOBlock member conf
block: Rename BlockDriverCompletionFunc to BlockCompletionFunc
block: Rename BlockDriverAIOCB* to BlockAIOCB*
block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()
block: Merge BlockBackend and BlockDriverState name spaces
block: Eliminate BlockDriverState member device_name[]
block: Eliminate bdrv_iterate(), use bdrv_next()
blockdev: Eliminate drive_del()
block: Make BlockBackend own its BlockDriverState
block: Code motion to get rid of stubs/blockdev.c
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/pc.c | 2 | ||||
-rw-r--r-- | hw/i386/pc_piix.c | 2 | ||||
-rw-r--r-- | hw/i386/pc_sysfw.c | 10 | ||||
-rw-r--r-- | hw/i386/xen/xen_platform.c | 5 |
4 files changed, 10 insertions, 9 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index d045e8b454..61aba9fc54 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -44,7 +44,7 @@ #include "sysemu/kvm.h" #include "kvm_i386.h" #include "hw/xen/xen.h" -#include "sysemu/blockdev.h" +#include "sysemu/block-backend.h" #include "hw/block/block.h" #include "ui/qemu-spice.h" #include "exec/memory.h" diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 43846339bc..91a20cb8f4 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -41,7 +41,7 @@ #include "hw/sysbus.h" #include "hw/cpu/icc_bus.h" #include "sysemu/arch_init.h" -#include "sysemu/blockdev.h" +#include "sysemu/block-backend.h" #include "hw/i2c/smbus.h" #include "hw/xen/xen.h" #include "exec/memory.h" diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index bbe367a49f..75913c5b2f 100644 --- a/hw/i386/pc_sysfw.c +++ b/hw/i386/pc_sysfw.c @@ -23,7 +23,7 @@ * THE SOFTWARE. */ -#include "sysemu/blockdev.h" +#include "sysemu/block-backend.h" #include "qemu/error-report.h" #include "hw/sysbus.h" #include "hw/hw.h" @@ -103,7 +103,7 @@ static void pc_system_flash_init(MemoryRegion *rom_memory) { int unit; DriveInfo *pflash_drv; - BlockDriverState *bdrv; + BlockBackend *blk; int64_t size; char *fatal_errmsg = NULL; hwaddr phys_addr = 0x100000000ULL; @@ -119,8 +119,8 @@ static void pc_system_flash_init(MemoryRegion *rom_memory) (unit < FLASH_MAP_UNIT_MAX && (pflash_drv = drive_get(IF_PFLASH, 0, unit)) != NULL); ++unit) { - bdrv = pflash_drv->bdrv; - size = bdrv_getlength(bdrv); + blk = blk_by_legacy_dinfo(pflash_drv); + size = blk_getlength(blk); if (size < 0) { fatal_errmsg = g_strdup_printf("failed to get backing file size"); } else if (size == 0) { @@ -156,7 +156,7 @@ static void pc_system_flash_init(MemoryRegion *rom_memory) /* pflash_cfi01_register() creates a deep copy of the name */ snprintf(name, sizeof name, "system.flash%d", unit); system_flash = pflash_cfi01_register(phys_addr, NULL /* qdev */, name, - size, bdrv, sector_size, + size, blk, sector_size, size >> sector_bits, 1 /* width */, 0x0000 /* id0 */, diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c index 8bb18b403a..28b324a6f4 100644 --- a/hw/i386/xen/xen_platform.c +++ b/hw/i386/xen/xen_platform.c @@ -34,6 +34,7 @@ #include "hw/xen/xen_backend.h" #include "trace.h" #include "exec/address-spaces.h" +#include "sysemu/block-backend.h" #include <xenguest.h> @@ -132,8 +133,8 @@ static void platform_fixed_ioport_writew(void *opaque, uint32_t addr, uint32_t v devices, and bit 2 the non-primary-master IDE devices. */ if (val & UNPLUG_ALL_IDE_DISKS) { DPRINTF("unplug disks\n"); - bdrv_drain_all(); - bdrv_flush_all(); + blk_drain_all(); + blk_flush_all(); pci_unplug_disks(pci_dev->bus); } if (val & UNPLUG_ALL_NICS) { |