UI
qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
GUEST
static void aw_shutdown_cb(Notifier *n, void *opaque)
{
printf("aw_f1c100s shutdown callback\n");
}
static void f1c100s_realize(DeviceState *dev, Error **errp)
{
AwF1c100sState *s = AW_F1C100S(dev);
s->shutdown_notifier.notify = aw_shutdown_cb;
qemu_register_shutdown_notifier(&s->shutdown_notifier);
}