qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] xhci: allow 1 and 2 bytes accesses to capabilit


From: Alejandro Martinez
Subject: Re: [Qemu-devel] [PATCH] xhci: allow 1 and 2 bytes accesses to capability registers
Date: Thu, 6 Sep 2012 11:20:14 +0200

Gerd,

On Tue, Sep 4, 2012 at 3:30 PM, Gerd Hoffmann <address@hidden> wrote:
> On 08/30/12 14:49, Alejandro Martinez Ruiz wrote:
>> Some xHC drivers (most notably on Windows and BSD systems) read
>> the first capability registers using 1 and 2 bytes accesses, since
>> this is how they are defined in section 5.3 of the xHCI specs.
>>
>> Enabling these kind of read accesses allows Windows and FreeBSD
>> guests to properly recognize the host controller.
>>
>> As this is an exception to the general 4-byte aligned accesses rule,
>> we special-case the code path for capability reading and implement
>> checks to guard against wrong size/alignment combinations.
>
> No need to do that by hand, the memory api can handle it.  Can you check
> whenever usb-next
> (http://www.kraxel.org/cgit/qemu/log/?h=rebase/usb-next) works for you?

usb-next will fail to compile using -Werror with:
hcd-xhci.c: In function ‘xhci_fire_ctl_transfer’:
hcd-xhci.c:1508:14: error: variable ‘wLength’ set but not used
[-Werror=unused-but-set-variable]

It will also crash at runtime at
host-linux.c:usb_handle_control_packet(), since a NULL value is passed
from xhci_address_slot() for the USBPacket *p argument, and an assert
is testing for p->result == 0.

Other than that, this problem is resolved. I will perform further
testing and report back, since the in-tree xHC driver has never really
worked with any guest other than Linux.

Thanks,
  Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]