From patchwork Mon Dec 16 08:05:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 301505 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 234692C007B for ; Mon, 16 Dec 2013 19:13:00 +1100 (EST) Received: from localhost ([::1]:54381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsTIO-0000Gf-B2 for incoming@patchwork.ozlabs.org; Mon, 16 Dec 2013 03:12:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsTHr-00007v-Cd for qemu-devel@nongnu.org; Mon, 16 Dec 2013 03:12:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsTHk-00044r-OB for qemu-devel@nongnu.org; Mon, 16 Dec 2013 03:12:23 -0500 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:33980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsTHk-00044d-HE for qemu-devel@nongnu.org; Mon, 16 Dec 2013 03:12:16 -0500 Received: by mail-pa0-f50.google.com with SMTP id kl14so2617475pab.23 for ; Mon, 16 Dec 2013 00:12:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KJTRMXkw9CUstQTbUvnUvQ21Ys38K9d+KKbrs3kJWlw=; b=dw3ymbDFgUy9AJGkdVzBoVPvDmnF+b7S2uzkIDC0U4KcUmQXniA7MmijZCO60Y3o1q U8Phy/JWbGThqP7uMEWj89eNzgcJtEcNwYGt2DpHoshzotS1Zyrm7fRAXbsyK3v5lAGB bCVR0DJy0ZiAH5AMHmfJNEPW891D+Eu67OMM8XQeMlUO7zh1+jH9vGGq9uIh2UdnEIb9 +mpwpR8cZ8Q9edxTGrOu6SkIh+/DQJ/YMcJmKESjsYQzutdvUYEdgFY5mMH9wqmt8pyG ae7lM1pJegnaFEj9ZS95Up7OSLR+7J7TebSw/IQpbj3PzSB3aRe8AN13YkbwhSolVBhi rTcQ== X-Received: by 10.68.193.233 with SMTP id hr9mr18905521pbc.26.1387181514083; Mon, 16 Dec 2013 00:11:54 -0800 (PST) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPSA id sy10sm33334311pac.15.2013.12.16.00.11.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 16 Dec 2013 00:11:53 -0800 (PST) From: edgar.iglesias@gmail.com To: qemu-devel@nongnu.org Date: Mon, 16 Dec 2013 18:05:57 +1000 Message-Id: <1387181170-23267-10-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1387181170-23267-1-git-send-email-edgar.iglesias@gmail.com> References: <1387181170-23267-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::232 Cc: peter.maydell@linaro.org, blauwirbel@gmail.com, aliguori@amazon.com, pcrost@xilinx.com, pbonzini@redhat.com, afaerber@suse.de, aurelien@aurel32.net, rth@twiddle.net Subject: [Qemu-devel] [PATCH v1 09/22] target-microblaze: Add address-space property X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-microblaze/cpu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/target-microblaze/cpu.c b/target-microblaze/cpu.c index 0ef9aa4..ada9556 100644 --- a/target-microblaze/cpu.c +++ b/target-microblaze/cpu.c @@ -88,11 +88,22 @@ static void mb_cpu_reset(CPUState *s) #endif } +static void mb_cpu_setup_as(CPUState *cs) +{ +#ifndef CONFIG_USER_ONLY + MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs); + CPUMBState *env = &cpu->env; + + cpu_address_space_init(cs, env->as); +#endif +} + static void mb_cpu_realizefn(DeviceState *dev, Error **errp) { CPUState *cs = CPU(dev); MicroBlazeCPUClass *mcc = MICROBLAZE_CPU_GET_CLASS(dev); + mb_cpu_setup_as(cs); cpu_reset(cs); qemu_init_vcpu(cs); @@ -123,6 +134,9 @@ static const VMStateDescription vmstate_mb_cpu = { }; static Property mb_properties[] = { +#ifndef CONFIG_USER_ONLY + DEFINE_PROP_ADDRESS_SPACE("address-space", MicroBlazeCPU, env.as), +#endif DEFINE_PROP_UINT32("xlnx.base-vectors", MicroBlazeCPU, base_vectors, 0), DEFINE_PROP_END_OF_LIST(), };