* [ANNOUNCE] kvm-73 release
@ 2008-08-20 15:04 Avi Kivity
2008-08-20 16:21 ` Henrik Holst
` (4 more replies)
0 siblings, 5 replies; 20+ messages in thread
From: Avi Kivity @ 2008-08-20 15:04 UTC (permalink / raw)
To: kvm-devel@lists.sourceforge.net
The big change is of course full swapping support, finally delivering
the full range of Linux memory management operations to kvm. You will
need a 2.6.27 host to use this functionality, however.
Other noteworthy changes: speedups of both virtio-net and qcow2 with
cache=off. Two important works-in-progress: device assignment (not
usable yet, as dma support is still missing) and the real-mode emulation
framework.
Changes from kvm-72:
- merge qemu-svn
- improve qcow2 performance with cache=off
- ide fixes
- ia64 external module (Xiantao Zhang)
- external module compatibility with 2.6.27 hosts
- fix sysenter msrs save/restore (Alexander Graf)
- fix 2.6.26 host support (Nikola Ciprich)
- fix linux-user build (Philippe Gerum)
- virtio-net speedup (Mark McLoughlin)
- fix ./configure with multiple arguments
- support Windows hibernation on non-FlexPriority hosts
- fix makefile dependencies (Sheng Yang)
- fix compiler warnings (Jan Kiszka)
- work around dhclient checksum offload brokenness (Anthony Liguori)
- full swapping support (Andrea Arcangeli)
- needs 2.6.27 hosts
- internal irq ack notification api
(Marcelo Tosatti, Amit Shah, Ben-Ami Yassour, me)
- fix pit timer interrupt injection logic (Marcelo Tosatti)
- paravirt guest: query tsc frequency from host (Glauber Costa)
- pci device assignment (Amit Shah, Ben-Ami Yassour, Weidong Han)
- still lacking dma
- fix large page crash on z10 mainframes (Christian Borntraeger)
- stack usage reduction (Dave Hansen, Sheng Yang)
- code cleanup (Sheng Yang)
- fix debug register corruption on Intel hosts (Marcelo Tosatti)
- fix -no-kvm-irqchip
- fix irq acking on pic reset (Marcelo Tosatti)
- ignore spurious timer interrupt acks
- limit device assignment to privileged user (Amit Shah)
- big real mode emulation framework (Mohammed Gamal)
- simpify irq injection (Amit Shah)
- dummy irq ack notifier for ia64 (Xiantao Zhang)
Notes:
If you use the modules bundled with kvm-73, you can use any version
of Linux from 2.6.16 upwards. You may also use kvm-73 userspace with
the kvm modules provided by Linux 2.6.22 or above. Some features may
only be available in newer releases.
http://kvm.qumranet.com
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [ANNOUNCE] kvm-73 release 2008-08-20 15:04 [ANNOUNCE] kvm-73 release Avi Kivity @ 2008-08-20 16:21 ` Henrik Holst 2008-08-20 16:43 ` Muli Ben-Yehuda ` (3 subsequent siblings) 4 siblings, 0 replies; 20+ messages in thread From: Henrik Holst @ 2008-08-20 16:21 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel@lists.sourceforge.net ons 2008-08-20 klockan 18:04 +0300 skrev Avi Kivity: > The big change is of course full swapping support, finally delivering > the full range of Linux memory management operations to kvm. You will > need a 2.6.27 host to use this functionality, however. > > Other noteworthy changes: speedups of both virtio-net and qcow2 with > cache=off. Two important works-in-progress: device assignment (not > usable yet, as dma support is still missing) and the real-mode emulation > framework. > > Changes from kvm-72: > - merge qemu-svn > - improve qcow2 performance with cache=off > - ide fixes > - ia64 external module (Xiantao Zhang) > - external module compatibility with 2.6.27 hosts > - fix sysenter msrs save/restore (Alexander Graf) > - fix 2.6.26 host support (Nikola Ciprich) > - fix linux-user build (Philippe Gerum) > - virtio-net speedup (Mark McLoughlin) > - fix ./configure with multiple arguments > - support Windows hibernation on non-FlexPriority hosts > - fix makefile dependencies (Sheng Yang) > - fix compiler warnings (Jan Kiszka) > - work around dhclient checksum offload brokenness (Anthony Liguori) > - full swapping support (Andrea Arcangeli) > - needs 2.6.27 hosts > - internal irq ack notification api > (Marcelo Tosatti, Amit Shah, Ben-Ami Yassour, me) > - fix pit timer interrupt injection logic (Marcelo Tosatti) > - paravirt guest: query tsc frequency from host (Glauber Costa) > - pci device assignment (Amit Shah, Ben-Ami Yassour, Weidong Han) > - still lacking dma > - fix large page crash on z10 mainframes (Christian Borntraeger) > - stack usage reduction (Dave Hansen, Sheng Yang) > - code cleanup (Sheng Yang) > - fix debug register corruption on Intel hosts (Marcelo Tosatti) > - fix -no-kvm-irqchip > - fix irq acking on pic reset (Marcelo Tosatti) > - ignore spurious timer interrupt acks > - limit device assignment to privileged user (Amit Shah) > - big real mode emulation framework (Mohammed Gamal) > - simpify irq injection (Amit Shah) > - dummy irq ack notifier for ia64 (Xiantao Zhang) > > > Notes: > If you use the modules bundled with kvm-73, you can use any version > of Linux from 2.6.16 upwards. You may also use kvm-73 userspace with > the kvm modules provided by Linux 2.6.22 or above. Some features may > only be available in newer releases. > > http://kvm.qumranet.com > Scsi and virtio block devices still do not survive a guest reboot (that is after a guest reboot the bios cannot find any bootable devices and thus halts). Using extboot.bin from kvm-71 makes it work so there is still something very strange going on. I have tried to locate what it might be but cannot find why ide devices survives the reboot while scsi and virtio does not... On the plus side it seams like kvm-73 fixed one issue for us where a ubuntu-8.04-i386 server guest running on a amd64 host had troubles using a scsi device (for example a mkfs.ext3 would never finish). /Henrik Holst ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [ANNOUNCE] kvm-73 release 2008-08-20 15:04 [ANNOUNCE] kvm-73 release Avi Kivity 2008-08-20 16:21 ` Henrik Holst @ 2008-08-20 16:43 ` Muli Ben-Yehuda 2008-08-21 1:45 ` Yang, Sheng 2008-08-20 21:49 ` Anthony Liguori ` (2 subsequent siblings) 4 siblings, 1 reply; 20+ messages in thread From: Muli Ben-Yehuda @ 2008-08-20 16:43 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel@lists.sourceforge.net, Ben-Ami Yassour1 On Wed, Aug 20, 2008 at 06:04:26PM +0300, Avi Kivity wrote: > Other noteworthy changes: speedups of both virtio-net and qcow2 with > cache=off. Two important works-in-progress: device assignment (not > usable yet, as dma support is still missing) and the real-mode > emulation framework. Hi Avi, The latest version of the VT-d patches for device assignment was posted by Ben on Aug 7th[1][2]. There were no substantial review comments, so... what are we waiting for? [1] http://www.mail-archive.com/kvm@vger.kernel.org/msg02554.html [2] http://www.mail-archive.com/kvm@vger.kernel.org/msg02553.html Cheers, Muli -- Workshop on I/O Virtualization (WIOV '08) Co-located with OSDI '08, Dec 2008, San Diego, CA http://www.usenix.org/wiov08 ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [ANNOUNCE] kvm-73 release 2008-08-20 16:43 ` Muli Ben-Yehuda @ 2008-08-21 1:45 ` Yang, Sheng 2008-08-21 3:26 ` Han, Weidong ` (2 more replies) 0 siblings, 3 replies; 20+ messages in thread From: Yang, Sheng @ 2008-08-21 1:45 UTC (permalink / raw) To: kvm; +Cc: Muli Ben-Yehuda, Avi Kivity, Ben-Ami Yassour1 On Thursday 21 August 2008 00:43:22 Muli Ben-Yehuda wrote: > On Wed, Aug 20, 2008 at 06:04:26PM +0300, Avi Kivity wrote: > > Other noteworthy changes: speedups of both virtio-net and qcow2 > > with cache=off. Two important works-in-progress: device > > assignment (not usable yet, as dma support is still missing) and > > the real-mode emulation framework. > > Hi Avi, > > The latest version of the VT-d patches for device assignment was > posted by Ben on Aug 7th[1][2]. There were no substantial review > comments, so... what are we waiting for? > > [1] http://www.mail-archive.com/kvm@vger.kernel.org/msg02554.html > [2] http://www.mail-archive.com/kvm@vger.kernel.org/msg02553.html > Hi Muli The next step should be send the first patch to linux-pci(and CC Jesse Barnes and other guys) to have review, for it related to DMAR modification... I think we mentioned that in recent comments, and I meant to remind Ben about that, but forgot it... -- regards Yang, Sheng ^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: [ANNOUNCE] kvm-73 release 2008-08-21 1:45 ` Yang, Sheng @ 2008-08-21 3:26 ` Han, Weidong 2008-08-21 8:39 ` Muli Ben-Yehuda 2008-08-21 8:14 ` Yang, Sheng 2008-08-21 12:54 ` Avi Kivity 2 siblings, 1 reply; 20+ messages in thread From: Han, Weidong @ 2008-08-21 3:26 UTC (permalink / raw) To: Yang, Sheng, kvm; +Cc: Muli Ben-Yehuda, Avi Kivity, Ben-Ami Yassour1 Yang, Sheng wrote: > On Thursday 21 August 2008 00:43:22 Muli Ben-Yehuda wrote: >> On Wed, Aug 20, 2008 at 06:04:26PM +0300, Avi Kivity wrote: >>> Other noteworthy changes: speedups of both virtio-net and qcow2 >>> with cache=off. Two important works-in-progress: device >>> assignment (not usable yet, as dma support is still missing) and >>> the real-mode emulation framework. >> >> Hi Avi, >> >> The latest version of the VT-d patches for device assignment was >> posted by Ben on Aug 7th[1][2]. There were no substantial review >> comments, so... what are we waiting for? >> >> [1] http://www.mail-archive.com/kvm@vger.kernel.org/msg02554.html >> [2] http://www.mail-archive.com/kvm@vger.kernel.org/msg02553.html >> > Hi Muli > > The next step should be send the first patch to linux-pci(and CC > Jesse Barnes and other guys) to have review, for it related to DMAR > modification... I think we mentioned that in recent comments, and I > meant to remind Ben about that, but forgot it... > I thought the patches would be merged into KVM mainline first. Avi, is it possible? If not, we should send the patch to LKML soon. Randy (Weidong) ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [ANNOUNCE] kvm-73 release 2008-08-21 3:26 ` Han, Weidong @ 2008-08-21 8:39 ` Muli Ben-Yehuda 0 siblings, 0 replies; 20+ messages in thread From: Muli Ben-Yehuda @ 2008-08-21 8:39 UTC (permalink / raw) To: Han, Weidong; +Cc: Yang, Sheng, kvm, Avi Kivity, Ben-Ami Yassour1 On Thu, Aug 21, 2008 at 11:26:59AM +0800, Han, Weidong wrote: > I thought the patches would be merged into KVM mainline first. Avi, > is it possible? If not, we should send the patch to LKML soon. That was my understanding too from previous discussions. Cheers, Muli -- Workshop on I/O Virtualization (WIOV '08) Co-located with OSDI '08, Dec 2008, San Diego, CA http://www.usenix.org/wiov08 ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [ANNOUNCE] kvm-73 release 2008-08-21 1:45 ` Yang, Sheng 2008-08-21 3:26 ` Han, Weidong @ 2008-08-21 8:14 ` Yang, Sheng 2008-08-21 12:54 ` Avi Kivity 2 siblings, 0 replies; 20+ messages in thread From: Yang, Sheng @ 2008-08-21 8:14 UTC (permalink / raw) To: Ben-Ami Yassour1; +Cc: Muli Ben-Yehuda, Avi Kivity, Weidong Han, kvm On Thursday 21 August 2008 09:45:29 Yang, Sheng wrote: > On Thursday 21 August 2008 00:43:22 Muli Ben-Yehuda wrote: > > On Wed, Aug 20, 2008 at 06:04:26PM +0300, Avi Kivity wrote: > > > Other noteworthy changes: speedups of both virtio-net and qcow2 > > > with cache=off. Two important works-in-progress: device > > > assignment (not usable yet, as dma support is still missing) > > > and the real-mode emulation framework. > > > > Hi Avi, > > > > The latest version of the VT-d patches for device assignment was > > posted by Ben on Aug 7th[1][2]. There were no substantial review > > comments, so... what are we waiting for? > > > > [1] http://www.mail-archive.com/kvm@vger.kernel.org/msg02554.html > > [2] http://www.mail-archive.com/kvm@vger.kernel.org/msg02553.html > > Hi Muli > > The next step should be send the first patch to linux-pci(and CC > Jesse Barnes and other guys) to have review, for it related to DMAR > modification... I think we mentioned that in recent comments, and I > meant to remind Ben about that, but forgot it... Hi Ben I think you can CC Jesse Barnes, David Woodhouse(David.Woodhouse@intel.com, current VT-d maintainer) and Mark Gross(former VT-d maintainer). -- regards Yang, Sheng ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [ANNOUNCE] kvm-73 release 2008-08-21 1:45 ` Yang, Sheng 2008-08-21 3:26 ` Han, Weidong 2008-08-21 8:14 ` Yang, Sheng @ 2008-08-21 12:54 ` Avi Kivity 2 siblings, 0 replies; 20+ messages in thread From: Avi Kivity @ 2008-08-21 12:54 UTC (permalink / raw) To: Yang, Sheng; +Cc: kvm, Muli Ben-Yehuda, Ben-Ami Yassour1 Yang, Sheng wrote: > On Thursday 21 August 2008 00:43:22 Muli Ben-Yehuda wrote: > >> On Wed, Aug 20, 2008 at 06:04:26PM +0300, Avi Kivity wrote: >> >>> Other noteworthy changes: speedups of both virtio-net and qcow2 >>> with cache=off. Two important works-in-progress: device >>> assignment (not usable yet, as dma support is still missing) and >>> the real-mode emulation framework. >>> >> Hi Avi, >> >> The latest version of the VT-d patches for device assignment was >> posted by Ben on Aug 7th[1][2]. There were no substantial review >> comments, so... what are we waiting for? >> >> [1] http://www.mail-archive.com/kvm@vger.kernel.org/msg02554.html >> [2] http://www.mail-archive.com/kvm@vger.kernel.org/msg02553.html >> >> > Hi Muli > > The next step should be send the first patch to linux-pci(and CC > Jesse Barnes and other guys) to have review, for it related to DMAR > modification... I think we mentioned that in recent comments, and I > meant to remind Ben about that, but forgot it... > Yeah. I can queue the patch, provided it is acked by the VT-d maintainer. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [ANNOUNCE] kvm-73 release 2008-08-20 15:04 [ANNOUNCE] kvm-73 release Avi Kivity 2008-08-20 16:21 ` Henrik Holst 2008-08-20 16:43 ` Muli Ben-Yehuda @ 2008-08-20 21:49 ` Anthony Liguori 2008-08-21 2:35 ` Zhang, Xiantao 2008-08-22 10:58 ` Farkas Levente 4 siblings, 0 replies; 20+ messages in thread From: Anthony Liguori @ 2008-08-20 21:49 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel@lists.sourceforge.net Avi Kivity wrote: > The big change is of course full swapping support, finally delivering > the full range of Linux memory management operations to kvm. You will > need a 2.6.27 host to use this functionality, however. > > Other noteworthy changes: speedups of both virtio-net and qcow2 with > cache=off. Two important works-in-progress: device assignment (not > usable yet, as dma support is still missing) and the real-mode > emulation framework. > > Changes from kvm-72: > - merge qemu-svn > - improve qcow2 performance with cache=off > - ide fixes The snapshot you pulled from SVN had a broken monitor. Usually, the symptom is that you have two '(qemu)' prompts. This probably will break management tools (like libvirt) although I haven't confirmed. It's fixed in the very latest SVN. Regards, Anthony Liguori > - ia64 external module (Xiantao Zhang) > - external module compatibility with 2.6.27 hosts > - fix sysenter msrs save/restore (Alexander Graf) > - fix 2.6.26 host support (Nikola Ciprich) > - fix linux-user build (Philippe Gerum) > - virtio-net speedup (Mark McLoughlin) > - fix ./configure with multiple arguments > - support Windows hibernation on non-FlexPriority hosts > - fix makefile dependencies (Sheng Yang) > - fix compiler warnings (Jan Kiszka) > - work around dhclient checksum offload brokenness (Anthony Liguori) > - full swapping support (Andrea Arcangeli) > - needs 2.6.27 hosts > - internal irq ack notification api > (Marcelo Tosatti, Amit Shah, Ben-Ami Yassour, me) > - fix pit timer interrupt injection logic (Marcelo Tosatti) > - paravirt guest: query tsc frequency from host (Glauber Costa) > - pci device assignment (Amit Shah, Ben-Ami Yassour, Weidong Han) > - still lacking dma > - fix large page crash on z10 mainframes (Christian Borntraeger) > - stack usage reduction (Dave Hansen, Sheng Yang) > - code cleanup (Sheng Yang) > - fix debug register corruption on Intel hosts (Marcelo Tosatti) > - fix -no-kvm-irqchip > - fix irq acking on pic reset (Marcelo Tosatti) > - ignore spurious timer interrupt acks > - limit device assignment to privileged user (Amit Shah) > - big real mode emulation framework (Mohammed Gamal) > - simpify irq injection (Amit Shah) > - dummy irq ack notifier for ia64 (Xiantao Zhang) > > > Notes: > If you use the modules bundled with kvm-73, you can use any version > of Linux from 2.6.16 upwards. You may also use kvm-73 userspace with > the kvm modules provided by Linux 2.6.22 or above. Some features may > only be available in newer releases. > > http://kvm.qumranet.com > > ^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: [ANNOUNCE] kvm-73 release 2008-08-20 15:04 [ANNOUNCE] kvm-73 release Avi Kivity ` (2 preceding siblings ...) 2008-08-20 21:49 ` Anthony Liguori @ 2008-08-21 2:35 ` Zhang, Xiantao 2008-08-21 13:18 ` Avi Kivity 2008-08-22 10:58 ` Farkas Levente 4 siblings, 1 reply; 20+ messages in thread From: Zhang, Xiantao @ 2008-08-21 2:35 UTC (permalink / raw) To: Avi Kivity, kvm-devel@lists.sourceforge.net; +Cc: kvm-ia64 Hi, Avi Since ia64 has supported userspace's build, could we include ia64 bits in next release? Thanks Xiantao Avi Kivity wrote: > The big change is of course full swapping support, finally delivering > the full range of Linux memory management operations to kvm. You will > need a 2.6.27 host to use this functionality, however. > > Other noteworthy changes: speedups of both virtio-net and qcow2 with > cache=off. Two important works-in-progress: device assignment (not > usable yet, as dma support is still missing) and the real-mode > emulation framework. > > Changes from kvm-72: > - merge qemu-svn > - improve qcow2 performance with cache=off > - ide fixes > - ia64 external module (Xiantao Zhang) > - external module compatibility with 2.6.27 hosts > - fix sysenter msrs save/restore (Alexander Graf) > - fix 2.6.26 host support (Nikola Ciprich) > - fix linux-user build (Philippe Gerum) > - virtio-net speedup (Mark McLoughlin) > - fix ./configure with multiple arguments > - support Windows hibernation on non-FlexPriority hosts > - fix makefile dependencies (Sheng Yang) > - fix compiler warnings (Jan Kiszka) > - work around dhclient checksum offload brokenness (Anthony Liguori) > - full swapping support (Andrea Arcangeli) > - needs 2.6.27 hosts > - internal irq ack notification api > (Marcelo Tosatti, Amit Shah, Ben-Ami Yassour, me) > - fix pit timer interrupt injection logic (Marcelo Tosatti) > - paravirt guest: query tsc frequency from host (Glauber Costa) > - pci device assignment (Amit Shah, Ben-Ami Yassour, Weidong Han) > - still lacking dma > - fix large page crash on z10 mainframes (Christian Borntraeger) > - stack usage reduction (Dave Hansen, Sheng Yang) > - code cleanup (Sheng Yang) > - fix debug register corruption on Intel hosts (Marcelo Tosatti) > - fix -no-kvm-irqchip > - fix irq acking on pic reset (Marcelo Tosatti) > - ignore spurious timer interrupt acks > - limit device assignment to privileged user (Amit Shah) > - big real mode emulation framework (Mohammed Gamal) > - simpify irq injection (Amit Shah) > - dummy irq ack notifier for ia64 (Xiantao Zhang) > > > Notes: > If you use the modules bundled with kvm-73, you can use any > version of Linux from 2.6.16 upwards. You may also use kvm-73 > userspace with the kvm modules provided by Linux 2.6.22 or above. > Some features may only be available in newer releases. > > http://kvm.qumranet.com > > > -- > error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [ANNOUNCE] kvm-73 release 2008-08-21 2:35 ` Zhang, Xiantao @ 2008-08-21 13:18 ` Avi Kivity 2008-08-21 13:24 ` Avi Kivity 2008-08-21 14:23 ` Zhang, Xiantao 0 siblings, 2 replies; 20+ messages in thread From: Avi Kivity @ 2008-08-21 13:18 UTC (permalink / raw) To: Zhang, Xiantao; +Cc: kvm-devel@lists.sourceforge.net, kvm-ia64 Zhang, Xiantao wrote: > Hi, Avi > Since ia64 has supported userspace's build, could we include ia64 > bits in next release? > I updated my scripts. I'll send you a test tarball via private mail to see I hadn't missed any files. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [ANNOUNCE] kvm-73 release 2008-08-21 13:18 ` Avi Kivity @ 2008-08-21 13:24 ` Avi Kivity 2008-08-22 4:14 ` Zhang, Xiantao 2008-08-21 14:23 ` Zhang, Xiantao 1 sibling, 1 reply; 20+ messages in thread From: Avi Kivity @ 2008-08-21 13:24 UTC (permalink / raw) To: Zhang, Xiantao; +Cc: kvm-devel@lists.sourceforge.net, kvm-ia64 Avi Kivity wrote: > Zhang, Xiantao wrote: >> Hi, Avi Since ia64 has supported userspace's build, could we >> include ia64 >> bits in next release? > > I updated my scripts. I'll send you a test tarball via private mail > to see I hadn't missed any files. > Better a link: http://userweb.kernel.org/~avi/test.tar.gz -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: [ANNOUNCE] kvm-73 release 2008-08-21 13:24 ` Avi Kivity @ 2008-08-22 4:14 ` Zhang, Xiantao 2008-08-26 11:44 ` Zhang, Xiantao 0 siblings, 1 reply; 20+ messages in thread From: Zhang, Xiantao @ 2008-08-22 4:14 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel@lists.sourceforge.net, kvm-ia64 [-- Attachment #1: Type: text/plain, Size: 6586 bytes --] Avi Kivity wrote: > Avi Kivity wrote: >> Zhang, Xiantao wrote: >>> Hi, Avi Since ia64 has supported userspace's build, could we >>> include ia64 bits in next release? >> >> I updated my scripts. I'll send you a test tarball via private mail >> to see I hadn't missed any files. >> > > Better a link: http://userweb.kernel.org/~avi/test.tar.gz Hi, Avi You may need to apply this patch, and regenerate the package again to keep kvm/ia64 compatible with Linux-2.6.26 and newer versions. :) Thannks Xiantao >From e552da3b1e7d2d30bcd09982d313ebf74c348be1 Mon Sep 17 00:00:00 2001 From: Xiantao Zhang <xiantao.zhang@intel.com> Date: Fri, 22 Aug 2008 11:07:37 +0800 Subject: [PATCH] KVM: external module: keep kvm/ia64 compatible with Linux-2.6.26 and newer version. Add some compatibility hack for Linux-2.6.26 and newer versions for ia64 Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> --- kernel/Makefile | 4 ++-- kernel/external-module-compat-comm.h | 13 ------------- kernel/ia64/Kbuild | 2 +- kernel/ia64/external-module-compat.h | 34 ++++++++++++++++++++++++++++++++++ kernel/ia64/hack-module.awk | 14 ++++++++++++++ kernel/x86/external-module-compat.h | 14 ++++++++++++++ kernel/{ => x86}/hack-module.awk | 0 7 files changed, 65 insertions(+), 16 deletions(-) create mode 100644 kernel/ia64/hack-module.awk rename kernel/{ => x86}/hack-module.awk (100%) diff --git a/kernel/Makefile b/kernel/Makefile index 6f8cc9d..3f5f6da 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -19,7 +19,7 @@ LINUX = ../linux-2.6 version = $(shell cd $(LINUX); git describe) _hack = mv $1 $1.orig && \ - gawk -v version=$(version) -f hack-module.awk $1.orig \ + gawk -v version=$(version) -f $(ARCH_DIR)/hack-module.awk $1.orig \ | sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig unifdef = mv $1 $1.orig && \ @@ -29,7 +29,7 @@ unifdef = mv $1 $1.orig && \ hack = $(call _hack,$T/$(strip $1)) hack-files-x86 = kvm_main.c mmu.c vmx.c svm.c x86.c irq.h lapic.c i8254.c -hack-files-ia64 = +hack-files-ia64 = kvm_main.c kvm_fw.c hack-files = $(hack-files-$(ARCH_DIR)) diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h index 97e921b..fcffb1f 100644 --- a/kernel/external-module-compat-comm.h +++ b/kernel/external-module-compat-comm.h @@ -17,7 +17,6 @@ #include <asm/processor.h> #include <linux/hrtimer.h> #include <asm/bitops.h> -#include <asm/msr.h> /* * 2.6.16 does not have GFP_NOWAIT @@ -40,18 +39,6 @@ #define prof_on 4321 #endif -/* - * smp_call_function_single() is not exported below 2.6.20, and has different - * semantics below 2.6.23. The 'nonatomic' argument was removed in 2.6.27. - */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) - -int kvm_smp_call_function_single(int cpu, void (*func)(void *info), - void *info, int wait); - -#define smp_call_function_single kvm_smp_call_function_single - -#endif /* on_each_cpu() lost an argument in 2.6.27. */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) diff --git a/kernel/ia64/Kbuild b/kernel/ia64/Kbuild index 764a493..50af491 100644 --- a/kernel/ia64/Kbuild +++ b/kernel/ia64/Kbuild @@ -1,6 +1,6 @@ obj-m := kvm.o kvm-intel.o -kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o +kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o ../anon_inodes.o EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127 kvm-intel-objs := vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o mmio.o \ diff --git a/kernel/ia64/external-module-compat.h b/kernel/ia64/external-module-compat.h index 3c4001c..1f8dc9b 100644 --- a/kernel/ia64/external-module-compat.h +++ b/kernel/ia64/external-module-compat.h @@ -2,8 +2,11 @@ * Compatibility header for building as an external module. */ +#ifndef __ASSEMBLY__ #include <linux/version.h> +#include "../external-module-compat-comm.h" + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) #error "KVM/IA-64 Can't be compiled if kernel version < 2.6.26" #endif @@ -13,3 +16,34 @@ TODO: Implement it later! */ #error "KVM/IA-64 depends on preempt notifiers in kernel." #endif + +/* on_each_cpu() lost an argument in 2.6.27. */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) + +#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, 0, wait) + +#else + +#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, wait) + +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) + +/* The 'nonatomic' argument was removed in 2.6.27. */ + +#undef smp_call_function_single + +#include <linux/smp.h> + +static inline int kvm_smp_call_function_single(int cpu, void (*func)(void *info), + void *info, int wait) +{ + return smp_call_function_single(cpu, func, info, 0, wait); +} + +#define smp_call_function_single kvm_smp_call_function_single + +#endif + +#endif diff --git a/kernel/ia64/hack-module.awk b/kernel/ia64/hack-module.awk new file mode 100644 index 0000000..b9b24c0 --- /dev/null +++ b/kernel/ia64/hack-module.awk @@ -0,0 +1,14 @@ +BEGIN { split("INIT_WORK on_each_cpu smp_call_function" , compat_apis); } + +/MODULE_AUTHOR/ { + printf("MODULE_INFO(version, \"%s\");\n", version) +} + +{ + for (i in compat_apis) { + ident = compat_apis[i] + sub("\\<" ident "\\>", "kvm_" ident) + } +} + +{ print } diff --git a/kernel/x86/external-module-compat.h b/kernel/x86/external-module-compat.h index f6e3e34..8ab8f26 100644 --- a/kernel/x86/external-module-compat.h +++ b/kernel/x86/external-module-compat.h @@ -5,9 +5,23 @@ #include <linux/compiler.h> #include <linux/version.h> +#include <asm/msr.h> #include "../external-module-compat-comm.h" +/* + * smp_call_function_single() is not exported below 2.6.20, and has different + * semantics below 2.6.23. The 'nonatomic' argument was removed in 2.6.27. + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) + +int kvm_smp_call_function_single(int cpu, void (*func)(void *info), + void *info, int wait); + +#define smp_call_function_single kvm_smp_call_function_single + +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) #ifndef _EFER_SCE diff --git a/kernel/hack-module.awk b/kernel/x86/hack-module.awk similarity index 100% rename from kernel/hack-module.awk rename to kernel/x86/hack-module.awk -- 1.5.1 [-- Attachment #2: 0002-KVM-external-module-keep.patch --] [-- Type: application/octet-stream, Size: 5844 bytes --] From e552da3b1e7d2d30bcd09982d313ebf74c348be1 Mon Sep 17 00:00:00 2001 From: Xiantao Zhang <xiantao.zhang@intel.com> Date: Fri, 22 Aug 2008 11:07:37 +0800 Subject: [PATCH] KVM: external module: keep kvm/ia64 compatible with Linux-2.6.26 and newer version. Add some compatibility hack for Linux-2.6.26 and newer versions for ia64 Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> --- kernel/Makefile | 4 ++-- kernel/external-module-compat-comm.h | 13 ------------- kernel/ia64/Kbuild | 2 +- kernel/ia64/external-module-compat.h | 34 ++++++++++++++++++++++++++++++++++ kernel/ia64/hack-module.awk | 14 ++++++++++++++ kernel/x86/external-module-compat.h | 14 ++++++++++++++ kernel/{ => x86}/hack-module.awk | 0 7 files changed, 65 insertions(+), 16 deletions(-) create mode 100644 kernel/ia64/hack-module.awk rename kernel/{ => x86}/hack-module.awk (100%) diff --git a/kernel/Makefile b/kernel/Makefile index 6f8cc9d..3f5f6da 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -19,7 +19,7 @@ LINUX = ../linux-2.6 version = $(shell cd $(LINUX); git describe) _hack = mv $1 $1.orig && \ - gawk -v version=$(version) -f hack-module.awk $1.orig \ + gawk -v version=$(version) -f $(ARCH_DIR)/hack-module.awk $1.orig \ | sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig unifdef = mv $1 $1.orig && \ @@ -29,7 +29,7 @@ unifdef = mv $1 $1.orig && \ hack = $(call _hack,$T/$(strip $1)) hack-files-x86 = kvm_main.c mmu.c vmx.c svm.c x86.c irq.h lapic.c i8254.c -hack-files-ia64 = +hack-files-ia64 = kvm_main.c kvm_fw.c hack-files = $(hack-files-$(ARCH_DIR)) diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h index 97e921b..fcffb1f 100644 --- a/kernel/external-module-compat-comm.h +++ b/kernel/external-module-compat-comm.h @@ -17,7 +17,6 @@ #include <asm/processor.h> #include <linux/hrtimer.h> #include <asm/bitops.h> -#include <asm/msr.h> /* * 2.6.16 does not have GFP_NOWAIT @@ -40,18 +39,6 @@ #define prof_on 4321 #endif -/* - * smp_call_function_single() is not exported below 2.6.20, and has different - * semantics below 2.6.23. The 'nonatomic' argument was removed in 2.6.27. - */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) - -int kvm_smp_call_function_single(int cpu, void (*func)(void *info), - void *info, int wait); - -#define smp_call_function_single kvm_smp_call_function_single - -#endif /* on_each_cpu() lost an argument in 2.6.27. */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) diff --git a/kernel/ia64/Kbuild b/kernel/ia64/Kbuild index 764a493..50af491 100644 --- a/kernel/ia64/Kbuild +++ b/kernel/ia64/Kbuild @@ -1,6 +1,6 @@ obj-m := kvm.o kvm-intel.o -kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o +kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o ../anon_inodes.o EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127 kvm-intel-objs := vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o mmio.o \ diff --git a/kernel/ia64/external-module-compat.h b/kernel/ia64/external-module-compat.h index 3c4001c..1f8dc9b 100644 --- a/kernel/ia64/external-module-compat.h +++ b/kernel/ia64/external-module-compat.h @@ -2,8 +2,11 @@ * Compatibility header for building as an external module. */ +#ifndef __ASSEMBLY__ #include <linux/version.h> +#include "../external-module-compat-comm.h" + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) #error "KVM/IA-64 Can't be compiled if kernel version < 2.6.26" #endif @@ -13,3 +16,34 @@ TODO: Implement it later! */ #error "KVM/IA-64 depends on preempt notifiers in kernel." #endif + +/* on_each_cpu() lost an argument in 2.6.27. */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) + +#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, 0, wait) + +#else + +#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, wait) + +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) + +/* The 'nonatomic' argument was removed in 2.6.27. */ + +#undef smp_call_function_single + +#include <linux/smp.h> + +static inline int kvm_smp_call_function_single(int cpu, void (*func)(void *info), + void *info, int wait) +{ + return smp_call_function_single(cpu, func, info, 0, wait); +} + +#define smp_call_function_single kvm_smp_call_function_single + +#endif + +#endif diff --git a/kernel/ia64/hack-module.awk b/kernel/ia64/hack-module.awk new file mode 100644 index 0000000..b9b24c0 --- /dev/null +++ b/kernel/ia64/hack-module.awk @@ -0,0 +1,14 @@ +BEGIN { split("INIT_WORK on_each_cpu smp_call_function" , compat_apis); } + +/MODULE_AUTHOR/ { + printf("MODULE_INFO(version, \"%s\");\n", version) +} + +{ + for (i in compat_apis) { + ident = compat_apis[i] + sub("\\<" ident "\\>", "kvm_" ident) + } +} + +{ print } diff --git a/kernel/x86/external-module-compat.h b/kernel/x86/external-module-compat.h index f6e3e34..8ab8f26 100644 --- a/kernel/x86/external-module-compat.h +++ b/kernel/x86/external-module-compat.h @@ -5,9 +5,23 @@ #include <linux/compiler.h> #include <linux/version.h> +#include <asm/msr.h> #include "../external-module-compat-comm.h" +/* + * smp_call_function_single() is not exported below 2.6.20, and has different + * semantics below 2.6.23. The 'nonatomic' argument was removed in 2.6.27. + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) + +int kvm_smp_call_function_single(int cpu, void (*func)(void *info), + void *info, int wait); + +#define smp_call_function_single kvm_smp_call_function_single + +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) #ifndef _EFER_SCE diff --git a/kernel/hack-module.awk b/kernel/x86/hack-module.awk similarity index 100% rename from kernel/hack-module.awk rename to kernel/x86/hack-module.awk -- 1.5.1 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* RE: [ANNOUNCE] kvm-73 release 2008-08-22 4:14 ` Zhang, Xiantao @ 2008-08-26 11:44 ` Zhang, Xiantao 2008-08-26 15:26 ` Avi Kivity 0 siblings, 1 reply; 20+ messages in thread From: Zhang, Xiantao @ 2008-08-26 11:44 UTC (permalink / raw) To: Zhang, Xiantao, Avi Kivity; +Cc: kvm-devel@lists.sourceforge.net, kvm-ia64 [-- Attachment #1: Type: text/plain, Size: 6336 bytes --] Hi, Avi A updated version. Please review again. Thanks. Xiantao >From 689bdb4c0506a1b6b24e9c481634593052ee2cc0 Mon Sep 17 00:00:00 2001 From: Xiantao Zhang <xiantao.zhang@intel.com> Date: Tue, 26 Aug 2008 19:20:03 +0800 Subject: [PATCH] KVM: external module: keep kvm/ia64 compatible with Linux-2.6.26 and newer version. Add some compatibility hack for Linux-2.6.26 and newer versions for ia64 Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> --- kernel/Makefile | 4 ++-- kernel/external-module-compat-comm.h | 1 - kernel/{x86 => }/external-module-compat.c | 0 kernel/ia64/Kbuild | 3 ++- kernel/ia64/external-module-compat.h | 16 ++++++++++++++++ kernel/ia64/hack-module.awk | 14 ++++++++++++++ kernel/x86/Kbuild | 6 +++--- kernel/x86/external-module-compat.h | 1 + kernel/{ => x86}/hack-module.awk | 0 9 files changed, 38 insertions(+), 7 deletions(-) rename kernel/{x86 => }/external-module-compat.c (100%) create mode 100644 kernel/ia64/hack-module.awk rename kernel/{ => x86}/hack-module.awk (100%) diff --git a/kernel/Makefile b/kernel/Makefile index 6f8cc9d..3f5f6da 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -19,7 +19,7 @@ LINUX = ../linux-2.6 version = $(shell cd $(LINUX); git describe) _hack = mv $1 $1.orig && \ - gawk -v version=$(version) -f hack-module.awk $1.orig \ + gawk -v version=$(version) -f $(ARCH_DIR)/hack-module.awk $1.orig \ | sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig unifdef = mv $1 $1.orig && \ @@ -29,7 +29,7 @@ unifdef = mv $1 $1.orig && \ hack = $(call _hack,$T/$(strip $1)) hack-files-x86 = kvm_main.c mmu.c vmx.c svm.c x86.c irq.h lapic.c i8254.c -hack-files-ia64 = +hack-files-ia64 = kvm_main.c kvm_fw.c hack-files = $(hack-files-$(ARCH_DIR)) diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h index 97e921b..2e87c57 100644 --- a/kernel/external-module-compat-comm.h +++ b/kernel/external-module-compat-comm.h @@ -17,7 +17,6 @@ #include <asm/processor.h> #include <linux/hrtimer.h> #include <asm/bitops.h> -#include <asm/msr.h> /* * 2.6.16 does not have GFP_NOWAIT diff --git a/kernel/x86/external-module-compat.c b/kernel/external-module-compat.c similarity index 100% rename from kernel/x86/external-module-compat.c rename to kernel/external-module-compat.c diff --git a/kernel/ia64/Kbuild b/kernel/ia64/Kbuild index 764a493..8561476 100644 --- a/kernel/ia64/Kbuild +++ b/kernel/ia64/Kbuild @@ -1,6 +1,7 @@ obj-m := kvm.o kvm-intel.o -kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o +kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o \ + ../anon_inodes.o ../external-module-compat.o EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127 kvm-intel-objs := vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o mmio.o \ diff --git a/kernel/ia64/external-module-compat.h b/kernel/ia64/external-module-compat.h index 3c4001c..2a11d39 100644 --- a/kernel/ia64/external-module-compat.h +++ b/kernel/ia64/external-module-compat.h @@ -2,8 +2,11 @@ * Compatibility header for building as an external module. */ +#ifndef __ASSEMBLY__ #include <linux/version.h> +#include "../external-module-compat-comm.h" + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) #error "KVM/IA-64 Can't be compiled if kernel version < 2.6.26" #endif @@ -13,3 +16,16 @@ TODO: Implement it later! */ #error "KVM/IA-64 depends on preempt notifiers in kernel." #endif + +/* smp_call_function() lost an argument in 2.6.27. */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) + +#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, 0, wait) + +#else + +#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, wait) + +#endif + +#endif diff --git a/kernel/ia64/hack-module.awk b/kernel/ia64/hack-module.awk new file mode 100644 index 0000000..b9b24c0 --- /dev/null +++ b/kernel/ia64/hack-module.awk @@ -0,0 +1,14 @@ +BEGIN { split("INIT_WORK on_each_cpu smp_call_function" , compat_apis); } + +/MODULE_AUTHOR/ { + printf("MODULE_INFO(version, \"%s\");\n", version) +} + +{ + for (i in compat_apis) { + ident = compat_apis[i] + sub("\\<" ident "\\>", "kvm_" ident) + } +} + +{ print } diff --git a/kernel/x86/Kbuild b/kernel/x86/Kbuild index ee81a1e..8dc0483 100644 --- a/kernel/x86/Kbuild +++ b/kernel/x86/Kbuild @@ -1,11 +1,11 @@ obj-m := kvm.o kvm-intel.o kvm-amd.o kvm-objs := kvm_main.o x86.o mmu.o x86_emulate.o ../anon_inodes.o irq.o i8259.o \ lapic.o ioapic.o preempt.o i8254.o coalesced_mmio.o \ - external-module-compat.o + ../external-module-compat.o ifeq ($(CONFIG_KVM_TRACE),y) kvm-objs += kvm_trace.o endif -kvm-intel-objs := vmx.o vmx-debug.o external-module-compat.o -kvm-amd-objs := svm.o external-module-compat.o +kvm-intel-objs := vmx.o vmx-debug.o ../external-module-compat.o +kvm-amd-objs := svm.o ../external-module-compat.o CFLAGS_kvm_main.o = -DKVM_MAIN diff --git a/kernel/x86/external-module-compat.h b/kernel/x86/external-module-compat.h index f6e3e34..0b70a53 100644 --- a/kernel/x86/external-module-compat.h +++ b/kernel/x86/external-module-compat.h @@ -5,6 +5,7 @@ #include <linux/compiler.h> #include <linux/version.h> +#include <asm/msr.h> #include "../external-module-compat-comm.h" diff --git a/kernel/hack-module.awk b/kernel/x86/hack-module.awk similarity index 100% rename from kernel/hack-module.awk rename to kernel/x86/hack-module.awk -- 1.5.1 Zhang, Xiantao wrote: > Avi Kivity wrote: >> Avi Kivity wrote: >>> Zhang, Xiantao wrote: >>>> Hi, Avi Since ia64 has supported userspace's build, could we >>>> include ia64 bits in next release? >>> >>> I updated my scripts. I'll send you a test tarball via private mail >>> to see I hadn't missed any files. >>> >> >> Better a link: http://userweb.kernel.org/~avi/test.tar.gz > Hi, Avi > You may need to apply this patch, and regenerate the package > again to keep kvm/ia64 compatible with Linux-2.6.26 and newer > versions. :) Thannks > Xiantao > [-- Attachment #2: 0001-KVM-external-module-keep-kvm-ia64-compatible-with.patch --] [-- Type: application/octet-stream, Size: 5508 bytes --] From 689bdb4c0506a1b6b24e9c481634593052ee2cc0 Mon Sep 17 00:00:00 2001 From: Xiantao Zhang <xiantao.zhang@intel.com> Date: Tue, 26 Aug 2008 19:20:03 +0800 Subject: [PATCH] KVM: external module: keep kvm/ia64 compatible with Linux-2.6.26 and newer version. Add some compatibility hack for Linux-2.6.26 and newer versions for ia64 Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> --- kernel/Makefile | 4 ++-- kernel/external-module-compat-comm.h | 1 - kernel/{x86 => }/external-module-compat.c | 0 kernel/ia64/Kbuild | 3 ++- kernel/ia64/external-module-compat.h | 16 ++++++++++++++++ kernel/ia64/hack-module.awk | 14 ++++++++++++++ kernel/x86/Kbuild | 6 +++--- kernel/x86/external-module-compat.h | 1 + kernel/{ => x86}/hack-module.awk | 0 9 files changed, 38 insertions(+), 7 deletions(-) rename kernel/{x86 => }/external-module-compat.c (100%) create mode 100644 kernel/ia64/hack-module.awk rename kernel/{ => x86}/hack-module.awk (100%) diff --git a/kernel/Makefile b/kernel/Makefile index 6f8cc9d..3f5f6da 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -19,7 +19,7 @@ LINUX = ../linux-2.6 version = $(shell cd $(LINUX); git describe) _hack = mv $1 $1.orig && \ - gawk -v version=$(version) -f hack-module.awk $1.orig \ + gawk -v version=$(version) -f $(ARCH_DIR)/hack-module.awk $1.orig \ | sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig unifdef = mv $1 $1.orig && \ @@ -29,7 +29,7 @@ unifdef = mv $1 $1.orig && \ hack = $(call _hack,$T/$(strip $1)) hack-files-x86 = kvm_main.c mmu.c vmx.c svm.c x86.c irq.h lapic.c i8254.c -hack-files-ia64 = +hack-files-ia64 = kvm_main.c kvm_fw.c hack-files = $(hack-files-$(ARCH_DIR)) diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h index 97e921b..2e87c57 100644 --- a/kernel/external-module-compat-comm.h +++ b/kernel/external-module-compat-comm.h @@ -17,7 +17,6 @@ #include <asm/processor.h> #include <linux/hrtimer.h> #include <asm/bitops.h> -#include <asm/msr.h> /* * 2.6.16 does not have GFP_NOWAIT diff --git a/kernel/x86/external-module-compat.c b/kernel/external-module-compat.c similarity index 100% rename from kernel/x86/external-module-compat.c rename to kernel/external-module-compat.c diff --git a/kernel/ia64/Kbuild b/kernel/ia64/Kbuild index 764a493..8561476 100644 --- a/kernel/ia64/Kbuild +++ b/kernel/ia64/Kbuild @@ -1,6 +1,7 @@ obj-m := kvm.o kvm-intel.o -kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o +kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o \ + ../anon_inodes.o ../external-module-compat.o EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127 kvm-intel-objs := vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o mmio.o \ diff --git a/kernel/ia64/external-module-compat.h b/kernel/ia64/external-module-compat.h index 3c4001c..2a11d39 100644 --- a/kernel/ia64/external-module-compat.h +++ b/kernel/ia64/external-module-compat.h @@ -2,8 +2,11 @@ * Compatibility header for building as an external module. */ +#ifndef __ASSEMBLY__ #include <linux/version.h> +#include "../external-module-compat-comm.h" + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) #error "KVM/IA-64 Can't be compiled if kernel version < 2.6.26" #endif @@ -13,3 +16,16 @@ TODO: Implement it later! */ #error "KVM/IA-64 depends on preempt notifiers in kernel." #endif + +/* smp_call_function() lost an argument in 2.6.27. */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) + +#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, 0, wait) + +#else + +#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, wait) + +#endif + +#endif diff --git a/kernel/ia64/hack-module.awk b/kernel/ia64/hack-module.awk new file mode 100644 index 0000000..b9b24c0 --- /dev/null +++ b/kernel/ia64/hack-module.awk @@ -0,0 +1,14 @@ +BEGIN { split("INIT_WORK on_each_cpu smp_call_function" , compat_apis); } + +/MODULE_AUTHOR/ { + printf("MODULE_INFO(version, \"%s\");\n", version) +} + +{ + for (i in compat_apis) { + ident = compat_apis[i] + sub("\\<" ident "\\>", "kvm_" ident) + } +} + +{ print } diff --git a/kernel/x86/Kbuild b/kernel/x86/Kbuild index ee81a1e..8dc0483 100644 --- a/kernel/x86/Kbuild +++ b/kernel/x86/Kbuild @@ -1,11 +1,11 @@ obj-m := kvm.o kvm-intel.o kvm-amd.o kvm-objs := kvm_main.o x86.o mmu.o x86_emulate.o ../anon_inodes.o irq.o i8259.o \ lapic.o ioapic.o preempt.o i8254.o coalesced_mmio.o \ - external-module-compat.o + ../external-module-compat.o ifeq ($(CONFIG_KVM_TRACE),y) kvm-objs += kvm_trace.o endif -kvm-intel-objs := vmx.o vmx-debug.o external-module-compat.o -kvm-amd-objs := svm.o external-module-compat.o +kvm-intel-objs := vmx.o vmx-debug.o ../external-module-compat.o +kvm-amd-objs := svm.o ../external-module-compat.o CFLAGS_kvm_main.o = -DKVM_MAIN diff --git a/kernel/x86/external-module-compat.h b/kernel/x86/external-module-compat.h index f6e3e34..0b70a53 100644 --- a/kernel/x86/external-module-compat.h +++ b/kernel/x86/external-module-compat.h @@ -5,6 +5,7 @@ #include <linux/compiler.h> #include <linux/version.h> +#include <asm/msr.h> #include "../external-module-compat-comm.h" diff --git a/kernel/hack-module.awk b/kernel/x86/hack-module.awk similarity index 100% rename from kernel/hack-module.awk rename to kernel/x86/hack-module.awk -- 1.5.1 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [ANNOUNCE] kvm-73 release 2008-08-26 11:44 ` Zhang, Xiantao @ 2008-08-26 15:26 ` Avi Kivity 2008-08-27 1:53 ` Zhang, Xiantao 0 siblings, 1 reply; 20+ messages in thread From: Avi Kivity @ 2008-08-26 15:26 UTC (permalink / raw) To: Zhang, Xiantao; +Cc: kvm-devel@lists.sourceforge.net, kvm-ia64 Zhang, Xiantao wrote: > Hi, Avi > A updated version. Please review again. Thanks. > Xiantao > From 689bdb4c0506a1b6b24e9c481634593052ee2cc0 Mon Sep 17 00:00:00 2001 > From: Xiantao Zhang <xiantao.zhang@intel.com> > Date: Tue, 26 Aug 2008 19:20:03 +0800 > Subject: [PATCH] KVM: external module: keep kvm/ia64 compatible with > Linux-2.6.26 and newer version. > > Add some compatibility hack for Linux-2.6.26 and newer versions for ia64 > Unfortunately it breaks x86 build (2.6.25 host). Please test that. Also, please separate the x86 file movement from the ia64 additions. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: [ANNOUNCE] kvm-73 release 2008-08-26 15:26 ` Avi Kivity @ 2008-08-27 1:53 ` Zhang, Xiantao 2008-08-27 8:54 ` Avi Kivity 0 siblings, 1 reply; 20+ messages in thread From: Zhang, Xiantao @ 2008-08-27 1:53 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel@lists.sourceforge.net, kvm-ia64 [-- Attachment #1: Type: text/plain, Size: 890 bytes --] Avi Kivity wrote: > Zhang, Xiantao wrote: >> Hi, Avi >> A updated version. Please review again. Thanks. >> Xiantao >> From 689bdb4c0506a1b6b24e9c481634593052ee2cc0 Mon Sep 17 00:00:00 >> 2001 From: Xiantao Zhang <xiantao.zhang@intel.com> >> Date: Tue, 26 Aug 2008 19:20:03 +0800 >> Subject: [PATCH] KVM: external module: keep kvm/ia64 compatible with >> Linux-2.6.26 and newer version. >> >> Add some compatibility hack for Linux-2.6.26 and newer versions for >> ia64 >> > > > Unfortunately it breaks x86 build (2.6.25 host). Please test that. Oops, my mistake! I should put asm/msr.h after external-module-compat-comm.h due to dependcies issue. > Also, please separate the x86 file movement from the ia64 additions. Attached! First is for x86 file movement, and the other targets for hacking ia64 source for back-ward compatibility. Thanks Xiantao [-- Attachment #2: 0001-KVM-External-Module-Moving-two-files-for-cross-arc.patch --] [-- Type: application/octet-stream, Size: 3131 bytes --] From 0583db6c105df8870084ba866ca08bfb681eaf2d Mon Sep 17 00:00:00 2001 From: Zhang Xiantao <xiantao.zhang@intel.com> Date: Wed, 27 Aug 2008 09:23:17 +0800 Subject: [PATCH] KVM: External Module: Moving two files for cross-arch support. x86/external-module-compat.c -> external-module-compat.c. hack-module.awk -> x86/hack-module.awk. Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> --- kernel/Makefile | 2 +- kernel/external-module-compat-comm.h | 1 - kernel/{x86 => }/external-module-compat.c | 0 kernel/x86/Kbuild | 6 +++--- kernel/x86/external-module-compat.h | 2 ++ kernel/{ => x86}/hack-module.awk | 0 6 files changed, 6 insertions(+), 5 deletions(-) rename kernel/{x86 => }/external-module-compat.c (100%) rename kernel/{ => x86}/hack-module.awk (100%) diff --git a/kernel/Makefile b/kernel/Makefile index 6f8cc9d..d2913a9 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -19,7 +19,7 @@ LINUX = ../linux-2.6 version = $(shell cd $(LINUX); git describe) _hack = mv $1 $1.orig && \ - gawk -v version=$(version) -f hack-module.awk $1.orig \ + gawk -v version=$(version) -f $(ARCH_DIR)/hack-module.awk $1.orig \ | sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig unifdef = mv $1 $1.orig && \ diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h index 97e921b..2e87c57 100644 --- a/kernel/external-module-compat-comm.h +++ b/kernel/external-module-compat-comm.h @@ -17,7 +17,6 @@ #include <asm/processor.h> #include <linux/hrtimer.h> #include <asm/bitops.h> -#include <asm/msr.h> /* * 2.6.16 does not have GFP_NOWAIT diff --git a/kernel/x86/external-module-compat.c b/kernel/external-module-compat.c similarity index 100% rename from kernel/x86/external-module-compat.c rename to kernel/external-module-compat.c diff --git a/kernel/x86/Kbuild b/kernel/x86/Kbuild index ee81a1e..8dc0483 100644 --- a/kernel/x86/Kbuild +++ b/kernel/x86/Kbuild @@ -1,11 +1,11 @@ obj-m := kvm.o kvm-intel.o kvm-amd.o kvm-objs := kvm_main.o x86.o mmu.o x86_emulate.o ../anon_inodes.o irq.o i8259.o \ lapic.o ioapic.o preempt.o i8254.o coalesced_mmio.o \ - external-module-compat.o + ../external-module-compat.o ifeq ($(CONFIG_KVM_TRACE),y) kvm-objs += kvm_trace.o endif -kvm-intel-objs := vmx.o vmx-debug.o external-module-compat.o -kvm-amd-objs := svm.o external-module-compat.o +kvm-intel-objs := vmx.o vmx-debug.o ../external-module-compat.o +kvm-amd-objs := svm.o ../external-module-compat.o CFLAGS_kvm_main.o = -DKVM_MAIN diff --git a/kernel/x86/external-module-compat.h b/kernel/x86/external-module-compat.h index f6e3e34..c53e0d6 100644 --- a/kernel/x86/external-module-compat.h +++ b/kernel/x86/external-module-compat.h @@ -8,6 +8,8 @@ #include "../external-module-compat-comm.h" +#include <asm/msr.h> + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) #ifndef _EFER_SCE diff --git a/kernel/hack-module.awk b/kernel/x86/hack-module.awk similarity index 100% rename from kernel/hack-module.awk rename to kernel/x86/hack-module.awk -- 1.5.6.2 [-- Attachment #3: 0002-kvm-ia64-External-module-Some-hacks-for-the-compab.patch --] [-- Type: application/octet-stream, Size: 2970 bytes --] From d7c633f32c16606a06a1c2df97cb36e76c439757 Mon Sep 17 00:00:00 2001 From: Zhang Xiantao <xiantao.zhang@intel.com> Date: Wed, 27 Aug 2008 09:33:45 +0800 Subject: [PATCH] kvm/ia64: External module: Some hacks for the compability with 2.6.26. Add one hack-module.awk scripts to hack ia64 source. Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> --- kernel/Makefile | 2 +- kernel/ia64/Kbuild | 3 ++- kernel/ia64/external-module-compat.h | 16 ++++++++++++++++ kernel/ia64/hack-module.awk | 14 ++++++++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 kernel/ia64/hack-module.awk diff --git a/kernel/Makefile b/kernel/Makefile index d2913a9..3f5f6da 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -29,7 +29,7 @@ unifdef = mv $1 $1.orig && \ hack = $(call _hack,$T/$(strip $1)) hack-files-x86 = kvm_main.c mmu.c vmx.c svm.c x86.c irq.h lapic.c i8254.c -hack-files-ia64 = +hack-files-ia64 = kvm_main.c kvm_fw.c hack-files = $(hack-files-$(ARCH_DIR)) diff --git a/kernel/ia64/Kbuild b/kernel/ia64/Kbuild index 764a493..8561476 100644 --- a/kernel/ia64/Kbuild +++ b/kernel/ia64/Kbuild @@ -1,6 +1,7 @@ obj-m := kvm.o kvm-intel.o -kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o +kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o \ + ../anon_inodes.o ../external-module-compat.o EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127 kvm-intel-objs := vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o mmio.o \ diff --git a/kernel/ia64/external-module-compat.h b/kernel/ia64/external-module-compat.h index 3c4001c..d6b67fe 100644 --- a/kernel/ia64/external-module-compat.h +++ b/kernel/ia64/external-module-compat.h @@ -2,8 +2,11 @@ * Compatibility header for building as an external module. */ +#ifndef __ASSEMBLY__ #include <linux/version.h> +#include "../external-module-compat-comm.h" + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) #error "KVM/IA-64 Can't be compiled if kernel version < 2.6.26" #endif @@ -13,3 +16,16 @@ TODO: Implement it later! */ #error "KVM/IA-64 depends on preempt notifiers in kernel." #endif + +/* smp_call_function() lost an argument in 2.6.27. */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) + +#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, 0, wait) + +#else + +#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, wait) + +#endif + +#endif diff --git a/kernel/ia64/hack-module.awk b/kernel/ia64/hack-module.awk new file mode 100644 index 0000000..b9b24c0 --- /dev/null +++ b/kernel/ia64/hack-module.awk @@ -0,0 +1,14 @@ +BEGIN { split("INIT_WORK on_each_cpu smp_call_function" , compat_apis); } + +/MODULE_AUTHOR/ { + printf("MODULE_INFO(version, \"%s\");\n", version) +} + +{ + for (i in compat_apis) { + ident = compat_apis[i] + sub("\\<" ident "\\>", "kvm_" ident) + } +} + +{ print } -- 1.5.6.2 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [ANNOUNCE] kvm-73 release 2008-08-27 1:53 ` Zhang, Xiantao @ 2008-08-27 8:54 ` Avi Kivity 0 siblings, 0 replies; 20+ messages in thread From: Avi Kivity @ 2008-08-27 8:54 UTC (permalink / raw) To: Zhang, Xiantao; +Cc: kvm-devel@lists.sourceforge.net, kvm-ia64 Zhang, Xiantao wrote: > Attached! First is for x86 file movement, and the other targets for > hacking ia64 source for back-ward compatibility. > Both applied, thanks. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: [ANNOUNCE] kvm-73 release 2008-08-21 13:18 ` Avi Kivity 2008-08-21 13:24 ` Avi Kivity @ 2008-08-21 14:23 ` Zhang, Xiantao 1 sibling, 0 replies; 20+ messages in thread From: Zhang, Xiantao @ 2008-08-21 14:23 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel@lists.sourceforge.net, kvm-ia64 Avi Kivity wrote: > Zhang, Xiantao wrote: >> Hi, Avi >> Since ia64 has supported userspace's build, could we include ia64 >> bits in next release? >> > > I updated my scripts. I'll send you a test tarball via private mail > to see I hadn't missed any files. Great! I will guarantee it can work well on ia64 platforms. Thanks! Xiantao ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [ANNOUNCE] kvm-73 release 2008-08-20 15:04 [ANNOUNCE] kvm-73 release Avi Kivity ` (3 preceding siblings ...) 2008-08-21 2:35 ` Zhang, Xiantao @ 2008-08-22 10:58 ` Farkas Levente 2008-08-22 18:13 ` Avi Kivity 4 siblings, 1 reply; 20+ messages in thread From: Farkas Levente @ 2008-08-22 10:58 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel@lists.sourceforge.net Avi Kivity wrote: > The big change is of course full swapping support, finally delivering > the full range of Linux memory management operations to kvm. You will > need a 2.6.27 host to use this functionality, however. > > Other noteworthy changes: speedups of both virtio-net and qcow2 with > cache=off. Two important works-in-progress: device assignment (not > usable yet, as dma support is still missing) and the real-mode emulation > framework. what is the current recommended way to build kernel module for kvm? until now it was a simple make KDIR=... in the linux dir, but it's no longer working. first of all now is required to run configure for kernel module too, second the above make now get into an infinite recursive loop. anyway it's be useful a few lines of INSTALL file for both userspace and kernel module config, build and install procedure. -- Levente "Si vis pacem para bellum!" ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [ANNOUNCE] kvm-73 release 2008-08-22 10:58 ` Farkas Levente @ 2008-08-22 18:13 ` Avi Kivity 0 siblings, 0 replies; 20+ messages in thread From: Avi Kivity @ 2008-08-22 18:13 UTC (permalink / raw) To: Farkas Levente; +Cc: kvm-devel@lists.sourceforge.net Farkas Levente wrote: > what is the current recommended way to build kernel module for kvm? > until now it was a simple > make KDIR=... > in the linux dir, but it's no longer working. first of all now is > required to run configure for kernel module too, second the above make > now get into an infinite recursive loop. > anyway it's be useful a few lines of INSTALL file for both userspace and > kernel module config, build and install procedure. > cd kvm-73 ./configure make sudo make install -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2008-08-27 8:54 UTC | newest] Thread overview: 20+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-08-20 15:04 [ANNOUNCE] kvm-73 release Avi Kivity 2008-08-20 16:21 ` Henrik Holst 2008-08-20 16:43 ` Muli Ben-Yehuda 2008-08-21 1:45 ` Yang, Sheng 2008-08-21 3:26 ` Han, Weidong 2008-08-21 8:39 ` Muli Ben-Yehuda 2008-08-21 8:14 ` Yang, Sheng 2008-08-21 12:54 ` Avi Kivity 2008-08-20 21:49 ` Anthony Liguori 2008-08-21 2:35 ` Zhang, Xiantao 2008-08-21 13:18 ` Avi Kivity 2008-08-21 13:24 ` Avi Kivity 2008-08-22 4:14 ` Zhang, Xiantao 2008-08-26 11:44 ` Zhang, Xiantao 2008-08-26 15:26 ` Avi Kivity 2008-08-27 1:53 ` Zhang, Xiantao 2008-08-27 8:54 ` Avi Kivity 2008-08-21 14:23 ` Zhang, Xiantao 2008-08-22 10:58 ` Farkas Levente 2008-08-22 18:13 ` Avi Kivity
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox