qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: Programmingkid <programmingkidx@gmail.com>
Cc: QEMU devel list <qemu-devel@nongnu.org>,
	gerd@kraxel.org, Howard Spoelstra <hsp.cat7@gmail.com>
Subject: Re: Mac OS real USB device support issue
Date: Tue, 6 Apr 2021 18:53:37 +0200 (CEST)	[thread overview]
Message-ID: <ace05be8-a256-788f-b896-45398d752d3@eik.bme.hu> (raw)
In-Reply-To: <967C172F-B708-40A2-862E-9948F0844133@gmail.com>

On Tue, 6 Apr 2021, Programmingkid wrote:
>> On Apr 6, 2021, at 10:01 AM, Howard Spoelstra <hsp.cat7@gmail.com> wrote:
>> On Tue, Apr 6, 2021 at 3:44 PM Programmingkid <programmingkidx@gmail.com> wrote:
>>>
>>> Hi Gerd,
>>>
>>> I was wondering if you had access to a Mac OS 10 or Mac OS 11 machine to test USB support. I am on Mac OS 11.1 and cannot make USB devices work with any of my guests. So far these are the guests I have tested with:
>>>
>>> - Windows 7
>>> - Mac OS 9.2
>>> - Windows 2000
>>>
>>> I have tried using USB flash drives, USB sound cards, and an USB headset. They all show up under 'info usb', but cannot be used in the guest. My setup does use a USB-C hub so I'm not sure if this is a bug with QEMU or an issue with the hub. Would you have any information on this issue?
>>
>> Hi John,
>>
>> As far as the Mac OS 9.2 guest is concerned on a mac OS host, it does
>> not support USB 2.0. I was successful only in passing through a USB
>> flash drive that was forced into USB 1.1 mode by connecting it to a
>> real USB 1.1 hub and unloading the kext it used.
>>
>> Best,
>> Howard
>
> Hi Howard, I was actually thinking about CC'ing you for this email. Glad 
> you found it. Unloading kext files does not sound pleasant. Maybe there 
> is some better way of doing it.

In any case, until you make sure nothing tries to drive the device on the 
host, passing it to a guest likely will fail because then two drivers from 
two OSes would try to access it simultaneously which likely creates a mess 
as the device and drivers don't expect this. So you can't just pass a 
device through that the host has recognised and is driving without somehow 
getting the host to leave it alone first before you can pass it through. 
Unloading the driver is one way to do that (although it probably breaks 
all other similar devices too). Maybe there's another way to unbind a 
device from the host such as ejecting it first but then I'm not sure if 
the low level USB needed for accessing the device still works after that 
or it's completely forgotten. There's probably a doc somewhere that 
describes how it works and how can you plug a device without also getting 
higher level drivers to load or if there's no official ways for that then 
you'll need to do some configuration on the host to avoid it grabbing 
devices that you want to pass through. On Linux you can add an udev rule 
to ignore the device (maybe also adding TAG+="uaccess" to allow console 
users to use it without needing root access) but not sure how USB works on 
macOS.

Regards,
BALATON Zoltan


  reply	other threads:[~2021-04-06 16:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 13:44 Mac OS real USB device support issue Programmingkid
2021-04-06 14:01 ` Howard Spoelstra
2021-04-06 14:20   ` BALATON Zoltan
2021-04-06 14:33     ` Programmingkid
2021-04-06 14:31   ` Programmingkid
2021-04-06 16:53     ` BALATON Zoltan [this message]
2021-04-06 19:28       ` Programmingkid
2021-04-06 23:18         ` BALATON Zoltan
2021-04-07  1:52           ` Programmingkid
2021-04-07  5:26             ` Howard Spoelstra
2021-04-07  5:28               ` Howard Spoelstra
2021-04-07 10:27                 ` BALATON Zoltan
2021-04-09 19:37                 ` Programmingkid
2021-04-10  7:28                   ` Howard Spoelstra
2021-04-10 11:29                     ` BALATON Zoltan
2021-05-16  0:33                       ` Programmingkid
2021-04-08 11:05             ` Gerd Hoffmann
2021-04-08 16:40               ` Howard Spoelstra
2021-04-08 19:50                 ` Programmingkid
2021-04-08 19:43               ` Programmingkid
2021-04-09  8:08                 ` Gerd Hoffmann
2021-04-14 14:03                   ` Programmingkid

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=ace05be8-a256-788f-b896-45398d752d3@eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=gerd@kraxel.org \
    --cc=hsp.cat7@gmail.com \
    --cc=programmingkidx@gmail.com \
    --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).