[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 29/54] hw/block: Request permissions
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH 29/54] hw/block: Request permissions |
Date: |
Fri, 24 Feb 2017 14:46:12 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 21.02.2017 15:58, Kevin Wolf wrote:
> This makes all device emulations with a qdev drive property request
> permissions on their BlockBackend. The only thing we block at this point
> is resizing images for some devices that can't support it.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> hw/block/block.c | 22 +++++++++++++++++++++-
> hw/block/fdc.c | 25 +++++++++++++++++++++++--
> hw/block/m25p80.c | 8 ++++++++
> hw/block/nand.c | 7 +++++++
> hw/block/nvme.c | 8 +++++++-
> hw/block/onenand.c | 7 +++++++
> hw/block/pflash_cfi01.c | 18 ++++++++++++------
> hw/block/pflash_cfi02.c | 19 +++++++++++++------
> hw/block/virtio-blk.c | 8 +++++++-
> hw/core/qdev-properties-system.c | 1 -
> hw/ide/qdev.c | 7 +++++--
> hw/nvram/spapr_nvram.c | 8 ++++++++
> hw/scsi/scsi-disk.c | 9 +++++++--
> hw/sd/sd.c | 6 ++++++
> hw/usb/dev-storage.c | 6 +++++-
> include/hw/block/block.h | 3 ++-
> tests/qemu-iotests/051.pc.out | 6 +++---
> 17 files changed, 141 insertions(+), 27 deletions(-)
For all the SCSI disks, shouldn't @resizable be true only if the qdev
type is TYPE_DISK? At least hw/scsi/scsi-disk.c:scsi_realize() looks as
if that is not necessarily the case.
OTOH, I'm not sure how useful the condition in scsi_disk_resize_cb() is
in the first place. In my understanding, the SCSI device should always
be of TYPE_DISK there.
And for IDE devices, @resizable should be true only if the device is not
a CD ROM drive.
Max
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-block] [PATCH 24/54] block: Add permissions to blk_new(), (continued)
- [Qemu-block] [PATCH 25/54] block: Add error parameter to blk_insert_bs(), Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 26/54] block: Add BDRV_O_RESIZE for blk_new_open(), Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 28/54] block: Allow error return in BlockDevOps.change_media_cb(), Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 32/54] block: Add BdrvChildRole.get_parent_desc(), Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 29/54] hw/block: Request permissions, Kevin Wolf, 2017/02/21
- Re: [Qemu-block] [PATCH 29/54] hw/block: Request permissions,
Max Reitz <=
- [Qemu-block] [PATCH 30/54] hw/block: Introduce share-rw qdev property, Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 33/54] block: Include details on permission errors in message, Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 31/54] blockjob: Add permissions to block_job_create(), Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 34/54] block: Add BdrvChildRole.stay_at_node, Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 36/54] commit: Use real permissions in commit block job, Kevin Wolf, 2017/02/21