From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: Stefan Fritsch <sf@sfritsch.de>
Cc: intel-gfx@lists.freedesktop.org,
intel-gvt-dev <intel-gvt-dev@lists.freedesktop.org>
Subject: Re: [Intel-gfx] drm/i915: Detecting Vt-d when running as guest os
Date: Mon, 19 Oct 2020 17:19:09 +0800 [thread overview]
Message-ID: <20201019091909.GQ27141@zhen-hp.sh.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2010161716270.29164@manul.sfritsch.de>
[-- Attachment #1.1: Type: text/plain, Size: 1376 bytes --]
On 2020.10.16 17:19:19 +0200, Stefan Fritsch wrote:
> Hi,
>
> if Linux is running as a guest and the host is doing igd-pass-thorugh with
> VT-d enabled, the i915 driver does not work all that great. The most
> obvious problem is that there are dozens of 'Fault errors on pipe A'
> errrors logged per second, but depending on the hardware there can be
> other issues, too. I will send a patch to rate-limit that message in a
> separate mail.
>
> The i915 has various quirks for VT-d and these should be enabled even if
> Linux is running as a guest and does itself have iommu enabled. I have
> checked that making intel_vtd_active() form i915_drv.h return true makes
> the error messages go away. How could Linux detect this situation? Maybe
> simply check the Hypervisor cpuid bit? Or would you prefer a module
> parameter, or a combination of both? Or is there another way to detect
> that VT-d is enabled for the igd device?
>
I think that's right, although I haven't tried to force intel_vtd_active()
for guest, but I did see those fault errors on some machine. You can use
hypervisor cpuid bit, and need to seperate case for GVT which is detected by
intel_vgpu_active(), but I'm not sure if this should be taken in nested case,
suppose those quirks should still work?
--
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-10-19 9:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 15:19 [Intel-gfx] drm/i915: Detecting Vt-d when running as guest os Stefan Fritsch
2020-10-19 9:19 ` Zhenyu Wang [this message]
2020-10-19 9:57 ` Chris Wilson
2020-10-19 9:51 ` Zhenyu Wang
2020-10-19 10:20 ` Chris Wilson
2020-10-19 10:07 ` Zhenyu Wang
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=20201019091909.GQ27141@zhen-hp.sh.intel.com \
--to=zhenyuw@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=sf@sfritsch.de \
/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