From patchwork Wed Jul 8 19:19:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Rzeszutek Wilk X-Patchwork-Id: 493120 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 86209140787 for ; Thu, 9 Jul 2015 05:19:49 +1000 (AEST) Received: from localhost ([::1]:36548 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCusl-0000Ml-5l for incoming@patchwork.ozlabs.org; Wed, 08 Jul 2015 15:19:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCusT-0008Vf-D0 for qemu-devel@nongnu.org; Wed, 08 Jul 2015 15:19:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCusO-0001Ce-Hf for qemu-devel@nongnu.org; Wed, 08 Jul 2015 15:19:29 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:33120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCusO-0001Ag-BI for qemu-devel@nongnu.org; Wed, 08 Jul 2015 15:19:24 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t68JJF94025656 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 8 Jul 2015 19:19:15 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t68JJFPj018688 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 8 Jul 2015 19:19:15 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t68JJE2j013737; Wed, 8 Jul 2015 19:19:14 GMT Received: from l.oracle.com (/10.137.176.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 08 Jul 2015 12:19:14 -0700 Received: by l.oracle.com (Postfix, from userid 1000) id 80F076A01B3; Wed, 8 Jul 2015 15:19:13 -0400 (EDT) From: Konrad Rzeszutek Wilk To: stefano.stabellini@eu.citrix.com, xen-devel@lists.xenproject.org, qemu-devel@nongnu.org, JBeulich@suse.com Date: Wed, 8 Jul 2015 15:19:12 -0400 Message-Id: <1436383152-18033-2-git-send-email-konrad.wilk@oracle.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1436383152-18033-1-git-send-email-konrad.wilk@oracle.com> References: <1435866681-18468-1-git-send-email-konrad.wilk@oracle.com> <1436383152-18033-1-git-send-email-konrad.wilk@oracle.com> X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 Cc: Konrad Rzeszutek Wilk Subject: [Qemu-devel] [PATCH] xen/pt: Don't slurp wholesale the PCI configuration registers 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 Instead we have the emulation registers ->init functions which consult the host values to see what the initial value should be and they are responsible for populating the dev.config. Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Stefano Stabellini --- hw/xen/xen_pt.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 05828e0..cd69cb4 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -780,12 +780,7 @@ static int xen_pt_initfn(PCIDevice *d) } /* Initialize virtualized PCI configuration (Extended 256 Bytes) */ - rc = xen_host_pci_get_block(&s->real_device, 0, d->config, - PCI_CONFIG_SPACE_SIZE); - if (rc < 0) { - XEN_PT_ERR(d,"Could not read PCI_CONFIG space! (rc:%d)\n", rc); - goto err_out; - } + memset(d->config, 0, PCI_CONFIG_SPACE_SIZE); s->memory_listener = xen_pt_memory_listener; s->io_listener = xen_pt_io_listener;