Re: [PATCHv3 11/14] Add bootindex parameter to net/block/fd device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 10, 2010 at 5:14 PM, Gleb Natapov <gleb@xxxxxxxxxx> wrote:
> If bootindex is specified on command line a string that describes device
> in firmware readable way is added into sorted list. Later this list will
> be passed into firmware to control boot order.
>
> Signed-off-by: Gleb Natapov <gleb@xxxxxxxxxx>
> ---
> Âblock_int.h   |  Â4 +++-
> Âhw/e1000.c   Â|  Â7 +++++++
> Âhw/eepro100.c  |  Â6 ++++++
> Âhw/fdc.c    Â|  13 +++++++++++++
> Âhw/ide/qdev.c  |  Â7 +++++++
> Âhw/ne2000.c   |  Â6 ++++++
> Âhw/pcnet.c   Â|  Â6 ++++++
> Âhw/qdev.c    |  32 ++++++++++++++++++++++++++++++++
> Âhw/qdev.h    |  Â1 +
> Âhw/rtl8139.c  Â|  Â7 +++++++
> Âhw/usb-net.c  Â|  Â4 ++++
> Âhw/virtio-blk.c | Â Â4 ++++
> Âhw/virtio-net.c | Â Â4 ++++
> Ânet.h      |  Â4 +++-
> Âsysemu.h    Â|  Â2 ++
> Âvl.c      Â|  35 +++++++++++++++++++++++++++++++++++
> Â16 files changed, 140 insertions(+), 2 deletions(-)
>
> diff --git a/block_int.h b/block_int.h
> index 87e60b8..f9042a8 100644
> --- a/block_int.h
> +++ b/block_int.h
> @@ -227,6 +227,7 @@ typedef struct BlockConf {
> Â Â uint16_t logical_block_size;
> Â Â uint16_t min_io_size;
> Â Â uint32_t opt_io_size;
> + Â Âint32_t bootindex;
> Â} BlockConf;
>
> Âstatic inline unsigned int get_physical_block_exp(BlockConf *conf)
> @@ -249,6 +250,7 @@ static inline unsigned int get_physical_block_exp(BlockConf *conf)
> Â Â DEFINE_PROP_UINT16("physical_block_size", _state, Â Â Â Â Â Â Â Â Â \
> Â Â Â Â Â Â Â Â Â Â Â Â_conf.physical_block_size, 512), Â Â Â Â Â Â Â Â \
> Â Â DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0), Â\
> - Â ÂDEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0)
> + Â ÂDEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0), Â Â\
> + Â ÂDEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1) Â Â Â Â \
>
> Â#endif /* BLOCK_INT_H */
> diff --git a/hw/e1000.c b/hw/e1000.c
> index 532efdc..009e24b 100644
> --- a/hw/e1000.c
> +++ b/hw/e1000.c
> @@ -30,6 +30,7 @@
> Â#include "net.h"
> Â#include "net/checksum.h"
> Â#include "loader.h"
> +#include "sysemu.h"
>
> Â#include "e1000_hw.h"
>
> @@ -1148,6 +1149,12 @@ static int pci_e1000_init(PCIDevice *pci_dev)
> Â Â Â Â Â Â Â Â Â Â Â Â Â d->dev.qdev.info->name, d->dev.qdev.id, d);
>
> Â Â qemu_format_nic_info_str(&d->nic->nc, macaddr);
> +
> + Â Âif (d->conf.bootindex >= 0) {

Maybe these checks should be moved into add_boot_device_path, that
would simplify the callers.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux