All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Mark McLoughlin <markmc@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 5/5] monitor: add "info capabilities" command
Date: Thu, 13 Nov 2008 13:50:56 -0600	[thread overview]
Message-ID: <491C8520.5040005@codemonkey.ws> (raw)
In-Reply-To: <1226594763-2304-6-git-send-email-markmc@redhat.com>

Mark McLoughlin wrote:
> +static void do_info_capabilities(void)
> +{
> +    term_printf("[qemu]\n");
> +    list_printf("accel", accel_names);
> +    term_printf("arch=%s\n", TARGET_ARCH);
> +    list_printf("cpu", cpu_names());
> +    machines_printf();
> +
> +    term_printf("\n");
> +
> +    do_machine_capabilities();
> +
> +    term_printf("[devices]\n");
> +    list_printf("bluetooth", bt_list_types());
> +    list_printf("char", qemu_chr_list_types());
> +    list_printf("drive_cache", drive_cache_types());
> +    list_printf("drive_if", drive_if_types());
> +    list_printf("graphics", graphics_list_types());
> +    list_printf("network", net_client_types());
> +#ifdef HAS_AUDIO
> +    list_printf("soundhw", soundhw_list_types());
> +#endif
> +    list_printf("vga", vga_list_types());
> +
> +    term_printf("\n");
>   

This makes me uneasy because it introduces a lot of dependencies that 
are going to be hard to break.  I think this level of logic needs to be 
more encapsulated in the various subsystems.

> +
> +    term_printf("[limits]\n");
> +    term_printf("max_boot_dev=q\n"); /* above '-boot q' not allowed */
> +    term_printf("max_bluetooth_devs=%d\n", MAX_BT_CMDLINE);
> +    term_printf("max_drives=%d\n", MAX_DRIVES);
> +    term_printf("max_ide_devs=%d\n", MAX_IDE_DEVS);
> +    term_printf("max_net_clients=%d\n", MAX_NET_CLIENTS);
> +    term_printf("max_nics=%d\n", MAX_NICS);
> +    term_printf("max_option_roms=%d\n", MAX_OPTION_ROMS);
> +    term_printf("max_parallel_ports=%d\n", MAX_PARALLEL_PORTS);
> +#ifdef TARGET_SPARC
> +    term_printf("max_prom_envs=%d\n", MAX_PROM_ENVS);
> +#endif
> +    term_printf("max_scsi_devs=%d\n", MAX_SCSI_DEVS);
> +    term_printf("max_serial_ports=%d\n", MAX_SERIAL_PORTS);
> +    term_printf("max_usb_devs=%d\n", MAX_USB_CMDLINE);
>   

While we have a lot of hard coded maximums today, I don't think we 
always will.  How do you intend to support an unlimited number of things?

Regards,

Anthony Liguori

  reply	other threads:[~2008-11-13 19:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-13 16:45 [Qemu-devel] [PATCH 0/5] Add "info capabilities" monitor command Mark McLoughlin
2008-11-13 16:45 ` [Qemu-devel] [PATCH 1/5] Re-factor nic model listing Mark McLoughlin
2008-11-13 16:46   ` [Qemu-devel] [PATCH 2/5] Add cpu_list() for any targets that don't already have it Mark McLoughlin
2008-11-13 16:46     ` [Qemu-devel] [PATCH 3/5] Rename xxx_cpu_list() to cpu_xxx_list() Mark McLoughlin
2008-11-13 16:46       ` [Qemu-devel] [PATCH 4/5] Add new cpu_names() function Mark McLoughlin
2008-11-13 16:46         ` [Qemu-devel] [PATCH 5/5] monitor: add "info capabilities" command Mark McLoughlin
2008-11-13 19:50           ` Anthony Liguori [this message]
2008-11-14 16:02             ` [Qemu-devel] " Mark McLoughlin
2008-11-14 10:07           ` [Qemu-devel] " Avi Kivity
2008-11-14 15:58             ` Mark McLoughlin
2008-11-16  7:17               ` Avi Kivity
2008-11-14 10:13           ` Daniel P. Berrange
2008-11-13 19:47         ` [Qemu-devel] Re: [PATCH 4/5] Add new cpu_names() function Anthony Liguori
2008-11-14 15:36           ` Mark McLoughlin
2008-11-13 18:35   ` [Qemu-devel] [PATCH 1/5] Re-factor nic model listing Paul Brook
2008-11-13 19:45     ` Anthony Liguori
2008-11-13 22:50       ` Paul Brook
2008-11-14  2:31         ` Jamie Lokier
2008-11-14  2:49           ` Anthony Liguori
2008-11-13 19:44   ` [Qemu-devel] " Anthony Liguori
2008-11-14 15:34     ` Mark McLoughlin
2008-11-13 17:49 ` [Qemu-devel] [PATCH 0/5] Add "info capabilities" monitor command Blue Swirl
2008-11-14  2:50   ` Jamie Lokier
2008-11-14 16:09     ` Mark McLoughlin
2008-11-14  3:28 ` [Qemu-devel] " Anthony Liguori
2008-11-14  3:51   ` Jamie Lokier
2008-11-14 15:56     ` Mark McLoughlin
2008-11-14 22:54       ` Jamie Lokier
2008-11-14 15:51   ` Mark McLoughlin
2008-11-14 22:52     ` Jamie Lokier
2008-11-14 10:16 ` [Qemu-devel] " Daniel P. Berrange

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=491C8520.5040005@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=markmc@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.