qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 29/54] hw/block: Request permissions


From: Max Reitz
Subject: Re: [Qemu-devel] [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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]