Paolo Bonzini <[email protected]> writes: > On 21/09/2016 17:46, Alistair Francis wrote: >>> > I know it's way too late for design questions, but the thought just >>> > occured to me: -device gives you what you need without defining yet >>> > another command line option (good!), but is it appropriate? It's not >>> > exactly a device... Would -object be a better fit? I honestly don't >>> > know. Paolo? >> I see your point, but I kind of think it makes sense that everything >> uses the same command line argument. >> >> I image it would be very confusing if we have -device and -object. >> Then when you want to add something you will need to figure out if it >> is a device or an object? How do you know which one is which? >> >> I agree that technically it isn't a device but I think this is still >> clear what you are trying to do. > > I think -device is okay for something that isn't a "backend" but is > directly guest-visible.
Well, the contents of a block device is just as guest-visible. We split the device in a frontend and a backend, and the contents comes from the backend. We traditionally don't model memory as a split device. Perhaps we should. Regardless of whether we actually do, "contents of a memory device that you need to create by some other means (explicit or implicit)" feels much more like -object than like -device to me.
