guest: Only add default usb redirdev for x86

Since we only attempt to add a default USB controller for x86, match
it by only trying to add redir devices on x86 as well. Fixes a uitests
failure for ppc testing, since the test:/// driver doesn't add an
implied USB controller, and libvirt now validates that one was provided.
This commit is contained in:
Cole Robinson 2017-03-05 14:30:11 -05:00
parent a3508f2269
commit 8ebed65459
3 changed files with 2 additions and 4 deletions

View File

@ -30,7 +30,5 @@
<video>
<model type="vga"/>
</video>
<redirdev bus="usb" type="spicevmc"/>
<redirdev bus="usb" type="spicevmc"/>
</devices>
</domain>

View File

@ -34,7 +34,5 @@
<video>
<model type="vga"/>
</video>
<redirdev bus="usb" type="spicevmc"/>
<redirdev bus="usb" type="spicevmc"/>
</devices>
</domain>

View File

@ -1126,6 +1126,8 @@ class Guest(XMLBuilder):
return
if self.get_devices("redirdev"):
return
if not self.os.is_x86():
return
if not self.conn.check_support(self.conn.SUPPORT_CONN_USBREDIR):
return