Re: [PATCH 2/3] Add a new function doStopCPUs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/14/2010 12:40 AM, Hu Tao wrote:
> ---
>  src/qemu/qemu_driver.c |   64 +++++++++++++++++------------------------------
>  1 files changed, 23 insertions(+), 41 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 8b3546d..484bdeb 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -579,6 +579,22 @@ static void qemuDomainObjExitRemoteWithDriver(struct qemud_driver *driver,
>      virDomainObjUnref(obj);
>  }
>  
> +static int doStopCPUs(struct qemud_driver *driver, virDomainObjPtr vm)
> +{
> +    int ret;
> +    int oldState = vm->state;
> +    qemuDomainObjPrivatePtr priv = vm->privateData;
> +
> +    vm->state = VIR_DOMAIN_PAUSED;
> +    qemuDomainObjEnterMonitorWithDriver(driver, vm);
> +    ret = qemuMonitorStopCPUs(priv->mon);
> +    qemuDomainObjExitMonitorWithDriver(driver, vm);
> +    if (ret < 0) {
> +        vm->state = oldState;
> +    }
> +    return ret;
> +}

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]