Skip to content

Commit

Permalink
i915/gvt: Separate the MMIO tracking table from GVT-g
Browse files Browse the repository at this point in the history
To support the new mdev interfaces and the re-factor patches from
Christoph, which moves the GVT-g code into a dedicated module, the GVT-g
MMIO tracking table needs to be separated from GVT-g.

v7:

- Keep the marcos of device generation in GVT-g. (Christoph, Jani)

v6:

- Move the mmio_table.c into i915. (Christoph)
- Keep init_device_info and related structures in GVT-g. (Christoph)
- Refine the callbacks of the iterator. (Christoph)
- Move the flags of MMIO register defination to GVT-g. (Chrsitoph)
- Move the mmio block handling to GVT-g.

v5:

- Re-design the mmio table framework. (Christoph)

v4:

- Fix the errors of patch checking scripts.

v3:

- Fix the errors when CONFIG_DRM_I915_WERROR is turned on. (Jani)

v2:

- Implement a mmio table instead of generating it by marco in i915. (Jani)

Cc: Christoph Hellwig <hch@lst.de>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Vivi Rodrigo <rodrigo.vivi@intel.com>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.a.wang@intel.com>
Signed-off-by: Zhi Wang <zhi.a.wang@gmail.com>
  • Loading branch information
Zhi Wang authored and intel-lab-lkp committed Mar 25, 2022
1 parent 00f4150 commit 8203f91
Show file tree
Hide file tree
Showing 7 changed files with 1,476 additions and 899 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/Makefile
Expand Up @@ -320,7 +320,7 @@ i915-$(CONFIG_DRM_I915_SELFTEST) += \
i915-y += i915_vgpu.o

ifeq ($(CONFIG_DRM_I915_GVT),y)
i915-y += intel_gvt.o
i915-y += intel_gvt.o intel_gvt_mmio_table.o
include $(src)/gvt/Makefile
endif

Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i915/gvt/gvt.h
Expand Up @@ -36,6 +36,7 @@
#include <uapi/linux/pci_regs.h>

#include "i915_drv.h"
#include "intel_gvt.h"

#include "debug.h"
#include "hypercall.h"
Expand Down Expand Up @@ -272,7 +273,7 @@ struct intel_gvt_mmio {
/* Value of command write of this reg needs to be patched */
#define F_CMD_WRITE_PATCH (1 << 8)

const struct gvt_mmio_block *mmio_block;
struct gvt_mmio_block *mmio_block;
unsigned int num_mmio_block;

DECLARE_HASHTABLE(mmio_info_table, INTEL_GVT_MMIO_HASH_BITS);
Expand Down

0 comments on commit 8203f91

Please sign in to comment.