All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@linux.vnet.ibm.com>
To: Glauber Costa <glommer@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org, avi@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/2] machine opts framework
Date: Wed, 24 Mar 2010 16:11:32 -0500	[thread overview]
Message-ID: <4BAA8004.309@linux.vnet.ibm.com> (raw)
In-Reply-To: <20100324205855.GB11840@mothafucka.localdomain>

On 03/24/2010 03:58 PM, Glauber Costa wrote:
> On Wed, Mar 24, 2010 at 02:43:35PM -0500, Anthony Liguori wrote:
>    
>> On 03/24/2010 02:26 PM, Glauber Costa wrote:
>>      
>>> This patch adds initial support for the -machine option, that allows
>>> command line specification of machine attributes (always relying on safe
>>> defaults). Besides its value per-se, it is the saner way we found to
>>> allow for enabling/disabling of kvm's in-kernel irqchip.
>>>
>>> A machine with in-kernel-irqchip could be specified as:
>>> 	-machine irqchip=apic-kvm
>>> And one without it:
>>> 	-machine irqchip=apic
>>>
>>> To demonstrate how it'd work, this patch introduces a choice between
>>> "pic" and "apic", pic being the old-style isa thing.
>>>        
>> I started from a different place.  See machine-qemuopts in my staging tree.
>>
>> I think we should combine efforts.
>>
>> Regards,
>>
>>      
> Absolutely. I see little overlap between what we did. Just a comment on yours:
>
> -static void an5206_init(ram_addr_t ram_size,
> -                     const char *boot_device,
> -                     const char *kernel_filename, const char *kernel_cmdline,
> -                     const char *initrd_filename, const char *cpu_model)
> +static void an5206_init(QemuOpts *opts)
>   {
>
> Since we're changing init functions anyway, I believe we should also pass
> a pointer to the machine structure. With that, we can avoing using the global
> current_machine.
>    

Yes, I had the same thought.  For instance, with isa-pc is just pc_init 
with an extra parameter.  If we had a structure like:

typedef struct QEMUPCMachine
{
    QEMUMachine parent;
    int pci_enabled;
} QEMUPCMachine;

Then you wouldn't need those dispatch functions.  Not a huge win for x86 
but for sparc and some arm boards, it's pretty significant.

Regards,

Anthony Liguori

      reply	other threads:[~2010-03-24 21:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24 19:26 [Qemu-devel] [PATCH 0/2] machine opts framework Glauber Costa
2010-03-24 19:26 ` [Qemu-devel] [PATCH 1/2] early set current_machine Glauber Costa
2010-03-24 19:26   ` [Qemu-devel] [PATCH 2/2] machine opts framework Glauber Costa
2010-03-24 19:43     ` Anthony Liguori
2010-03-24 20:58       ` Glauber Costa
2010-03-24 21:11         ` Anthony Liguori [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BAA8004.309@linux.vnet.ibm.com \
    --to=aliguori@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=glommer@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.