On Wed, Nov 17, 2010 at 06:02:39PM +0100, Gerd Hoffmann wrote: > Hi, > > >>>>Better don't try ... > >>> > >>>Better prevent it then? > >> > >>How can I do that? > > Question still stands: Is there some way to disable hotplug for > certain pci devices?
Not sure. It's really a work-around bug, maybe it's better to fix it properly. > >> How does this work btw? Only > >>one vga adapter can drive the legacy vga ports, right? Is there > >>some way to enable/disable this per vga device? > > > >Yes, just disable IO memory. > > This is supposed to disable legacy vga ports (0x03c0+) too? Sure. > >> If so: does qemu > >>emulate this correctly? > > > >It mostly does. > > I doubt it actually enables/disables the legacy vga ports. I'll check when I have the time. We can fix it if it doesn't, > >But the counter wrapping will at least in theory crash qemu, > >this is an even bigger problem than a guest crash. > > I can put it a limit at one million hotplugs or so ... How about a simple allocator? With at most 256 devices on a pci bus * 8 functions, it need not be hard: just a long long bitmask with ffsll used to find a free bit. Also - what is the ID used for? What happens if it's not unique? > >> I also don't see the point in plugging a display like > >>mad. > > > >Just to see if you can exploit some memory corruption maybe? > > Can the guest do that without the hosts help? > Especially plugging *in* something? > > cheers, > Gerd No, but a monitor user connected to qemu over a qmp socket can do this. -- MST