From: Wei Wang2 <wei.wang2@amd.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"Keir (Xen.org)" <keir@xen.org>,
"JBeulich@suse.com" <JBeulich@suse.com>
Subject: Re: [PATCH 16 of 16] libxl: add iommu parameter to qemu-dm
Date: Thu, 15 Dec 2011 15:52:08 +0100 [thread overview]
Message-ID: <201112151552.09037.wei.wang2@amd.com> (raw)
In-Reply-To: <1323959445.20077.490.camel@zakaz.uk.xensource.com>
On Thursday 15 December 2011 15:30:44 Ian Campbell wrote:
> On Wed, 2011-12-14 at 15:29 +0000, Wei Wang wrote:
> > # HG changeset patch
> > # User Wei Wang <wei.wang2@amd.com>
> > # Date 1323876144 -3600
> > # Node ID 24f4a0a23da71c58f457f0bf98aa8238dd45332d
> > # Parent 93658ca85035d6a4e56e2e6602c02859974d30a4
> > libxl: add iommu parameter to qemu-dm.
> > When iomm = 0, virtual iommu device will be disabled.
> >
> > Signed-off-by: Wei Wang <wei.wang2@amd.com>
> >
> > diff -r 93658ca85035 -r 24f4a0a23da7 tools/libxl/libxl_dm.c
> > --- a/tools/libxl/libxl_dm.c Wed Dec 14 16:22:23 2011 +0100
> > +++ b/tools/libxl/libxl_dm.c Wed Dec 14 16:22:24 2011 +0100
> > @@ -194,6 +194,9 @@ static char ** libxl__build_device_model
> > if (info->gfx_passthru) {
> > flexarray_append(dm_args, "-gfx_passthru");
> > }
> > + if (info->iommu) {
> > + flexarray_append(dm_args, "-iommu");
> > + }
> > }
> > if (info->saved_state) {
> > flexarray_vappend(dm_args, "-loadvm", info->saved_state, NULL);
> > @@ -404,6 +407,9 @@ static char ** libxl__build_device_model
> > if (info->gfx_passthru) {
> > flexarray_append(dm_args, "-gfx_passthru");
> > }
> > + if (info->iommu) {
> > + flexarray_append(dm_args, "-iommu");
> > + }
> > }
> > if (info->saved_state) {
> > /* This file descriptor is meant to be used by QEMU */
> > diff -r 93658ca85035 -r 24f4a0a23da7 tools/libxl/libxl_types.idl
> > --- a/tools/libxl/libxl_types.idl Wed Dec 14 16:22:23 2011 +0100
> > +++ b/tools/libxl/libxl_types.idl Wed Dec 14 16:22:24 2011 +0100
> > @@ -254,6 +254,7 @@ The password never expires"""),
> > ("extra", libxl_string_list, False, "extra parameters
> > pass directly to qemu, NULL terminated"), ("extra_pv",
> > libxl_string_list, False, "extra parameters pass directly to qemu for PV
> > guest, NULL terminated"), ("extra_hvm", libxl_string_list, False,
> > "extra parameters pass directly to qemu for HVM guest, NULL terminated"),
> > + ("iommu", bool, False, "guest iommu enabled
> > or disabled"), ],
> > comment=
> > """Device Model information.
> > diff -r 93658ca85035 -r 24f4a0a23da7 tools/libxl/xl_cmdimpl.c
> > --- a/tools/libxl/xl_cmdimpl.c Wed Dec 14 16:22:23 2011 +0100
> > +++ b/tools/libxl/xl_cmdimpl.c Wed Dec 14 16:22:24 2011 +0100
> > @@ -386,6 +386,7 @@ static void printf_info(int domid,
> > printf("\t\t\t(spicedisable_ticketing %d)\n",
> > dm_info->spicedisable_ticketing);
> > printf("\t\t\t(spiceagent_mouse %d)\n",
> > dm_info->spiceagent_mouse); + printf("\t\t\t(iommu %d)\n",
> > dm_info->iommu);
> > printf("\t\t)\n");
> > break;
> > case LIBXL_DOMAIN_TYPE_PV:
> > @@ -1217,6 +1218,8 @@ skip_vfb:
> > xlu_cfg_replace_string (config, "soundhw", &dm_info->soundhw,
> > 0); if (!xlu_cfg_get_long (config, "xen_platform_pci", &l, 0))
> > dm_info->xen_platform_pci = l;
> > + if (!xlu_cfg_get_long (config, "iommu", &l, 0))
> > + dm_info->iommu = l;
>
> Didn't you already parse this same key into the build_info? Is there
> ever a possibility of the dm_info and build_info versions of this field
> differing?
> Assuming not I think this setting ought to only live in one place and I
> think build_info should be that place rather than the dm info. That
> might need some refactoring in libxl to pass the right struct down.
Yes, I added a new flag in build_info, which will control hvmloader to build
IVRS table. And I also need a flag for qemu-dm to decide if virtual iommu
device should be registered or not. I just saw other parameters like
gfx-passthu are attached to dm_info, so I do the same thing for iommu.
Also I cannot make a reference of libxl_domain_build_info in
libxl__build_device_model_args.
> Also you have only CC'd the hypervisor maintainers on this (and the
> other?) tool stack patch. Please check MAINTAINERS to see who ought to
> be CC'd.
Thanks, I cc'd them to Ian Jackson.
> Ian.
Wei
next prev parent reply other threads:[~2011-12-15 14:52 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 15:29 [PATCH 00 of 16] [RFC] amd iommu: support ATS device passthru on IOMMUv2 systems Wei Wang
2011-12-14 15:29 ` [PATCH 01 of 16] amd iommu: Refactoring iommu ring buffer definition Wei Wang
2011-12-14 15:29 ` [PATCH 02 of 16] amd iommu: Introduces new helper functions to simplify iommu bitwise operations Wei Wang
2011-12-14 15:29 ` [PATCH 03 of 16] amd iommu: Add iommu emulation for hvm guest Wei Wang
2011-12-15 13:35 ` Tim Deegan
2011-12-15 14:09 ` Wei Wang2
2011-12-15 14:13 ` Jan Beulich
2011-12-15 14:30 ` Wei Wang2
2011-12-14 15:29 ` [PATCH 04 of 16] amd iommu: Enable ppr log Wei Wang
2011-12-14 15:29 ` [PATCH 05 of 16] amd iommu: Enable guest level translation Wei Wang
2011-12-14 15:29 ` [PATCH 06 of 16] amd iommu: add ppr log processing into iommu interrupt handling Wei Wang
2011-12-14 15:29 ` [PATCH 07 of 16] amd iommu: Add 2 hypercalls for libxc Wei Wang
2011-12-14 16:44 ` Jan Beulich
2011-12-14 16:57 ` Wei Wang2
2011-12-14 17:03 ` Jan Beulich
2011-12-15 10:02 ` Wei Wang2
2011-12-14 15:29 ` [PATCH 08 of 16] amd iommu: Add a hypercall for hvmloader Wei Wang
2011-12-14 15:29 ` [PATCH 09 of 16] amd iommu: add iommu mmio handler Wei Wang
2011-12-14 15:29 ` [PATCH 10 of 16] amd iommu: Enable FC bit in iommu host level PTE Wei Wang
2011-12-14 15:29 ` [PATCH 11 of 16] amd iommu: Add a new flag to indication iommuv2 feature enabled or not Wei Wang
2011-12-15 13:39 ` Tim Deegan
2011-12-15 14:05 ` Wei Wang2
2011-12-14 15:29 ` [PATCH 12 of 16] hvmloader: Build IVRS table Wei Wang
2011-12-15 12:29 ` Ian Campbell
2011-12-14 15:29 ` [PATCH 13 of 16] libxc: add wrappers for new hypercalls Wei Wang
2011-12-14 15:29 ` [PATCH 14 of 16] libxl: bind virtual bdf to physical bdf after device assignment Wei Wang
2011-12-15 14:26 ` Ian Campbell
2011-12-14 15:29 ` [PATCH 15 of 16] libxl: Introduce a new guest config file parameter Wei Wang
2011-12-15 16:27 ` Ian Jackson
2011-12-14 15:29 ` [PATCH 16 of 16] libxl: add iommu parameter to qemu-dm Wei Wang
2011-12-15 14:30 ` Ian Campbell
2011-12-15 14:52 ` Wei Wang2 [this message]
2011-12-15 16:59 ` Ian Campbell
2011-12-15 17:10 ` Wei Wang2
2011-12-16 11:44 ` Ian Campbell
2011-12-15 10:23 ` [PATCH 00 of 16] [RFC] amd iommu: support ATS device passthru on IOMMUv2 systems Jan Beulich
2011-12-15 11:18 ` Wei Wang2
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=201112151552.09037.wei.wang2@amd.com \
--to=wei.wang2@amd.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).