[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] secondary-vga: unregister vram on unplug.
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH] secondary-vga: unregister vram on unplug. |
Date: |
Tue, 7 Aug 2018 15:57:01 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
* Gerd Hoffmann (address@hidden) wrote:
> On Fri, Jul 20, 2018 at 10:19:48AM +0200, address@hidden wrote:
> > From: "Remy Noel" <address@hidden>
> >
> > When removing a secondary-vga device and then adding it back (or adding
> > an other one), qemu aborts with:
> > "RAMBlock "0000:00:02.0/vga.vram" already registered, abort!".
> >
> > It is caused by the vram staying registered, preventing vga replugging.
>
> David? Does that look ok?
>
> This balances the
>
> vmstate_register_ram(&s->vram, s->global_vmstate ? NULL : DEVICE(obj));
>
> call in vga_common_init(). I'm wondering whenever the manual cleanup is
> actually needed in case owner is not NULL?
I can't see anyone who is calling unregister_ram or the functions it
calls as part of generic device cleanup, so I think it IS needed
to manually do it.
Which is a bit worrying since we have vastly more register's than
unregister's.
Dave
> thanks,
> Gerd
>
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK