From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 07 Oct 2016 01:07:50 +0200 (CEST) Received: from localhost.localdomain ([127.0.0.1]:40848 "EHLO localhost.localdomain" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23992212AbcJFXHnJQxxm (ORCPT ); Fri, 7 Oct 2016 01:07:43 +0200 Date: Fri, 7 Oct 2016 00:07:42 +0100 (BST) From: "Maciej W. Rozycki" To: James Hogan cc: Matt Redfearn , Ralf Baechle , linux-mips@linux-mips.org Subject: Re: [PATCH 1/9] MIPS: traps: 64bit kernels should read CP0_EBase 64bit In-Reply-To: <20161006225024.GJ19354@jhogan-linux.le.imgtec.org> Message-ID: References: <20160921130852.GA10899@linux-mips.org> <73eede89-af68-eb17-b0b3-2537084da819@imgtec.com> <20161005155653.GG15578@jhogan-linux.le.imgtec.org> <20161006180525.GG19354@jhogan-linux.le.imgtec.org> <20161006201943.GI19354@jhogan-linux.le.imgtec.org> <20161006225024.GJ19354@jhogan-linux.le.imgtec.org> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 55363 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: macro@linux-mips.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On Thu, 6 Oct 2016, James Hogan wrote: > I don't particularly object to always allocating our own vector when > EBase is present. It'd probably break KVM, but that's KVM's fault for > not emulating EBase properly yet. In most cases we'll use the default KSEG0 base address anyway, won't we? > I suppose there is also an advantage to keeping the bootloader exception > vector as alive as possible at least until Linux has set up its own one, > as it allows early bugs to be caught by the bootloader, which can dump > registers etc and even return to the bootloader prompt. Right, but I think using our own allocated memory actually helps that in that we can install our exception handlers first and only then switch EBase, which is atomic (modulo probing for WG, but perhaps we don't actually have to do that). Whereas overwriting firmware memory already pointed to by EBase while installing exception handlers is pretty much destructive right away, as there'll always be a stage at which a partially installed handler is non-functional. Maciej