Einheri
Einheri

Reputation: 985

Is there a way to give guest kernel direct access to mmc controllers?

I'm running a linux guest on top of kvm/arm on an ARM board with 2 mmc controllers, one hooked up to an onboard emmc chip, and the other to a microSD card. We're looking for a way to give the guest pass-through access to one of the controllers, i.e. read/write access to the device without trapping to the hypervisor at all. We want to have the one of the partitions of the onboard eMMC chip mounted as the guest's root file system.

I read up on QEMU documentations, and it seems there is a way to mount host drives for the guest; however, it suggests that the host drive be mounted read-only, which probably won't solve our problem. Is there a solution available for arm-linux?

Thanks

Upvotes: 0

Views: 802

Answers (1)

Peter Maydell
Peter Maydell

Reputation: 11493

That recommendation to mount read-only is really there to avoid users letting both their guest VM and their host OS have write access to the same disk or partition, which is likely to result in the two OSes trying to make conflicting changes and corrupting data. In your case it sounds like you would be OK with only having the guest VM have access to the SD card, so it should be OK to pass it through read/write. Just make sure you don't try to write to the SD card from the host OS while the guest VM is running.

Upvotes: 0

Related Questions