From: Julien Grall <julien.grall@citrix.com> To: qemu-devel@nongnu.org Cc: xen-devel@lists.xensource.com, julian.pidancet@citrix.com, Stefano.Stabellini@eu.citrix.com Subject: [Qemu-devel] [QEMU][RFC PATCH 1/6] option: Add -xen-dmid Date: Thu, 22 Mar 2012 16:01:53 +0000 [thread overview] Message-ID: <9a4c430501786549e5233b2158db757370ca8db0.1332430835.git.julien.grall@citrix.com> (raw) In-Reply-To: <cover.1332430834.git.julien.grall@citrix.com> 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(-) diff --git a/hw/xen.h b/hw/xen.h index b46879c..b056b13 100644 --- a/hw/xen.h +++ b/hw/xen.h @@ -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; diff --git a/qemu-options.hx b/qemu-options.hx index daefce3..95c87f8 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -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 diff --git a/vl.c b/vl.c index bd95539..36f2111 100644 --- a/vl.c +++ b/vl.c @@ -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); -- Julien Grall
WARNING: multiple messages have this Message-ID (diff)
From: Julien Grall <julien.grall@citrix.com> To: qemu-devel@nongnu.org Cc: xen-devel@lists.xensource.com, julian.pidancet@citrix.com, Stefano.Stabellini@eu.citrix.com Subject: [QEMU][RFC PATCH 1/6] option: Add -xen-dmid Date: Thu, 22 Mar 2012 16:01:53 +0000 [thread overview] Message-ID: <9a4c430501786549e5233b2158db757370ca8db0.1332430835.git.julien.grall@citrix.com> (raw) In-Reply-To: <cover.1332430834.git.julien.grall@citrix.com> 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(-) diff --git a/hw/xen.h b/hw/xen.h index b46879c..b056b13 100644 --- a/hw/xen.h +++ b/hw/xen.h @@ -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; diff --git a/qemu-options.hx b/qemu-options.hx index daefce3..95c87f8 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -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 diff --git a/vl.c b/vl.c index bd95539..36f2111 100644 --- a/vl.c +++ b/vl.c @@ -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); -- Julien Grall
next prev parent reply other threads:[~2012-03-22 16:05 UTC|newest] Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-03-22 16:01 [Qemu-devel] [QEMU][RFC PATCH 0/6] QEMU disaggregation Julien Grall 2012-03-22 16:01 ` Julien Grall 2012-03-22 16:01 ` Julien Grall [this message] 2012-03-22 16:01 ` [QEMU][RFC PATCH 1/6] option: Add -xen-dmid Julien Grall 2012-03-22 17:36 ` [Qemu-devel] " Jan Kiszka 2012-03-22 17:36 ` Jan Kiszka 2012-03-23 10:42 ` [Qemu-devel] " Stefano Stabellini 2012-03-23 10:42 ` Stefano Stabellini 2012-03-22 16:01 ` [Qemu-devel] [QEMU][RFC PATCH 2/6] xen: Add functions to register PCI and IO in Xen Julien Grall 2012-03-22 16:01 ` Julien Grall 2012-03-23 10:44 ` [Qemu-devel] " Stefano Stabellini 2012-03-23 10:44 ` Stefano Stabellini 2012-03-22 16:01 ` [Qemu-devel] [QEMU][RFC PATCH 3/6] memory: Add xen memory hook Julien Grall 2012-03-22 16:01 ` Julien Grall 2012-03-22 17:44 ` [Qemu-devel] " Jan Kiszka 2012-03-22 17:44 ` Jan Kiszka 2012-03-23 15:08 ` [Qemu-devel] " Julien Grall 2012-03-23 15:08 ` Julien Grall 2012-03-23 16:37 ` [Qemu-devel] " Jan Kiszka 2012-03-23 16:37 ` Jan Kiszka 2012-03-25 10:44 ` [Qemu-devel] " Avi Kivity 2012-03-25 10:44 ` Avi Kivity 2012-03-26 11:01 ` [Qemu-devel] " Stefano Stabellini 2012-03-26 11:01 ` Stefano Stabellini 2012-03-26 11:02 ` [Qemu-devel] " Avi Kivity 2012-03-26 11:02 ` Avi Kivity 2012-03-26 11:24 ` [Qemu-devel] " Julien Grall 2012-03-26 11:24 ` Julien Grall 2012-03-26 13:13 ` [Qemu-devel] " Avi Kivity 2012-03-26 13:13 ` Avi Kivity 2012-03-23 16:47 ` [Qemu-devel] " Anthony Liguori 2012-03-23 16:47 ` Anthony Liguori 2012-03-22 16:01 ` [Qemu-devel] [QEMU][RFC PATCH 4/6] xen-pci: Register PCI in Xen Julien Grall 2012-03-22 16:01 ` Julien Grall 2012-03-22 17:47 ` [Qemu-devel] " Jan Kiszka 2012-03-22 17:47 ` Jan Kiszka 2012-03-22 19:58 ` [Qemu-devel] " Anthony Liguori 2012-03-22 19:58 ` Anthony Liguori 2012-03-23 11:02 ` [Qemu-devel] " Stefano Stabellini 2012-03-23 11:02 ` Stefano Stabellini 2012-03-25 12:09 ` [Qemu-devel] " Avi Kivity 2012-03-25 12:09 ` Avi Kivity 2012-03-26 11:45 ` [Qemu-devel] " Stefano Stabellini 2012-03-26 11:45 ` Stefano Stabellini 2012-03-26 11:57 ` [Qemu-devel] " Avi Kivity 2012-03-26 11:57 ` Avi Kivity 2012-03-26 12:20 ` [Qemu-devel] " Stefano Stabellini 2012-03-26 12:20 ` Stefano Stabellini 2012-03-26 12:33 ` [Qemu-devel] " Avi Kivity 2012-03-26 12:33 ` Avi Kivity 2012-03-26 13:56 ` [Qemu-devel] " Stefano Stabellini 2012-03-26 13:56 ` Stefano Stabellini 2012-03-22 16:01 ` [Qemu-devel] [QEMU][RFC PATCH 5/6] xen-io: Handle the new ioreq type IOREQ_TYPE_PCI_CONFIG Julien Grall 2012-03-22 16:01 ` Julien Grall 2012-03-22 16:01 ` [Qemu-devel] [QEMU][RFC PATCH 6/6] xen: handle qemu disaggregation Julien Grall 2012-03-22 16:01 ` Julien Grall 2012-03-23 11:07 ` [Qemu-devel] " Stefano Stabellini 2012-03-23 11:07 ` Stefano Stabellini
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=9a4c430501786549e5233b2158db757370ca8db0.1332430835.git.julien.grall@citrix.com \ --to=julien.grall@citrix.com \ --cc=Stefano.Stabellini@eu.citrix.com \ --cc=julian.pidancet@citrix.com \ --cc=qemu-devel@nongnu.org \ --cc=xen-devel@lists.xensource.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.