From patchwork Mon Feb 3 09:44:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 316107 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 EF4B62C0086 for ; Mon, 3 Feb 2014 20:58:03 +1100 (EST) Received: from localhost ([::1]:45284 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAGHx-0001EB-Co for incoming@patchwork.ozlabs.org; Mon, 03 Feb 2014 04:58:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAGHN-00012O-DH for qemu-devel@nongnu.org; Mon, 03 Feb 2014 04:57:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAGHF-00031i-4h for qemu-devel@nongnu.org; Mon, 03 Feb 2014 04:57:25 -0500 Received: from mail-qc0-x22d.google.com ([2607:f8b0:400d:c01::22d]:57800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAGHF-00031d-12 for qemu-devel@nongnu.org; Mon, 03 Feb 2014 04:57:17 -0500 Received: by mail-qc0-f173.google.com with SMTP id i8so10660853qcq.18 for ; Mon, 03 Feb 2014 01:57:16 -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=bzklNx2EZP5prQsn7hkqtO3I4q0x2QmlC1nnKjjZDEo=; b=B2yOl2WSNJNVEy5cdDdLTH/GIbSdzMY0Os4bxyL2Kf6yiT2l/Ob6YBmx6Ck0/16s1j i0Cw+WrWsDf4YnqA1v7tYl0Sa47eI9ph/Br8ww9uHgqWJvicF3OAMPfVXg/uUzXujOIS ZSjxFkLlIQ+KhNbAKmltvD9f/txuRfwNHMJ1UaKklG6rBXK3jSEOTdyhzuUT8Q4wSQWa zJMlfl/jsXYUbBP0nBiB5Cs9UDHjbJgiOF9o6BXJDnOpFtdmfKfn83W2Ve+vlRLE6rje KGAfGfLRYwXUkpt4defn7QldNm+LFiDgd5prooXkSzlQAermVTi0H98ZMVUGGMpzUug1 itGw== X-Received: by 10.140.90.80 with SMTP id w74mr52025473qgd.96.1391421436584; Mon, 03 Feb 2014 01:57:16 -0800 (PST) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPSA id q10sm55096838qaj.13.2014.02.03.01.57.14 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 03 Feb 2014 01:57:15 -0800 (PST) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Mon, 3 Feb 2014 19:44:48 +1000 Message-Id: <1391420690-23745-21-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1391420690-23745-1-git-send-email-edgar.iglesias@gmail.com> References: <1391420690-23745-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:400d:c01::22d 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 v4 20/22] cpu: 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 --- qom/cpu.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qom/cpu.c b/qom/cpu.c index 9d62479..fc6dbff 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -24,6 +24,7 @@ #include "qemu/notify.h" #include "qemu/log.h" #include "sysemu/sysemu.h" +#include "hw/qdev-properties.h" bool cpu_exists(int64_t id) { @@ -237,6 +238,11 @@ static int64_t cpu_common_get_arch_id(CPUState *cpu) return cpu->cpu_index; } +static Property cpu_properties[] = { + DEFINE_PROP_ADDRESS_SPACE("address-space", CPUState, as), + DEFINE_PROP_END_OF_LIST(), +}; + static void cpu_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); @@ -253,6 +259,7 @@ static void cpu_class_init(ObjectClass *klass, void *data) k->write_elf64_note = cpu_common_write_elf64_note; k->gdb_read_register = cpu_common_gdb_read_register; k->gdb_write_register = cpu_common_gdb_write_register; + dc->props = cpu_properties; dc->realize = cpu_common_realizefn; /* * Reason: CPUs still need special care by board code: wiring up