From patchwork Mon Nov 15 07:30:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 71188 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2A931B6EF1 for ; Mon, 15 Nov 2010 18:32:32 +1100 (EST) Received: from localhost ([127.0.0.1]:51020 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHtYD-0003jy-6q for incoming@patchwork.ozlabs.org; Mon, 15 Nov 2010 02:32:29 -0500 Received: from [140.186.70.92] (port=51223 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHtWj-0003fU-RW for qemu-devel@nongnu.org; Mon, 15 Nov 2010 02:31:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PHtWe-00026r-RL for qemu-devel@nongnu.org; Mon, 15 Nov 2010 02:30:57 -0500 Received: from mail.valinux.co.jp ([210.128.90.3]:48007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PHtWe-000266-BS for qemu-devel@nongnu.org; Mon, 15 Nov 2010 02:30:52 -0500 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id 7448A8748D; Mon, 15 Nov 2010 16:30:47 +0900 (JST) Received: (nullmailer pid 10379 invoked by uid 1000); Mon, 15 Nov 2010 07:30:47 -0000 From: Isaku Yamahata To: qemu-devel@nongnu.org Date: Mon, 15 Nov 2010 16:30:46 +0900 Message-Id: <4201ea60f5be71bb179c9e8e0e4f61bf7d39ca84.1289805831.git.yamahata@valinux.co.jp> X-Mailer: git-send-email 1.7.1.1 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: skandasa@cisco.com, adnan@khaleel.us, wexu2@cisco.com, mst@redhat.com, yamahata@valinux.co.jp, etmartin@cisco.com Subject: [Qemu-devel] [PATCH v8 10/11] x3130/upstream: support aer X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org add aer support. Signed-off-by: Isaku Yamahata --- hw/xio3130_upstream.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/xio3130_upstream.c b/hw/xio3130_upstream.c index d9d637f..29bc814 100644 --- a/hw/xio3130_upstream.c +++ b/hw/xio3130_upstream.c @@ -41,7 +41,7 @@ static void xio3130_upstream_write_config(PCIDevice *d, uint32_t address, pci_bridge_write_config(d, address, val, len); pcie_cap_flr_write_config(d, address, val, len); msi_write_config(d, address, val, len); - /* TODO: AER */ + pcie_aer_write_config(d, address, val, len); } static void xio3130_upstream_reset(DeviceState *qdev) @@ -89,14 +89,14 @@ static int xio3130_upstream_initfn(PCIDevice *d) pcie_cap_flr_init(d); pcie_cap_deverr_init(d); - /* TODO: AER */ + pcie_aer_init(d, XIO3130_AER_OFFSET); return 0; } static int xio3130_upstream_exitfn(PCIDevice *d) { - /* TODO: AER */ + pcie_aer_exit(d); msi_uninit(d); pcie_cap_exit(d); return pci_bridge_exitfn(d); @@ -131,7 +131,8 @@ static const VMStateDescription vmstate_xio3130_upstream = { .minimum_version_id_old = 1, .fields = (VMStateField[]) { VMSTATE_PCIE_DEVICE(br.dev, PCIEPort), - /* TODO: AER */ + VMSTATE_STRUCT(br.dev.exp.aer_log, PCIEPort, 0, vmstate_pcie_aer_log, + PCIEAERLog), VMSTATE_END_OF_LIST() } }; @@ -151,7 +152,8 @@ static PCIDeviceInfo xio3130_upstream_info = { .qdev.props = (Property[]) { DEFINE_PROP_UINT8("port", PCIEPort, port, 0), - /* TODO: AER */ + DEFINE_PROP_UINT16("aer_log_max", PCIEPort, br.dev.exp.aer_log.log_max, + PCIE_AER_LOG_MAX_DEFAULT), DEFINE_PROP_END_OF_LIST(), } };