[libvirt PATCH v2 02/24] cpu_x86: Ignore alias names
Tim Wiederhake
twiederh at redhat.com
Thu Nov 3 15:21:36 UTC 2022
On Mon, 2022-10-31 at 09:36 +0000, Daniel P. Berrangé wrote:
> On Fri, Oct 28, 2022 at 05:06:33PM +0200, Tim Wiederhake wrote:
> > A later patch will add alias names to the feature map. Ignore them
> > for now.
> >
> > Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
> > Reviewed-by: Jiri Denemark <jdenemar at redhat.com>
> > ---
> > src/cpu/cpu_x86.c | 10 ++++++++--
> > 1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
> > index 4d2379803c..d2560de497 100644
> > --- a/src/cpu/cpu_x86.c
> > +++ b/src/cpu/cpu_x86.c
> > @@ -1089,7 +1089,7 @@ static int
> > x86ParseDataItemList(virCPUx86Data *cpudata,
> > xmlNodePtr node)
> > {
> > - size_t i;
> > + size_t i = 0;
> >
> > if (xmlChildElementCount(node) <= 0) {
> > virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("no x86 CPU
> > data found"));
> > @@ -1097,9 +1097,14 @@ x86ParseDataItemList(virCPUx86Data *cpudata,
> > }
> >
> > node = xmlFirstElementChild(node);
> > - for (i = 0; node; ++i) {
> > + while (node) {
> > virCPUx86DataItem item;
> >
> > + if (virXMLNodeNameEqual(node, "alias")) {
> > + node = xmlNextElementSibling(node);
> > + continue;
> > + }
>
> Please put a comment here describing that we're ignoring this because
> it is only intended for use by the QEMU sync script.
>
The QEMU sync script is not the only intended recipient of the alias
information. A follow-up patch series will feed this information to
virQEMUCapsCPUFeatureTranslate and remove the virQEMUCapsCPUFeaturesX86
translation table.
I will add the explanation from the patch series' cover letter to this
patch's commit message.
Tim
>
> With regards,
> Daniel
More information about the libvir-list
mailing list