[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 19/21] sysemu: add vm_start_hold/release
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 19/21] sysemu: add vm_start_hold/release |
Date: |
Fri, 29 Nov 2013 11:30:31 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
Il 18/11/2013 13:25, Marc-André Lureau ha scritto:
> +static int start_hold;
> +
> +void vm_start_hold(void)
> +{
> + start_hold++;
> +}
> +
> +void vm_start_release(void)
> +{
> + start_hold--;
> + vm_start();
> +}
> +
> void vm_start(void)
> {
> + if (start_hold != 0) {
> + return;
> + }
> +
This is interesting. I like it, but I think this sequence:
vm_start_hold()
vm_start_release()
should not call vm_start(), while this:
vm_start_hold()
vm_start()
vm_start_release()
should call it.
Also, vm_start_hold() should assert that the VM is not running.
Paolo
- [Qemu-devel] [PATCH 10/21] nbd: finish any pending coroutine, (continued)
- [Qemu-devel] [PATCH 10/21] nbd: finish any pending coroutine, Marc-André Lureau, 2013/11/18
- [Qemu-devel] [PATCH 11/21] nbd: avoid uninitialized warnings, Marc-André Lureau, 2013/11/18
- [Qemu-devel] [PATCH 12/21] block: save the associated child name in BlockDriverState, Marc-André Lureau, 2013/11/18
- [Qemu-devel] [PATCH 13/21] blockdev: add qmp_change_blockdev_int(), Marc-André Lureau, 2013/11/18
- [Qemu-devel] [PATCH 14/21] block: extract make_snapshot() from bdrv_open(), Marc-André Lureau, 2013/11/18
- [Qemu-devel] [PATCH 15/21] block: add "snapshot.size" option to avoid extra bdrv_open(), Marc-André Lureau, 2013/11/18
- [Qemu-devel] [PATCH 16/21] block: learn to open a driver with a given opaque, Marc-André Lureau, 2013/11/18
- [Qemu-devel] [PATCH 17/21] block: allow to call bdrv_open() with an opaque, Marc-André Lureau, 2013/11/18
- [Qemu-devel] [PATCH 18/21] block: do not notify change during migration, Marc-André Lureau, 2013/11/18
- [Qemu-devel] [PATCH 19/21] sysemu: add vm_start_hold/release, Marc-André Lureau, 2013/11/18
- Re: [Qemu-devel] [PATCH 19/21] sysemu: add vm_start_hold/release,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 20/21] spice-core: allow an interface to be in AIO context, Marc-André Lureau, 2013/11/18
- [Qemu-devel] [PATCH 21/21] block: add spice block device backend, Marc-André Lureau, 2013/11/18
- Re: [Qemu-devel] [PATCH 00/21] RFCv2: add Spice block device, Marc-André Lureau, 2013/11/22