From: Gerd Hoffmann Subject: Re: [Qemu-devel] [PATCH 1/7] xen: groundwork for xen support Date: Mon, 28 Jul 2008 16:52:28 +0200 Message-ID: <488DDD2C.10308@redhat.com> References: <1217251078-6591-1-git-send-email-kraxel@redhat.com> <1217251078-6591-2-git-send-email-kraxel@redhat.com> <488DD206.8040404@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <488DD206.8040404@codemonkey.ws> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Anthony Liguori Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org List-Id: xen-devel@lists.xenproject.org >> +/* xen_machine.c */ >> +extern QEMUMachine xenpv_machine; >> +extern QEMUMachine xenfv_machine; > > Why does xenfv need its own machine type? This is how xen's qemu-dm handles it at the moment and I've decided to do it the same way for simplicity. I think qemu could also figure it using a hypercall. >> - /* XXX: this should not be: some embedded targets just have flash */ >> + /* need a disk for this machine to boot ? */ >> + /* XXX: add embedded targets which just have flash */ >> + nodisk_ok = 0; >> + if (0 == strcmp(machine->name, "xenpv")) >> + nodisk_ok = 1; >> if (!linux_boot && net_boot == 0 && >> - nb_drives_opt == 0) >> + !nodisk_ok && nb_drives_opt == 0) >> help(1); > > This patch is pretty clean with the exception of this bit. I think a > cleaner way to do this would be to let the machine types specify whether > a disk is needed or not. Agreed, I'll make it a machine_type field. thanks, Gerd -- http://kraxel.fedorapeople.org/xenner/