From: Gerd Hoffmann <kraxel@redhat.com>
To: arei.gonglei@huawei.com
Cc: peter.maydell@linaro.org, weidong.huang@huawei.com,
mst@redhat.com, aik@ozlabs.ru, qemu-devel@nongnu.org,
agraf@suse.de, dmitry@daynix.com, akong@redhat.com,
armbru@redhat.com, lersek@redhat.com, marcel.a@redhat.com,
somlo@cmu.edu, luonengjun@huawei.com, peter.huangpeng@huawei.com,
alex.williamson@redhat.com, stefanha@redhat.com,
pbonzini@redhat.com, lcapitulino@redhat.com, rth@twiddle.net,
kwolf@redhat.com, peter.crosthwaite@xilinx.com,
Chenliang <chenliang88@huawei.com>,
imammedo@redhat.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH 1/6] bootindex: add {del, modify}_boot_device_path function
Date: Thu, 24 Jul 2014 12:08:51 +0200 [thread overview]
Message-ID: <1406196531.13444.9.camel@nilsson.home.kraxel.org> (raw)
In-Reply-To: <1406191142-16556-2-git-send-email-arei.gonglei@huawei.com>
On Do, 2014-07-24 at 16:38 +0800, arei.gonglei@huawei.com wrote:
> From: Gonglei <arei.gonglei@huawei.com>
>
> When we want to change one device's bootindex, we should do three
> things. On the on hand, remove the device from global fw_boot_order list,
> regardless attaching suffix or not delete. On the other hand, delete
> original object of the assigned bootindex. Finally add the new device's
> bootindex into the global fw_boot_order list.
Hmm. I think we should simply lookup the device and modify the
bootindex, leaving the entry as-is otherwise. In case the new bootindex
is already used by another device just throw an error.
> +void del_boot_device_path(int32_t bootindex, DeviceState *dev,
> + const char *suffix);
Should be del_boot_device_path(DeviceState *dev) and simply delete all
entries belonging to the device. Patch #3 can be much simpler then as
we can call the function from generic device cleanup code.
> +void modify_boot_device_path(int32_t bootindex, DeviceState *dev,
> + const char *suffix);
No need for suffix here if we just update the existing entry.
cheers,
Gerd
next prev parent reply other threads:[~2014-07-24 10:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 8:38 [Qemu-devel] [PATCH 0/6] modify boot order of guest, and take effect after rebooting arei.gonglei
2014-07-24 8:38 ` [Qemu-devel] [PATCH 1/6] bootindex: add {del, modify}_boot_device_path function arei.gonglei
2014-07-24 10:08 ` Gerd Hoffmann [this message]
2014-07-24 12:39 ` Gonglei (Arei)
2014-07-24 13:25 ` Gerd Hoffmann
2014-07-25 3:31 ` Gonglei (Arei)
2014-07-24 8:38 ` [Qemu-devel] [PATCH 2/6] fw_cfg: add fw_cfg_machine_reset function arei.gonglei
2014-07-24 8:38 ` [Qemu-devel] [PATCH 3/6] bootindex: delete bootindex when device is removed arei.gonglei
2014-07-24 8:39 ` [Qemu-devel] [PATCH 4/6] qmp: add set-bootindex command arei.gonglei
2014-07-24 8:39 ` [Qemu-devel] [PATCH 5/6] qemu-monitor: HMP set-bootindex wrapper arei.gonglei
2014-07-24 8:39 ` [Qemu-devel] [PATCH 6/6] spapr: fix possible memory leak arei.gonglei
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=1406196531.13444.9.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).