qemu-kvm.git now live
After a lengthy testing phase, qemu-kvm.git has replaced kvm-userspace.git as the source repository for kvm userspace development.
Differences from kvm-userspace.git are as follows:
- everything under qemu/ has been moved to the top-level directory
- everything not under qemu/ has been moved under a new top-level directory, kvm/
- all qemu subversion commits have been rewritten to be compatible with what will become the master qemu git repository
- all branches and tags have been converted
- qemu-kvm.git builds standalone (does not require kvm.git)
The repository is compatible with upstream qemu.git; merges and cherry-picking will work fine in either direction
Still missing:
- I have not tested powerpc or ia64. Patches welcome!
- testsuite (kvm/user/ directory) does not build
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 12 lines · Avi Kivity
After a lengthy testing phase, qemu-kvm.git has replaced kvm-userspace.git as the source repository for kvm userspace development.
Differences from kvm-userspace.git are as follows:
- everything under qemu/ has been moved to the top-level directory
- everything not under qemu/ has been moved under a new top-level directory, kvm/
- all qemu subversion commits have been rewritten to be compatible with what will become the master qemu git repository
- all branches and tags have been converted
- qemu-kvm.git builds standalone (does not require kvm.git)
Quoted 8 lines
The repository is compatible with upstream qemu.git; merges and cherry-picking will work fine in either direction
Still missing:
- I have not tested powerpc or ia64. Patches welcome!
- testsuite (kvm/user/ directory) does not build
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
I just tried running configure on x86 and amd_64 and I got no kvm support (field 'arch' has incomplete type). Is this the expected result?
Just for fun I also tried running configure in the top-level kvm directory and got thousands of unkillable 'configure' processes that quickly filled my 1-gig swap partition. I doubt that's the expected result :-)
Quoted 11 lines · Avi Kivity
After a lengthy testing phase, qemu-kvm.git has replaced kvm-userspace.git as the source repository for kvm userspace development.
Differences from kvm-userspace.git are as follows:
- everything under qemu/ has been moved to the top-level directory
- everything not under qemu/ has been moved under a new top-level directory, kvm/
- all qemu subversion commits have been rewritten to be compatible with what will become the master qemu git repository
- all branches and tags have been converted
- qemu-kvm.git builds standalone (does not require kvm.git)
Hi Avi,
When I run configure on a clean copy I get this error:
KVM support no - (field 'arch' has incomplete type, field 'arch' has incomplete type)
I think it's caused by the include/asm and include-compat/asm symlinks not being created until the kvm/configure script runs. Should configure call the qemu-kvm/kvm configure script?
Is "make" supposed to build the host kernel module?
Thanks,
Cam
Quoted 24 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Avi Kivity
Sent: Thursday, April 23, 2009 11:40 PM
To: KVM list
Cc: Anthony Liguori; Hollis Blanchard; Zhang, Xiantao; kvm-ppc; [email protected]; Carsten Otte
Subject: qemu-kvm.git now liveAfter a lengthy testing phase, qemu-kvm.git has replaced kvm-userspace.git as the source repository for kvm userspace development.
Differences from kvm-userspace.git are as follows:
- everything under qemu/ has been moved to the top-level directory
- everything not under qemu/ has been moved under a new top-level directory, kvm/
- all qemu subversion commits have been rewritten to be compatible with
what will become the master qemu git repository
- all branches and tags have been converted
- qemu-kvm.git builds standalone (does not require kvm.git)
Quoted 9 lines
The repository is compatible with upstream qemu.git; merges and cherry-picking will work fine in either direction
Still missing:
- I have not tested powerpc or ia64. Patches welcome!
- testsuite (kvm/user/ directory) does not build
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
Is there a http interface? ÿôèº{.nÇ+‰·Ÿ®‰†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¤¾oé¥Ïâ�Ø^n‡r¡ö¦zË�ëh™¨èÚ&£ûàz¿äz¹Ş—ú+€Ê+zf£¢·hšˆ§~††Ûiÿÿï�êÿ‘êçz_è®æj:+v‰¨ş)ߣøm
Hi,
Quoted 8 lines · Liu Yu-B13201 <Yu.Liu <at> freescale.com> writes:
Quoted 6 lines
After a lengthy testing phase, qemu-kvm.git has replaced kvm-userspace.git as the source repository for kvm userspace development.
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.gitIs there a http interface?
Yes. http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=summary
Quoted 16 lines · Cam Macdonell
Quoted 12 lines · Avi Kivity
After a lengthy testing phase, qemu-kvm.git has replaced kvm-userspace.git as the source repository for kvm userspace development.
Differences from kvm-userspace.git are as follows:
- everything under qemu/ has been moved to the top-level directory
- everything not under qemu/ has been moved under a new top-level directory, kvm/
- all qemu subversion commits have been rewritten to be compatible with what will become the master qemu git repository
- all branches and tags have been converted
- qemu-kvm.git builds standalone (does not require kvm.git)Hi Avi,
Quoted 7 lines
When I run configure on a clean copy I get this error:
KVM support no - (field 'arch' has incomplete type, field 'arch'
has incomplete type)I think it's caused by the
include/asmand include-compat/asm symlinks not being created until the kvm/configure script runs...
I see now that running 'make' fixed the problem, and when I went back and repeated 'configure' everything started working correctly. No idea why running kvm/configure by hand gave me such bad results yesterday but everything's working now.
PATCH 1/1 qemu-kvm: build system Add link to qemu
Quoted 21 lines · walt
Quoted 20 lines · Cam Macdonell
Quoted 12 lines · Avi Kivity
After a lengthy testing phase, qemu-kvm.git has replaced kvm-userspace.git as the source repository for kvm userspace development.
Differences from kvm-userspace.git are as follows:
- everything under qemu/ has been moved to the top-level directory
- everything not under qemu/ has been moved under a new top-level directory, kvm/
- all qemu subversion commits have been rewritten to be compatible with what will become the master qemu git repository
- all branches and tags have been converted
- qemu-kvm.git builds standalone (does not require kvm.git)Hi Avi,
When I run configure on a clean copy I get this error:
KVM support no - (field 'arch' has incomplete type, field 'arch'
has incomplete type)
Quoted 8 lines
Quoted 2 lines
I think it's caused by the
include/asmand include-compat/asm symlinks not being created until the kvm/configure script runs...I see now that running 'make' fixed the problem, and when I went back and repeated 'configure' everything started working correctly. No idea why running kvm/configure by hand gave me such bad results yesterday but everything's working now.
I'm getting closer to a working qemu-kvm, but there are still a few messy parts. The magic dance goes like this:
cd qemu-kvm/kvm
ln -s .. qemu (or apply patch below)
./configure -whatever
make
Still, this is unintuitive. As both top-level configure and Makefile already differ from upstream, I see no reason not tweaking them also in way that ./configure && make from the top-level directory behaves as expected again. May look into this later (and the other warnings the build threw at me), now I've to understand an ugly shadow page table inconsistency of kvm...
Jan
------->
Subject: [PATCH] qemu-kvm: build system Add link to qemu
--- kvm/qemu | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) create mode 120000 kvm/qemu
kvm/qemu new file +1 -0
@@ -0,0 +1 @@ +..
Signature · 1 line
1.5.6
PATCH 1/1 qemu-kvm: configure script fixups after qemu-kvm reorg
In reply to Avi KivityMake kvm configure script and Makefile work again after things have been moved around, so that you can do 'cd kvm && ./configure' to get a kvm-enabled qemu.
Also, guard against infinite recursion in case of 'cd' commands failing.
--
Quoted 2 lines · Avi Kivity
After a lengthy testing phase, qemu-kvm.git has replaced kvm-userspace.git as the source repository for kvm userspace development.
This patch makes cd kvm; ./configure work.
Is this the expected mode of operation?
kvm/Makefile +17 -17
@@ -7,29 +7,29 @@ rpmrelease = devel sane-arch = $(subst i386,x86,$(subst x86_64,x86,$(subst s390x,s390,$(ARCH)))) -.PHONY: kernel user libkvm qemu bios vgabios extboot clean libfdt cscope +.PHONY: kernel user libkvm ${QEMU_DIR} bios vgabios extboot clean libfdt cscope -all: libkvm qemu +all: libkvm ${QEMU_DIR} ifneq '$(filter $(ARCH), x86_64 i386 ia64)' '' all: $(if $(WANT_MODULE), kernel) user endif kcmd = $(if $(WANT_MODULE),,@\#) -qemu kernel user libkvm: +${QEMU_DIR} kernel user libkvm: $(MAKE) -C $@ -qemu: libkvm +${QEMU_DIR}: libkvm ifneq '$(filter $(ARCH), i386 x86_64)' '' - qemu: extboot + ${QEMU_DIR}: extboot endif ifneq '$(filter $(ARCH), powerpc ia64)' '' - qemu: libfdt + ${QEMU_DIR}: libfdt endif user: libkvm # sync if kernel/Makefile exists and if using --with-patched-kernel -user libkvm qemu: header-sync-$(if $(wildcard kernel/Makefile),$(if $(WANT_MODULE),n,y),n) +user libkvm ${QEMU_DIR}: header-sync-$(if $(wildcard kernel/Makefile),$(if $(WANT_MODULE),n,y),n) header-sync-n:
@@ -42,18 +42,18 @@ header-sync-y: bios: $(MAKE) -C $@ - cp bios/BIOS-bochs-latest qemu/pc-bios/bios.bin + cp bios/BIOS-bochs-latest ${QEMU_DIR}/pc-bios/bios.bin vgabios: $(MAKE) -C $@ - cp vgabios/VGABIOS-lgpl-latest.bin qemu/pc-bios/vgabios.bin - cp vgabios/VGABIOS-lgpl-latest.cirrus.bin qemu/pc-bios/vgabios-cirrus.bin + cp vgabios/VGABIOS-lgpl-latest.bin ${QEMU_DIR}/pc-bios/vgabios.bin + cp vgabios/VGABIOS-lgpl-latest.cirrus.bin ${QEMU_DIR}/pc-bios/vgabios-cirrus.bin extboot: $(MAKE) -C $@ - if ! [ -f qemu/pc-bios/extboot.bin ] \ - || ! cmp -s qemu/pc-bios/extboot.bin extboot/extboot.bin; then \ - cp extboot/extboot.bin qemu/pc-bios/extboot.bin; \ + if ! [ -f ${QEMU_DIR}/pc-bios/extboot.bin ] \ + || ! cmp -s ${QEMU_DIR}/pc-bios/extboot.bin extboot/extboot.bin; then \ + cp extboot/extboot.bin ${QEMU_DIR}/pc-bios/extboot.bin; \ fi libfdt: $(MAKE) -C $@
@@ -75,7 +75,7 @@ install-rpm: mkdir -p $(DESTDIR)/$(initdir) mkdir -p $(DESTDIR)/$(utilsdir) mkdir -p $(DESTDIR)/etc/udev/rules.d - make -C qemu DESTDIR=$(DESTDIR)/ install + make -C ${QEMU_DIR} DESTDIR=$(DESTDIR)/ install ln -sf /usr/kvm/bin/qemu-system-x86_64 $(DESTDIR)/$(bin) install -m 755 kvm_stat $(DESTDIR)/$(bindir)/kvm_stat cp scripts/kvm $(DESTDIR)/$(initdir)/kvm
@@ -85,7 +85,7 @@ install-rpm: install: $(kcmd)make -C kernel DESTDIR="$(DESTDIR)" install make -C libkvm DESTDIR="$(DESTDIR)" install - make -C qemu DESTDIR="$(DESTDIR)" install + make -C ${QEMU_DIR} DESTDIR="$(DESTDIR)" install tmpspec = .tmp.kvm.spec RPMTOPDIR = $$(pwd)/rpmtop
@@ -100,7 +100,7 @@ rpm: srpm srpm: mkdir -p $(RPMTOPDIR)/{SOURCES,SRPMS} sed 's/^Release:.*/Release: $(rpmrelease)/' kvm.spec > $(tmpspec) - tar czf $(RPMTOPDIR)/SOURCES/kvm.tar.gz qemu + tar czf $(RPMTOPDIR)/SOURCES/kvm.tar.gz ${QEMU_DIR} tar czf $(RPMTOPDIR)/SOURCES/user.tar.gz user tar czf $(RPMTOPDIR)/SOURCES/libkvm.tar.gz libkvm tar czf $(RPMTOPDIR)/SOURCES/kernel.tar.gz kernel
@@ -111,7 +111,7 @@ srpm: $(RM) $(tmpspec) clean: - for i in $(if $(WANT_MODULE), kernel) user libkvm qemu libfdt; do \ + for i in $(if $(WANT_MODULE), kernel) user libkvm ${QEMU_DIR} libfdt; do \ make -C $$i clean; \ done rm -f ./cscope.*
kvm/configure +7 -7
@@ -14,6 +14,7 @@ qemu_opts=() cross_prefix arch=`uname -m` target_exec+qemu_directory=$PWD/.. # don't use uname if kerneldir is set no_uname if [ -z "TMPDIR" ] ; then
@@ -41,8 +42,7 @@ usage() { Any additional option is given to qemu's configure verbatim; including: EOF - cd qemu - ./configure --help | egrep "enable-|disable-" \ + cd $qemu_directory && ./configure --help | egrep "enable-|disable-" \ | grep -v user | grep -v system | grep -v kqemu | grep -v kvm \ | sed -e "s/^ / /g" \ | sed -e"s/ enable/enable/g" | sed -e "s/ disable/disable/g"
@@ -117,7 +117,7 @@ processor=${arch#*-} arch=${arch%%-*} #configure kernel module -[ -e kernel/Makefile ] && (cd kernel; +[ -e kernel/Makefile ] && (cd kernel && ./configure \ --kerneldir="$kerneldir" \ --arch="$arch" \
@@ -127,15 +127,15 @@ arch=${arch%%-*} ) #configure user dir -(cd user; ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir" \ +(cd user && ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir" \ --arch="$arch" --processor="$processor" \ ${cross_prefix:+"--cross-prefix=$cross_prefix"}) #configure qemu -(cd qemu; ./configure --target-list=$target_exec \ +(cd $qemu_directory && ./configure --target-list=$target_exec \ --disable-kqemu \ - --extra-cflags="-I $PWD/../libkvm $qemu_cflags" \ - --extra-ldflags="-L $PWD/../libkvm $qemu_ldflags" \ + --extra-cflags="-I $PWD/libkvm $qemu_cflags" \ + --extra-ldflags="-L $PWD/libkvm $qemu_ldflags" \ --kerneldir="$libkvm_kerneldir" \ --prefix="$prefix" \ ${cross_prefix:+"--cross-prefix=$cross_prefix"} \
@@ -144,6 +144,7 @@ arch=${arch%%-*} cat <<EOF > config.mak +QEMU_DIR=$qemu_directory ARCH=$arch PROCESSOR=$processor PREFIX=$prefix
kvm/kernel/include/asm-x86/kvm.h +0 -1
@@ -56,7 +56,6 @@#define __KVM_HAVE_MSI#define __KVM_HAVE_USER_NMI#define __KVM_HAVE_GUEST_DEBUG -#define __KVM_HAVE_MSIX/* Architectural interrupt line count. */ #define KVM_NR_INTERRUPTS 256
kvm/kernel/include/asm-x86/kvm_host.h +6 -6
@@ -225,7 +225,6 @@ union kvm_mmu_page_role { unsigned access:3; unsigned invalid:1; unsigned cr4_pge:1; - unsigned nxe:1; }; };
@@ -253,6 +252,7 @@ struct kvm_mmu_page {int multimapped;/* More than one parent_pte? */ int root_count;/* Currently serving as active root */ bool unsync; +bool global;unsigned int unsync_children;union {u64 *parent_pte;/* !multimapped */
@@ -301,7 +301,6 @@ struct kvm_mmu {union kvm_mmu_page_role base_role;u64 *pae_root; -u64 rsvd_bits_mask[2 ][4 ]; };struct kvm_vcpu_arch {
@@ -327,7 +326,6 @@ struct kvm_vcpu_arch {u64 shadow_efer;u64 apic_base;struct kvm_lapic *apic;/* kernel irqchip context */ -int32_t apic_arb_prio;int mp_state;int sipi_vector;u64 ia32_misc_enable_msr;
@@ -434,6 +432,7 @@ struct kvm_arch{*/ struct list_head active_mmu_pages;struct list_head assigned_dev_head; +struct list_head oos_global_pages;struct iommu_domain *iommu_domain;struct kvm_pic *vpic;struct kvm_ioapic *vioapic;
@@ -441,6 +440,7 @@ struct kvm_arch{struct hlist_head irq_ack_notifier_list;int vapics_in_nmi_mode; +int round_robin_prev_vcpu;unsigned int tss_addr;struct page *apic_access_page;
@@ -463,6 +463,7 @@ struct kvm_vm_stat {u32 mmu_recycled;u32 mmu_cache_miss;u32 mmu_unsync; +u32 mmu_unsync_global;u32 remote_tlb_flush;u32 lpages; };
@@ -560,7 +561,7 @@ struct kvm_x86_ops {void (*inject_pending_irq)(struct kvm_vcpu *vcpu);void (*inject_pending_vectors)(struct kvm_vcpu *vcpu,struct kvm_run *run); -int (*interrupt_allowed)(struct kvm_vcpu *vcpu); +int (*set_tss_addr)(struct kvm *kvm,unsigned int addr);int (*get_tdp_level)(void );int (*get_mt_mask_shift)(void );
@@ -602,7 +603,6 @@ enum emulation_result {#define EMULTYPE_NO_DECODE (1 << 0)#define EMULTYPE_TRAP_UD (1 << 1) -#define EMULTYPE_SKIP (1 << 2)int emulate_instruction (struct kvm_vcpu *vcpu,struct kvm_run *run,unsigned long cr2,u16 error_code,int emulation_type);void kvm_report_emulation_failure (struct kvm_vcpu *cvpu,const char *context);
@@ -678,6 +678,7 @@ void __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu);int kvm_mmu_load (struct kvm_vcpu *vcpu);void kvm_mmu_unload (struct kvm_vcpu *vcpu);void kvm_mmu_sync_roots (struct kvm_vcpu *vcpu); +void kvm_mmu_sync_global (struct kvm_vcpu *vcpu);int kvm_emulate_hypercall (struct kvm_vcpu *vcpu);
@@ -830,6 +831,5 @@ asmlinkage void kvm_handle_fault_on_reboot(void);#define KVM_ARCH_WANT_MMU_NOTIFIER int kvm_unmap_hva (struct kvm *kvm,unsigned long hva);int kvm_age_hva (struct kvm *kvm,unsigned long hva); -int cpuid_maxphyaddr (struct kvm_vcpu *vcpu);#endif /* _ASM_X86_KVM_HOST_H */
kvm/kernel/include/asm-x86/svm.h +0 -1
@@ -265,7 +265,6 @@ struct __attribute__ ((__packed__)) vmcb {#define SVM_EVTINJ_VALID_ERR (1 << 11)#define SVM_EXITINTINFO_VEC_MASK SVM_EVTINJ_VEC_MASK -#define SVM_EXITINTINFO_TYPE_MASK SVM_EVTINJ_TYPE_MASK#define SVM_EXITINTINFO_TYPE_INTR SVM_EVTINJ_TYPE_INTR#define SVM_EXITINTINFO_TYPE_NMI SVM_EVTINJ_TYPE_NMI
kvm/kernel/include/linux/kvm.h +6 -42
97 lines not on this page · raw message
kvm/kernel/include/linux/kvm_host.h +4 -16
@@ -338,7 +338,6 @@ int kvm_arch_hardware_setup(void);void kvm_arch_hardware_unsetup (void );void kvm_arch_check_processor_compat (void *rtn);int kvm_arch_vcpu_runnable (struct kvm_vcpu *vcpu); -int kvm_arch_interrupt_allowed (struct kvm_vcpu *vcpu);void kvm_free_physmem (struct kvm *kvm);
@@ -360,13 +359,6 @@ struct kvm_irq_ack_notifier {void (*irq_acked)(struct kvm_irq_ack_notifier *kian); }; -#define KVM_ASSIGNED_MSIX_PENDING 0x1 -struct kvm_guest_msix_entry { -u32 vector; -u16 entry; -u16 flags; -}; -struct kvm_assigned_dev_kernel {struct kvm_irq_ack_notifier ack_notifier;struct work_struct interrupt_work;
@@ -374,12 +366,13 @@ struct kvm_assigned_dev_kernel {int assigned_dev_id;int host_busnr;int host_devfn; -unsigned int entries_nr;int host_irq;bool host_irq_disabled; -struct msix_entry *host_msix_entries;int guest_irq; -struct kvm_guest_msix_entry *guest_msix_entries; +#define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) +#define KVM_ASSIGNED_DEV_GUEST_MSI (1 << 1) +#define KVM_ASSIGNED_DEV_HOST_INTX (1 << 8) +#define KVM_ASSIGNED_DEV_HOST_MSI (1 << 9)unsigned long irq_requested_type;int irq_source_id;int flags;
@@ -399,11 +392,6 @@ void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq, struct kvm_irq_mask_notifier *kimn);void kvm_fire_mask_notifiers (struct kvm *kvm,int irq,bool mask); -#ifdef __KVM_HAVE_IOAPIC -void kvm_get_intr_delivery_bitmask (struct kvm_ioapic *ioapic, -union kvm_ioapic_redirect_entry *entry, -unsigned long *deliver_bitmask); -#endif int kvm_set_irq (struct kvm *kvm,int irq_source_id,int irq,int level);void kvm_notify_acked_irq (struct kvm *kvm,unsigned irqchip,unsigned pin); void kvm_register_irq_ack_notifier(struct kvm *kvm,
kvm/kernel/include/linux/kvm_types.h +0 -27
@@ -80,31 +80,4 @@ typedef unsigned long hfn_t;typedef hfn_t pfn_t ; -union kvm_ioapic_redirect_entry { -u64 bits; -struct { -u8 vector; -u8 delivery_mode:3 ; -u8 dest_mode:1 ; -u8 delivery_status:1 ; -u8 polarity:1 ; -u8 remote_irr:1 ; -u8 trig_mode:1 ; -u8 mask:1 ; -u8 reserve:7 ; -u8 reserved[4 ]; -u8 dest_id; - } fields; -}; - -struct kvm_lapic_irq { -u32 vector; -u32 delivery_mode; -u32 dest_mode; -u32 level; -u32 trig_mode; -u32 shorthand; -u32 dest_id; -}; -#endif /* __KVM_TYPES_H__ */
Re: [PATCH] qemu-kvm: configure script fixups after qemu-kvm reorg
Quoted 6 lines · Michael S. Tsirkin
Make kvm configure script and
Makefilework again after things have been moved around, so that you can do 'cd kvm && ./configure' to get a kvm-enabled qemu.Also, guard against infinite recursion in case of 'cd' commands failing.
I suppose changes under kvm/kernel/* are not relevant to this goal. Also for me running ./configure --kerneldir=/path/to/kernel at top dir works. (/path/to/kernel should be absolute though, otherwise kernel include path is incorrect).
Quoted 485 lines
Signed-off-by Michael S. Tsirkin <[email protected]>--
Quoted 2 lines · Avi Kivity
After a lengthy testing phase, qemu-kvm.git has replaced kvm-userspace.git as the source repository for kvm userspace development.
This patch makes cd kvm; ./configure work.
Is this the expected mode of operation?kvm/Makefile +17
-17@@ -7,29 +7,29 @@ rpmrelease = devel sane-arch = $(subst i386,x86,$(subst x86_64,x86,$(subst s390x,s390,$(ARCH)))) -.PHONY: kernel user libkvm qemu bios vgabios extboot clean libfdt cscope +.PHONY: kernel user libkvm ${QEMU_DIR} bios vgabios extboot clean libfdt cscope -all: libkvm qemu +all: libkvm ${QEMU_DIR} ifneq '$(filter $(ARCH), x86_64 i386 ia64)' '' all: $(if $(WANT_MODULE), kernel) user endif kcmd = $(if $(WANT_MODULE),,@\#) -qemu kernel user libkvm: +${QEMU_DIR} kernel user libkvm: $(MAKE) -C $@ -qemu: libkvm +${QEMU_DIR}: libkvm ifneq '$(filter $(ARCH), i386 x86_64)' '' - qemu: extboot + ${QEMU_DIR}: extboot endif ifneq '$(filter $(ARCH), powerpc ia64)' '' - qemu: libfdt + ${QEMU_DIR}: libfdt endif user: libkvm # sync if kernel/Makefile exists and if using --with-patched-kernel -user libkvm qemu: header-sync-$(if $(wildcard kernel/Makefile),$(if $(WANT_MODULE),n,y),n) +user libkvm ${QEMU_DIR}: header-sync-$(if $(wildcard kernel/Makefile),$(if $(WANT_MODULE),n,y),n) header-sync-n:@@ -42,18 +42,18 @@ header-sync-y: bios: $(MAKE) -C $@ - cp bios/BIOS-bochs-latest qemu/pc-bios/bios.bin + cp bios/BIOS-bochs-latest ${QEMU_DIR}/pc-bios/bios.bin vgabios: $(MAKE) -C $@ - cp vgabios/VGABIOS-lgpl-latest.bin qemu/pc-bios/vgabios.bin - cp vgabios/VGABIOS-lgpl-latest.cirrus.bin qemu/pc-bios/vgabios-cirrus.bin + cp vgabios/VGABIOS-lgpl-latest.bin ${QEMU_DIR}/pc-bios/vgabios.bin + cp vgabios/VGABIOS-lgpl-latest.cirrus.bin ${QEMU_DIR}/pc-bios/vgabios-cirrus.bin extboot: $(MAKE) -C $@ - if ! [ -f qemu/pc-bios/extboot.bin ] \ - || ! cmp -s qemu/pc-bios/extboot.bin extboot/extboot.bin; then \ - cp extboot/extboot.bin qemu/pc-bios/extboot.bin; \ + if ! [ -f ${QEMU_DIR}/pc-bios/extboot.bin ] \ + || ! cmp -s ${QEMU_DIR}/pc-bios/extboot.bin extboot/extboot.bin; then \ + cp extboot/extboot.bin ${QEMU_DIR}/pc-bios/extboot.bin; \ fi libfdt: $(MAKE) -C $@@@ -75,7 +75,7 @@ install-rpm: mkdir -p $(DESTDIR)/$(initdir) mkdir -p $(DESTDIR)/$(utilsdir) mkdir -p $(DESTDIR)/etc/udev/rules.d - make -C qemu DESTDIR=$(DESTDIR)/ install + make -C ${QEMU_DIR} DESTDIR=$(DESTDIR)/ install ln -sf /usr/kvm/bin/qemu-system-x86_64 $(DESTDIR)/$(bin) install -m 755 kvm_stat $(DESTDIR)/$(bindir)/kvm_stat cp scripts/kvm $(DESTDIR)/$(initdir)/kvm@@ -85,7 +85,7 @@ install-rpm: install: $(kcmd)make -C kernel DESTDIR="$(DESTDIR)" install make -C libkvm DESTDIR="$(DESTDIR)" install - make -C qemu DESTDIR="$(DESTDIR)" install + make -C ${QEMU_DIR} DESTDIR="$(DESTDIR)" install tmpspec = .tmp.kvm.spec RPMTOPDIR = $$(pwd)/rpmtop@@ -100,7 +100,7 @@ rpm: srpm srpm: mkdir -p $(RPMTOPDIR)/{SOURCES,SRPMS} sed 's/^Release:.*/Release: $(rpmrelease)/' kvm.spec > $(tmpspec) - tar czf $(RPMTOPDIR)/SOURCES/kvm.tar.gz qemu + tar czf $(RPMTOPDIR)/SOURCES/kvm.tar.gz ${QEMU_DIR} tar czf $(RPMTOPDIR)/SOURCES/user.tar.gz user tar czf $(RPMTOPDIR)/SOURCES/libkvm.tar.gz libkvm tar czf $(RPMTOPDIR)/SOURCES/kernel.tar.gz kernel@@ -111,7 +111,7 @@ srpm: $(RM) $(tmpspec) clean: - for i in $(if $(WANT_MODULE), kernel) user libkvm qemu libfdt; do \ + for i in $(if $(WANT_MODULE), kernel) user libkvm ${QEMU_DIR} libfdt; do \ make -C $$i clean; \ done rm -f ./cscope.*kvm/configure +7
-7@@ -14,6 +14,7 @@ qemu_opts=() cross_prefix> arch=`uname -m` target_exec> +qemu_directory=$PWD/.. # don't use uname if kerneldir is set no_uname> if [ -z "TMPDIR" ] ; then@@ -41,8 +42,7 @@ usage() { Any additional option is given to qemu's configure verbatim; including: EOF - cd qemu - ./configure --help | egrep "enable-|disable-" \ + cd $qemu_directory && ./configure --help | egrep "enable-|disable-" \ | grep -v user | grep -v system | grep -v kqemu | grep -v kvm \ | sed -e "s/^ / /g" \ | sed -e"s/ enable/enable/g" | sed -e "s/ disable/disable/g"@@ -117,7 +117,7 @@ processor=${arch#*-} arch=${arch%%-*} #configure kernel module -[ -e kernel/Makefile ] && (cd kernel; +[ -e kernel/Makefile ] && (cd kernel && ./configure \ --kerneldir="$kerneldir" \ --arch="$arch" \@@ -127,15 +127,15 @@ arch=${arch%%-*} ) #configure user dir -(cd user; ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir" \ +(cd user && ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir" \ --arch="$arch" --processor="$processor" \ ${cross_prefix:+"--cross-prefix=$cross_prefix"}) #configure qemu -(cd qemu; ./configure --target-list=$target_exec \ +(cd $qemu_directory && ./configure --target-list=$target_exec \ --disable-kqemu \ - --extra-cflags="-I $PWD/../libkvm $qemu_cflags" \ - --extra-ldflags="-L $PWD/../libkvm $qemu_ldflags" \ + --extra-cflags="-I $PWD/libkvm $qemu_cflags" \ + --extra-ldflags="-L $PWD/libkvm $qemu_ldflags" \ --kerneldir="$libkvm_kerneldir" \ --prefix="$prefix" \ ${cross_prefix:+"--cross-prefix=$cross_prefix"} \@@ -144,6 +144,7 @@ arch=${arch%%-*} cat <<EOF > config.mak +QEMU_DIR=$qemu_directory ARCH=$arch PROCESSOR=$processor PREFIX=$prefixkvm/kernel/include/asm-x86/kvm.h +0
-1@@ -56,7 +56,6 @@#define __KVM_HAVE_MSI#define __KVM_HAVE_USER_NMI#define __KVM_HAVE_GUEST_DEBUG -#define __KVM_HAVE_MSIX/* Architectural interrupt line count. */ #define KVM_NR_INTERRUPTS 256kvm/kernel/include/asm-x86/kvm_host.h +6
-6@@ -225,7 +225,6 @@ union kvm_mmu_page_role { unsigned access:3; unsigned invalid:1; unsigned cr4_pge:1; - unsigned nxe:1; }; };@@ -253,6 +252,7 @@ struct kvm_mmu_page {int multimapped;/* More than one parent_pte? */ int root_count;/* Currently serving as active root */ bool unsync; +bool global;unsigned int unsync_children;union {u64 *parent_pte;/* !multimapped */ @@ -301,7 +301,6 @@ struct kvm_mmu {union kvm_mmu_page_role base_role;u64 *pae_root; -u64 rsvd_bits_mask[2 ][4 ]; };struct kvm_vcpu_arch {@@ -327,7 +326,6 @@ struct kvm_vcpu_arch {u64 shadow_efer;u64 apic_base;struct kvm_lapic *apic;/* kernel irqchip context */ -int32_t apic_arb_prio;int mp_state;int sipi_vector;u64 ia32_misc_enable_msr;@@ -434,6 +432,7 @@ struct kvm_arch{*/ struct list_head active_mmu_pages;struct list_head assigned_dev_head; +struct list_head oos_global_pages;struct iommu_domain *iommu_domain;struct kvm_pic *vpic;struct kvm_ioapic *vioapic;@@ -441,6 +440,7 @@ struct kvm_arch{struct hlist_head irq_ack_notifier_list;int vapics_in_nmi_mode; +int round_robin_prev_vcpu;unsigned int tss_addr;struct page *apic_access_page;@@ -463,6 +463,7 @@ struct kvm_vm_stat {u32 mmu_recycled;u32 mmu_cache_miss;u32 mmu_unsync; +u32 mmu_unsync_global;u32 remote_tlb_flush;u32 lpages; };@@ -560,7 +561,7 @@ struct kvm_x86_ops {void (*inject_pending_irq)(struct kvm_vcpu *vcpu);void (*inject_pending_vectors)(struct kvm_vcpu *vcpu,struct kvm_run *run); -int (*interrupt_allowed)(struct kvm_vcpu *vcpu); +int (*set_tss_addr)(struct kvm *kvm,unsigned int addr);int (*get_tdp_level)(void );int (*get_mt_mask_shift)(void );@@ -602,7 +603,6 @@ enum emulation_result {#define EMULTYPE_NO_DECODE (1 << 0)#define EMULTYPE_TRAP_UD (1 << 1) -#define EMULTYPE_SKIP (1 << 2)int emulate_instruction (struct kvm_vcpu *vcpu,struct kvm_run *run,unsigned long cr2,u16 error_code,int emulation_type);void kvm_report_emulation_failure (struct kvm_vcpu *cvpu,const char *context);@@ -678,6 +678,7 @@ void __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu);int kvm_mmu_load (struct kvm_vcpu *vcpu);void kvm_mmu_unload (struct kvm_vcpu *vcpu);void kvm_mmu_sync_roots (struct kvm_vcpu *vcpu); +void kvm_mmu_sync_global (struct kvm_vcpu *vcpu);int kvm_emulate_hypercall (struct kvm_vcpu *vcpu);@@ -830,6 +831,5 @@ asmlinkage void kvm_handle_fault_on_reboot(void);#define KVM_ARCH_WANT_MMU_NOTIFIER int kvm_unmap_hva (struct kvm *kvm,unsigned long hva);int kvm_age_hva (struct kvm *kvm,unsigned long hva); -int cpuid_maxphyaddr (struct kvm_vcpu *vcpu);#endif /* _ASM_X86_KVM_HOST_H */ kvm/kernel/include/asm-x86/svm.h +0
-1@@ -265,7 +265,6 @@ struct __attribute__ ((__packed__)) vmcb {#define SVM_EVTINJ_VALID_ERR (1 << 11)#define SVM_EXITINTINFO_VEC_MASK SVM_EVTINJ_VEC_MASK -#define SVM_EXITINTINFO_TYPE_MASK SVM_EVTINJ_TYPE_MASK#define SVM_EXITINTINFO_TYPE_INTR SVM_EVTINJ_TYPE_INTR#define SVM_EXITINTINFO_TYPE_NMI SVM_EVTINJ_TYPE_NMIkvm/kernel/include/linux/kvm.h +6
-42@@ -159,7 +159,7 @@ struct kvm_run {__u32 error_code; } ex;/* KVM_EXIT_IO */ -struct { +struct kvm_io {#define KVM_EXIT_IO_IN 0#define KVM_EXIT_IO_OUT 1__u8 direction;@@ -264,10 +264,10 @@ struct kvm_interrupt {/* for KVM_GET_DIRTY_LOG */ struct kvm_dirty_log {__u32 slot; -__u32 padding1; +__u32 padding;union {void *dirty_bitmap;/* one bit per page */ -__u64 padding2; +__u64 padding; }; };@@ -449,12 +449,6 @@ struct kvm_trace_rec {#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT#define KVM_CAP_DEVICE_DEASSIGNMENT 27#endif -#ifdef __KVM_HAVE_MSIX -#define KVM_CAP_DEVICE_MSIX 28 -#endif -#define KVM_CAP_ASSIGN_DEV_IRQ 29 -/* Another bug in KVM_SET_USER_MEMORY_REGION fixed: */ -#define KVM_CAP_JOIN_MEMORY_REGIONS_WORKS 30#ifdef KVM_CAP_IRQ_ROUTING @@ -526,18 +520,11 @@ struct kvm_irq_routing {#define KVM_ASSIGN_PCI_DEVICE _IOR(KVMIO, 0x69, \ struct kvm_assigned_pci_dev)#define KVM_SET_GSI_ROUTING _IOW(KVMIO, 0x6a, struct kvm_irq_routing) -/* deprecated, replaced by KVM_ASSIGN_DEV_IRQ */ #define KVM_ASSIGN_IRQ _IOR(KVMIO, 0x70, \ struct kvm_assigned_irq) -#define KVM_ASSIGN_DEV_IRQ _IOW(KVMIO, 0x70, struct kvm_assigned_irq)#define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71)#define KVM_DEASSIGN_PCI_DEVICE _IOW(KVMIO, 0x72, \ struct kvm_assigned_pci_dev) -#define KVM_ASSIGN_SET_MSIX_NR \ - _IOW(KVMIO, 0x73, struct kvm_assigned_msix_nr) -#define KVM_ASSIGN_SET_MSIX_ENTRY \ - _IOW(KVMIO, 0x74, struct kvm_assigned_msix_entry) -#define KVM_DEASSIGN_DEV_IRQ _IOW(KVMIO, 0x75, struct kvm_assigned_irq)/* * ioctls for vcpu fds @@ -628,8 +615,6 @@ struct kvm_debug_guest {#define KVM_TRC_STLB_INVAL (KVM_TRC_HANDLER + 0x18)#define KVM_TRC_PPC_INSTR (KVM_TRC_HANDLER + 0x19) -#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) -struct kvm_assigned_pci_dev {__u32 assigned_dev_id;__u32 busnr;@@ -640,17 +625,6 @@ struct kvm_assigned_pci_dev { }; }; -#define KVM_DEV_IRQ_HOST_INTX (1 << 0) -#define KVM_DEV_IRQ_HOST_MSI (1 << 1) -#define KVM_DEV_IRQ_HOST_MSIX (1 << 2) - -#define KVM_DEV_IRQ_GUEST_INTX (1 << 8) -#define KVM_DEV_IRQ_GUEST_MSI (1 << 9) -#define KVM_DEV_IRQ_GUEST_MSIX (1 << 10) - -#define KVM_DEV_IRQ_HOST_MASK 0x00ff -#define KVM_DEV_IRQ_GUEST_MASK 0xff00 -struct kvm_assigned_irq {__u32 assigned_dev_id;__u32 host_irq;@@ -666,19 +640,9 @@ struct kvm_assigned_irq { }; }; +#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) -struct kvm_assigned_msix_nr { -__u32 assigned_dev_id; -__u16 entry_nr; -__u16 padding; -}; - -#define KVM_MAX_MSIX_PER_DEV 512 -struct kvm_assigned_msix_entry { -__u32 assigned_dev_id; -__u32 gsi; -__u16 entry;/* The index of entry in the MSI-X table */ -__u16 padding[3 ]; -}; +#define KVM_DEV_IRQ_ASSIGN_MSI_ACTION KVM_DEV_IRQ_ASSIGN_ENABLE_MSI +#define KVM_DEV_IRQ_ASSIGN_ENABLE_MSI (1 << 0)#endif kvm/kernel/include/linux/kvm_host.h +4
-16@@ -338,7 +338,6 @@ int kvm_arch_hardware_setup(void);void kvm_arch_hardware_unsetup (void );void kvm_arch_check_processor_compat (void *rtn);int kvm_arch_vcpu_runnable (struct kvm_vcpu *vcpu); -int kvm_arch_interrupt_allowed (struct kvm_vcpu *vcpu);void kvm_free_physmem (struct kvm *kvm);@@ -360,13 +359,6 @@ struct kvm_irq_ack_notifier {void (*irq_acked)(struct kvm_irq_ack_notifier *kian); }; -#define KVM_ASSIGNED_MSIX_PENDING 0x1 -struct kvm_guest_msix_entry { -u32 vector; -u16 entry; -u16 flags; -}; -struct kvm_assigned_dev_kernel {struct kvm_irq_ack_notifier ack_notifier;struct work_struct interrupt_work;@@ -374,12 +366,13 @@ struct kvm_assigned_dev_kernel {int assigned_dev_id;int host_busnr;int host_devfn; -unsigned int entries_nr;int host_irq;bool host_irq_disabled; -struct msix_entry *host_msix_entries;int guest_irq; -struct kvm_guest_msix_entry *guest_msix_entries; +#define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) +#define KVM_ASSIGNED_DEV_GUEST_MSI (1 << 1) +#define KVM_ASSIGNED_DEV_HOST_INTX (1 << 8) +#define KVM_ASSIGNED_DEV_HOST_MSI (1 << 9)unsigned long irq_requested_type;int irq_source_id;int flags;@@ -399,11 +392,6 @@ void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq, struct kvm_irq_mask_notifier *kimn);void kvm_fire_mask_notifiers (struct kvm *kvm,int irq,bool mask); -#ifdef __KVM_HAVE_IOAPIC -void kvm_get_intr_delivery_bitmask (struct kvm_ioapic *ioapic, -union kvm_ioapic_redirect_entry *entry, -unsigned long *deliver_bitmask); -#endif int kvm_set_irq (struct kvm *kvm,int irq_source_id,int irq,int level);void kvm_notify_acked_irq (struct kvm *kvm,unsigned irqchip,unsigned pin); void kvm_register_irq_ack_notifier(struct kvm *kvm,kvm/kernel/include/linux/kvm_types.h +0
-28@@ -80,31 +80,4 @@ typedef unsigned long hfn_t;typedef hfn_t pfn_t ; -union kvm_ioapic_redirect_entry { -u64 bits; -struct { -u8 vector; -u8 delivery_mode:3 ; -u8 dest_mode:1 ; -u8 delivery_status:1 ; -u8 polarity:1 ; -u8 remote_irr:1 ; -u8 trig_mode:1 ; -u8 mask:1 ; -u8 reserve:7 ; -u8 reserved[4 ]; -u8 dest_id; - } fields; -}; - -struct kvm_lapic_irq { -u32 vector; -u32 delivery_mode; -u32 dest_mode; -u32 level; -u32 trig_mode; -u32 shorthand; -u32 dest_id; -}; -#endif /* __KVM_TYPES_H__ */ --
Quoted 3 lines
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Gleb.
Re: [PATCH] qemu-kvm: configure script fixups after qemu-kvm reorg
Quoted 8 lines · Gleb Natapov
Quoted 6 lines · Michael S. Tsirkin
Make kvm configure script and
Makefilework again after things have been moved around, so that you can do 'cd kvm && ./configure' to get a kvm-enabled qemu.Also, guard against infinite recursion in case of 'cd' commands failing.
I suppose changes under kvm/kernel/* are not relevant to this goal.
I don't really understand how they got there.
Is configure script overwriting files under version control?
Quoted 4 lines
Also
for me running ./configure --kerneldir=/path/to/kernel at top dir works. (/path/to/kernel should be absolute though, otherwise kernel include path is incorrect).
I'm using --with-patched-kernel which does not seem to be available there.
Quoted 496 lines
Quoted 486 lines
Signed-off-by Michael S. Tsirkin <[email protected]>--
Quoted 2 lines · Avi Kivity
After a lengthy testing phase, qemu-kvm.git has replaced kvm-userspace.git as the source repository for kvm userspace development.
This patch makes cd kvm; ./configure work.
Is this the expected mode of operation?kvm/Makefile +17
-17@@ -7,29 +7,29 @@ rpmrelease = devel sane-arch = $(subst i386,x86,$(subst x86_64,x86,$(subst s390x,s390,$(ARCH)))) -.PHONY: kernel user libkvm qemu bios vgabios extboot clean libfdt cscope +.PHONY: kernel user libkvm ${QEMU_DIR} bios vgabios extboot clean libfdt cscope -all: libkvm qemu +all: libkvm ${QEMU_DIR} ifneq '$(filter $(ARCH), x86_64 i386 ia64)' '' all: $(if $(WANT_MODULE), kernel) user endif kcmd = $(if $(WANT_MODULE),,@\#) -qemu kernel user libkvm: +${QEMU_DIR} kernel user libkvm: $(MAKE) -C $@ -qemu: libkvm +${QEMU_DIR}: libkvm ifneq '$(filter $(ARCH), i386 x86_64)' '' - qemu: extboot + ${QEMU_DIR}: extboot endif ifneq '$(filter $(ARCH), powerpc ia64)' '' - qemu: libfdt + ${QEMU_DIR}: libfdt endif user: libkvm # sync if kernel/Makefile exists and if using --with-patched-kernel -user libkvm qemu: header-sync-$(if $(wildcard kernel/Makefile),$(if $(WANT_MODULE),n,y),n) +user libkvm ${QEMU_DIR}: header-sync-$(if $(wildcard kernel/Makefile),$(if $(WANT_MODULE),n,y),n) header-sync-n:@@ -42,18 +42,18 @@ header-sync-y: bios: $(MAKE) -C $@ - cp bios/BIOS-bochs-latest qemu/pc-bios/bios.bin + cp bios/BIOS-bochs-latest ${QEMU_DIR}/pc-bios/bios.bin vgabios: $(MAKE) -C $@ - cp vgabios/VGABIOS-lgpl-latest.bin qemu/pc-bios/vgabios.bin - cp vgabios/VGABIOS-lgpl-latest.cirrus.bin qemu/pc-bios/vgabios-cirrus.bin + cp vgabios/VGABIOS-lgpl-latest.bin ${QEMU_DIR}/pc-bios/vgabios.bin + cp vgabios/VGABIOS-lgpl-latest.cirrus.bin ${QEMU_DIR}/pc-bios/vgabios-cirrus.bin extboot: $(MAKE) -C $@ - if ! [ -f qemu/pc-bios/extboot.bin ] \ - || ! cmp -s qemu/pc-bios/extboot.bin extboot/extboot.bin; then \ - cp extboot/extboot.bin qemu/pc-bios/extboot.bin; \ + if ! [ -f ${QEMU_DIR}/pc-bios/extboot.bin ] \ + || ! cmp -s ${QEMU_DIR}/pc-bios/extboot.bin extboot/extboot.bin; then \ + cp extboot/extboot.bin ${QEMU_DIR}/pc-bios/extboot.bin; \ fi libfdt: $(MAKE) -C $@@@ -75,7 +75,7 @@ install-rpm: mkdir -p $(DESTDIR)/$(initdir) mkdir -p $(DESTDIR)/$(utilsdir) mkdir -p $(DESTDIR)/etc/udev/rules.d - make -C qemu DESTDIR=$(DESTDIR)/ install + make -C ${QEMU_DIR} DESTDIR=$(DESTDIR)/ install ln -sf /usr/kvm/bin/qemu-system-x86_64 $(DESTDIR)/$(bin) install -m 755 kvm_stat $(DESTDIR)/$(bindir)/kvm_stat cp scripts/kvm $(DESTDIR)/$(initdir)/kvm@@ -85,7 +85,7 @@ install-rpm: install: $(kcmd)make -C kernel DESTDIR="$(DESTDIR)" install make -C libkvm DESTDIR="$(DESTDIR)" install - make -C qemu DESTDIR="$(DESTDIR)" install + make -C ${QEMU_DIR} DESTDIR="$(DESTDIR)" install tmpspec = .tmp.kvm.spec RPMTOPDIR = $$(pwd)/rpmtop@@ -100,7 +100,7 @@ rpm: srpm srpm: mkdir -p $(RPMTOPDIR)/{SOURCES,SRPMS} sed 's/^Release:.*/Release: $(rpmrelease)/' kvm.spec > $(tmpspec) - tar czf $(RPMTOPDIR)/SOURCES/kvm.tar.gz qemu + tar czf $(RPMTOPDIR)/SOURCES/kvm.tar.gz ${QEMU_DIR} tar czf $(RPMTOPDIR)/SOURCES/user.tar.gz user tar czf $(RPMTOPDIR)/SOURCES/libkvm.tar.gz libkvm tar czf $(RPMTOPDIR)/SOURCES/kernel.tar.gz kernel@@ -111,7 +111,7 @@ srpm: $(RM) $(tmpspec) clean: - for i in $(if $(WANT_MODULE), kernel) user libkvm qemu libfdt; do \ + for i in $(if $(WANT_MODULE), kernel) user libkvm ${QEMU_DIR} libfdt; do \ make -C $$i clean; \ done rm -f ./cscope.*kvm/configure +7
-7@@ -14,6 +14,7 @@ qemu_opts=() cross_prefix> > arch=`uname -m` target_exec> > +qemu_directory=$PWD/.. # don't use uname if kerneldir is set no_uname> > if [ -z "TMPDIR" ] ; then@@ -41,8 +42,7 @@ usage() { Any additional option is given to qemu's configure verbatim; including: EOF - cd qemu - ./configure --help | egrep "enable-|disable-" \ + cd $qemu_directory && ./configure --help | egrep "enable-|disable-" \ | grep -v user | grep -v system | grep -v kqemu | grep -v kvm \ | sed -e "s/^ / /g" \ | sed -e"s/ enable/enable/g" | sed -e "s/ disable/disable/g"@@ -117,7 +117,7 @@ processor=${arch#*-} arch=${arch%%-*} #configure kernel module -[ -e kernel/Makefile ] && (cd kernel; +[ -e kernel/Makefile ] && (cd kernel && ./configure \ --kerneldir="$kerneldir" \ --arch="$arch" \@@ -127,15 +127,15 @@ arch=${arch%%-*} ) #configure user dir -(cd user; ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir" \ +(cd user && ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir" \ --arch="$arch" --processor="$processor" \ ${cross_prefix:+"--cross-prefix=$cross_prefix"}) #configure qemu -(cd qemu; ./configure --target-list=$target_exec \ +(cd $qemu_directory && ./configure --target-list=$target_exec \ --disable-kqemu \ - --extra-cflags="-I $PWD/../libkvm $qemu_cflags" \ - --extra-ldflags="-L $PWD/../libkvm $qemu_ldflags" \ + --extra-cflags="-I $PWD/libkvm $qemu_cflags" \ + --extra-ldflags="-L $PWD/libkvm $qemu_ldflags" \ --kerneldir="$libkvm_kerneldir" \ --prefix="$prefix" \ ${cross_prefix:+"--cross-prefix=$cross_prefix"} \@@ -144,6 +144,7 @@ arch=${arch%%-*} cat <<EOF > config.mak +QEMU_DIR=$qemu_directory ARCH=$arch PROCESSOR=$processor PREFIX=$prefixkvm/kernel/include/asm-x86/kvm.h +0
-1@@ -56,7 +56,6 @@#define __KVM_HAVE_MSI#define __KVM_HAVE_USER_NMI#define __KVM_HAVE_GUEST_DEBUG -#define __KVM_HAVE_MSIX/* Architectural interrupt line count. */ #define KVM_NR_INTERRUPTS 256kvm/kernel/include/asm-x86/kvm_host.h +6
-6@@ -225,7 +225,6 @@ union kvm_mmu_page_role { unsigned access:3; unsigned invalid:1; unsigned cr4_pge:1; - unsigned nxe:1; }; };@@ -253,6 +252,7 @@ struct kvm_mmu_page {int multimapped;/* More than one parent_pte? */ int root_count;/* Currently serving as active root */ bool unsync; +bool global;unsigned int unsync_children;union {u64 *parent_pte;/* !multimapped */ @@ -301,7 +301,6 @@ struct kvm_mmu {union kvm_mmu_page_role base_role;u64 *pae_root; -u64 rsvd_bits_mask[2 ][4 ]; };struct kvm_vcpu_arch {@@ -327,7 +326,6 @@ struct kvm_vcpu_arch {u64 shadow_efer;u64 apic_base;struct kvm_lapic *apic;/* kernel irqchip context */ -int32_t apic_arb_prio;int mp_state;int sipi_vector;u64 ia32_misc_enable_msr;@@ -434,6 +432,7 @@ struct kvm_arch{*/ struct list_head active_mmu_pages;struct list_head assigned_dev_head; +struct list_head oos_global_pages;struct iommu_domain *iommu_domain;struct kvm_pic *vpic;struct kvm_ioapic *vioapic;@@ -441,6 +440,7 @@ struct kvm_arch{struct hlist_head irq_ack_notifier_list;int vapics_in_nmi_mode; +int round_robin_prev_vcpu;unsigned int tss_addr;struct page *apic_access_page;@@ -463,6 +463,7 @@ struct kvm_vm_stat {u32 mmu_recycled;u32 mmu_cache_miss;u32 mmu_unsync; +u32 mmu_unsync_global;u32 remote_tlb_flush;u32 lpages; };@@ -560,7 +561,7 @@ struct kvm_x86_ops {void (*inject_pending_irq)(struct kvm_vcpu *vcpu);void (*inject_pending_vectors)(struct kvm_vcpu *vcpu,struct kvm_run *run); -int (*interrupt_allowed)(struct kvm_vcpu *vcpu); +int (*set_tss_addr)(struct kvm *kvm,unsigned int addr);int (*get_tdp_level)(void );int (*get_mt_mask_shift)(void );@@ -602,7 +603,6 @@ enum emulation_result {#define EMULTYPE_NO_DECODE (1 << 0)#define EMULTYPE_TRAP_UD (1 << 1) -#define EMULTYPE_SKIP (1 << 2)int emulate_instruction (struct kvm_vcpu *vcpu,struct kvm_run *run,unsigned long cr2,u16 error_code,int emulation_type);void kvm_report_emulation_failure (struct kvm_vcpu *cvpu,const char *context);@@ -678,6 +678,7 @@ void __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu);int kvm_mmu_load (struct kvm_vcpu *vcpu);void kvm_mmu_unload (struct kvm_vcpu *vcpu);void kvm_mmu_sync_roots (struct kvm_vcpu *vcpu); +void kvm_mmu_sync_global (struct kvm_vcpu *vcpu);int kvm_emulate_hypercall (struct kvm_vcpu *vcpu);@@ -830,6 +831,5 @@ asmlinkage void kvm_handle_fault_on_reboot(void);#define KVM_ARCH_WANT_MMU_NOTIFIER int kvm_unmap_hva (struct kvm *kvm,unsigned long hva);int kvm_age_hva (struct kvm *kvm,unsigned long hva); -int cpuid_maxphyaddr (struct kvm_vcpu *vcpu);#endif /* _ASM_X86_KVM_HOST_H */ kvm/kernel/include/asm-x86/svm.h +0
-1@@ -265,7 +265,6 @@ struct __attribute__ ((__packed__)) vmcb {#define SVM_EVTINJ_VALID_ERR (1 << 11)#define SVM_EXITINTINFO_VEC_MASK SVM_EVTINJ_VEC_MASK -#define SVM_EXITINTINFO_TYPE_MASK SVM_EVTINJ_TYPE_MASK#define SVM_EXITINTINFO_TYPE_INTR SVM_EVTINJ_TYPE_INTR#define SVM_EXITINTINFO_TYPE_NMI SVM_EVTINJ_TYPE_NMIkvm/kernel/include/linux/kvm.h +6
-42@@ -159,7 +159,7 @@ struct kvm_run {__u32 error_code; } ex;/* KVM_EXIT_IO */ -struct { +struct kvm_io {#define KVM_EXIT_IO_IN 0#define KVM_EXIT_IO_OUT 1__u8 direction;@@ -264,10 +264,10 @@ struct kvm_interrupt {/* for KVM_GET_DIRTY_LOG */ struct kvm_dirty_log {__u32 slot; -__u32 padding1; +__u32 padding;union {void *dirty_bitmap;/* one bit per page */ -__u64 padding2; +__u64 padding; }; };@@ -449,12 +449,6 @@ struct kvm_trace_rec {#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT#define KVM_CAP_DEVICE_DEASSIGNMENT 27#endif -#ifdef __KVM_HAVE_MSIX -#define KVM_CAP_DEVICE_MSIX 28 -#endif -#define KVM_CAP_ASSIGN_DEV_IRQ 29 -/* Another bug in KVM_SET_USER_MEMORY_REGION fixed: */ -#define KVM_CAP_JOIN_MEMORY_REGIONS_WORKS 30#ifdef KVM_CAP_IRQ_ROUTING @@ -526,18 +520,11 @@ struct kvm_irq_routing {#define KVM_ASSIGN_PCI_DEVICE _IOR(KVMIO, 0x69, \ struct kvm_assigned_pci_dev)#define KVM_SET_GSI_ROUTING _IOW(KVMIO, 0x6a, struct kvm_irq_routing) -/* deprecated, replaced by KVM_ASSIGN_DEV_IRQ */ #define KVM_ASSIGN_IRQ _IOR(KVMIO, 0x70, \ struct kvm_assigned_irq) -#define KVM_ASSIGN_DEV_IRQ _IOW(KVMIO, 0x70, struct kvm_assigned_irq)#define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71)#define KVM_DEASSIGN_PCI_DEVICE _IOW(KVMIO, 0x72, \ struct kvm_assigned_pci_dev) -#define KVM_ASSIGN_SET_MSIX_NR \ - _IOW(KVMIO, 0x73, struct kvm_assigned_msix_nr) -#define KVM_ASSIGN_SET_MSIX_ENTRY \ - _IOW(KVMIO, 0x74, struct kvm_assigned_msix_entry) -#define KVM_DEASSIGN_DEV_IRQ _IOW(KVMIO, 0x75, struct kvm_assigned_irq)/* * ioctls for vcpu fds @@ -628,8 +615,6 @@ struct kvm_debug_guest {#define KVM_TRC_STLB_INVAL (KVM_TRC_HANDLER + 0x18)#define KVM_TRC_PPC_INSTR (KVM_TRC_HANDLER + 0x19) -#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) -struct kvm_assigned_pci_dev {__u32 assigned_dev_id;__u32 busnr;@@ -640,17 +625,6 @@ struct kvm_assigned_pci_dev { }; }; -#define KVM_DEV_IRQ_HOST_INTX (1 << 0) -#define KVM_DEV_IRQ_HOST_MSI (1 << 1) -#define KVM_DEV_IRQ_HOST_MSIX (1 << 2) - -#define KVM_DEV_IRQ_GUEST_INTX (1 << 8) -#define KVM_DEV_IRQ_GUEST_MSI (1 << 9) -#define KVM_DEV_IRQ_GUEST_MSIX (1 << 10) - -#define KVM_DEV_IRQ_HOST_MASK 0x00ff -#define KVM_DEV_IRQ_GUEST_MASK 0xff00 -struct kvm_assigned_irq {__u32 assigned_dev_id;__u32 host_irq;@@ -666,19 +640,9 @@ struct kvm_assigned_irq { }; }; +#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) -struct kvm_assigned_msix_nr { -__u32 assigned_dev_id; -__u16 entry_nr; -__u16 padding; -}; - -#define KVM_MAX_MSIX_PER_DEV 512 -struct kvm_assigned_msix_entry { -__u32 assigned_dev_id; -__u32 gsi; -__u16 entry;/* The index of entry in the MSI-X table */ -__u16 padding[3 ]; -}; +#define KVM_DEV_IRQ_ASSIGN_MSI_ACTION KVM_DEV_IRQ_ASSIGN_ENABLE_MSI +#define KVM_DEV_IRQ_ASSIGN_ENABLE_MSI (1 << 0)#endif kvm/kernel/include/linux/kvm_host.h +4
-16@@ -338,7 +338,6 @@ int kvm_arch_hardware_setup(void);void kvm_arch_hardware_unsetup (void );void kvm_arch_check_processor_compat (void *rtn);int kvm_arch_vcpu_runnable (struct kvm_vcpu *vcpu); -int kvm_arch_interrupt_allowed (struct kvm_vcpu *vcpu);void kvm_free_physmem (struct kvm *kvm);@@ -360,13 +359,6 @@ struct kvm_irq_ack_notifier {void (*irq_acked)(struct kvm_irq_ack_notifier *kian); }; -#define KVM_ASSIGNED_MSIX_PENDING 0x1 -struct kvm_guest_msix_entry { -u32 vector; -u16 entry; -u16 flags; -}; -struct kvm_assigned_dev_kernel {struct kvm_irq_ack_notifier ack_notifier;struct work_struct interrupt_work;@@ -374,12 +366,13 @@ struct kvm_assigned_dev_kernel {int assigned_dev_id;int host_busnr;int host_devfn; -unsigned int entries_nr;int host_irq;bool host_irq_disabled; -struct msix_entry *host_msix_entries;int guest_irq; -struct kvm_guest_msix_entry *guest_msix_entries; +#define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) +#define KVM_ASSIGNED_DEV_GUEST_MSI (1 << 1) +#define KVM_ASSIGNED_DEV_HOST_INTX (1 << 8) +#define KVM_ASSIGNED_DEV_HOST_MSI (1 << 9)unsigned long irq_requested_type;int irq_source_id;int flags;@@ -399,11 +392,6 @@ void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq, struct kvm_irq_mask_notifier *kimn);void kvm_fire_mask_notifiers (struct kvm *kvm,int irq,bool mask); -#ifdef __KVM_HAVE_IOAPIC -void kvm_get_intr_delivery_bitmask (struct kvm_ioapic *ioapic, -union kvm_ioapic_redirect_entry *entry, -unsigned long *deliver_bitmask); -#endif int kvm_set_irq (struct kvm *kvm,int irq_source_id,int irq,int level);void kvm_notify_acked_irq (struct kvm *kvm,unsigned irqchip,unsigned pin); void kvm_register_irq_ack_notifier(struct kvm *kvm,kvm/kernel/include/linux/kvm_types.h +0
-28@@ -80,31 +80,4 @@ typedef unsigned long hfn_t;typedef hfn_t pfn_t ; -union kvm_ioapic_redirect_entry { -u64 bits; -struct { -u8 vector; -u8 delivery_mode:3 ; -u8 dest_mode:1 ; -u8 delivery_status:1 ; -u8 polarity:1 ; -u8 remote_irr:1 ; -u8 trig_mode:1 ; -u8 mask:1 ; -u8 reserve:7 ; -u8 reserved[4 ]; -u8 dest_id; - } fields; -}; - -struct kvm_lapic_irq { -u32 vector; -u32 delivery_mode; -u32 dest_mode; -u32 level; -u32 trig_mode; -u32 shorthand; -u32 dest_id; -}; -#endif /* __KVM_TYPES_H__ */ --Quoted 3 lines
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] qemu-kvm: configure script fixups after qemu-kvm reorg
In reply to Gleb NatapovQuoted 5 lines
Also
for me running ./configure --kerneldir=/path/to/kernel at top dir works. (/path/to/kernel should be absolute though, otherwise kernel include path is incorrect).
Ah, I didn't realise kvm/cofigure is obsolete.
Quoted 6 lines · Cam Macdonell
When I run configure on a clean copy I get this error:
KVM support no - (field 'arch' has incomplete type, field 'arch' has incomplete type)
I think it's caused by the
include/asmand include-compat/asm symlinks not being created until the kvm/configure script runs. Should configure call the qemu-kvm/kvm configure script?
There was a big mix-up in this area. I just pushed changes to make everything work as expected (./configure && make -> builds qemu)
Quoted 2 lines
Is "make" supposed to build the host kernel module?
No, the external module build will be moved to a different repository.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 6 lines · Liu Yu-B13201 wrote:
Quoted 3 lines
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.gitIs there a http interface?
http://www.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
Signature · 6 lines
error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] qemu-kvm: build system Add link to qemu
In reply to Jan KiszkaQuoted 3 lines · Jan Kiszka
I'm getting closer to a working qemu-kvm, but there are still a few messy parts. The magic dance goes like this:
Try a fresh fetch. ./configure && make ought to work.
Signature · 1 line
error compiling committee.c: too many arguments to function
Re: [PATCH] qemu-kvm: build system Add link to qemu
Quoted 7 lines · Avi Kivity
Quoted 3 lines · Jan Kiszka
I'm getting closer to a working qemu-kvm, but there are still a few messy parts. The magic dance goes like this:
Try a fresh fetch. ./configure && make ought to work.
It's different, but not yet better:
...
CC x86_64-softmmu/extboot.o
CC x86_64-softmmu/i8254-kvm.o
/data/qemu-kvm/hw/i8254-kvm.c: In function ‘kvm_pit_save’:
/data/qemu-kvm/hw/i8254-kvm.c:36: error: storage size of ‘pit’ isn’t known /data/qemu-kvm/hw/i8254-kvm.c:41: warning: implicit declaration of function ‘kvm_get_pit’
/data/qemu-kvm/hw/i8254-kvm.c:46: error: dereferencing pointer to incomplete type
...
with more verbosity:
# make V=1 make -C x86_64-softmmu V="1" TARGET_DIR="x86_64-softmmu/" all make[1]: Entering directory `/data/qemu-kvm/x86_64-softmmu' gcc -I. -I.. -I/data/qemu-kvm/target-i386 -I/data/qemu-kvm -MMD -MT i8254-kvm.o -MP -DNEED_CPU_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__user= -I/data/qemu-kvm/tcg -I/data/qemu-kvm/tcg/x86_64 -I/data/qemu-kvm/fpu -DHAS_AUDIO -DHAS_AUDIO_CHOICE -I/data/qemu-kvm/slirp -O2 -g -fno-strict-aliasing -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -I/data/qemu-kvm/kvm/libkvm -m64 -c -o i8254-kvm.o /data/qemu-kvm/hw/i8254-kvm.c /data/qemu-kvm/hw/i8254-kvm.c: In function ‘kvm_pit_save’: /data/qemu-kvm/hw/i8254-kvm.c:36: error: storage size of ‘pit’ isn’t known /data/qemu-kvm/hw/i8254-kvm.c:41: warning: implicit declaration of function ‘kvm_get_pit’ /data/qemu-kvm/hw/i8254-kvm.c:46: error: dereferencing pointer to incomplete type
I bet it still picks up the host's kernel headers instead of the included ones... (you know, my host is oooold :) )
Jan
Re: [PATCH] qemu-kvm: build system Add link to qemu
In reply to Avi KivityQuoted 6 lines · Avi Kivity
Quoted 3 lines · Jan Kiszka
I'm getting closer to a working qemu-kvm, but there are still a few messy parts. The magic dance goes like this:
Try a fresh fetch. ./configure && make ought to work.
Works for me now.
Re: [PATCH] qemu-kvm: build system Add link to qemu
In reply to Jan KiszkaQuoted 20 lines · Jan Kiszka
with more verbosity:
# make V=1 make -C x86_64-softmmu V="1" TARGET_DIR="x86_64-softmmu/" all make[1]: Entering directory `/data/qemu-kvm/x86_64-softmmu' gcc -I. -I.. -I/data/qemu-kvm/target-i386 -I/data/qemu-kvm -MMD -MT i8254-kvm.o -MP -DNEED_CPU_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64(quoted diff) +0
-6-D_LARGEFILE_SOURCE -D__user= -I/data/qemu-kvm/tcg -I/data/qemu-kvm/tcg/x86_64 -I/data/qemu-kvm/fpu -DHAS_AUDIO -DHAS_AUDIO_CHOICE -I/data/qemu-kvm/slirp -O2 -g -fno-strict-aliasing -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -I/data/qemu-kvm/kvm/libkvm -m64 -c -o i8254-kvm.o /data/qemu-kvm/hw/i8254-kvm.c/data/qemu-kvm/hw/i8254-kvm.c: In function ‘kvm_pit_save’:
/data/qemu-kvm/hw/i8254-kvm.c:36: error: storage size of ‘pit’ isn’t known /data/qemu-kvm/hw/i8254-kvm.c:41: warning: implicit declaration of function ‘kvm_get_pit’
/data/qemu-kvm/hw/i8254-kvm.c:46: error: dereferencing pointer to incomplete type
Quoted 4 lines
I bet it still picks up the host's kernel headers instead of the included ones... (you know, my host is oooold :) )
Yes. Pull again, I added i8254.c to the list of files which have their #includes hacked to add kvm/kernel/... .
Signature · 1 line
error compiling committee.c: too many arguments to function
Re: [PATCH] qemu-kvm: build system Add link to qemu
Quoted 22 lines · Avi Kivity
Quoted 21 lines · Jan Kiszka
with more verbosity:
# make V=1 make -C x86_64-softmmu V="1" TARGET_DIR="x86_64-softmmu/" all make[1]: Entering directory `/data/qemu-kvm/x86_64-softmmu' gcc -I. -I.. -I/data/qemu-kvm/target-i386 -I/data/qemu-kvm -MMD -MT i8254-kvm.o -MP -DNEED_CPU_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64(quoted diff) +0
-6-D_LARGEFILE_SOURCE -D__user= -I/data/qemu-kvm/tcg -I/data/qemu-kvm/tcg/x86_64 -I/data/qemu-kvm/fpu -DHAS_AUDIO -DHAS_AUDIO_CHOICE -I/data/qemu-kvm/slirp -O2 -g -fno-strict-aliasing -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -I/data/qemu-kvm/kvm/libkvm -m64 -c -o i8254-kvm.o /data/qemu-kvm/hw/i8254-kvm.c/data/qemu-kvm/hw/i8254-kvm.c: In function ‘kvm_pit_save’:
/data/qemu-kvm/hw/i8254-kvm.c:36: error: storage size of ‘pit’ isn’t known
/data/qemu-kvm/hw/i8254-kvm.c:41: warning: implicit declaration of function ‘kvm_get_pit’
/data/qemu-kvm/hw/i8254-kvm.c:46: error: dereferencing pointer to incomplete type
Quoted 8 lines
Quoted 4 lines
I bet it still picks up the host's kernel headers instead of the included ones... (you know, my host is oooold :) )
Yes. Pull again, I added
i8254.cto the list of files which have their #includes hacked to add kvm/kernel/... .
No change here.
Jan
Re: [PATCH] qemu-kvm: build system Add link to qemu
Quoted 7 lines · Jan Kiszka
Quoted 4 lines
Yes. Pull again, I added
i8254.cto the list of files which have their #includes hacked to add kvm/kernel/... .No change here.
Drat, it's i8254-kvm.c, not i8254.c. Please try again.
Signature · 1 line
error compiling committee.c: too many arguments to function
Re: [PATCH] qemu-kvm: build system Add link to qemu
Quoted 11 lines · Avi Kivity
Quoted 7 lines · Jan Kiszka
Quoted 4 lines
Yes. Pull again, I added
i8254.cto the list of files which have their #includes hacked to add kvm/kernel/... .No change here.
Drat, it's
i8254-kvm.c, noti8254.c. Please try again.
OK, works now, thanks.
Next topic: for kernel module build, I need to cd to kvm/kernel, run configure and then make, right? What's the kvm/configure now for? Looks at least broken ATM.
Jan
Re: [PATCH] qemu-kvm: build system Add link to qemu
Quoted 4 lines · Jan Kiszka
Next topic: for kernel module build, I need to cd to kvm/kernel, run configure and then make, right? What's the kvm/configure now for? Looks at least broken ATM.
I'm going to split the external kernel module support code into its own repository, which will include kvm.git by means of gitmodules(5).
So we will have:
qemu-kvm.git: standalone repo for qemu kvm-kmod.git: standalone repo for kvm external module
The only time these repos will interact is when I generate kvm-xx tarballs.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 9 lines · Avi Kivity
Quoted 6 lines · Cam Macdonell
When I run configure on a clean copy I get this error:
KVM support no - (field 'arch' has incomplete type, field 'arch' has incomplete type)
I think it's caused by the
include/asmand include-compat/asm symlinks not being created until the kvm/configure script runs. Should configure call the qemu-kvm/kvm configure script?There was a big mix-up in this area. I just pushed changes to make everything work as expected (./configure && make -> builds qemu)
Great. They work as expected. One thing I noticed is that make clean doesn't remove libkvm.{o,a} and .libkvm.d. Should it?
Quoted 3 lines
Quoted 1 line
Is "make" supposed to build the host kernel module?
No, the external module build will be moved to a different repository.
Ok.
Cam
-----------------------------------------------
A. Cameron Macdonell
Ph.D. Student
Department of Computing Science
University of Alberta
[email protected]
Quoted 1 line · Cameron Macdonell
Great. They work as expected. One thing I noticed is that make clean doesn't remove libkvm.{o,a} and .libkvm.d. Should it?
Should, but doesn't. Another thing to fix.
Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
Quoted 3 lines · Avi Kivity
Still missing:
- I have not tested powerpc or ia64. Patches welcome!
This repository seems pretty messed up; I'm not even sure what you want from me. Some of the bigger problems:
* configure completely ignores --kerneldir and only uses kvm/kernel headers instead.
* The headers in kvm/kernel/arch/foo seem to be the important ones, but they have odd ifdefs at the top and I'm not sure how they should be generated.
* "make -C kvm/kernel sync" doesn't even come close to working.
There are a host of other issues and confusing issues, even with a fresh checkout. In general it seems like the mess that was kvm-userspace has been rearranged, and as a consequence is even worse than before.
How am I supposed to create kvm/kernel/arch/powerpc/include/asm/*? Just cp from a Linux tree, or must I add funny ifdefs somehow?
Here's one patch that I think will be needed:
Set kvm_arch=powerpc for PPC builds.
The name of the Linux arch directory is "powerpc", not "ppc".
configure +3 -0
@@ -816,6 +816,9 @@ case "$cpu" in i386 | x86_64) kvm_arch="x86" ;; + ppc) + kvm_arch="powerpc" + ;; *) kvm_arch="$cpu" ;;
Signature · 7 lines
Hollis Blanchard IBM Linux Technology Center -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Hollis Blanchard
Quoted 3 lines · Avi Kivity
Still missing:
- I have not tested powerpc or ia64. Patches welcome!This repository seems pretty messed up; I'm not even sure what you want from me.
Since PPC is now supported in upstream QEMU, does it really matter if it works in qemu-kvm.git?
Regards,
Anthony Liguori
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · Anthony Liguori
Quoted 8 lines · Hollis Blanchard
Quoted 4 lines · Avi Kivity
Still missing:
- I have not tested powerpc or ia64. Â Patches welcome!
Quoted 5 lines
Quoted 2 lines
This repository seems pretty messed up; I'm not even sure what you want from me.
Since PPC is now supported in upstream QEMU, does it really matter if it works in qemu-kvm.git?
Yes. There are people (me) who still rely on building everything from the same source.
It can only be done by the superset (qemu-kvm.git)
Signature · 5 lines
Glauber Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act."
Quoted 4 lines · Glauber Costa
Yes. There are people (me) who still rely on building everything from the same source.
It can only be done by the superset (qemu-kvm.git)
Fedora doesn't package a KVM enabled qemu-system-ppcemb, do they?
Regards,
Anthony Liguori
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Anthony Liguori
Quoted 8 lines · Hollis Blanchard
Quoted 3 lines · Avi Kivity
Still missing:
- I have not tested powerpc or ia64. Patches welcome!This repository seems pretty messed up; I'm not even sure what you want from me.
Since PPC is now supported in upstream QEMU, does it really matter if it works in qemu-kvm.git?
I was going to take that position too, except Avi asked me specifically if some of the code inside TARGET_I386 ifdefs in qemu-kvm.c works for other architectures.
Since it's a safe bet that some version of this code will probably be submitted to qemu-devel, I figured I'd try a build test... and discovered that qemu-kvm.git was released a little prematurely.
Signature · 7 lines
Hollis Blanchard IBM Linux Technology Center -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Anthony Liguori
Quoted 4 lines · Glauber Costa
Yes. There are people (me) who still rely on building everything from the same source.
It can only be done by the superset (qemu-kvm.git)Fedora doesn't package a KVM enabled qemu-system-ppcemb, do they?
The more people who notice when the PowerPC build breaks, the better.
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
Avi Kivity
AppliedQuoted 6 lines · Hollis Blanchard
Quoted 3 lines · Avi Kivity
Still missing:
- I have not tested powerpc or ia64. Patches welcome!
Quoted 6 lines
This repository seems pretty messed up; I'm not even sure what you want from me. Some of the bigger problems:
* configure completely ignores --kerneldir and only uses kvm/kernel headers instead.
That's intentional.
Quoted 4 lines
* The headers in kvm/kernel/arch/foo seem to be the important ones, but they have odd ifdefs at the top and I'm not sure how they should be generated.
They were generated by the old 'make sync' to remove CONFIG_ dependencies. I guess a better way to generate them is a 'make headers-install' from the kernel tree and grab the results.
Quoted 2 lines
* "make -C kvm/kernel sync" doesn't even come close to working.
One of the goals of qemu-kvm.git was to have a standalone repository so I could release kvm-kmod and qemu-kvm independently.
Quoted 4 lines
There are a host of other issues and confusing issues, even with a fresh checkout. In general it seems like the mess that was kvm-userspace has been rearranged, and as a consequence is even worse than before.
Can you detail specific grievances? Please exclude temporary brokenness that was the result of the change.
Quoted 3 lines
How am I supposed to create kvm/kernel/arch/powerpc/include/asm/*? Just cp from a Linux tree, or must I add funny ifdefs somehow?
cp from a Linux tree won't compile. The results of the old 'make sync' would do, but a 'make headers-install' is probably better.
Quoted 17 lines
Here's one patch that I think will be needed:
Set kvm_arch=powerpc for PPC builds.
The name of the Linux arch directory is "powerpc", not "ppc".
Signed-off-by Hollis Blanchard <hollisb-r/[email protected]>configure +0
-0
configure case "$cpu" in · line 824
Quoted 9 lines
configure +3
-0@@ -816,6 +816,9 @@ case "$cpu" in i386 | x86_64) kvm_arch="x86" ;; + ppc) + kvm_arch="powerpc" + ;; *) kvm_arch="$cpu" ;;
Applied, thanks.
Signature · 7 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Hollis Blanchard
Quoted 2 lines
Since PPC is now supported in upstream QEMU, does it really matter if it works in qemu-kvm.git?
I was going to take that position too, except Avi asked me specifically if some of the code inside
TARGET_I386ifdefs inqemu-kvm.cworks for other architectures.
In that case it's sufficient to have the build system use the upstream kvm integration (CONFIG_KVM) rather than the qemu-kvm integration (USE_KVM).
Signature · 7 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Avi Kivity
After a lengthy testing phase, qemu-kvm.git has replaced kvm-userspace.git as the source repository for kvm userspace development.
Differences from kvm-userspace.git are as follows:
- everything under qemu/ has been moved to the top-level directory
- everything not under qemu/ has been moved under a new top-level directory, kvm/
- all qemu subversion commits have been rewritten to be compatible with what will become the master qemu git repository
- all branches and tags have been converted
- qemu-kvm.git builds standalone (does not require kvm.git)
Quoted 6 lines
The repository is compatible with upstream qemu.git; merges and cherry-picking will work fine in either direction
Still missing:
- I have not tested powerpc or ia64. Patches welcome!
- testsuite (kvm/user/ directory) does not build
- proper guest memory setup
During merge with upstream, the call to qemu_alloc_physram dropped under the table (due to removal of phys_ram_base from qemu). And that means we no longer call kvm_setup_guest_memory (fork will cause troubles, deja vu...) and -mempath is broken. Sorry, I'm not deep enough into all parts to provide a quick-fix.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
Quoted 22 lines · Jan Kiszka
Quoted 12 lines · Avi Kivity
After a lengthy testing phase, qemu-kvm.git has replaced kvm-userspace.git as the source repository for kvm userspace development.
Differences from kvm-userspace.git are as follows:
- everything under qemu/ has been moved to the top-level directory
- everything not under qemu/ has been moved under a new top-level directory, kvm/
- all qemu subversion commits have been rewritten to be compatible with what will become the master qemu git repository
- all branches and tags have been converted
- qemu-kvm.git builds standalone (does not require kvm.git)Quoted 7 lines
The repository is compatible with upstream qemu.git; merges and cherry-picking will work fine in either direction
Still missing:
- I have not tested powerpc or ia64. Patches welcome!
- testsuite (kvm/user/ directory) does not build
Quoted 8 lines
- proper guest memory setup
During merge with upstream, the call to
qemu_alloc_physramdropped under the table (due to removal ofphys_ram_basefrom qemu). And that means we no longer callkvm_setup_guest_memory(fork will cause troubles, deja vu...) and -mempath is broken. Sorry, I'm not deep enough into all parts to provide a quick-fix.
That's unrelated to the repository conversion.
I'm unhappy with both qemu.git and qemu-kvm.git memory slot management; qemu-kvm.git is clumsy, and qemu.git is too simplistic (for example, it ignores the fact that dirty logging is a global resource with multiple users).
Signature · 7 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 26 lines · Avi Kivity
Quoted 25 lines · Jan Kiszka
Quoted 13 lines · Avi Kivity
After a lengthy testing phase, qemu-kvm.git has replaced kvm-userspace.git as the source repository for kvm userspace development.
Differences from kvm-userspace.git are as follows:
- everything under qemu/ has been moved to the top-level directory
- everything not under qemu/ has been moved under a new top-level directory, kvm/
- all qemu subversion commits have been rewritten to be compatible with what will become the master qemu git repository
- all branches and tags have been converted
- qemu-kvm.git builds standalone (does not require kvm.git)Quoted 7 lines
The repository is compatible with upstream qemu.git; merges and cherry-picking will work fine in either direction
Still missing:
- I have not tested powerpc or ia64. Patches welcome!
- testsuite (kvm/user/ directory) does not build- proper guest memory setup
Quoted 8 lines
Quoted 6 lines
During merge with upstream, the call to
qemu_alloc_physramdropped under the table (due to removal ofphys_ram_basefrom qemu). And that means we no longer callkvm_setup_guest_memory(fork will cause troubles, deja vu...) and -mempath is broken. Sorry, I'm not deep enough into all parts to provide a quick-fix.That's unrelated to the repository conversion.
Then it's a merge artifact, but it's a problematic regression compared to still-working kvm-userspace.
Quoted 5 lines
I'm unhappy with both qemu.git and qemu-kvm.git memory slot management; qemu-kvm.git is clumsy, and qemu.git is too simplistic (for example, it ignores the fact that dirty logging is a global resource with multiple users).
Don't get your point yet. Can you name a concrete scenario that is problematic in upstream? I'd really like to get slot management right there before we drop the old version of qemu-kvm.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
Quoted 10 lines · Jan Kiszka
Quoted 5 lines
I'm unhappy with both qemu.git and qemu-kvm.git memory slot management; qemu-kvm.git is clumsy, and qemu.git is too simplistic (for example, it ignores the fact that dirty logging is a global resource with multiple users).
Don't get your point yet. Can you name a concrete scenario that is problematic in upstream? I'd really like to get slot management right there before we drop the old version of qemu-kvm.
If migration disables dirty memory logging, it must keep the vga logging enabled, and vice versa.
Signature · 7 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Avi Kivity
Quoted 6 lines · Jan Kiszka
Quoted 5 lines
I'm unhappy with both qemu.git and qemu-kvm.git memory slot management; qemu-kvm.git is clumsy, and qemu.git is too simplistic (for example, it ignores the fact that dirty logging is a global resource with multiple users).
Quoted 7 lines
Quoted 4 lines
Don't get your point yet. Can you name a concrete scenario that is problematic in upstream? I'd really like to get slot management right there before we drop the old version of qemu-kvm.
If migration disables dirty memory logging, it must keep the vga logging enabled, and vice versa.
So we need some notifier callbacks on slot changes so that all users can re-enable dirty logging after the update as required. Where/how does the migration code disable dirty logging?
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
Quoted 6 lines · Jan Kiszka
Quoted 3 lines
If migration disables dirty memory logging, it must keep the vga logging enabled, and vice versa.
So we need some notifier callbacks on slot changes so that all users can re-enable dirty logging after the update as required.
Simpler to do reference counting. When a user enables logging for a memory range, the refcount for all slots containing that range gets bumped. When a user enables logging for all of memory, a global refcount is bumped. For a given slot, dirty logging is enabled if either the slot logging refcount or the global logging refcount is nonzero.
That's sort of what's implemented in qemu-kvm.git. In qemu.git vga logging does not get disabled, which is really broken. It prevents optimizations like disabling logging when the screen is not displayed to a human.
Quoted 3 lines
Where/how does the
migration code disable dirty logging?
Should be phase 3 of ram_save_live().
Signature · 7 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Avi Kivity
Quoted 4 lines · Jan Kiszka
Quoted 3 lines
If migration disables dirty memory logging, it must keep the vga logging enabled, and vice versa.
Quoted 8 lines
Quoted 2 lines
So we need some notifier callbacks on slot changes so that all users can re-enable dirty logging after the update as required.
Simpler to do reference counting. When a user enables logging for a memory range, the refcount for all slots containing that range gets bumped. When a user enables logging for all of memory, a global refcount is bumped. For a given slot, dirty logging is enabled if either the slot logging refcount or the global logging refcount is nonzero.
OK, but then we just need to check for that global flag after registering/modifying slots and enable logging unconditionally. That's indeed a simple add-on.
Quoted 5 lines
That's sort of what's implemented in qemu-kvm.git. In qemu.git vga logging does not get disabled, which is really broken. It prevents optimizations like disabling logging when the screen is not displayed to a human.
Is there a channel that tells vga "nothing will be displayed"? I may have missed it while removing all those disable-logging-as-it-may- confuse-slot-management hooks.
Quoted 6 lines
Quoted 4 lines
Where/how does the
migration code disable dirty logging?Should be phase 3 of
ram_save_live().
But only in qemu-kvm. What is the plan about pushing it upstream? Then we could discuss how to extend the exiting support best.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
Quoted 10 lines · Jan Kiszka
Quoted 5 lines
That's sort of what's implemented in qemu-kvm.git. In qemu.git vga logging does not get disabled, which is really broken. It prevents optimizations like disabling logging when the screen is not displayed to a human.
Is there a channel that tells vga "nothing will be displayed"? I may have missed it while removing all those disable-logging-as-it-may- confuse-slot-management hooks.
I think currently qemu simply stops calling vga_draw_graphic(). This makes sense for tcg since it needs to track dirty memory regardless (so it can invalidate TBs). But for kvm we'll want to add an explicit channel.
Note that it isn't likely to make a huge difference: if you don't actively read-and-reset the dirty bitmap, kvm will keep the shadow ptes with write permission and you won't see any performance hit. The only difference is whether large pages can be used or not.
Quoted 10 lines
Quoted 6 lines
Quoted 4 lines
Where/how does the
migration code disable dirty logging?Should be phase 3 of
ram_save_live().But only in qemu-kvm. What is the plan about pushing it upstream? Then we could discuss how to extend the exiting support best.
Pushing things upstream is quite difficult because of the very different infrastructure. It's unfortunate that upstream rewrote everything instead of changing things incrementally. Rewrites are almost always a mistake since they throw away accumulated knowledge.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 6 lines · Avi Kivity
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Where/how does the
migration code disable dirty logging?Should be phase 3 of
ram_save_live().
Quoted 6 lines
Quoted 3 lines
But only in qemu-kvm. What is the plan about pushing it upstream? Then we could discuss how to extend the exiting support best.
Pushing things upstream is quite difficult because of the very different infrastructure.
Isn't the midterm goal to get rid of most of these differences (namely libkvm)?
Quoted 3 lines
It's unfortunate that upstream rewrote everything
instead of changing things incrementally. Rewrites are almost always a mistake since they throw away accumulated knowledge.
I disagree, at least in this particular case. Upstream already diverged from qemu-kvm, and the latter provided no comparable alternative for slot management and dirty logging. And I still don't see that we lost anything that could not easily be re-integrated into upstream (ie. global dirty logging), finally leading to a cleaner and more complete result.
So, what bits are missing to make KVM migration work in upstream?
Jan
Signature · 6 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 13 lines · Jan Kiszka
Quoted 11 lines · Avi Kivity
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
Where/how does the
migration code disable dirty logging?Should be phase 3 of
ram_save_live().But only in qemu-kvm. What is the plan about pushing it upstream? Then we could discuss how to extend the exiting support best.
Quoted 7 lines
Quoted 3 lines
Pushing things upstream is quite difficult because of the very different infrastructure.
Isn't the midterm goal to get rid of most of these differences (namely libkvm)?
Yes, but not by removing existing functionality.
Quoted 6 lines
Quoted 5 lines
It's unfortunate that upstream rewrote everything
instead of changing things incrementally. Rewrites are almost always a mistake since they throw away accumulated knowledge.
Quoted 7 lines
I disagree, at least in this particular case. Upstream already diverged from qemu-kvm, and the latter provided no comparable alternative for slot management and dirty logging. And I still don't see that we lost anything that could not easily be re-integrated into upstream (ie. global dirty logging), finally leading to a cleaner and more complete result.
It could have been done differently, by morphing the existing support into something mergable, and merging that. In this way, we'd ensure no needed functionality is lost.
As is, we're adding something simple, then discovering it's insufficient. We're throwing away information, that's not a good way to make progress.
Quoted 2 lines
So, what bits are missing to make KVM migration work in upstream?
I don't know of anything beyond dirty logging.
Signature · 6 lines
error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 15 lines · Avi Kivity
Quoted 14 lines · Jan Kiszka
Quoted 11 lines · Avi Kivity
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Where/how does the
migration code disable dirty logging?Should be phase 3 of
ram_save_live().But only in qemu-kvm. What is the plan about pushing it upstream? Then we could discuss how to extend the exiting support best.
Pushing things upstream is quite difficult because of the very different infrastructure.
Quoted 5 lines
Quoted 3 lines
Isn't the midterm goal to get rid of most of these differences (namely libkvm)?
Yes, but not by removing existing functionality.
No one said this.
Quoted 15 lines
Quoted 7 lines
Quoted 6 lines
It's unfortunate that upstream rewrote everything
instead of changing things incrementally. Rewrites are almost always a mistake since they throw away accumulated knowledge.Quoted 7 lines
I disagree, at least in this particular case. Upstream already diverged from qemu-kvm, and the latter provided no comparable alternative for slot management and dirty logging. And I still don't see that we lost anything that could not easily be re-integrated into upstream (ie. global dirty logging), finally leading to a cleaner and more complete result.
Quoted 3 lines
It could have been done differently, by morphing the existing support into something mergable, and merging that. In this way, we'd ensure no needed functionality is lost.
The existing support lacked features upstream already had and instead required additional hacks to make qemu-kvm work.
Quoted 4 lines
As is, we're adding something simple, then discovering it's insufficient. We're throwing away information, that's not a good way to make progress.
I doubt this applies here.
Quoted 6 lines
Quoted 3 lines
So, what bits are missing to make KVM migration work in upstream?
I don't know of anything beyond dirty logging.
OK, then I will pick this up and have a look at something comparable to cpu_physical_memory_set_dirty_tracking() for upstream.
Jan
Signature · 6 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Jan Kiszka
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Pushing things upstream is quite difficult because of the very different infrastructure.
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
Isn't the midterm goal to get rid of most of these differences (namely libkvm)?
Yes, but not by removing existing functionality.
No one said this.
I'm sure no one meant it either, but that is what's happening.
This is the flow:
* qemu.git has very limited kvm support
* more kvm support is added to qemu.git
* because it's a rewrite, not all the knowledge that has gone into qemu-kvm.git is added
* when I merge qemu.git into qemu-kvm.git, the two implementation methods clash, and things break
This has happened on most clean rewrites I've seen. The new code is clean, but the old code works better. It's much better to morph the old code into shape (though more time consuming and a lot less fun).
Quoted 7 lines
Quoted 4 lines
As is, we're adding something simple, then discovering it's insufficient. We're throwing away information, that's not a good way to make progress.
I doubt this applies here.
In fact it's happened. qemu-kvm.git knows that the dirty logging flag is a shared resource. qemu-kvm.git also handles older kernels (though I think that was intentional).
Signature · 6 lines
error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Avi Kivity
Quoted 5 lines
* configure completely ignores --kerneldir and only uses kvm/kernel headers instead.
That's intentional.
Huh? If --kerneldir does nothing, why does it exist?
Quoted 9 lines
Quoted 2 lines
* The headers in kvm/kernel/arch/foo seem to be the important ones, but they have odd ifdefs at the top and I'm not sure
how
Quoted 2 lines
they should be generated.
They were generated by the old 'make sync' to remove
CONFIG_dependencies. I guess a better way to generate them is a 'make headers-install' from the kernel tree and grab the results.
'make headers_install' only produces include/asm/kvm.h, which apparently is not sufficient.
I can use output from an old 'make sync' for now, but obviously that doesn't help with future changes to these headers. Defining a process for updating those headers would be useful.
I'll send patches separately.
Signature · 7 lines
Hollis Blanchard IBM Linux Technology Center -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Avi Kivity
Quoted 7 lines · Hollis Blanchard
Quoted 3 lines
Since PPC is now supported in upstream QEMU, does it really matter if it works in qemu-kvm.git?
I was going to take that position too, except Avi asked me specifically if some of the code inside
TARGET_I386ifdefs inqemu-kvm.cworks for other architectures.In that case it's sufficient to have the build system use the upstream kvm integration (
CONFIG_KVM) rather than the qemu-kvm integration (USE_KVM).
OK, I give up... how is this supposed to work? Nobody ever sets CONFIG_KVM or KVM_UPSTREAM, but there are a couple tests for it. Glauber once sent a patch related to that, but I don't see how it helps.
For reference, the actual error is about a hundred instances of e.g.
/home/hollisb/source/qemu-kvm.git/vl.c:3393: undefined reference to `kvm_allowed'
Signature · 7 lines
Hollis Blanchard IBM Linux Technology Center -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Hollis Blanchard
Quoted 7 lines · Avi Kivity
Quoted 5 lines
* configure completely ignores --kerneldir and only uses kvm/kernel headers instead.
That's intentional.
Huh? If --kerneldir does nothing, why does it exist?
BTW Avi, if you intend on carrying the KVM kernel headers in qemu-kvm, I see no strong reason not to do the same in QEMU.
I'd like to move them from kvm/kernel/include to kvm/include. I'm open to suggestion actually.
How often do you intend on updating the headers?
Regards,
Anthony Liguori
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Anthony Liguori
Quoted 6 lines · Hollis Blanchard
Quoted 4 lines · Avi Kivity
Quoted 4 lines
* configure completely ignores --kerneldir and only uses kvm/kernel headers instead.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
That's intentional.
Huh? If --kerneldir does nothing, why does it exist?
BTW Avi, if you intend on carrying the KVM kernel headers in qemu-kvm, I see no strong reason not to do the same in QEMU.
That's the plan.
Quoted 4 lines
I'd like to move them from kvm/kernel/include to kvm/include. I'm open to suggestion actually.
How often do you intend on updating the headers?
For qemu-kvm.git, as often as they're updated in kvm.git.
For qemu.git, every major Linux release. This way we don't commit to an ABI which may change.
Signature · 6 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Hollis Blanchard
Quoted 2 lines
In that case it's sufficient to have the build system use the upstream kvm integration (
CONFIG_KVM) rather than the qemu-kvm integration (USE_KVM).OK, I give up... how is this supposed to work? Nobody ever sets
CONFIG_KVMorKVM_UPSTREAM, but there are a couple tests for it. Glauber once sent a patch related to that, but I don't see how it helps.
KVM_UPSTREAM is just a marker to let us know which parts of upstream qemu/kvm integration conflict with qemu-kvm.git.
Signature · 6 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Hollis Blanchard
Quoted 4 lines
Quoted 2 lines
They were generated by the old 'make sync' to remove
CONFIG_dependencies. I guess a better way to generate them is a 'make headers-install' from the kernel tree and grab the results.'make
headers_install' only producesinclude/asm/kvm.h, which apparently is not sufficient.
That's a bug then. People should be able to use kvm without copying and hacking headers from the kernel source tree.
Quoted 4 lines
I can use output from an old 'make sync' for now, but obviously that doesn't help with future changes to these headers. Defining a process for updating those headers would be useful.
I plan to setup a script for that (basically an updated make sync).
Signature · 6 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Hollis Blanchard
Quoted 7 lines · Avi Kivity
Quoted 5 lines
* configure completely ignores --kerneldir and only uses kvm/kernel headers instead.
That's intentional.
Huh? If --kerneldir does nothing, why does it exist?
--kerneldir predates the inclusion of headers in qemu-kvm.git.
Signature · 6 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Hollis Blanchard
I can use output from an old 'make sync' for now, but obviously that doesn't help with future changes to these headers. Defining a process for updating those headers would be useful.
Two thumbs up. People doing kvm development which is not-quite-yet ready for upstream inclusion will appreciate having a way of keeping their (changed) kernel headers in sync with the userspace bits as transparently as possible.
Cheers,
Muli
Signature · 10 lines
Muli Ben-Yehuda | muli-7z/[email protected] | +972-4-8281080 Manager, Virtualization and Systems Architecture Master Inventor, IBM Haifa Research Laboratory SYSTOR 2009---The Israeli Experimental Systems Conference http://www.haifa.il.ibm.com/conferences/systor2009/ -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] qemu-kvm: build system Add link to qemu
In reply to Jan KiszkaQuoted 34 lines · Jan Kiszka
I'm getting closer to a working qemu-kvm, but there are still a few messy parts. The magic dance goes like this:
cd qemu-kvm/kvm
ln -s .. qemu (or apply patch below)
./configure -whatever
makeStill, this is unintuitive. As both top-level configure and
Makefilealready differ from upstream, I see no reason not tweaking them also in way that ./configure && make from the top-level directory behaves as expected again. May look into this later (and the other warnings the build threw at me), now I've to understand an ugly shadow page table inconsistency of kvm...Jan
------->
Subject: [PATCH] qemu-kvm: build system Add link to qemu
Signed-off-by Jan Kiszka <[email protected]>--- kvm/qemu | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) create mode 120000 kvm/qemukvm/qemu new file +0
-0
kvm/qemu line 1
Quoted 2 lines
kvm/qemu new file +1
-0@@ -0,0 +1 @@ +..
This shouldn't be needed. Can you confirm this with current qemu-kvm.git?
Signature · 1 line
error compiling committee.c: too many arguments to function
Re: [PATCH] qemu-kvm: build system Add link to qemu
Quoted 28 lines · Avi Kivity
Quoted 27 lines · Jan Kiszka
I'm getting closer to a working qemu-kvm, but there are still a few messy parts. The magic dance goes like this:
cd qemu-kvm/kvm
ln -s .. qemu (or apply patch below)
./configure -whatever
makeStill, this is unintuitive. As both top-level configure and
Makefilealready differ from upstream, I see no reason not tweaking them also in way that ./configure && make from the top-level directory behaves as expected again. May look into this later (and the other warnings the build threw at me), now I've to understand an ugly shadow page table inconsistency of kvm...Jan
------->
Subject: [PATCH] qemu-kvm: build system Add link to qemu
Signed-off-by Jan Kiszka <[email protected]>--- kvm/qemu | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) create mode 120000 kvm/qemu
Quoted 12 lines
kvm/qemu line 1
Quoted 9 lines
kvm/qemu new file +1
-0@@ -0,0 +1 @@ +..This shouldn't be needed. Can you confirm this with current qemu-kvm.git?
Yes, long solved.
Jan
Quoted 5 lines · Avi Kivity
Quoted 4 lines · Hollis Blanchard
Quoted 3 lines
In that case it's sufficient to have the build system use the upstream kvm integration (
CONFIG_KVM) rather than the qemu-kvm integration (USE_KVM).
Quoted 7 lines
Quoted 4 lines
OK, I give up... how is this supposed to work? Nobody ever sets
CONFIG_KVMorKVM_UPSTREAM, but there are a couple tests for it. Glauber once sent a patch related to that, but I don't see how it helps.
KVM_UPSTREAMis just a marker to let us know which parts of upstream qemu/kvm integration conflict with qemu-kvm.git.
OK, so where do I define KVM_UPSTREAM?
Also, where do I define CONFIG_KVM? I would expect the configure script to do that, but apparently it does not.
Signature · 7 lines
Hollis Blanchard IBM Linux Technology Center -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html