From patchwork Mon Mar 16 09:25:40 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Han, Weidong" X-Patchwork-Id: 12342 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2G9Rr0u015805 for ; Mon, 16 Mar 2009 09:27:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752295AbZCPJ1y (ORCPT ); Mon, 16 Mar 2009 05:27:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752618AbZCPJ1y (ORCPT ); Mon, 16 Mar 2009 05:27:54 -0400 Received: from mga11.intel.com ([192.55.52.93]:65347 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752272AbZCPJ1x convert rfc822-to-8bit (ORCPT ); Mon, 16 Mar 2009 05:27:53 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 16 Mar 2009 02:24:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.38,372,1233561600"; d="scan'208";a="439214756" Received: from pgsmsx602.gar.corp.intel.com ([10.221.43.81]) by fmsmga002.fm.intel.com with ESMTP; 16 Mar 2009 02:23:14 -0700 Received: from pdsmsx602.ccr.corp.intel.com (172.16.12.184) by pgsmsx602.gar.corp.intel.com (10.221.43.81) with Microsoft SMTP Server (TLS) id 8.1.340.0; Mon, 16 Mar 2009 17:25:47 +0800 Received: from pdsmsx503.ccr.corp.intel.com ([172.16.12.95]) by pdsmsx602.ccr.corp.intel.com ([172.16.12.184]) with mapi; Mon, 16 Mar 2009 17:25:45 +0800 From: "Han, Weidong" To: "'Gregory Haskins'" , "'kvm@vger.kernel.org'" CC: "'Mark McLoughlin'" , "'Avi Kivity'" , "'Gleb Natapov'" Date: Mon, 16 Mar 2009 17:25:40 +0800 Subject: RE: Build breakage between kvm-userspace.git HEAD and 2.6.29-rc8 Thread-Topic: Build breakage between kvm-userspace.git HEAD and 2.6.29-rc8 Thread-Index: Acmj8S4pp0tCi1w4Sq2C8410kg1QGgCJfJ5Q Message-ID: <715D42877B251141A38726ABF5CABF2C0195BA8F7D@pdsmsx503.ccr.corp.intel.com> References: <49BA7D77.1010003@gmail.com> In-Reply-To: <49BA7D77.1010003@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Gregory Haskins wrote: > Hi kvm-devs, > Been away from the kvm scene for a while...hope everyone is well. > > FYI: There are a few build breakages between kvm-userspace.git HEAD > (f29d402ab885d30bfa7350378cff911c9c17a226) when you compile against > Linus' linux-2.6.git HEAD > (v2.6.29-rc8-041b62374c7fedc11a8a1eeda2868612d3d1436c) > > I am not sure if this is a supported configuration (e.g. perhaps you > only support building kvm-userspace HEAD against Avi's kernel tree?). > But in case this was unintentional, read on... > > First error: > > libkvm.c:702: error: 'struct kvm_irq_level' has no member named > 'status' make[1]: *** [libkvm.o] Error 1 > > Which is attributable to: > > commit ea1b668e7684dc43e9d198ba0b25fe47a0b2acd2 > Author: Gleb Natapov > Date: Wed Feb 4 17:30:01 2009 +0200 > > kvm: qemu: handle IRQ status injection in userspace > > Reverting this patch does allow the build to get past this error. > Then I hit the next one: > > device-assignment.o: In function `deassign_device': > /home/ghaskins/sandbox/git/fabric/kvm-userspace/qemu/hw/device-assignment.c:562: > undefined reference to `kvm_deassign_pci_device' > > Reverting: > > commit 1435f18213edee9fabf936f5d6be70054f1f2bd1 > Author: Weidong Han > Date: Wed Feb 18 14:33:41 2009 +0800 > > kvm: qemu: fix hot remove assigned device > > Followed by: > > commit 71ae34caaa961330f53f40090cd180a74fcda5fc > Author: Weidong Han > Date: Wed Feb 18 14:28:30 2009 +0800 > > kvm: qemu: deassign device from guest > > Does fix the build. I realize reversion is probably not the desirable > long term solution, but at least it points to the proper places that > need some backwards-compat love ;) > kvm_deassign_pci_device is defined when KVM_CAP_DEVICE_DEASSIGNMENT is defined. Following patch should fix the breakage. > Regards, > -Greg --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c index 7c73210..6765683 100644 --- a/qemu/hw/device-assignment.c +++ b/qemu/hw/device-assignment.c @@ -551,6 +551,7 @@ static int assign_irq(AssignedDevInfo *adev) static void deassign_device(AssignedDevInfo *adev) { +#ifdef KVM_CAP_DEVICE_DEASSIGNMENT struct kvm_assigned_pci_dev assigned_dev_data; AssignedDevice *dev = adev->assigned_dev; int r; @@ -563,6 +564,7 @@ static void deassign_device(AssignedDevInfo *adev) if (r < 0) fprintf(stderr, "Failed to deassign device \"%s\" : %s\n", adev->name, strerror(-r)); +#endif } void remove_assigned_device(AssignedDevInfo *adev)