Skip to content
Commit 1bda80d5 authored by Vivek Kumar Gautam's avatar Vivek Kumar Gautam Committed by Nuno Lopes
Browse files

features/virtualization: disable MTE for PCI device assignment



The PCI device assignment test at present fails with below errors:

  # lkvm run -k /mnt/Image -m 512 -c 2 --name guest-274
  Info: Using IOMMU type 3 for VFIO container
  Error: 0000:08:00.1: failed to register region with KVM
  Warning: [13b5:ff80] Error activating emulation for BAR 0
  Error: 0000:08:00.1: failed to configure regions
  Warning: Failed init: vfio__init  Fatal: Initialisation failed

This happens because the VFIO driver in kvmtool tries to create mmap
mappings for the device BAR regions with MAP_SHARED/VM_SHARED flag.
On platforms that have support for MTE, the mm/mmap driver in Linux
kernel also adds VM_MTE flag to the mmap request. However, when kvmtool
sets aside this memory with KVM_SET_USER_MEMORY_REGION it fails as the
VM_SHARED mappings with MTE aren't allowed.

A quick fix to this problem could be to disable MTE with PCI device
assignment test.

Signed-off-by: Vivek Kumar Gautam's avatarVivek Gautam <vivek.gautam@arm.com>
Change-Id: I98de264778b9cae3483a73c03987a5a6bff2e1a0
parent 5628e352
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment