From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4IKb-0001to-KW for qemu-devel@nongnu.org; Wed, 02 Dec 2015 20:05:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4IKX-0006dR-Gi for qemu-devel@nongnu.org; Wed, 02 Dec 2015 20:05:09 -0500 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]:32895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4IKX-0006cV-8d for qemu-devel@nongnu.org; Wed, 02 Dec 2015 20:05:05 -0500 Received: by pabfh17 with SMTP id fh17so57368919pab.0 for ; Wed, 02 Dec 2015 17:05:04 -0800 (PST) References: <1447201710-10229-1-git-send-email-benh@kernel.crashing.org> <1447201710-10229-42-git-send-email-benh@kernel.crashing.org> <564A7584.5060605@ozlabs.ru> <1447720804.3729.17.camel@kernel.crashing.org> <20151201064326.GA4903@voom> <565E5656.8060200@ozlabs.ru> <1449034147.2983.25.camel@kernel.crashing.org> From: Alexey Kardashevskiy Message-ID: <565F953A.4020105@ozlabs.ru> Date: Thu, 3 Dec 2015 12:04:58 +1100 MIME-Version: 1.0 In-Reply-To: <1449034147.2983.25.camel@kernel.crashing.org> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 41/77] ppc/pnv: Add LPC controller and hook it up with a UART and RTC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt , David Gibson Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org On 12/02/2015 04:29 PM, Benjamin Herrenschmidt wrote: > On Wed, 2015-12-02 at 13:24 +1100, Alexey Kardashevskiy wrote: >>> But on the whole I agree with you, since the LPC is part of the P8 >>> chip, I think it makes sense to include it even with -nodefaults. >> >> POWER8 chips all have 8 threads per core but we do not always assume -smt >> ...,threads=8, how are LPC or PHB different? > > First, for pseries which is paravirtualized it's a different can of > worms completely. For powernv, we *should* represent all 8 threads, > we just can't yet due to TCG limitations. Out of curiosity - for pseries we should not? I know it works with various numbers of threads but is not that because we also control guest linux kernel and, for example, the Other OS (AIX) might be upset on non-multiply-of-2 number of threads? >> PHB is more interesting - how is the user supposed to add more? > > That's an open question. Since we model a real P8 chip we can only > model the PHBs as they exist on it, which is up to 3 per chip at > very specific XSCOM addresses. We could try to model some non-existing > P8 chip with more but bad things will happen when the FW try to assign > interrupt numbers for example. > > We simulate a machine that has been primed by HostBoot before OPAL > starts. So we rely on what the device-tree tells us of what PHB were > enabled but appart from that, we have to stick to the limitations. > >> And there always will be the default one >> which properties are set in a separate way (via -global, not -device). I >> found it sometime really annoying to debug the existing pseries which >> always adds a default PHB (I know, this was to make libvirt happy but this >> is not the case here). >> >> Out of curiosity - if we have 2 chips, will the system work if the second >> chip does not get any LPC or PHB attached? > > This is something I need to look into, there's a lot of work needed to > properly model "chips" that I haven't done yet, but what is there is > sufficient for a lot of usages already. For now, if possible, I'd suggest implementing -nodefaults with no defaults whatsoever and create a config somewhere in the qemu tree to pass it via -readconfig to get reasonably configured machine so people will know what is expected to work but there will still be possibility for experiments (do not we secretly hope that other vendors will start designing/manufacturing their ppc64 chips?). It could be a config file per an actual POWER8 chip (we have two already). -- Alexey