From patchwork Wed May 16 18:51:17 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: 914860 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="F481dIL8"; 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 40mNvl0nb1z9s1w for ; Thu, 17 May 2018 04:56:51 +1000 (AEST) Received: from localhost ([::1]:34162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ1bU-0006UW-Lc for incoming@patchwork.ozlabs.org; Wed, 16 May 2018 14:56:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ1Wu-000337-Ub for qemu-devel@nongnu.org; Wed, 16 May 2018 14:52:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJ1Wu-0000jl-8r for qemu-devel@nongnu.org; Wed, 16 May 2018 14:52:05 -0400 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:35827) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fJ1Wu-0000ja-1F for qemu-devel@nongnu.org; Wed, 16 May 2018 14:52:04 -0400 Received: by mail-wm0-x230.google.com with SMTP id o78-v6so4302670wmg.0 for ; Wed, 16 May 2018 11:52:03 -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=F8YuqPcoMlrPY8X1uzL8nO/RxQ4DLnZlQjO6I/YPEDc=; b=F481dIL8VpLwnrS+PFnDewehYEkEXI1Xdmhmr2qekzz+oUyzKCJEDWwoWsQAUGWoR+ yAWFZ3HCf2ACWTyoO6M3bug9o5pe8T1GG6o1PKAlPV8aRwJEfv7d1aGwvG2tZnFlP6iY DfDtg05Bbzrpqr81kRhBE2njf3LRrsZyGjIbmvDUJZA7Vl/DHYhCW/I2I5ucMiMzogcF gCuOtCTHbypmHvUI29Gh5EzmDyALoukp4KukE3FMSRfc+hDoWKvzdvje2fogmOHocNpm wZOABlFe1YMNck1ebqAqASp/jlCVQHh/C5S0ZjZ54i2ejNw2dPVNgeDOc9CsrEJ3oSnG 081Q== 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=F8YuqPcoMlrPY8X1uzL8nO/RxQ4DLnZlQjO6I/YPEDc=; b=um50jhwKXPjKmoWkJV9qnTEwbShAeGulG6qff6Qyv2iZAACjmVNiOAu9eRhmpRA1qh 3Mt9Kq0VauNrkT2qHFMPcQ8nuSNm0o0/lzp0scmDde/j5893X17JXvq64AC2DZDtV8+m DfDbrHgbgSWQePgcs/3ouhALPTxj5pJ6sURqlF3UZTwywCCHhZfocW/SiDrrvVx+gDCf t1Wq/nPxA32aLSm3OSL94iRVJDZN2dPnGB8zpmsIF3iDNvnfkk6bksfrodfrGSN5ewQo jk/NInI/MNRpo1xbAY6GzEOBlsoOKCxnCdmBiqljmveQ4UsPMaAchr/ttfvJoRQRG5/d gP2w== X-Gm-Message-State: ALKqPwf4i3v60iBVnvV17fxWnptORwvMZOLpnrcPUFtBk+HkGMhpdLBq jqcuLyEUJiPR4T1dspqcjAYcPw== X-Google-Smtp-Source: AB8JxZoHMiN9hdH2A34okjMQBO8y396Vm9XTJZn8VvL8Azt14dDvOSfHAuPRR7LJY7rXxF/I2zxB4Q== X-Received: by 2002:a2e:740b:: with SMTP id p11-v6mr1221395ljc.59.1526496722639; Wed, 16 May 2018 11:52:02 -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 m202-v6sm779410lfg.36.2018.05.16.11.52.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 May 2018 11:52:01 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Wed, 16 May 2018 20:51:17 +0200 Message-Id: <20180516185146.30708-10-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180516185146.30708-1-edgar.iglesias@gmail.com> References: <20180516185146.30708-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:c09::230 Subject: [Qemu-devel] [PATCH v3 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, sstabellini@kernel.org, sai.pavan.boddu@xilinx.com, frasse.iglesias@gmail.com, alistair@alistair23.me, richard.henderson@linaro.org, frederic.konrad@adacore.com 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 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..6fdf0fd223 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); }