title: KVM idle VM CPU 100% usage with ehci
body: <p>My idle KVM Windows VM used 100% CPU.
  It went from 100% host CPU down to 3% host CPU after I disabled ehci(Standard Enhanced PCI to USB Host Controller) in Device Manager.
  Device Magener Picture<br>
  <a href="https://i.stack.imgur.com/L0sE1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L0sE1.png" alt="enter image description here"></a></p>
  
  <p>Vm run normally at the beginning. It went up to 100% after a long timer(may be one night long).</p>
  
  <ol>
  <li><p>Why the cpu usage reduced when I disabled the ehci?</p></li>
  <li><p>Is there any other way to reduce the cpu usage?</p></li>
  </ol>
  
  <p>Here is my libvirt.xml</p>
  
  <pre><code>&lt;domain type="kvm" xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0"&gt;
    &lt;name&gt;i-win2003/name&gt;
    &lt;os&gt;
      &lt;type&gt;hvm&lt;/type&gt;
      &lt;boot dev='hd'/&gt;
    &lt;/os&gt;
    &lt;features&gt;
      &lt;acpi/&gt;
    &lt;/features&gt;
    &lt;clock offset="localtime"/&gt;
    &lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt;
    &lt;on_reboot&gt;restart&lt;/on_reboot&gt;
    &lt;on_crash&gt;destroy&lt;/on_crash&gt;
    &lt;vcpu current="1"&gt;1&lt;/vcpu&gt;
   &lt;memory&gt;2097152&lt;/memory&gt;
    &lt;currentMemory&gt;2097152&lt;/currentMemory&gt;
    &lt;devices&gt;
      &lt;disk device="disk" type="file"&gt;
        &lt;driver name="qemu" type="qcow2"/&gt;
        &lt;source file="/root/i-win2003/snap.qcow2"/&gt;
        &lt;target bus="virtio" dev="vda"/&gt;
      &lt;/disk&gt;
      &lt;disk type='file' device='cdrom'&gt;
        &lt;source dev=''/&gt;
        &lt;target dev='hdc' bus='ide'/&gt;
      &lt;/disk&gt;
      &lt;serial type="pty"&gt;
        &lt;source path="/dev/pts/1"/&gt;
        &lt;target port="0"/&gt;
      &lt;/serial&gt;
     &lt;interface type='bridge'&gt;
        &lt;mac address='fa:16:3e:81:68:b4'/&gt;
        &lt;source bridge='eucabr'/&gt;
        &lt;model type='virtio'/&gt;
        &lt;driver name='qemu'/&gt;
        &lt;alias name='net0'/&gt;
      &lt;/interface&gt;
      &lt;channel type='unix'&gt;
        &lt;source mode='bind'/&gt;
        &lt;target type='virtio' name='org.qemu.guest_agent.0'/&gt;
      &lt;/channel&gt;
      &lt;controller type="usb" index="0" model="ich9-ehci1"/&gt;
      &lt;controller type="usb" index="0" model="ich9-uhci1"/&gt;
      &lt;controller type="usb" index="0" model="ich9-uhci2"/&gt;
      &lt;controller type="usb" index="0" model="ich9-uhci3"/&gt;
      &lt;input type="tablet" bus="usb"/&gt;
      &lt;input type="mouse" bus="ps2"/&gt;
      &lt;graphics type="vnc" port="-1" autoport="yes" keymap="en-us" listen="0.0.0.0"/&gt;
    &lt;/devices&gt;
    &lt;qemu:commandline&gt;
    &lt;/qemu:commandline&gt;
  &lt;/domain&gt;
  </code></pre>