qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: cyrozap <1920013@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1920013] [NEW] Unable to pass-through PCIe devices from a ppc64le host to an x86_64 guest
Date: Thu, 18 Mar 2021 12:22:57 -0000	[thread overview]
Message-ID: <161607017744.16047.7761702341537087563.malonedeb@gac.canonical.com> (raw)

Public bug reported:

Attempting to pass through a PCIe device from a ppc64le host to an
x86_64 guest with QEMU v5.2.0-3031-g571d413b5d (built from git master)
fails with the following error:

    include/exec/memory.h:43:IOMMU_MEMORY_REGION: Object 0x10438eb00 is
not an instance of type qemu:iommu-memory-region

To reproduce this issue, simply run the following command on a POWER9
system:

    qemu-system-x86_64 -machine q35 -device vfio-pci,host=$DBSF

Where $DBSF is a domain:bus:slot.function PCIe device address.

This also fails with QEMU 3.1.0 (from Debian Buster), so I assume this
has never worked. Helpfully, the error message it prints seems to
indicate where the problem is:

    hw/vfio/spapr.c:147:vfio_spapr_create_window: Object 0x164473510 is
not an instance of type qemu:iommu-memory-region

My kernel (Linux v5.8.0 plus some small unrelated patches) is built with
the page size set to 4k, so this issue shouldn't be due to a page size
mismatch. And as I stated earlier, my host arch is ppc64le, so it
shouldn't be an endianness issue, either.

I assume this should be possible (in theory) since I've seen reports of
others getting PCIe passthrough working with aarch64 guests on x86_64
hosts, but of course that (passthrough to weird guest arch on x86) is
somewhat the opposite of what I'm trying to do (passthrough to x86 on
weird host arch) so I don't know for sure. If it is possible, I'm
willing to develop a fix myself, but I'm almost completely unfamiliar
with QEMU's internals so if anyone has any advice on where to start I'd
greatly appreciate it.

** Affects: qemu
     Importance: Undecided
         Status: New


** Tags: ppc

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1920013

Title:
  Unable to pass-through PCIe devices from a ppc64le host to an x86_64
  guest

Status in QEMU:
  New

Bug description:
  Attempting to pass through a PCIe device from a ppc64le host to an
  x86_64 guest with QEMU v5.2.0-3031-g571d413b5d (built from git master)
  fails with the following error:

      include/exec/memory.h:43:IOMMU_MEMORY_REGION: Object 0x10438eb00
  is not an instance of type qemu:iommu-memory-region

  To reproduce this issue, simply run the following command on a POWER9
  system:

      qemu-system-x86_64 -machine q35 -device vfio-pci,host=$DBSF

  Where $DBSF is a domain:bus:slot.function PCIe device address.

  This also fails with QEMU 3.1.0 (from Debian Buster), so I assume this
  has never worked. Helpfully, the error message it prints seems to
  indicate where the problem is:

      hw/vfio/spapr.c:147:vfio_spapr_create_window: Object 0x164473510
  is not an instance of type qemu:iommu-memory-region

  My kernel (Linux v5.8.0 plus some small unrelated patches) is built
  with the page size set to 4k, so this issue shouldn't be due to a page
  size mismatch. And as I stated earlier, my host arch is ppc64le, so it
  shouldn't be an endianness issue, either.

  I assume this should be possible (in theory) since I've seen reports
  of others getting PCIe passthrough working with aarch64 guests on
  x86_64 hosts, but of course that (passthrough to weird guest arch on
  x86) is somewhat the opposite of what I'm trying to do (passthrough to
  x86 on weird host arch) so I don't know for sure. If it is possible,
  I'm willing to develop a fix myself, but I'm almost completely
  unfamiliar with QEMU's internals so if anyone has any advice on where
  to start I'd greatly appreciate it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1920013/+subscriptions


             reply	other threads:[~2021-03-18 12:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 12:22 cyrozap [this message]
2021-03-19 12:56 ` [Bug 1920013] Re: Unable to pass-through PCIe devices from a ppc64le host to an x86_64 guest cyrozap
2021-03-19 14:25 ` Laurent Vivier
2021-03-20  6:36 ` cyrozap
2021-05-14 18:52 ` Thomas Huth
2021-06-06 18:46 ` cyrozap
2021-06-07  5:56 ` Thomas Huth

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=161607017744.16047.7761702341537087563.malonedeb@gac.canonical.com \
    --to=1920013@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).