aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-05-19 11:58:56 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-05-19 11:58:56 +0100
commitbffe88d139ad7447e163e732e423cd767e908dc3 (patch)
treede1dda0fa5370cb1b0498dda6a2e7aea781ef59e /hw
parenta89af8c20ab289785806fcc1589b0f4265bd4e90 (diff)
parent4cdd0a774dc35b2ffe6ddb634e0c431f17dfe07e (diff)
downloadqemu-bffe88d139ad7447e163e732e423cd767e908dc3.zip
qemu-bffe88d139ad7447e163e732e423cd767e908dc3.tar.gz
qemu-bffe88d139ad7447e163e732e423cd767e908dc3.tar.bz2
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches: - Introduce real BdrvChildRole - blk/bdrv_make_empty() functions instead of calling callbacks directly - mirror: Make sure that source and target size match - block-copy: Fix uninitialized variable - block/replication: Avoid cancelling the job twice - ahci: Log lost IRQs - iotests: Run pylint and mypy in a testcase - iotests: log messages from notrun() # gpg: Signature made Mon 18 May 2020 18:05:32 BST # gpg: using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6 # gpg: issuer "kwolf@redhat.com" # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full] # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (52 commits) hw: Use QEMU_IS_ALIGNED() on parallel flash block size iotests/030: Reduce run time by unthrottling job earlier hw/ide/ahci: Log lost IRQs iotests: log messages from notrun() block/block-copy: Simplify block_copy_do_copy() block/block-copy: Fix uninitialized variable in block_copy_task_entry block: Drop @child_class from bdrv_child_perm() block: Pass BdrvChildRole in remaining cases block: Drop child_file block: Drop bdrv_format_default_perms() block: Make bdrv_filter_default_perms() static block: Use bdrv_default_perms() tests: Use child_of_bds instead of child_file block: Use child_of_bds in remaining places block: Make filter drivers use child_of_bds block: Make format drivers use child_of_bds block: Drop child_backing block: Make backing files child_of_bds children block: Drop child_format block: Switch child_format users to child_of_bds ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/arm/sbsa-ref.c2
-rw-r--r--hw/arm/virt.c2
-rw-r--r--hw/block/pflash_cfi01.c2
-rw-r--r--hw/block/pflash_cfi02.c2
-rw-r--r--hw/i386/pc_sysfw.c2
-rw-r--r--hw/ide/ahci.c1
-rw-r--r--hw/riscv/virt.c2
7 files changed, 7 insertions, 6 deletions
diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index a6cdb4f..6a0221a 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -240,7 +240,7 @@ static void sbsa_flash_map1(PFlashCFI01 *flash,
{
DeviceState *dev = DEVICE(flash);
- assert(size % SBSA_FLASH_SECTOR_SIZE == 0);
+ assert(QEMU_IS_ALIGNED(size, SBSA_FLASH_SECTOR_SIZE));
assert(size / SBSA_FLASH_SECTOR_SIZE <= UINT32_MAX);
qdev_prop_set_uint32(dev, "num-blocks", size / SBSA_FLASH_SECTOR_SIZE);
qdev_init_nofail(dev);
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index c41d5f9..37462a6 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -977,7 +977,7 @@ static void virt_flash_map1(PFlashCFI01 *flash,
{
DeviceState *dev = DEVICE(flash);
- assert(size % VIRT_FLASH_SECTOR_SIZE == 0);
+ assert(QEMU_IS_ALIGNED(size, VIRT_FLASH_SECTOR_SIZE));
assert(size / VIRT_FLASH_SECTOR_SIZE <= UINT32_MAX);
qdev_prop_set_uint32(dev, "num-blocks", size / VIRT_FLASH_SECTOR_SIZE);
qdev_init_nofail(dev);
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index 24f3bce..8e88872 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -965,7 +965,7 @@ PFlashCFI01 *pflash_cfi01_register(hwaddr base,
if (blk) {
qdev_prop_set_drive(dev, "drive", blk, &error_abort);
}
- assert(size % sector_len == 0);
+ assert(QEMU_IS_ALIGNED(size, sector_len));
qdev_prop_set_uint32(dev, "num-blocks", size / sector_len);
qdev_prop_set_uint64(dev, "sector-length", sector_len);
qdev_prop_set_uint8(dev, "width", bank_width);
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
index f0579ec..c277b03 100644
--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -997,7 +997,7 @@ PFlashCFI02 *pflash_cfi02_register(hwaddr base,
if (blk) {
qdev_prop_set_drive(dev, "drive", blk, &error_abort);
}
- assert(size % sector_len == 0);
+ assert(QEMU_IS_ALIGNED(size, sector_len));
qdev_prop_set_uint32(dev, "num-blocks", size / sector_len);
qdev_prop_set_uint32(dev, "sector-length", sector_len);
qdev_prop_set_uint8(dev, "width", width);
diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c
index 2abab3a..b8d8ef5 100644
--- a/hw/i386/pc_sysfw.c
+++ b/hw/i386/pc_sysfw.c
@@ -167,7 +167,7 @@ static void pc_system_flash_map(PCMachineState *pcms,
blk_name(blk), strerror(-size));
exit(1);
}
- if (size == 0 || size % FLASH_SECTOR_SIZE != 0) {
+ if (size == 0 || !QEMU_IS_ALIGNED(size, FLASH_SECTOR_SIZE)) {
error_report("system firmware block device %s has invalid size "
"%" PRId64,
blk_name(blk), size);
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 13d91e1..fc82cbd 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1509,6 +1509,7 @@ static void ahci_cmd_done(IDEDMA *dma)
static void ahci_irq_set(void *opaque, int n, int level)
{
+ qemu_log_mask(LOG_UNIMP, "ahci: IRQ#%d level:%d\n", n, level);
}
static const IDEDMAOps ahci_dma_ops = {
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index c695a44..7ce2889 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -111,7 +111,7 @@ static void virt_flash_map1(PFlashCFI01 *flash,
{
DeviceState *dev = DEVICE(flash);
- assert(size % VIRT_FLASH_SECTOR_SIZE == 0);
+ assert(QEMU_IS_ALIGNED(size, VIRT_FLASH_SECTOR_SIZE));
assert(size / VIRT_FLASH_SECTOR_SIZE <= UINT32_MAX);
qdev_prop_set_uint32(dev, "num-blocks", size / VIRT_FLASH_SECTOR_SIZE);
qdev_init_nofail(dev);