From owner-p4-projects@FreeBSD.ORG Tue Oct 21 15:04:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 69D941065681; Tue, 21 Oct 2008 15:04:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DCB8106567D for ; Tue, 21 Oct 2008 15:04:42 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1C9908FC14 for ; Tue, 21 Oct 2008 15:04:42 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m9LF4fxd018577 for ; Tue, 21 Oct 2008 15:04:42 GMT (envelope-from nwhitehorn@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9LF4fk4018575 for perforce@freebsd.org; Tue, 21 Oct 2008 15:04:41 GMT (envelope-from nwhitehorn@freebsd.org) Date: Tue, 21 Oct 2008 15:04:41 GMT Message-Id: <200810211504.m9LF4fk4018575@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to nwhitehorn@freebsd.org using -f From: Nathan Whitehorn To: Perforce Change Reviews Cc: Subject: PERFORCE change 151665 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2008 15:04:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=151665 Change 151665 by nwhitehorn@nwhitehorn_trantor on 2008/10/21 15:04:40 On 64-bit systems with an enabled hypervisor (e.g. IBM G5 systems), the system becomes extremely unhappy if you suddenly switch hyper-privileged mode off. On a non-partitioned IBM system, you are supposed to keep MSR[HV] = 1 at all times, but our trap handlers zeroed the upper 32 bits of the MSR. Instead, or the current MSR with the new SRR1 value to preserve any stray bits right before we exit the handler. This patch results in booting multi-user under Mambo. And now we return to my regularly scheduled field theory assignment... Affected files ... .. //depot/projects/ppc-g5/sys/powerpc/aim/trap_subr.S#4 edit Differences ... ==== //depot/projects/ppc-g5/sys/powerpc/aim/trap_subr.S#4 (text+ko) ==== @@ -224,6 +224,11 @@ lwz %r3,(savearea+CPUSAVE_SRR0)(%r2); /* restore srr0 */ \ mtsrr0 %r3; \ lwz %r3,(savearea+CPUSAVE_SRR1)(%r2); /* restore srr1 */ \ + \ + /* Make sure HV bit of MSR propagated to SRR1 */ \ + mfmsr %r2; \ + or %r3,%r2,%r3; \ + \ mtsrr1 %r3; \ mfsprg2 %r2; /* restore r2 & r3 */ \ mfsprg3 %r3