"Michael S. Tsirkin" <m...@redhat.com> writes: > On Thu, Oct 19, 2023 at 10:56:07AM +0100, Alex Bennée wrote: >> Now the new base class supports config handling we can take advantage >> and make vhost-user-gpio a much simpler boilerplate wrapper. Also as >> this doesn't require any target specific hacks we only need to build >> the stubs once. >> >> Message-Id: <20230418162140.373219-12-alex.ben...@linaro.org> >> Acked-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk> >> Acked-by: Viresh Kumar <viresh.ku...@linaro.org> >> Signed-off-by: Alex Bennée <alex.ben...@linaro.org> >> Message-Id: <20231009095937.195728-4-alex.ben...@linaro.org> >> --- >> - case CHR_EVENT_OPENED: >> - if (vu_gpio_connect(dev, &local_err) < 0) { >> - qemu_chr_fe_disconnect(&gpio->chardev); >> - return; >> - } >> - break; >> - case CHR_EVENT_CLOSED: >> - /* defer close until later to avoid circular close */ >> - vhost_user_async_close(dev, &gpio->chardev, &gpio->vhost_dev, >> - vu_gpio_disconnect); > > Hmm. Looking at this, it seems that the base device will handle close > synchronously. No? Why isn't this a problem?
I suspect it was a copy and paste from another vhost-user impl. But testing has shown it works ok. -- Alex Bennée Virtualisation Tech Lead @ Linaro