Re: [PATCH 5/7] hyperv: fix domainSuspend and domainResume on Hyper-V V2

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

 



On Fri, Oct 09, 2020 at 04:56:09AM -0400, Matt Coleman wrote:
> > On Oct 9, 2020, at 4:43 AM, Daniel P. Berrangé <berrange@xxxxxxxxxx> wrote:
> > 
> > On Fri, Oct 09, 2020 at 04:31:54AM -0400, Matt Coleman wrote:
> >> Signed-off-by: Matt Coleman <matt@xxxxxxxxx>
> >> ---
> >> src/hyperv/hyperv_driver.c      | 15 +++++++++++----
> >> src/hyperv/hyperv_wmi_classes.h |  1 +
> >> 2 files changed, 12 insertions(+), 4 deletions(-)
> >> 
> >> diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
> >> index 0b28c1e94b..89840f7ac4 100644
> >> --- a/src/hyperv/hyperv_driver.c
> >> +++ b/src/hyperv/hyperv_driver.c
> >> @@ -867,6 +867,10 @@ hypervDomainSuspend(virDomainPtr domain)
> >>     int result = -1;
> >>     hypervPrivate *priv = domain->conn->privateData;
> >>     Msvm_ComputerSystem *computerSystem = NULL;
> >> +    int requestedState = MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_PAUSED;
> >> +
> >> +    if (priv->wmiVersion == HYPERV_WMI_VERSION_V2)
> >> +        requestedState = MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_QUIESCE;
> > 
> > Is quiesce really what we want here ?
> > 
> > The libvirt  Suspend/Resume APIs are specifically about pausing
> > execution of the guest CPUs.
> > 
> > IIUC, quiesce usually just refers to suspending I/O processing,
> > in order to allow snapshots to be taken, but CPUs stay running.
> 
> I agree that it’s an odd name, but that’s how Microsoft chose to 
> describe this RequestedState. It’s documented at the following link as...
> 
> "Quiesce (9)
> Corresponds to CIM_EnabledLogicalElement.EnabledState = Quiesce, 
> Enabled but paused."
> 
> https://docs.microsoft.com/en-us/windows/win32/hyperv_v2/requeststatechange-msvm-computersystem
> 
> I didn’t believe the documentation when I first read it, so I paused a 
> VM in Hyper-V Manager and confirmed that its state was indeed Quiesce.

AH, that's ok then.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




[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]

  Powered by Linux