Kevin Wolf <kw...@redhat.com> wrote: >> >> I am perhaps a bit ingenuous here, but it is there a way to convince >> qemu that snapshot_save_job_bh *HAS* to run on the main thread? > > I believe we're talking about a technicality here. I asked another more > fundamental question that nobody has answered yet: > > Why do you think that it's ok to call bdrv_writev_vmstate() without > holding the BQL?
I will say this function starts by bdrv_ (i.e. block layer people) and endes with _vmstate (i.e. migration people). To be honest, I don't know. That is why I _supposed_ you have an idea. > Because if we come to the conclusion that it's not ok (which is what I > think), then it doesn't matter whether we violate the condition in the > main thread or a vcpu thread. It's wrong in both cases, just the failure > mode differs - one crashes spectacularly with an assertion failure, the > other has a race condition. Moving from the assertion failure to a race > condition is not a proper fix. Fully agree there. Just that I don't know the answer. Later, Juan.