[PATCH v3] qemu: Don't report spurious errors from vCPU tid validation on hotunplug timeout

Ján Tomko jtomko at redhat.com
Mon Dec 5 10:00:31 UTC 2022


On a Tuesday in 2022, Peter Krempa wrote:
>From: Shaleen Bathla <shaleen.bathla at oracle.com>
>
>Use of qemuDomainValidateVcpuInfo in the helpers for hotplug and unplug
>of vCPUs can lead to spurious errors reported such as:
>
>  internal error: qemu didn't report thread id for vcpu 'XX'"
>
>The reason for this is that qemuDomainValidateVcpuInfo validates the
>state of all vCPUs against the expected state of vCPUs. If an unplug
>operation completed before libvirt was unable to process it yet the
>expected state could not reflect the current state.
>
>To avoid spurious errors the qemuDomainHotplugAddVcpu and
>qemuDomainRemoveVcpu functions are modified to do localized validation
>only for the vCPUs they actually modify.
>
>We also now ensure that the cgroups are modified before bailing out on
>error for any vCPUs which passed validation.
>
>Additionally in order for qemuDomainRemoveVcpuAlias to be able to find
>the unplugged vCPU we must ensure that qemuDomainRefreshVcpuInfo does
>not clear out the alias in case when the vCPU is no longer reported by
>qemu.
>
>Co-authored-by: Partha Satapathy <partha.satapathy at oracle.com>
>Signed-off-by: Shaleen Bathla <shaleen.bathla at oracle.com>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
>
>v3 addresses my review feedback of the original patch, as well as
>rewrites the commit message for more clarity.
>
> src/qemu/qemu_domain.c  |  6 +++--
> src/qemu/qemu_hotplug.c | 53 ++++++++++++++++++++++++-----------------
> 2 files changed, 35 insertions(+), 24 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20221205/3cd94801/attachment.sig>


More information about the libvir-list mailing list