Received: from eggs.gnu.org ([2001:4830:134:3::10]:47430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiJgI-0003Vg-9k for qemu-devel@nongnu.org; Wed, 15 Apr 2015 05:32:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiJgC-000304-CL for qemu-devel@nongnu.org; Wed, 15 Apr 2015 05:32:26 -0400 Received: from mwork.nabble.com ([162.253.133.43]:63950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiJgC-0002zq-6V for qemu-devel@nongnu.org; Wed, 15 Apr 2015 05:32:20 -0400 Received: from mtom.nabble.com (unknown [162.253.133.81]) by mwork.nabble.com (Postfix) with ESMTP id 31E401AEAA84 for ; Wed, 15 Apr 2015 02:32:50 -0700 (PDT) Date: Wed, 15 Apr 2015 02:17:56 -0700 (MST) From: eraul_cn Message-ID: <1429089476338-323854.post@n7.nabble.com> In-Reply-To: <1426669601-13891-4-git-send-email-tiejun.chen@intel.com> References: <1426669601-13891-1-git-send-email-tiejun.chen@intel.com> <1426669601-13891-4-git-send-email-tiejun.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [v7][PATCH 03/10] piix: create host bridge to passthrough List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Chen, Tiejun wrote > +/* Here we just expose minimal host bridge offset subset. */ > +static const IGDHostInfo igd_host_bridge_infos[] = { > + {0x08, 2}, /* revision id */ > + {0x2c, 2}, /* sybsystem vendor id */ > + {0x2e, 2}, /* sybsystem id */ > + {0x50, 2}, /* SNB: processor graphics control register */ > + {0x52, 2}, /* processor graphics control register */ > + {0xa4, 4}, /* SNB: graphics base of stolen memory */ > + {0xa8, 4}, /* SNB: base of GTT stolen memory */ > +}; > + I tested this patch and found that the registers 0xa0(top of memory) and 0xb0(ILK: BSM) were necessary for Win XP. Both of them are 4 bytes. Chen, Tiejun wrote > +static int igd_pt_i440fx_initfn(struct PCIDevice *pci_dev) > +{ > + uint32_t val = 0; > + int rc, i, num; > + int pos, len; > + > + num = ARRAY_SIZE(igd_host_bridge_infos); > + for (i = 0; i < num; i++) { > + pos = igd_host_bridge_infos[i].offset; > + len = igd_host_bridge_infos[i].len; > + rc = host_pci_config_read(pos, len, val); Here, when we call function host_pci_config_read, the parameter val is passed by value not address, so the value of val will not be changed after call host_pci_config_read. So I think host_pci_config_read need update and the third parameter should be an address. Thanks -- View this message in context: http://qemu.11.n7.nabble.com/v7-PATCH-00-10-xen-add-Intel-IGD-passthrough-support-tp319698p323854.html Sent from the Developer mailing list archive at Nabble.com.