From: Gerd Hoffmann <kraxel@redhat.com>
To: "Gonglei (Arei)" <arei.gonglei@huawei.com>
Cc: "peter.maydell@linaro.org" <peter.maydell@linaro.org>,
"Huangweidong (C)" <weidong.huang@huawei.com>,
"mst@redhat.com" <mst@redhat.com>,
"aik@ozlabs.ru" <aik@ozlabs.ru>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"agraf@suse.de" <agraf@suse.de>,
"dmitry@daynix.com" <dmitry@daynix.com>,
"akong@redhat.com" <akong@redhat.com>,
"armbru@redhat.com" <armbru@redhat.com>,
"lersek@redhat.com" <lersek@redhat.com>,
"marcel.a@redhat.com" <marcel.a@redhat.com>,
"somlo@cmu.edu" <somlo@cmu.edu>,
Luonengjun <luonengjun@huawei.com>,
"Huangpeng (Peter)" <peter.huangpeng@huawei.com>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"stefanha@redhat.com" <stefanha@redhat.com>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"lcapitulino@redhat.com" <lcapitulino@redhat.com>,
"rth@twiddle.net" <rth@twiddle.net>,
"kwolf@redhat.com" <kwolf@redhat.com>,
"peter.crosthwaite@xilinx.com" <peter.crosthwaite@xilinx.com>,
"chenliang (T)" <chenliang88@huawei.com>,
"imammedo@redhat.com" <imammedo@redhat.com>,
"afaerber@suse.de" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function
Date: Mon, 28 Jul 2014 12:02:03 +0200 [thread overview]
Message-ID: <1406541723.20726.11.camel@nilsson.home.kraxel.org> (raw)
In-Reply-To: <33183CC9F5247A488A2544077AF1902086C1D42A@SZXEMA503-MBS.china.huawei.com>
Hi,
> > > > I think it is ok to allow only *changing* the bootindex.
> > > >
> > > Yes, that's no problem.
> >
> > But then yoy always will have a old entry where you can take the suffix
> > from, and you don't need the suffix as parameter for the monitor
> > command.
> >
> No, optional.
> Because the bootindex property is not a necessary property for devices.
> If a device, such as IDE cdrom haven't attach the bootindex in qemu booting
> command line, the global fw_boot_order will not have its entry.
I'd suggest to simply not support this and throw an error then.
> So, we should
> save the suffix as parameter.
I think it is a bad idea to have the suffix as monitor command
parameter. It is a implementation detail which the monitor users should
not have to worry about.
Easiest way to do this is to allow *changing* an existing bootindex
entry only, and not support *adding* new boot entries. The user has to
set a bootindex for any device it might want to boot from in the future
then. I think this is acceptable.
If you want support adding bootentries at runtime (and it probably makes
sense to support removing entries too in that case) the suffix handling
should be reworked. The suffix could be stored in DeviceState instead
of being passed to the add_bootentry function, so you can add boot
entries later on without expecting the user to know what the correct
suffix is.
cheers,
Gerd
next prev parent reply other threads:[~2014-07-28 10:02 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 6:52 [Qemu-devel] [PATCH v2 0/7] modify boot order of guest, and take effect after rebooting arei.gonglei
2014-07-25 6:52 ` [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function arei.gonglei
2014-07-25 9:46 ` Gerd Hoffmann
2014-07-26 1:58 ` Gonglei (Arei)
2014-07-28 8:30 ` Gerd Hoffmann
2014-07-28 8:37 ` Gonglei (Arei)
2014-07-28 9:27 ` Gerd Hoffmann
2014-07-28 9:36 ` Gonglei (Arei)
2014-07-28 10:02 ` Gerd Hoffmann [this message]
2014-07-28 10:15 ` Gonglei (Arei)
2014-07-29 3:56 ` Gonglei (Arei)
2014-07-29 9:16 ` Gonglei (Arei)
2014-07-25 6:52 ` [Qemu-devel] [PATCH v2 2/7] bootindex: add del_boot_device_path function arei.gonglei
2014-07-25 6:52 ` [Qemu-devel] [PATCH v2 3/7] fw_cfg: add fw_cfg_machine_reset function arei.gonglei
2014-07-25 6:52 ` [Qemu-devel] [PATCH v2 4/7] bootindex: delete bootindex when device is removed arei.gonglei
2014-07-25 9:51 ` Gerd Hoffmann
2014-07-26 1:49 ` Gonglei (Arei)
2014-07-30 7:29 ` Gonglei (Arei)
2014-08-01 14:33 ` Eduardo Habkost
2014-08-04 6:23 ` Gonglei (Arei)
2014-07-25 6:52 ` [Qemu-devel] [PATCH v2 5/7] qmp: add set-bootindex command arei.gonglei
2014-08-01 15:07 ` Eduardo Habkost
2014-08-04 6:36 ` Gonglei (Arei)
2014-08-04 8:14 ` Markus Armbruster
2014-08-04 8:34 ` Gonglei (Arei)
2014-08-04 10:00 ` Markus Armbruster
2014-08-04 11:04 ` Gonglei (Arei)
2014-08-04 11:46 ` Markus Armbruster
2014-08-04 12:13 ` Gonglei (Arei)
2014-08-04 13:09 ` Markus Armbruster
2014-08-05 2:29 ` Gonglei (Arei)
2014-08-04 17:35 ` Eduardo Habkost
2014-07-25 6:52 ` [Qemu-devel] [PATCH v2 6/7] qemu-monitor: HMP set-bootindex wrapper arei.gonglei
2014-07-25 6:52 ` [Qemu-devel] [PATCH v2 7/7] spapr: fix possible memory leak arei.gonglei
2014-07-28 10:45 ` Alexander Graf
2014-07-29 0:54 ` Gonglei (Arei)
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=1406541723.20726.11.camel@nilsson.home.kraxel.org \
--to=kraxel@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=akong@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=armbru@redhat.com \
--cc=chenliang88@huawei.com \
--cc=dmitry@daynix.com \
--cc=imammedo@redhat.com \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=lersek@redhat.com \
--cc=luonengjun@huawei.com \
--cc=marcel.a@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=peter.huangpeng@huawei.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=somlo@cmu.edu \
--cc=stefanha@redhat.com \
--cc=weidong.huang@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).