public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: kraxel@redhat.com
To: Colin Xu <colin.xu@intel.com>
Cc: zhenyuw@linux.intel.com, devel@edk2.groups.io, lersek@redhat.com,
	alex.williamson@redhat.com, rebecca@bsdio.com
Subject: Re: [edk2-devel] [PATCH v2 1/2] OvmfPkg/IntelGvtGopDxe: Intel GVT-g GOP Implementation.
Date: Fri, 19 Mar 2021 10:06:41 +0100	[thread overview]
Message-ID: <20210319090641.zx7ly4ev7ileticc@sirius.home.kraxel.org> (raw)
In-Reply-To: <alpine.LNX.2.22.419.2103190929110.9695@coxu-arch-shz>

  Hi,

> operations but handle the common logic. In this opregion case, QEMU and
> seabios only copies the raw data, but the contents are left to gvt to fill
> so that gvt could fill different data in different cases.

Yes, gvt could do that.

The big question is: does that actually happen?  When looking at
drivers/gpu/drm/i915/gvt/opregion.c it seems the opregion is pretty
static.

Are there plausible reasons for that capability being needed in the
future?

> Otherwise any change requires SEABIOS update, instead of dyncamilly
> filled by gvt.

That clearly isn't an option.

> One benefit OVMF overcomes SEABIOS is that IntelGvtGopDxe can be loaded
> as a standalone driver.

Well, seabios allows standalone drivers too.  It's called vgabios ;)

> So it maybe possible that in OVMF case, both gvt and
> IntelGvtGopDxe can act part of Intel vGPU virtualization component. However
> the behavior of gvt+seabios and gvt+ovmf will be inconsistent.

Well, in case the opregion is not static there is still the option to
use the pci rom bar instead of fw_cfg to deliver the opregion content
to the guest.

> May need
> update gvt logic so that if IntelGvtGopDxe generate opregion, gvt can still
> update it before any opregion consumer using it.

Hmm.  Can gvt trap pci config space writes?  IIRC pci config space is
simply yet another vfio region, so that should be possible.  gvt could
update the opregion then when the firmware updates the opregion address.

If that actually works there is little reason for IntelGvtGopDxe (and
seabios) to fill the opregion in the first place though.  We could
change the opregion initialization protocol to something like this:

  (1) firmware allocates memory for the opregion
  (2) firmware fills signature and size
  (3) firmware writes opregion address to pci config space
  (4) gvt goes fill opregion at the given address in guest memory.

Maybe it would be better to reserve a paravirtual mmio register for that
purpose to make the whole thing a bit more robust.

> Then, loading fw_cfg can be
> dropped without preventing guest OS driver find it.

I guess we have to keep that for a while for backward compatibility
reasons.

take care,
  Gerd


  reply	other threads:[~2021-03-19  9:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05  6:20 [PATCH v2 0/2] OvmfPkg/IntelGvtGopDxe: Add Intel GVT-g GOP Colin Xu
2021-03-05  6:20 ` [PATCH v2 1/2] OvmfPkg/IntelGvtGopDxe: Intel GVT-g GOP Implementation Colin Xu
2021-03-05 13:19   ` [edk2-devel] " Laszlo Ersek
2021-03-12  3:57     ` Colin Xu
2021-03-12 12:35       ` Gerd Hoffmann
2021-03-19  2:08         ` Colin Xu
2021-03-19  9:06           ` kraxel [this message]
2021-03-26  7:37             ` Colin Xu
2021-03-12  4:42     ` Rebecca Cran
2021-03-12  4:55       ` Colin Xu
2021-03-05  6:20 ` [PATCH v2 2/2] OvmfPkg/IntelGvtGopDxe: Enable GVT-g GOP in OvmfPkg DSC & DFD Colin Xu

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-list 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=20210319090641.zx7ly4ev7ileticc@sirius.home.kraxel.org \
    --to=devel@edk2.groups.io \
    /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