From patchwork Tue May 29 10:49:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 921972 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="INuOouiI"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40w9j50RWdz9ry1 for ; Tue, 29 May 2018 20:59:37 +1000 (AEST) Received: from localhost ([::1]:60127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcLm-0008JP-K4 for incoming@patchwork.ozlabs.org; Tue, 29 May 2018 06:59:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcD1-0001Ku-GU for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNcD0-0003s0-Fl for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:31 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:35093) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNcD0-0003qz-85 for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:30 -0400 Received: by mail-wr0-x241.google.com with SMTP id i14-v6so24683519wre.2 for ; Tue, 29 May 2018 03:50:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VzigYZUet4AJDxdyrVRlaGKoOJouMbYbYJj7AAEtr9o=; b=INuOouiIlN+z2NDB8n/080A7xW5TlBa1wFeUnCQcX0B8uiTZ52rCKQvqXkfxnafRUj MLmq16+9W2y3J667+I9pFK5Qx1Uv8SiizYIyZqwx57s2b9aSwvcmqHbgdLeDMqHY582J PgCk2YGVV+R1vWSAIzL8Z9kbXhYn7Q9lko3TwXEDw/nWyFznE14ez2JzffmkD+FNFztq wTFBSOQyWbU5DK6tYIu4JPuYoRM0GAvsbx2JJOxBhPFx9eGmCbLfcTJMtvztdqDuPqqY BPZYijvkX3TxC1RclfztzUi4uuL+9DqLttG8rVqxH9YL+/YrJkQ843LIFAX2195FJKSh rpdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VzigYZUet4AJDxdyrVRlaGKoOJouMbYbYJj7AAEtr9o=; b=nLjhPO8Id+8JZygpLUpLKGMlyQshzHZInShxiSYKC6KelQRZ/m2vElN2p8gaBcJKYN pDY682jFZhY/MdsbRDI/FPg782DHQNgW8fVlppqtSwGsqouaS3VLKvzH3jZiEyngASPj JsNoZF6mJJbK9L18Qp3KLNZ4hUVbRhZeVJjCzE8ji1S3K0h0tY8ry2kcWzFOb8eupizN GhMcYdN2P4Z9PLHRqVA7OCvkSk+a0dmaKC8w9ktzTyQ+TNlc6D4z9jTsfeqL9iIYRz/a NVFJD+DjlzldQik7NDqHJzhE4O08AgC6tJdt5ChvcIdeERyZ214A8E7RBAUJ1QQflGx0 uEkw== X-Gm-Message-State: ALKqPwfDCf1DU5t03lMNqikQe9gTCB0gSO3UkACdHXzYS1O0ur+V09LF MJSzn38dhYvBHFMnU9OZlL/qTA== X-Google-Smtp-Source: ADUXVKLeIBSNXc0FV9Q94xua1BcH0J97h4PnZGbZ142rVYqxO2UldpKwCY9k3MmZvCXxlcOGHPt+VQ== X-Received: by 2002:a19:5701:: with SMTP id l1-v6mr9004980lfb.32.1527591028803; Tue, 29 May 2018 03:50:28 -0700 (PDT) Received: from gmail.com (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id x134-v6sm419332lfd.0.2018.05.29.03.50.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 03:50:27 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 29 May 2018 12:49:42 +0200 Message-Id: <20180529105011.1914-10-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180529105011.1914-1-edgar.iglesias@gmail.com> References: <20180529105011.1914-1-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PULL v1 09/38] target-microblaze: Conditionalize setting of PVR11_USE_MMU X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: "Edgar E. Iglesias" Conditionalize setting of PVR11_USE_MMU on the use_mmu CPU property, otherwise we may incorrectly advertise an MMU via PVR when the core in fact has none. Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- target/microblaze/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 06476f6efc..a6f1ce6549 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -201,7 +201,8 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **errp) PVR5_DCACHE_WRITEBACK_MASK : 0; env->pvr.regs[10] = 0x0c000000; /* Default to spartan 3a dsp family. */ - env->pvr.regs[11] = PVR11_USE_MMU | (16 << 17); + env->pvr.regs[11] = (cpu->cfg.use_mmu ? PVR11_USE_MMU : 0) | + 16 << 17; mcc->parent_realize(dev, errp); }