<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 13, 2022 at 7:04 PM Daniel P. Berrangé <<a href="mailto:berrange@redhat.com">berrange@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Jul 13, 2022 at 07:00:17PM +0800, Han Han wrote:<br>
> Hello,<br>
> I found that the default USB controller for q35 machine type is qemu-xhci<br>
> while for pc it is piix3-uhci. Here are the results(on qemu-kvm-7.0.0<br>
> qemu-kvm-7.0.0):<br>
> ➜  ~ cat /tmp/usb.xml<br>
> <domain type="kvm"><br>
>   <name>USB</name><br>
>   <uuid>1a81d4ef-6537-4ae8-b257-8a15e0c0525f</uuid><br>
>   <memory>2097152</memory><br>
>   <currentMemory>2097152</currentMemory><br>
>   <vcpu>1</vcpu><br>
>   <os><br>
>     <type arch="x86_64" machine="q35">hvm</type><br>
>     <boot dev="hd"/><br>
>   </os><br>
>   <devices><br>
>     <emulator>/usr/libexec/qemu-kvm</emulator><br>
>   </devices><br>
> </domain><br>
> <br>
> ➜  ~ virsh define /tmp/usb.xml && virsh dumpxml USB|grep usb<br>
> Domain 'USB' defined from /tmp/usb.xml<br>
> <br>
>     <controller type='usb' index='0' model='qemu-xhci'><br>
> <br>
> <br>
> ➜  ~ cat /tmp/usb-pc.xml<br>
> <domain type="kvm"><br>
>   <name>USB</name><br>
>   <uuid>1a81d4ef-6537-4ae8-b257-8a15e0c0525f</uuid><br>
>   <memory>2097152</memory><br>
>   <currentMemory>2097152</currentMemory><br>
>   <vcpu>1</vcpu><br>
>   <os><br>
>     <type arch="x86_64" machine="pc">hvm</type><br>
>     <boot dev="hd"/><br>
>   </os><br>
>   <devices><br>
>     <emulator>/usr/libexec/qemu-kvm</emulator><br>
>   </devices><br>
> </domain><br>
> <br>
> ➜  ~ virsh define /tmp/usb-pc.xml && virsh dumpxml USB|grep usb<br>
> Domain 'USB' defined from /tmp/usb-pc.xml<br>
> <br>
>     <controller type='usb' index='0' model='piix3-uhci'><br>
> <br>
> And the default usb controller for q35 has been added since:<br>
> ed2049ea19 qemu: auto-add generic xhci rather than NEC xhci to Q35 domains<br>
> <br>
> As I know, pc machine supports qemu-xhci as well.           Morever, the<br>
> performance of qemu-xhci is better than piix3-uhci. So why not update the<br>
> default usb controller of pc machine type to qemu-xhci? I think we can<br>
> improve it here.<br>
<br>
A qemu-xhci controller can be added to any x86 machien type regardless<br>
of the default, and most mgmt apps will do exactly that.<br>
 </blockquote><div>Does that mean, the default USB controller for a specific x86 machine type does NOT matter? <br></div><div>And leave the default USB controller to up-layer mgmt apps?</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
With regards,<br>
Daniel<br>
-- <br>
|: <a href="https://berrange.com" rel="noreferrer" target="_blank">https://berrange.com</a>      -o-    <a href="https://www.flickr.com/photos/dberrange" rel="noreferrer" target="_blank">https://www.flickr.com/photos/dberrange</a> :|<br>
|: <a href="https://libvirt.org" rel="noreferrer" target="_blank">https://libvirt.org</a>         -o-            <a href="https://fstop138.berrange.com" rel="noreferrer" target="_blank">https://fstop138.berrange.com</a> :|<br>
|: <a href="https://entangle-photo.org" rel="noreferrer" target="_blank">https://entangle-photo.org</a>    -o-    <a href="https://www.instagram.com/dberrange" rel="noreferrer" target="_blank">https://www.instagram.com/dberrange</a> :|<br>
<br>
</blockquote></div></div>