Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752402AbZCINqT (ORCPT ); Mon, 9 Mar 2009 09:46:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751315AbZCINp7 (ORCPT ); Mon, 9 Mar 2009 09:45:59 -0400 Received: from mx2.redhat.com ([66.187.237.31]:35661 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128AbZCINp5 (ORCPT ); Mon, 9 Mar 2009 09:45:57 -0400 Message-ID: <49B51D90.5090603@redhat.com> Date: Mon, 09 Mar 2009 15:45:52 +0200 From: Avi Kivity User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: "Yang, Sheng" CC: Matthew Wilcox , "Zhao, Yu" , "jbarnes@virtuousgeek.org" , "linux-pci@vger.kernel.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v10 0/7] PCI: Linux kernel SR-IOV support References: <1235112888-9524-1-git-send-email-yu.zhao@intel.com> <49B3D678.4050004@redhat.com> <200903091142.06628.sheng.yang@intel.com> <200903091235.43083.sheng.yang@intel.com> In-Reply-To: <200903091235.43083.sheng.yang@intel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1707 Lines: 42 Yang, Sheng wrote: >>> Patches 2 and 3 of the patchset that enables SR/IOV in kvm [1] suggest >>> that at the config space is only partially implemented. >>> >>> [1] http://thread.gmane.org/gmane.comp.emulators.kvm.devel/29034 >>> >> Hi Avi >> >> For kernel side, patch 2 is not necessary. Because kernel would read >> VID/DID directly from pci_dev rather than configuration space, which have >> been set properly already. >> >> And very sorry, for the patch 3. We haven't known exactly what's happened. >> I think the problem is caused by guest driver, but didn't confirm(and I >> have some misunderstandings with ZhaoYu for I thought we are agree on the >> reason, but after confirm with him, he didn't agree). I am doing more >> investigations to find the real cause. >> > > Found the reason of patch 3. > > After insert guest driver module(vf driver), the driver would do a RMW to the > command register to enable Bus Master bit(bit 2). And before that, MMIO bit > have been set in the register. But without the patch 3, guest driver won't see > the MMIO bit(bit 1), then just set 0x4 to the command register, with the side > effect to unmap MMIO in QEmu. So patch 3 is needed(and what I thought before > is right). > > Unset the bit only affect the QEmu, which would unmap the mapping for MMIO. > Kernel side don't need this, so it's OK. > Thanks for the explanations! -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/