From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VpMwg-0006ML-IB for mharc-qemu-trivial@gnu.org; Sat, 07 Dec 2013 13:49:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VpMwZ-0006E2-7S for qemu-trivial@nongnu.org; Sat, 07 Dec 2013 13:49:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VpMwT-0001SX-5E for qemu-trivial@nongnu.org; Sat, 07 Dec 2013 13:49:35 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:56949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VpMwG-0001M0-Ot; Sat, 07 Dec 2013 13:49:16 -0500 Received: from [192.168.88.2] (mjt.vpn.tls.msk.ru [192.168.177.99]) by isrv.corpit.ru (Postfix) with ESMTP id 2FE0240CDB; Sat, 7 Dec 2013 22:49:06 +0400 (MSK) Message-ID: <52A36DA2.4050508@msgid.tls.msk.ru> Date: Sat, 07 Dec 2013 22:49:06 +0400 From: Michael Tokarev Organization: Telecom Service, JSC User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-Version: 1.0 To: Alexander Graf References: <1386334344-24620-1-git-send-email-agraf@suse.de> In-Reply-To: <1386334344-24620-1-git-send-email-agraf@suse.de> X-Enigmail-Version: 1.5.1 OpenPGP: id=804465C5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: qemu-trivial , QEMU Developers Subject: Re: [Qemu-trivial] [PATCH] x86: only allow real mode to access 32bit without LMA X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 18:49:41 -0000 06.12.2013 16:52, Alexander Graf wrote: > When we're running in non-64bit mode with qemu-system-x86_64 we can > still end up with virtual addresses that are above the 32bit boundary > if a segment offset is set up. > > GNU Hurd does exactly that. It sets the segment offset to 0x80000000 and > puts its EIP value to 0x8xxxxxxx to access low memory. > > This doesn't hit us when we enable paging, as there we just mask away the > unused bits. But with real mode, we assume that vaddr == paddr which is > wrong in this case. Real hardware wraps the virtual address around at the > 32bit boundary. So let's do the same. > > This fixes booting GNU Hurd in qemu-system-x86_64 for me. Since i386 tcg code has no active maintainer and since this is a rather simple change, I'll queue it up to trivial-patches. Thank you! /mjt From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VpMwM-00067K-Uf for qemu-devel@nongnu.org; Sat, 07 Dec 2013 13:49:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VpMwG-0001PZ-Vd for qemu-devel@nongnu.org; Sat, 07 Dec 2013 13:49:22 -0500 Message-ID: <52A36DA2.4050508@msgid.tls.msk.ru> Date: Sat, 07 Dec 2013 22:49:06 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1386334344-24620-1-git-send-email-agraf@suse.de> In-Reply-To: <1386334344-24620-1-git-send-email-agraf@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] x86: only allow real mode to access 32bit without LMA List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-trivial , QEMU Developers 06.12.2013 16:52, Alexander Graf wrote: > When we're running in non-64bit mode with qemu-system-x86_64 we can > still end up with virtual addresses that are above the 32bit boundary > if a segment offset is set up. > > GNU Hurd does exactly that. It sets the segment offset to 0x80000000 and > puts its EIP value to 0x8xxxxxxx to access low memory. > > This doesn't hit us when we enable paging, as there we just mask away the > unused bits. But with real mode, we assume that vaddr == paddr which is > wrong in this case. Real hardware wraps the virtual address around at the > 32bit boundary. So let's do the same. > > This fixes booting GNU Hurd in qemu-system-x86_64 for me. Since i386 tcg code has no active maintainer and since this is a rather simple change, I'll queue it up to trivial-patches. Thank you! /mjt