Received: from eggs.gnu.org ([2001:4830:134:3::10]:33823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8VXd-0000dm-N8 for qemu-devel@nongnu.org; Thu, 02 Jun 2016 12:32:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8VXb-0007eA-Oy for qemu-devel@nongnu.org; Thu, 02 Jun 2016 12:32:16 -0400 Date: Thu, 2 Jun 2016 18:32:03 +0200 From: Igor Mammedov Message-ID: <20160602183203.4814e984@nial.brq.redhat.com> In-Reply-To: <20160602145322.GG19055@thinpad.lan.raisama.net> 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-Transfer-Encoding: 7bit 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: peter.maydell@linaro.org, Peter Krempa , libvir-list@redhat.com, mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org, blauwirbel@gmail.com, qemu-arm@nongnu.org, pbonzini@redhat.com, Jiri Denemark , rth@twiddle.net On Thu, 2 Jun 2016 11:53:22 -0300 Eduardo Habkost wrote: > (CCing libvirt folks) > > BTW: > > On Thu, Jun 02, 2016 at 02:22:22PM +0200, Igor Mammedov wrote: > [...] > > > /* Special cases: */ > > > if (!strcmp(name, "xlevel")) { > > > numvalue = 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 >= 0x80000000" > > > ", fixup will be removed in future versions"); > > > numvalue += 0x80000000; > > > snprintf(num, sizeof(num), "%" PRIu32, numvalue); > > > val = num; > [...] > > > } else if (!strcmp(name, "hv-spinlocks")) { > > > const int min = 0xFFF; > > > > > > numvalue = 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 >= 0x%x" > > > ", fixup will be removed in future versions", > > > min); > > > numvalue = min; > > > } > > 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. > > The hv-spinlocks setter already rejects invalid values. We just > need to make x86_cpu_realizefn() reject invalid xlevel values. I'll leave axing them to you.