From: Claudio Carvalho Date: Mon, 01 Jul 2019 14:12:38 +0000 Subject: Re: [PATCH v3 3/9] powerpc: Introduce FW_FEATURE_ULTRAVISOR Message-Id: <990dd9d3-441a-229c-a007-817d1dd856be@linux.ibm.com> List-Id: References: <20190606173614.32090-1-cclaudio@linux.ibm.com> <20190606173614.32090-4-cclaudio@linux.ibm.com> <20190615073600.GA24709@blackberry> In-Reply-To: <20190615073600.GA24709@blackberry> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Paul Mackerras Cc: Madhavan Srinivasan , Michael Anderson , Ram Pai , kvm-ppc@vger.kernel.org, Bharata B Rao , linuxppc-dev@ozlabs.org, Sukadev Bhattiprolu , Anshuman Khandual On 6/15/19 4:36 AM, Paul Mackerras wrote: > On Thu, Jun 06, 2019 at 02:36:08PM -0300, Claudio Carvalho wrote: >> This feature tells if the ultravisor firmware is available to handle >> ucalls. > Everything in this patch that depends on CONFIG_PPC_UV should just > depend on CONFIG_PPC_POWERNV instead. The reason is that every host > kernel needs to be able to do the ultracall to set partition table > entry 0, in case it ends up being run on a machine with an ultravisor. > Otherwise we will have the situation where a host kernel may crash > early in boot just because the machine it's booted on happens to have > an ultravisor running. The crash will be a particularly nasty one > because it will happen before we have probed the machine type and > initialized the console; therefore it will just look like the machine > hangs for no discernable reason. > We also need to think about how to provide a way for petitboot to know > whether the kernel it is booting knows how to do a ucall to set its > partition table entry. One suggestion would be to modify > vmlinux.lds.S to add a new PT_NOTE entry in the program header of the > binary with (say) a 64-bit doubleword which is a bitmap indicating > capabilities of the binary. We would define the first bit as > indicating that the kernel knows how to run under an ultravisor. > When running under an ultravisor, petitboot could then look for the > PT_NOTE and the ultravisor-capable bit in it, and if the PT_NOTE is > not there or the bit is zero, put up a dialog warning the user that > the kernel will probably crash early in boot, and asking for explicit > confirmation that the user wants to proceed. I just posted a separated RFC patch for the ELF note. Thanks, Claudio. > > Paul. >