[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/4] handle reparenting of SD cards for rpi2
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 0/4] handle reparenting of SD cards for rpi2 |
Date: |
Tue, 28 Feb 2017 16:59:23 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 28/02/2017 15:55, Peter Maydell wrote:
> These patches are a respin of Clement's work on the
> rpi2 sd controller/gpio. They fix the valgrind issue that
> I was seeing because we got reparenting of the card wrong.
>
> This patchset adds a new qdev patch which makes the
> qdev_set_parent_bus() function do most of the work of
> unplugging and replugging if the device was already on
> a bus. In particular it calls bus_remove_child() which does
> a lot of things that the previous "just call object_unparent"
> attempt didn't do.
>
> Comments on whether this makes sense to people welcome.
> I'm still kind of hoping we can squeeze this into 2.9;
> comments on whether that would be unwise also welcome.
Looks good. My first reaction was to add an assertion in
qdev_set_parent_bus, modify it to handle qdev_set_parent_bus(dev, NULL),
and then do a two-step unplug+replug in the raspi device models.
However, who knows what you could unleash when adding that assertion...
Paolo