On 2015/3/18 15:35, Markus Armbruster wrote:
> Gerd Hoffmann writes:
>
>> Hi,
>>
>>> -static void uhci_reset(void *opaque)
>>> +static void uhci_reset(DeviceState *dev)
>>> {
>>> -UHCIState *s = opaque;
>>> +PCIDevice *d = PCI_DEVICE(dev);
>>> +UHCIState *s = DO_UPCAST(UHCIState, d
Gerd Hoffmann writes:
> Hi,
>
>> -static void uhci_reset(void *opaque)
>> +static void uhci_reset(DeviceState *dev)
>> {
>> -UHCIState *s = opaque;
>> +PCIDevice *d = PCI_DEVICE(dev);
>> +UHCIState *s = DO_UPCAST(UHCIState, dev, d);
>
> Uh, oh, DO_UPCAST() is long deprecated. Ther
On 2015/3/18 15:02, Gerd Hoffmann wrote:
> Hi,
>
>> -static void uhci_reset(void *opaque)
>> +static void uhci_reset(DeviceState *dev)
>> {
>> -UHCIState *s = opaque;
>> +PCIDevice *d = PCI_DEVICE(dev);
>> +UHCIState *s = DO_UPCAST(UHCIState, dev, d);
>
> Uh, oh, DO_UPCAST() is lon
Hi,
> -static void uhci_reset(void *opaque)
> +static void uhci_reset(DeviceState *dev)
> {
> -UHCIState *s = opaque;
> +PCIDevice *d = PCI_DEVICE(dev);
> +UHCIState *s = DO_UPCAST(UHCIState, dev, d);
Uh, oh, DO_UPCAST() is long deprecated. There are other instances of
this in the
From: Gonglei
When hot-unplugging the usb controllers (ehci/uhci),
we have to clean all resouce of these devices,
involved registered reset handler. Otherwise, it
may cause NULL pointer access and/or segmentation fault
if we reboot the guest os after hot-unplugging.
Let's hook up reset via Devic