On 22 August 2013 21:09, Anthony Liguori <anth...@codemonkey.ws> wrote: > Paolo Bonzini <pbonz...@redhat.com> writes: >> Not just that. Panic notifiers are called in a substantially unknown >> environment, with locks taken or interrupts already set up. > > If you make the panic notify a config space write, then on virtio-pci, > it's an outb to a fixed offset within a io address that after boot is > static. > > So the address could be stored in a global and accessed without a lock.
Fine for virtio-mmio too, obviously. I have a vague recollection that config space writes on virtio-s390 are weird though. (would also be an issue if we wanted to implement the virtio-console "emergency write" functionality.) -- PMM