From: Juan Quintela <quintela@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: jasowang@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com
Subject: [Qemu-devel] Re: [PATCHv3 RFC] qemu-kvm: stop devices on vmstop
Date: Mon, 22 Nov 2010 14:56:08 +0100 [thread overview]
Message-ID: <m3hbf9cvif.fsf@trasno.mitica> (raw)
In-Reply-To: <20101121191641.GA28858@redhat.com> (Michael S. Tsirkin's message of "Sun, 21 Nov 2010 21:16:42 +0200")
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> Stop running devices on vmstop, so that VM does not interact with
> outside world at that time.
>
> Whitelist system handlers which run even when VM is stopped.
> These are specific handlers like monitor, gdbstub, migration.
> I'm not really sure about ui: spice and vnc: do they need to run?
>
> -int qemu_aio_set_fd_handler(int fd,
> +static int qemu_aio_assign_fd_handler(int fd,
> IOHandler *io_read,
> IOHandler *io_write,
> AioFlushHandler *io_flush,
> AioProcessQueue *io_process_queue,
> - void *opaque)
> + void *opaque, bool system)
> {
New names much better O:-)
> - qemu_set_fd_handler2(vs->csock, NULL, vnc_client_read, NULL, vs);
> + qemu_set_systemk_fd_handler(vs->csock, NULL, vnc_client_read, NULL, vs);
typo? it would not compile (extra k on syntemk)
> +static inline void call_ioh_fds(IOHandlerRecordList *list,
> + fd_set *rfds, fd_set *wfds)
> +{
> + IOHandlerRecord *ioh, *pioh;
> +
> + QLIST_FOREACH_SAFE(ioh, list, next, pioh) {
> + if (ioh->deleted) {
> + QLIST_REMOVE(ioh, next);
> + qemu_free(ioh);
> + continue;
> + }
> + if (ioh->fd_read && FD_ISSET(ioh->fd, rfds)) {
> + ioh->fd_read(ioh->opaque);
> + if (!(ioh->fd_read_poll && ioh->fd_read_poll(ioh->opaque)))
> + FD_CLR(ioh->fd, rfds);
> + }
> + if (ioh->fd_write && FD_ISSET(ioh->fd, wfds)) {
> + ioh->fd_write(ioh->opaque);
> + }
Notice this loop has been changed to be able that the fd_read to delete
the handle.
> - }
>
> - slirp_select_poll(&rfds, &wfds, &xfds, (ret < 0));
> + slirp_select_poll(&rfds, &wfds, &xfds, (ret < 0));
white space damage?
I haven't tested it either, to know if changing things to the bottom
handler would improve things.
Later, Juan.
prev parent reply other threads:[~2010-11-22 13:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-21 19:16 [Qemu-devel] [PATCHv3 RFC] qemu-kvm: stop devices on vmstop Michael S. Tsirkin
2010-11-22 9:57 ` [Qemu-devel] " Gerd Hoffmann
2010-11-22 10:15 ` Michael S. Tsirkin
2010-11-22 13:56 ` Juan Quintela [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3hbf9cvif.fsf@trasno.mitica \
--to=quintela@redhat.com \
--cc=jasowang@redhat.com \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.