qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/1] Support default interface types per QEMUMac


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 1/1] Support default interface types per QEMUMachine
Date: Thu, 26 Apr 2012 13:10:35 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

On 04/26/2012 11:11 AM, Andreas Färber wrote:
Am 26.04.2012 17:48, schrieb Anthony Liguori:
On 04/26/2012 10:23 AM, Christian Borntraeger wrote:
From: Einar Lueck<address@hidden>

There are QEMUMachines that have neither IF_IDE nor IF_SCSI as a
default/standard interface to their block devices / drives. Therefore,
this patch introduces a new field def_blk_if per QEMUMachine struct.
The prior use_scsi field becomes thereby obsolete and is replaced through
.def_blk_if = IF_SCSI.

I'd prefer a less cryptic name along with a reasonable default.  If 0
isn't the right thing for IF_*, we could use another enum.

Looking briefly, it seems like both IF_SCSI and IF_IDE could be a
reasonable default.

Not so long ago you told me that the whole machine should go into
configuration files... If we do start drilling up QEMUMachine now, we
should seriously QOM'ify it for 1.2.

QOM represents logic objects. It's a data model and when we model hardware, we can model something concrete (because hardware for the most part has a physical implementation).

Machines are entirely a QEMU concept. There's logic in the machines that will never be able to be expressed in a config file. Machines make decisions about things like what the best NIC to use is. There's no way to model "the best nic" in QOM.

Now a machine should *only* do things that can be done through a config file. IOW, the output of the machine function could be a config file that is then used to do a bunch of QOM operations. That's perhaps a simplification but you get the general idea hopefully.

But I don't see a tremendous amount of value in just making QEMUMachine an Object. I can certainly be convinced otherwise, but it's not obvious to me how it would be helpful.

Regards,

Anthony Liguori

Andreas





reply via email to

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