From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8UB7-0006qm-HC for qemu-devel@nongnu.org; Thu, 02 Jun 2016 11:05:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8UB1-0003MN-G3 for qemu-devel@nongnu.org; Thu, 02 Jun 2016 11:04:57 -0400 Date: Thu, 2 Jun 2016 17:05:06 +0200 From: Peter Krempa Message-ID: <20160602150506.GF5194@andariel.pipo.sk> References: <1464799050-11002-1-git-send-email-imammedo@redhat.com> <1464799050-11002-5-git-send-email-imammedo@redhat.com> <20160601184620.GE13503@thinpad.lan.raisama.net> <20160602142222.307ec4ee@nial.brq.redhat.com> <20160602145322.GG19055@thinpad.lan.raisama.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20160602145322.GG19055@thinpad.lan.raisama.net> Subject: Re: [Qemu-devel] [PATCH RFC 4/8] target-i386: cpu: consolidate calls of object_property_parse() in x86_cpu_parse_featurestr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Igor Mammedov , qemu-devel@nongnu.org, peter.maydell@linaro.org, pbonzini@redhat.com, rth@twiddle.net, blauwirbel@gmail.com, mark.cave-ayland@ilande.co.uk, qemu-arm@nongnu.org, libvir-list@redhat.com, Jiri Denemark On Thu, Jun 02, 2016 at 11:53:22 -0300, Eduardo Habkost wrote: > (CCing libvirt folks) >=20 > BTW: >=20 > On Thu, Jun 02, 2016 at 02:22:22PM +0200, Igor Mammedov wrote: > [...] > > > /* Special cases: */ > > > if (!strcmp(name, "xlevel")) { > > > numvalue =3D strtoul(val, &err, 0); > > > if (!*val || *err) { > > > error_setg(errp, "bad numerical value %s", val); > > > return; > > > } > > > if (numvalue < 0x80000000) { > > > error_report("xlevel value shall always be >=3D 0x800= 00000" > > > ", fixup will be removed in future versi= ons"); > > > numvalue +=3D 0x80000000; > > > snprintf(num, sizeof(num), "%" PRIu32, numvalue); > > > val =3D num; > [...] > > > } else if (!strcmp(name, "hv-spinlocks")) { > > > const int min =3D 0xFFF; > > >=20 > > > numvalue =3D strtoul(val, &err, 0); > > > if (!*val || *err) { > > > error_setg(errp, "bad numerical value %s", val); > > > return; > > > } > > > if (numvalue < min) { > > > error_report("hv-spinlocks value shall always be >=3D= 0x%x" > > > ", fixup will be removed in future versi= ons", > > > min); > > > numvalue =3D min; > > > } >=20 > Those "fixup will be removed in future versions" warnings are > present since QEMU 1.7. Assuming that libvirt never allowed those > invalid values to be used in the configuration (did it?), I > believe we can safely remove the hv-spinlocks and xlevel fixups > in QEMU 2.7. I couldn't find anything regarding xlevel (so we might actually not support it at all), but we indeed do limit the hv_spinlock count: if (def->hyperv_spinlocks < 0xFFF) { virReportError(VIR_ERR_XML_ERROR, "%s", _("HyperV spinlock retry count must be " "at least 4095")); goto error; } Peter