DM: add option to show which virtio-blk is boot device.
Now, we could use option: -s 3,virtio-blk,/XXXX_vdisk_file,b to show this virtio device is boot device for guest. Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
53b89b91de
commit
0d9d628d9a
|
@ -48,6 +48,7 @@
|
||||||
#include "pci_core.h"
|
#include "pci_core.h"
|
||||||
#include "irq.h"
|
#include "irq.h"
|
||||||
#include "lpc.h"
|
#include "lpc.h"
|
||||||
|
#include "sw_load.h"
|
||||||
|
|
||||||
#define CONF1_ADDR_PORT 0x0cf8
|
#define CONF1_ADDR_PORT 0x0cf8
|
||||||
#define CONF1_DATA_PORT 0x0cfc
|
#define CONF1_DATA_PORT 0x0cfc
|
||||||
|
@ -161,7 +162,7 @@ pci_parse_slot(char *opt)
|
||||||
{
|
{
|
||||||
struct businfo *bi;
|
struct businfo *bi;
|
||||||
struct slotinfo *si;
|
struct slotinfo *si;
|
||||||
char *emul, *config, *str, *cp;
|
char *emul, *config, *str, *cp, *b = NULL;
|
||||||
int error, bnum, snum, fnum;
|
int error, bnum, snum, fnum;
|
||||||
|
|
||||||
error = -1;
|
error = -1;
|
||||||
|
@ -180,6 +181,11 @@ pci_parse_slot(char *opt)
|
||||||
if (cp != NULL) {
|
if (cp != NULL) {
|
||||||
*cp = '\0';
|
*cp = '\0';
|
||||||
config = cp + 1;
|
config = cp + 1;
|
||||||
|
cp = strchr(config, ',');
|
||||||
|
if (cp != NULL) {
|
||||||
|
*cp = '\0';
|
||||||
|
b = cp + 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pci_parse_slot_usage(opt);
|
pci_parse_slot_usage(opt);
|
||||||
|
@ -227,6 +233,12 @@ pci_parse_slot(char *opt)
|
||||||
/* saved fi param in case reboot */
|
/* saved fi param in case reboot */
|
||||||
si->si_funcs[fnum].fi_param_saved = config;
|
si->si_funcs[fnum].fi_param_saved = config;
|
||||||
|
|
||||||
|
if (b != NULL) {
|
||||||
|
if ((strcmp("virtio-blk", emul) == 0) && (b != NULL) &&
|
||||||
|
(strchr(b, 'b') != NULL)) {
|
||||||
|
vsbl_set_bdf(bnum, snum, fnum);
|
||||||
|
}
|
||||||
|
}
|
||||||
done:
|
done:
|
||||||
if (error)
|
if (error)
|
||||||
free(str);
|
free(str);
|
||||||
|
|
Loading…
Reference in New Issue