All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ajay Garg <ajaygargnsit@gmail.com>
To: kvm@vger.kernel.org
Subject: Generically, how to see a host-pci-device on guest?
Date: Tue, 28 Sep 2021 13:03:47 +0530	[thread overview]
Message-ID: <CAHP4M8V=tpLaUYidAJLi8U+p-VvKrK2qR97pebqec29r60jrFg@mail.gmail.com> (raw)

Hi All.

I have the following set up:

* Host : Ubuntu-16, on a amd64 hardware
* Guest : Ubuntu-21, as a VM on QEMU/KVM.


Now, I have a SD-MMC card-reader attached physically on the host,
which is listed as expected if I do lspci on the host :

############################################
ajay@ajay-Latitude-E6320:~/ldd3$ lspci
....
....
0a:00.0 SD Host controller: O2 Micro, Inc. OZ600FJ0/OZ900FJ0/OZ600FJS
SD/MMC Card Reader Controller (rev 05)
....
############################################


However, if I try doing lspci on the guest, this pci-device is not listed.




So, I have the following queries :

* Would it require enabling pci-passthrough (if not already) in the
guest-kernel, on a global basis?
* Does having raw-physical-access on the guest, require support from
the pci-device itself?


My ultimate aim is to get the sd-mmc-driver that I wrote for the
host-machine, to run unmodified on the guest-machine (obviously after
the sd-card-reader is detected on the guest, and the code recompiled
on the guest).


Will be grateful for any pointers.


Thanks and Regards,
Ajay

             reply	other threads:[~2021-09-28  7:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28  7:33 Ajay Garg [this message]
2021-09-28 14:54 ` Generically, how to see a host-pci-device on guest? Ajay Garg
2021-09-30  2:37   ` Ajay Garg

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='CAHP4M8V=tpLaUYidAJLi8U+p-VvKrK2qR97pebqec29r60jrFg@mail.gmail.com' \
    --to=ajaygargnsit@gmail.com \
    --cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.