qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH v2 8/8] hw: Drop superfluous specia


From: Fam Zheng
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v2 8/8] hw: Drop superfluous special checks for orphaned -drive
Date: Fri, 3 Feb 2017 22:07:06 +0800
User-agent: Mutt/1.7.1 (2016-10-04)

On Fri, 02/03 14:35, Markus Armbruster wrote:
> > I guess the painpoint is "okay, what the heck does the machine support 
> > then?" -
> 
> At the place where we can reliably detect orphaned drives regardless of
> what the machine initialization code does, we have no idea.
> 
> > that "3 > 2" is the good part of the old message.
> 
> At the places that actually adopt drives, we know.  But there are many
> of them.  Just three check for orphans.  One of them gets it right
> (ide/core.c), one of them gets it wrong (mips_jazz.c), and one of them
> sets a problematic example (sun4m.c): if copied to a machine that lets
> users configure additional SCSI HBAs, it would break if=scsi for those.
> Dampens my enthusiasm for improving the error message by adding similar
> checks to all the places that adopt drives.
> 
> We could make machines declare what they support.  Better, I think.  So
> if you have a burning desire to leave your mark in git-blame for every
> machine...

Could you please remind me the situation about if=scsi across all machines? If
it is simply legacy and it's recommended to use "-drive if=none" and "-device
...", I think saying this in the error message is enough; or if "if=scsi" is a
valid way for some machines, then maybe we can declare support limits found with
your script?

Fam

> 
> > Do we have a user documentation for this? Or, can we give a hint how to 
> > figure
> > that out?
> 
> Try it out:
> 
>     for i in ide scsi floppy pflash mtd sd virtio xen
>     do
>         for ((b=0; b<4; b++))
>         do
>             for ((u=0; u<10; u++))
>             do
>                 echo q | qemu-system-x86_64 -nodefaults -S -display none 
> -monitor stdio -drive if=$i,bus=$b,unit=$u,file=tmp.qcow2 >/dev/null
>             done
>         done
>     done
> 
> My upper bounds for bus and unit are arbitrary.



reply via email to

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