@@ -18,6 +18,7 @@ enum xen_mode {
};
extern uint32_t xen_domid;
+extern uint32_t xen_dmid;
extern enum xen_mode xen_mode;
extern int xen_allowed;
@@ -2364,6 +2364,8 @@ DEF("xen-attach", 0, QEMU_OPTION_xen_attach,
"-xen-attach attach to existing xen domain\n"
" xend will use this when starting qemu\n",
QEMU_ARCH_ALL)
+DEF("xen-dmid", HAS_ARG, QEMU_OPTION_xen_dmid,
+ "-xen-dmid id specify the device model id for xenstore\n", QEMU_ARCH_ALL)
STEXI
@item -xen-domid @var{id}
@findex -xen-domid
@@ -263,6 +263,7 @@ int kvm_allowed = 0;
int xen_allowed = 0;
uint32_t xen_domid;
enum xen_mode xen_mode = XEN_EMULATE;
+uint32_t xen_dmid = 0;
static int tcg_tb_size;
static int default_serial = 1;
@@ -3132,6 +3133,13 @@ int main(int argc, char **argv, char **envp)
}
xen_mode = XEN_ATTACH;
break;
+ case QEMU_OPTION_xen_dmid:
+ if (!(xen_available())) {
+ printf("Option %s not supported for this target\n", popt->name);
+ exit(1);
+ }
+ xen_dmid = atoi(optarg);
+ break;
case QEMU_OPTION_trace:
{
opts = qemu_opts_parse(qemu_find_opts("trace"), optarg, 0);
With this option, QEMU knows it's ID and can retrieve it's configuration from XenStore. Signed-off-by: Julien Grall <julien.grall@citrix.com> --- hw/xen.h | 1 + qemu-options.hx | 2 ++ vl.c | 8 ++++++++ 3 files changed, 11 insertions(+), 0 deletions(-)