[Qemu-devel] [RFC 0/6] Refine IGD stolen memory support in VFIO

Zhi Wang posted 6 patches 6 years, 10 months ago
Only 0 patches received!
hw/vfio/Makefile.objs    |   2 +-
hw/vfio/intel-platform.c | 366 +++++++++++++++++++++++++++++++++++++++++++++++
hw/vfio/intel-platform.h |  38 +++++
hw/vfio/pci-quirks.c     | 322 ++++++++---------------------------------
4 files changed, 463 insertions(+), 265 deletions(-)
create mode 100644 hw/vfio/intel-platform.c
create mode 100644 hw/vfio/intel-platform.h
[Qemu-devel] [RFC 0/6] Refine IGD stolen memory support in VFIO
Posted by Zhi Wang 6 years, 10 months ago
This patch series are aim to refine the IGD stolen memory support in QEMU.

Some features of Intel HW relies on the stolen memory to work, but some of
registers used to indicate the base address of stolen memory can only be
programmed once after system is powered-up. This will cause problems if
the base of the stolen memory is changed during IGD passthrough.

The solution of this patch series is allocating a new VM dedicated memory
as "guest stolen memory" in QEMU for isolation and let the "guest stolen
memory" sits in the same PA as host.

Also it introduces Intel platform definitions and clears some old funtions
and definitions.

Zhi Wang (6):
  vfio: Add Intel platform definitions
  vfio: Setup IGD quirks earlier
  vfio: Setup IGD stolen memory
  vfio: Refine GGTT clearing
  vfio: Remove extra quirks and old definitions
  vfio: Setup IGD stolen memory under secondary mode

 hw/vfio/Makefile.objs    |   2 +-
 hw/vfio/intel-platform.c | 366 +++++++++++++++++++++++++++++++++++++++++++++++
 hw/vfio/intel-platform.h |  38 +++++
 hw/vfio/pci-quirks.c     | 322 ++++++++---------------------------------
 4 files changed, 463 insertions(+), 265 deletions(-)
 create mode 100644 hw/vfio/intel-platform.c
 create mode 100644 hw/vfio/intel-platform.h

-- 
2.7.4


Re: [Qemu-devel] [RFC 0/6] Refine IGD stolen memory support in VFIO
Posted by Tian, Kevin 6 years, 10 months ago
> From: Wang, Zhi A
> Sent: Tuesday, May 30, 2017 1:31 AM
> 
> This patch series are aim to refine the IGD stolen memory support in QEMU.
> 
> Some features of Intel HW relies on the stolen memory to work, but some of
> registers used to indicate the base address of stolen memory can only be
> programmed once after system is powered-up. This will cause problems if
> the base of the stolen memory is changed during IGD passthrough.

'programmed once' suppose by BIOS. Then why would the base be changed
later?

> 
> The solution of this patch series is allocating a new VM dedicated memory
> as "guest stolen memory" in QEMU for isolation and let the "guest stolen
> memory" sits in the same PA as host.

As a RFC you need tell the whole story of the problem and your proposal.
Just one sentence is far away from the RFC purpose, e.g. people may
immediately ask whether you fake a guest stolen memory to work around
some limitation in guest driver (which e.g. only boots when observing the
presence of stolen memory) or to activate a feature which strictly uses
stolen memory (e.g. framebuffer compression). If the latter then what
matters is the real stolen memory instead of faked one, blah, blah, ...

> 
> Also it introduces Intel platform definitions and clears some old funtions
> and definitions.
> 
> Zhi Wang (6):
>   vfio: Add Intel platform definitions
>   vfio: Setup IGD quirks earlier
>   vfio: Setup IGD stolen memory
>   vfio: Refine GGTT clearing
>   vfio: Remove extra quirks and old definitions
>   vfio: Setup IGD stolen memory under secondary mode
> 
>  hw/vfio/Makefile.objs    |   2 +-
>  hw/vfio/intel-platform.c | 366
> +++++++++++++++++++++++++++++++++++++++++++++++
>  hw/vfio/intel-platform.h |  38 +++++
>  hw/vfio/pci-quirks.c     | 322 ++++++++---------------------------------
>  4 files changed, 463 insertions(+), 265 deletions(-)
>  create mode 100644 hw/vfio/intel-platform.c
>  create mode 100644 hw/vfio/intel-platform.h
> 
> --
> 2.7.4