[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/6] bootindex: add {del, modify}_boot_device_pa
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH 1/6] bootindex: add {del, modify}_boot_device_path function |
Date: |
Thu, 24 Jul 2014 15:25:04 +0200 |
Hi,
> > 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.
> >
> If we just throw an error but not change the bootindex is already used,
> we cannot achieve our purpose. For example, we configure a hard disk,
> which bootindex=1, a nic which bootindex=2. If we want to boot the guest
> from nic firstly, we should must set the nic's bootindex to 1. AFAICT, the
> bootindex=1 always be used.
No. The devices are simply sorted by bootindex. You don't have to use
'1'. And you can have holes in your numbering and use --for example --
3+5.
So you can start qemu with hd=2,cdrom=3,nic=4, then set nic=1 or cdrom=1
for a guest install, change it back when done.
> > 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.
> >
> Because the IDE device may configure two kind of disk, HD and CDROM, we
> have to distinguish them by suffix.
Yes, the suffix indicated whenever the device is a disk or cdrom. But
you'll never have both cdrom+disk paths attached to a single device.
Therefore the device is enough to identify the bootpath entry, you don't
need the suffix for that.
cheers,
Gerd
[Qemu-devel] [PATCH 2/6] fw_cfg: add fw_cfg_machine_reset function, arei.gonglei, 2014/07/24
[Qemu-devel] [PATCH 5/6] qemu-monitor: HMP set-bootindex wrapper, arei.gonglei, 2014/07/24
[Qemu-devel] [PATCH 4/6] qmp: add set-bootindex command, arei.gonglei, 2014/07/24
[Qemu-devel] [PATCH 3/6] bootindex: delete bootindex when device is removed, arei.gonglei, 2014/07/24
[Qemu-devel] [PATCH 6/6] spapr: fix possible memory leak, arei.gonglei, 2014/07/24