From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Zhenyu Wang <zhenyuw@linux.intel.com>,
intel-gfx@lists.freedesktop.org,
intel-gvt-dev@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Fix GVT-g PVINFO version compatibility check
Date: Mon, 05 Jun 2017 16:40:09 +0300 [thread overview]
Message-ID: <1496670009.17619.9.camel@linux.intel.com> (raw)
In-Reply-To: <20170605030041.9619-1-zhenyuw@linux.intel.com>
On ma, 2017-06-05 at 11:00 +0800, Zhenyu Wang wrote:
> Current it's strictly checked if PVINFO version matches 1.0
> for GVT-g i915 guest which doesn't help for compatibility at
> all and forces GVT-g host can't extend PVINFO easily with version
> bump for real compatibility check.
>
> This fixes that to check minimal required PVINFO version instead
> and currently minimal 1.0 is required.
>
> Cc: Chuanxiao Dong <chuanxiao.dong@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: stable@vger.kernel.org # 4.10+
> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
<SNIP>
> +++ b/drivers/gpu/drm/i915/i915_pvinfo.h
> @@ -37,7 +37,8 @@
> #define VGT_VERSION_MINOR 0
>
> #define INTEL_VGT_IF_VERSION_ENCODE(major, minor) ((major) << 16 | (minor))
> -#define INTEL_VGT_IF_VERSION \
> +/* minimal required PVINFO version */
> +#define INTEL_VGT_IF_VERSION_REQUIRED \
> INTEL_VGT_IF_VERSION_ENCODE(VGT_VERSION_MAJOR, VGT_VERSION_MINOR)
I think this can be dropped completely.
> @@ -72,7 +72,7 @@ void i915_check_vgpu(struct drm_i915_private *dev_priv)
> version = INTEL_VGT_IF_VERSION_ENCODE(
> __raw_i915_read16(dev_priv, vgtif_reg(version_major)),
> __raw_i915_read16(dev_priv, vgtif_reg(version_minor)));
Here one would check that
if (version_major != VGT_VERSION_MAJOR)
DRM_INFO("VGT interface version mismatch!\n");
return;
}
That makes sure that major version must always match (incrementing
major version is a direct indication of interface incompatibility). I'm
not sure if we want to check the minor version at all, at load time.
Instead we should check the minor version for each new feature we know
has been added. That way an older i915 module could keep running in the
DOM0, and the newer i915 modules in VMs just wouldn't attempt to use
the new features until the DOM0 gets an update, too.
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-06-05 13:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-05 3:00 [PATCH] drm/i915: Fix GVT-g PVINFO version compatibility check Zhenyu Wang
2017-06-05 3:25 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-06-05 13:40 ` Joonas Lahtinen [this message]
2017-06-07 9:16 ` [PATCH] " Zhenyu Wang
2017-06-08 6:58 ` [PATCH v2] " Zhenyu Wang
2017-06-08 9:17 ` Joonas Lahtinen
2017-06-09 7:48 ` [PATCH v3] " Zhenyu Wang
2017-06-08 7:27 ` ✓ Fi.CI.BAT: success for drm/i915: Fix GVT-g PVINFO version compatibility check (rev2) Patchwork
2017-06-09 8:10 ` ✓ Fi.CI.BAT: success for drm/i915: Fix GVT-g PVINFO version compatibility check (rev3) Patchwork
2017-06-12 12:46 ` Joonas Lahtinen
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=1496670009.17619.9.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=zhenyuw@linux.intel.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