All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: kvm-ia64@vger.kernel.org
Subject: Re: [PATCH] qemu-kvm: configure script fixups after qemu-kvm reorg
Date: Sun, 26 Apr 2009 07:48:20 +0000	[thread overview]
Message-ID: <20090426074820.GS24095@redhat.com> (raw)
In-Reply-To: <20090426073839.GA21634@redhat.com>

On Sun, Apr 26, 2009 at 10:38:39AM +0300, Michael S. Tsirkin wrote:
> Make 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.
> 
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).


> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 
> --
> 
> On Thu, Apr 23, 2009 at 06:40:00PM +0300, Avi Kivity wrote:
> > 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?
> 
> diff --git a/kvm/Makefile b/kvm/Makefile
> index 617504c..1ef6493 100644
> --- a/kvm/Makefile
> +++ b/kvm/Makefile
> @@ -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.*
> diff --git a/kvm/configure b/kvm/configure
> index 249c743..f4873c1 100755
> --- a/kvm/configure
> +++ b/kvm/configure
> @@ -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
> diff --git a/kvm/kernel/include/asm-x86/kvm.h b/kvm/kernel/include/asm-x86/kvm.h
> index dc90c47..8dfd630 100644
> --- a/kvm/kernel/include/asm-x86/kvm.h
> +++ b/kvm/kernel/include/asm-x86/kvm.h
> @@ -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
> diff --git a/kvm/kernel/include/asm-x86/kvm_host.h b/kvm/kernel/include/asm-x86/kvm_host.h
> index 07e1058..aa87be7 100644
> --- a/kvm/kernel/include/asm-x86/kvm_host.h
> +++ b/kvm/kernel/include/asm-x86/kvm_host.h
> @@ -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 */
> diff --git a/kvm/kernel/include/asm-x86/svm.h b/kvm/kernel/include/asm-x86/svm.h
> index 5a34c94..ae5aa0d 100644
> --- a/kvm/kernel/include/asm-x86/svm.h
> +++ b/kvm/kernel/include/asm-x86/svm.h
> @@ -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
> diff --git a/kvm/kernel/include/linux/kvm.h b/kvm/kernel/include/linux/kvm.h
> index f5e9d66..0746631 100644
> --- a/kvm/kernel/include/linux/kvm.h
> +++ b/kvm/kernel/include/linux/kvm.h
> @@ -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
> diff --git a/kvm/kernel/include/linux/kvm_host.h b/kvm/kernel/include/linux/kvm_host.h
> index 0c3c5b1..965f186 100644
> --- a/kvm/kernel/include/linux/kvm_host.h
> +++ b/kvm/kernel/include/linux/kvm_host.h
> @@ -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,
> diff --git a/kvm/kernel/include/linux/kvm_types.h b/kvm/kernel/include/linux/kvm_types.h
> index c65f89e..e204dd3 100644
> --- a/kvm/kernel/include/linux/kvm_types.h
> +++ b/kvm/kernel/include/linux/kvm_types.h
> @@ -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__ */
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
			Gleb.

WARNING: multiple messages have this Message-ID (diff)
From: Gleb Natapov <gleb@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Avi Kivity <avi@redhat.com>, KVM list <kvm@vger.kernel.org>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Hollis Blanchard <hollisb@us.ibm.com>,
	"Zhang, Xiantao" <xiantao.zhang@intel.com>,
	kvm-ppc <kvm-ppc@vger.kernel.org>,
	"kvm-ia64@vger.kernel.org" <kvm-ia64@vger.kernel.org>,
	Carsten Otte <cotte@de.ibm.com>
Subject: Re: [PATCH] qemu-kvm: configure script fixups after qemu-kvm reorg
Date: Sun, 26 Apr 2009 07:48:20 +0000	[thread overview]
Message-ID: <20090426074820.GS24095@redhat.com> (raw)
In-Reply-To: <20090426073839.GA21634@redhat.com>

On Sun, Apr 26, 2009 at 10:38:39AM +0300, Michael S. Tsirkin wrote:
> Make 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.
> 
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).


> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 
> --
> 
> On Thu, Apr 23, 2009 at 06:40:00PM +0300, Avi Kivity wrote:
> > 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?
> 
> diff --git a/kvm/Makefile b/kvm/Makefile
> index 617504c..1ef6493 100644
> --- a/kvm/Makefile
> +++ b/kvm/Makefile
> @@ -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.*
> diff --git a/kvm/configure b/kvm/configure
> index 249c743..f4873c1 100755
> --- a/kvm/configure
> +++ b/kvm/configure
> @@ -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
> diff --git a/kvm/kernel/include/asm-x86/kvm.h b/kvm/kernel/include/asm-x86/kvm.h
> index dc90c47..8dfd630 100644
> --- a/kvm/kernel/include/asm-x86/kvm.h
> +++ b/kvm/kernel/include/asm-x86/kvm.h
> @@ -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
> diff --git a/kvm/kernel/include/asm-x86/kvm_host.h b/kvm/kernel/include/asm-x86/kvm_host.h
> index 07e1058..aa87be7 100644
> --- a/kvm/kernel/include/asm-x86/kvm_host.h
> +++ b/kvm/kernel/include/asm-x86/kvm_host.h
> @@ -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 */
> diff --git a/kvm/kernel/include/asm-x86/svm.h b/kvm/kernel/include/asm-x86/svm.h
> index 5a34c94..ae5aa0d 100644
> --- a/kvm/kernel/include/asm-x86/svm.h
> +++ b/kvm/kernel/include/asm-x86/svm.h
> @@ -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
> diff --git a/kvm/kernel/include/linux/kvm.h b/kvm/kernel/include/linux/kvm.h
> index f5e9d66..0746631 100644
> --- a/kvm/kernel/include/linux/kvm.h
> +++ b/kvm/kernel/include/linux/kvm.h
> @@ -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
> diff --git a/kvm/kernel/include/linux/kvm_host.h b/kvm/kernel/include/linux/kvm_host.h
> index 0c3c5b1..965f186 100644
> --- a/kvm/kernel/include/linux/kvm_host.h
> +++ b/kvm/kernel/include/linux/kvm_host.h
> @@ -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,
> diff --git a/kvm/kernel/include/linux/kvm_types.h b/kvm/kernel/include/linux/kvm_types.h
> index c65f89e..e204dd3 100644
> --- a/kvm/kernel/include/linux/kvm_types.h
> +++ b/kvm/kernel/include/linux/kvm_types.h
> @@ -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__ */
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
			Gleb.

WARNING: multiple messages have this Message-ID (diff)
From: Gleb Natapov <gleb@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Avi Kivity <avi@redhat.com>, KVM list <kvm@vger.kernel.org>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Hollis Blanchard <hollisb@us.ibm.com>,
	"Zhang, Xiantao" <xiantao.zhang@intel.com>,
	kvm-ppc <kvm-ppc@vger.kernel.org>,
	"kvm-ia64@vger.kernel.org" <kvm-ia64@vger.kernel.org>,
	Carsten Otte <cotte@de.ibm.com>
Subject: Re: [PATCH] qemu-kvm: configure script fixups after qemu-kvm reorg
Date: Sun, 26 Apr 2009 10:48:20 +0300	[thread overview]
Message-ID: <20090426074820.GS24095@redhat.com> (raw)
In-Reply-To: <20090426073839.GA21634@redhat.com>

On Sun, Apr 26, 2009 at 10:38:39AM +0300, Michael S. Tsirkin wrote:
> Make 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.
> 
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).


> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 
> --
> 
> On Thu, Apr 23, 2009 at 06:40:00PM +0300, Avi Kivity wrote:
> > 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?
> 
> diff --git a/kvm/Makefile b/kvm/Makefile
> index 617504c..1ef6493 100644
> --- a/kvm/Makefile
> +++ b/kvm/Makefile
> @@ -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.*
> diff --git a/kvm/configure b/kvm/configure
> index 249c743..f4873c1 100755
> --- a/kvm/configure
> +++ b/kvm/configure
> @@ -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
> diff --git a/kvm/kernel/include/asm-x86/kvm.h b/kvm/kernel/include/asm-x86/kvm.h
> index dc90c47..8dfd630 100644
> --- a/kvm/kernel/include/asm-x86/kvm.h
> +++ b/kvm/kernel/include/asm-x86/kvm.h
> @@ -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
> diff --git a/kvm/kernel/include/asm-x86/kvm_host.h b/kvm/kernel/include/asm-x86/kvm_host.h
> index 07e1058..aa87be7 100644
> --- a/kvm/kernel/include/asm-x86/kvm_host.h
> +++ b/kvm/kernel/include/asm-x86/kvm_host.h
> @@ -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 */
> diff --git a/kvm/kernel/include/asm-x86/svm.h b/kvm/kernel/include/asm-x86/svm.h
> index 5a34c94..ae5aa0d 100644
> --- a/kvm/kernel/include/asm-x86/svm.h
> +++ b/kvm/kernel/include/asm-x86/svm.h
> @@ -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
> diff --git a/kvm/kernel/include/linux/kvm.h b/kvm/kernel/include/linux/kvm.h
> index f5e9d66..0746631 100644
> --- a/kvm/kernel/include/linux/kvm.h
> +++ b/kvm/kernel/include/linux/kvm.h
> @@ -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
> diff --git a/kvm/kernel/include/linux/kvm_host.h b/kvm/kernel/include/linux/kvm_host.h
> index 0c3c5b1..965f186 100644
> --- a/kvm/kernel/include/linux/kvm_host.h
> +++ b/kvm/kernel/include/linux/kvm_host.h
> @@ -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,
> diff --git a/kvm/kernel/include/linux/kvm_types.h b/kvm/kernel/include/linux/kvm_types.h
> index c65f89e..e204dd3 100644
> --- a/kvm/kernel/include/linux/kvm_types.h
> +++ b/kvm/kernel/include/linux/kvm_types.h
> @@ -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__ */
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
			Gleb.

  reply	other threads:[~2009-04-26  7:48 UTC|newest]

Thread overview: 108+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-26  7:38 [PATCH] qemu-kvm: configure script fixups after qemu-kvm reorg Michael S. Tsirkin
2009-04-26  7:38 ` Michael S. Tsirkin
2009-04-26  7:38 ` Michael S. Tsirkin
2009-04-26  7:48 ` Gleb Natapov [this message]
2009-04-26  7:48   ` Gleb Natapov
2009-04-26  7:48   ` Gleb Natapov
2009-04-26  8:15 ` Michael S. Tsirkin
2009-04-26  8:15   ` Michael S. Tsirkin
2009-04-26  8:15   ` Michael S. Tsirkin
2009-04-26  8:51 ` Michael S. Tsirkin
2009-04-26  8:51   ` Michael S. Tsirkin
2009-04-26  8:51   ` Michael S. Tsirkin
  -- strict thread matches above, loose matches on Subject: below --
2009-04-23 15:40 qemu-kvm.git now live Avi Kivity
2009-04-23 15:40 ` Avi Kivity
2009-04-23 15:40 ` Avi Kivity
2009-04-23 17:33 ` walt
2009-04-23 17:33   ` walt
2009-04-23 17:42 ` Cam Macdonell
2009-04-24 18:14   ` walt
2009-04-25  9:25     ` [PATCH] qemu-kvm: build system Add link to qemu Jan Kiszka
2009-04-26 10:33       ` Avi Kivity
2009-04-26 11:20         ` Jan Kiszka
2009-04-26 11:39           ` Avi Kivity
2009-04-26 12:24             ` Jan Kiszka
2009-04-26 12:33               ` Avi Kivity
2009-04-26 12:37                 ` Jan Kiszka
2009-04-26 12:46                   ` Avi Kivity
2009-04-26 11:34         ` Christoph Hellwig
2009-05-03  9:16       ` Avi Kivity
2009-05-04 21:01         ` Jan Kiszka
2009-04-26  9:20   ` qemu-kvm.git now live Avi Kivity
2009-04-27  1:00     ` Cameron Macdonell
2009-04-27  6:28       ` Avi Kivity
2009-04-24  2:49 ` Liu Yu-B13201
2009-04-24  2:49   ` Liu Yu-B13201
2009-04-24 10:16   ` Andreas Winkelbauer
     [not found]   ` <0A1FE637C2C7E148B9573BB60CC630E5210156-bKEhWGtIRUJ4Lp7cDGe+DVjVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2009-04-26  9:22     ` Avi Kivity
2009-04-26  9:22       ` Avi Kivity
     [not found] ` <49F08BD0.6000706-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-04-28 21:53   ` Hollis Blanchard
2009-04-28 21:53     ` Hollis Blanchard
     [not found]     ` <1240955602.24625.57.camel-EGjIuKC2qUdB0N6nvOmcJFaTQe2KTcn/@public.gmane.org>
2009-04-28 22:20       ` Anthony Liguori
2009-04-28 22:20         ` Anthony Liguori
2009-04-28 22:24         ` Glauber Costa
2009-04-28 22:24           ` Glauber Costa
     [not found]           ` <5d6222a80904281524v5eb5b163pd21e7d6643cbdbc6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-04-28 22:28             ` Anthony Liguori
2009-04-28 22:28               ` Anthony Liguori
2009-04-28 22:34               ` Hollis Blanchard
2009-04-28 22:34                 ` Hollis Blanchard
     [not found]         ` <49F78134.30904-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2009-04-28 22:33           ` Hollis Blanchard
2009-04-28 22:33             ` Hollis Blanchard
     [not found]             ` <1240957999.24625.60.camel-EGjIuKC2qUdB0N6nvOmcJFaTQe2KTcn/@public.gmane.org>
2009-04-29  8:31               ` Avi Kivity
2009-04-29  8:31                 ` Avi Kivity
     [not found]                 ` <49F81054.4010102-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-01 21:51                   ` Hollis Blanchard
2009-05-01 21:51                     ` Hollis Blanchard
     [not found]                     ` <1241214678.32624.176.camel-EGjIuKC2qUdB0N6nvOmcJFaTQe2KTcn/@public.gmane.org>
2009-05-02  7:52                       ` Avi Kivity
2009-05-02  7:52                         ` Avi Kivity
     [not found]                         ` <49FBFBC4.10905-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-04 21:35                           ` Hollis Blanchard
2009-05-04 21:35                             ` Hollis Blanchard
2009-04-29  8:29       ` Avi Kivity
2009-04-29  8:29         ` Avi Kivity
     [not found]         ` <49F80FE2.5030600-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-01 21:23           ` Hollis Blanchard
2009-05-01 21:23             ` Hollis Blanchard
     [not found]             ` <1241213025.32624.167.camel-EGjIuKC2qUdB0N6nvOmcJFaTQe2KTcn/@public.gmane.org>
2009-05-01 22:55               ` Anthony Liguori
2009-05-01 22:55                 ` Anthony Liguori
     [not found]                 ` <49FB7DF4.60201-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2009-05-02  7:42                   ` Avi Kivity
2009-05-02  7:42                     ` Avi Kivity
2009-05-02  7:54               ` Avi Kivity
2009-05-02  7:54                 ` Avi Kivity
2009-05-02  7:58               ` Avi Kivity
2009-05-02  7:58                 ` Avi Kivity
2009-05-02 14:50               ` Muli Ben-Yehuda
2009-05-02 14:50                 ` Muli Ben-Yehuda
2009-04-29  8:49 ` Jan Kiszka
2009-04-29  8:49   ` Jan Kiszka
2009-04-29  8:49   ` Jan Kiszka
2009-04-29 10:42 ` Avi Kivity
2009-04-29 10:42   ` Avi Kivity
2009-04-29 10:42   ` Avi Kivity
2009-04-29 10:55 ` Jan Kiszka
2009-04-29 10:55   ` Jan Kiszka
2009-04-29 10:55   ` Jan Kiszka
2009-04-29 11:12 ` Avi Kivity
2009-04-29 11:12   ` Avi Kivity
2009-04-29 11:12   ` Avi Kivity
2009-04-29 11:31 ` Jan Kiszka
2009-04-29 11:31   ` Jan Kiszka
2009-04-29 11:31   ` Jan Kiszka
2009-04-29 14:40 ` Avi Kivity
2009-04-29 14:40   ` Avi Kivity
2009-04-29 14:40   ` Avi Kivity
2009-04-29 15:42 ` Jan Kiszka
2009-04-29 15:42   ` Jan Kiszka
2009-04-29 15:42   ` Jan Kiszka
2009-04-30  9:12 ` Avi Kivity
2009-04-30  9:12   ` Avi Kivity
2009-04-30  9:12   ` Avi Kivity
2009-04-30  9:29 ` Jan Kiszka
2009-04-30  9:29   ` Jan Kiszka
2009-04-30  9:29   ` Jan Kiszka
2009-04-30 10:54 ` Avi Kivity
2009-04-30 10:54   ` Avi Kivity
2009-04-30 10:54   ` Avi Kivity
2009-04-30 15:32 ` Jan Kiszka
2009-04-30 15:32   ` Jan Kiszka
2009-04-30 15:32   ` Jan Kiszka
2009-04-30 15:43 ` Avi Kivity
2009-04-30 15:43   ` Avi Kivity
2009-04-30 15:43   ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090426074820.GS24095@redhat.com \
    --to=gleb@redhat.com \
    --cc=kvm-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.