On 26.04.2012, at 21:00, Christian Borntraeger wrote: > On 26/04/12 19:11, Peter Maydell wrote: >> On 26 April 2012 18:09, Alexander Graf <ag...@suse.de> wrote: >>> On 26.04.2012, at 18:17, Peter Maydell wrote: >>>> Can you describe what the problem is that you're trying to solve >>>> here? It's not entirely obvious from this commit message. >>> >>> On s390, there is no ide or scsi, so qemu-system-s390x <file> currently >>> uses a dirty hack that loops through IF_IDE and creates virtio devices. >>> I'd assume this patch tried to get rid of that. >> >> What's wrong with just having it be an error if the user >> creates IDE drives for a machine with no IDE interfaces? > > For example the fact that drive file=xxx works on x86 but fails on s390 if > I remove the hack in s390_init ;-) > > To me that looks more incosistent than having the right default interface even > if "right" changes across hardware. > If you have a second look, we already have different interfaces for different > systems. > e.g. sparc defaults to scsi, pc to ide. > > So this patch will allow that s390 chooses IF_VIRTIO and exynos can choose > IF_SD.
Yup, and I'm definitely in favor of the change. It's good to make the normal command line easy. I usually want "qemu-system-foo <disk>" to give me a useful VM, not an error message that I can't create an IDE bus because my machine model doesn't even know what MMIO is ;). And yes, we already do have the flag "use_scsi", so this is just a logic step further down the road. I don't see an issue with it really. Alex