From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VA0Jt-000688-Kn for qemu-devel@nongnu.org; Thu, 15 Aug 2013 12:22:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VA0Ji-0002A8-UD for qemu-devel@nongnu.org; Thu, 15 Aug 2013 12:22:41 -0400 Message-ID: <520D0042.1040502@suse.de> Date: Thu, 15 Aug 2013 18:22:26 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1376537732-29300-1-git-send-email-aik@ozlabs.ru> <283AA2CE-F23C-4218-B28A-3779D6BA549B@suse.de> <520C6AC6.6010708@ozlabs.ru> <25583D8C-4023-4E78-9B5E-2E3970FB301E@suse.de> <1376548221.4255.103.camel@pasglop> <87vc37qerm.fsf@codemonkey.ws> <520CEFAC.6090500@suse.de> <520CF84C.4070304@suse.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH] powerpc: add PVR mask support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Alexey Kardashevskiy , "qemu-devel@nongnu.org" , "qemu-ppc@nongnu.org" , Anthony Liguori , Paul Mackerras Am 15.08.2013 17:58, schrieb Alexander Graf: >=20 > On 15.08.2013, at 17:48, Andreas F=E4rber wrote: >=20 >> Am 15.08.2013 17:30, schrieb Alexander Graf: >>> >>> On 15.08.2013, at 17:11, Andreas F=E4rber wrote: >>> >>>> Am 15.08.2013 15:12, schrieb Anthony Liguori: >>>>> Everyone is talking past each other and no one is addressing the re= al >>>>> problem. There are two distinct issues here: >>>>> >>>>> 1) We have two ABIs that cannot be changed unless there's a very go= od >>>>> reason to. Alexey's original patch breaks both. The guest ABI >>>>> cannot change given a fixed command line. >>>>> >>>>> IOW, the exposed PVR value for -cpu POWER7 cannot change across >>>>> versions of QEMU or when running on different hardware. This brea= ks >>>>> live migration and save/resume. >>>>> >>>>> We also cannot break the command line interface. If the last vers= ion >>>>> of QEMU supported -cpu POWER7_v2.1, then we must continue to suppo= rt >>>>> that. >>>> >>>> 1a) How should -cpu 0xDEADBEEF or -cpu DEADBEEF behave. >>>> >>>> I expect it to error out as before >>>> rather than applying the same fuzz/mask that -cpu host might. >>> >>> I actually think it'd make sense to apply the same fuzz/mask, don't y= ou think? >> >> I think "-cpu host" has the semantics of give-me-what-the-host-has. Bu= t >> -cpu 0xDEADBEEF is asking for PVR DEADBEEF and having it silently retu= rn >> a guest-visible DEADBEBE is going to be undesired. >=20 > -cpu host on 0xDEADBEEF should give us a 0xDEADBEEF cpu. -cpu 0xDEADBEE= F should give us a 0xDEADBEEF cpu :). Then we mustn't tweak translate_init.c:cpu_class_by_pvr() to return deviating results! Which is what the change to ppc_cpu_compare_class_pvr() is essentially resulting in if I am not completely off track. And therefore my calling to handle this at a higher level (KVM init), where the user's intentions are clear, rather than to blur our internal API. Otherwise the _by_pvr() function would need to create a new class or modify an existing one when the function can't know what the function call was actually intended for. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg