From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Grzegorz Uriasz <gorbak25@gmail.com>, qemu-devel@nongnu.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
jakub@bartmin.ski, marmarek@invisiblethingslab.com,
Anthony Perard <anthony.perard@citrix.com>,
j.nowak26@student.uw.edu.pl, xen-devel@lists.xenproject.org,
contact@puzio.waw.pl
Subject: Re: [PATCH] hw/xen_pt: Don't grant opregion permissions
Date: Mon, 15 Jun 2020 08:10:24 +0200 [thread overview]
Message-ID: <acbe023e-def7-18b5-dc67-604221e4e1df@redhat.com> (raw)
In-Reply-To: <2157e10d63619d43151fe8b8ca913b44c54aba6e.1592176600.git.gorbak25@gmail.com>
Hi Grzegorz,
On 6/15/20 1:21 AM, Grzegorz Uriasz wrote:
> With the upstreaming of linux based stubdomains to xen, qemu can't
> assume it runs inside dom0 - permission assignment must be moved to
> libxl running in dom0. This xen patch:
> https://lists.xenproject.org/archives/html/xen-devel/2020-06/msg00973.html
> implements granting the required permissions to the stubdomain running
> qemu. This patch removes granting opregion permissions in qemu - this
> should be fine as when qemu is running inside dom0 the memory mapping will
> be successfully created without first explicitly granting the permission.
>
> Signed-off-by: Grzegorz Uriasz <gorbak25@gmail.com>
> ---
> hw/xen/xen_pt_graphics.c | 13 -------------
> 1 file changed, 13 deletions(-)
>
> diff --git a/hw/xen/xen_pt_graphics.c b/hw/xen/xen_pt_graphics.c
> index 7d46e9c209..303674365b 100644
> --- a/hw/xen/xen_pt_graphics.c
> +++ b/hw/xen/xen_pt_graphics.c
> @@ -283,19 +283,6 @@ void igd_write_opregion(XenPCIPassthroughState *s, uint32_t val)
> igd_guest_opregion = (unsigned long)(val & ~XEN_PCI_INTEL_OPREGION_MASK)
> | (igd_host_opregion & XEN_PCI_INTEL_OPREGION_MASK);
>
> - ret = xc_domain_iomem_permission(xen_xc, xen_domid,
> - (unsigned long)(igd_host_opregion >> XC_PAGE_SHIFT),
> - XEN_PCI_INTEL_OPREGION_PAGES,
> - XEN_PCI_INTEL_OPREGION_ENABLE_ACCESSED);
> -
> - if (ret) {
> - XEN_PT_ERR(&s->dev, "[%d]:Can't enable to access IGD host opregion:"
> - " 0x%lx.\n", ret,
> - (unsigned long)(igd_host_opregion >> XC_PAGE_SHIFT)),
> - igd_guest_opregion = 0;
> - return;
> - }
Shouldn't this be somehow versioned? I.e. if the libxl does not have
the change then keep the current code?
> -
> ret = xc_domain_memory_mapping(xen_xc, xen_domid,
> (unsigned long)(igd_guest_opregion >> XC_PAGE_SHIFT),
> (unsigned long)(igd_host_opregion >> XC_PAGE_SHIFT),
>
next prev parent reply other threads:[~2020-06-15 6:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-14 23:21 [PATCH] hw/xen_pt: Don't grant opregion permissions Grzegorz Uriasz
2020-06-15 6:10 ` Philippe Mathieu-Daudé [this message]
2020-06-15 12:47 ` Roger Pau Monné
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=acbe023e-def7-18b5-dc67-604221e4e1df@redhat.com \
--to=philmd@redhat.com \
--cc=anthony.perard@citrix.com \
--cc=contact@puzio.waw.pl \
--cc=gorbak25@gmail.com \
--cc=j.nowak26@student.uw.edu.pl \
--cc=jakub@bartmin.ski \
--cc=marmarek@invisiblethingslab.com \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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).