fix ia64 compilation
PATCH 1/1 fix ia64 compilation
Signed-off-by Gleb Natapov <[email protected]>
arch/ia64/kvm/kvm-ia64.c +2 -1
@@ -327,7 +327,7 @@ static void vcpu_deliver_ipi(struct kvm_vcpu *vcpu, uint64_t dm,case SAPIC_PMI :default :printk (KERN_ERR "kvm: Unimplemented Deliver reserved IPI!\n" ); - return +return ; }__apic_accept_irq (vcpu, vector); }
@@ -1919,6 +1919,7 @@ int kvm_apic_compare_prio(struct kvm_vcpu *vcpu1, struct kvm_vcpu *vcpu2)int kvm_apic_match_dest (struct kvm_vcpu *vcpu,struct kvm_lapic *source,int short_hand,int dest,int dest_mode) { +struct kvm_lapic *target = vcpu->arch.apic;return (dest_mode ==0 ) ?kvm_apic_match_physical_addr (target, dest) :kvm_apic_match_logical_addr (target, dest);
arch/ia64/kvm/lapic.h +1 -1
@@ -23,7 +23,7 @@ int kvm_apic_match_logical_addr(struct kvm_lapic *apic, u8 mda);int kvm_apic_match_dest (struct kvm_vcpu *vcpu,struct kvm_lapic *source,int short_hand,int dest,int dest_mode);int kvm_apic_compare_prio (struct kvm_vcpu *vcpu1,struct kvm_vcpu *vcpu2); -bool kvm_apic_present (struct kvm_vcpu *vcpu);int kvm_apic_set_irq (struct kvm_vcpu *vcpu,struct kvm_lapic_irq *irq); +#define kvm_apic_present (x) (true)#endif
arch/x86/kvm/lapic.h +0 -1
@@ -38,7 +38,6 @@ void kvm_set_apic_base(struct kvm_vcpu *vcpu, u64 data);void kvm_apic_post_state_restore (struct kvm_vcpu *vcpu);int kvm_lapic_enabled (struct kvm_vcpu *vcpu);bool kvm_apic_present (struct kvm_vcpu *vcpu); -bool kvm_lapic_present (struct kvm_vcpu *vcpu);int kvm_lapic_find_highest_irr (struct kvm_vcpu *vcpu);void kvm_lapic_set_vapic_addr (struct kvm_vcpu *vcpu,gpa_t vapic_addr);
virt/kvm/irq_comm.c +15 -2
@@ -22,6 +22,9 @@#include <linux/kvm_host.h> #include <asm/msidef.h> +#ifdef CONFIG_IA64 +#include <asm/iosapic.h> +#endif #include "irq.h"
@@ -43,6 +46,16 @@ static int kvm_set_ioapic_irq(struct kvm_kernel_irq_routing_entry *e,return kvm_ioapic_set_irq (kvm->arch.vioapic, e->irqchip.pin, level); } +inline static bool kvm_is_dm_lowest_prio (struct kvm_lapic_irq *irq) +{ +#ifdef CONFIG_IA64 +return irq->delivery_mode == + (IOSAPIC_LOWEST_PRIORITY <<IOSAPIC_DELIVERY_SHIFT ); +#else +return irq->delivery_mode ==APIC_DM_LOWEST ; +#endif +} +int kvm_irq_delivery_to_apic (struct kvm *kvm,struct kvm_lapic *src,struct kvm_lapic_irq *irq) {
@@ -50,7 +63,7 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src,struct kvm_vcpu *vcpu, *lowest =NULL ;if (irq->dest_mode ==0 && irq->dest_id ==0xff && - irq->delivery_mode ==APIC_DM_LOWEST ) +kvm_is_dm_lowest_prio (irq))printk (KERN_INFO "kvm: apic: phys broadcast and lowest prio\n" );for (i =0 ; i <KVM_MAX_VCPUS ; i++) {
@@ -63,7 +76,7 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src, irq->dest_id, irq->dest_mode))continue ; -if (irq->delivery_mode !=APIC_DM_LOWEST ) { +if (!kvm_is_dm_lowest_prio (irq)) {if (r <0 ) r =0 ; r +=kvm_apic_set_irq (vcpu, irq);
--
Gleb.
Hi, Avi
Please help to pick this patch which fixing ia64 build and queue it for kvm-85. Thanks!
Acked-by Xiantao Zhang <[email protected]>
Xiantao
Quoted 99 lines · Gleb Natapov
Signed-off-by Gleb Natapov <[email protected]>arch/ia64/kvm/kvm-ia64.c +2
-1@@ -327,7 +327,7 @@ static void vcpu_deliver_ipi(struct kvm_vcpu *vcpu, uint64_t dm, case SAPIC_PMI:default :printk (KERN_ERR "kvm: Unimplemented Deliver reserved IPI!\n" ); - return +return ; }__apic_accept_irq (vcpu, vector); }@@ -1919,6 +1919,7 @@ int kvm_apic_compare_prio(struct kvm_vcpu *vcpu1, struct kvm_vcpu *vcpu2) int kvm_apic_match_dest(structkvm_vcpu *vcpu,struct kvm_lapic *source,int short_hand,int dest,int dest_mode) { +struct kvm_lapic *target = vcpu->arch.apic;return (dest_mode ==0 ) ?kvm_apic_match_physical_addr (target, dest) :kvm_apic_match_logical_addr (target, dest);arch/ia64/kvm/lapic.h +0
-0@@ -23,7 +23,7 @@ int kvm_apic_match_logical_addr(struct kvm_lapic *apic, u8 mda); int kvm_apic_match_dest(struct kvm_vcpu *vcpu,struct kvm_lapic *source,int short_hand,int dest,int dest_mode);int kvm_apic_compare_prio (struct kvm_vcpu *vcpu1,struct kvm_vcpu *vcpu2); -bool kvm_apic_present(struct kvm_vcpu *vcpu);int kvm_apic_set_irq (struct kvm_vcpu *vcpu,struct kvm_lapic_irq *irq); +#define kvm_apic_present(x) (true)#endif
arch/x86/kvm/lapic.h +0
-1@@ -38,7 +38,6 @@ void kvm_set_apic_base(struct kvm_vcpu *vcpu, u64 data); void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu);int kvm_lapic_enabled (struct kvm_vcpu *vcpu);bool kvm_apic_present (struct kvm_vcpu *vcpu); -bool kvm_lapic_present (struct kvm_vcpu *vcpu);int kvm_lapic_find_highest_irr (struct kvm_vcpu *vcpu); void kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t
vapic_addr);virt/kvm/irq_comm.c +15
-3@@ -22,6 +22,9 @@#include <linux/kvm_host.h> #include <asm/msidef.h> +#ifdef CONFIG_IA64 +#include <asm/iosapic.h> +#endif #include "irq.h" @@ -43,6 +46,16 @@ static int kvm_set_ioapic_irq(struct kvm_kernel_irq_routing_entry *e, return kvm_ioapic_set_irq(kvm->arch.vioapic, e->irqchip.pin, level); } +inline static bool kvm_is_dm_lowest_prio (struct kvm_lapic_irq *irq) +{ +#ifdef CONFIG_IA64 +return irq->delivery_mode == + (IOSAPIC_LOWEST_PRIORITY <<IOSAPIC_DELIVERY_SHIFT ); +#else +return irq->delivery_mode ==APIC_DM_LOWEST ; +#endif +} +int kvm_irq_delivery_to_apic (struct kvm *kvm,struct kvm_lapic *src,struct kvm_lapic_irq *irq) {@@ -50,7 +63,7 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src, struct kvm_vcpu *vcpu, *lowest = NULL;if (irq->dest_mode ==0 && irq->dest_id ==0xff && - irq->delivery_mode ==APIC_DM_LOWEST ) +kvm_is_dm_lowest_prio (irq))printk (KERN_INFO "kvm: apic: phys broadcast and lowest prio\n" );for (i =0 ; i <KVM_MAX_VCPUS ; i++) {@@ -63,7 +76,7 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src, irq->dest_id, irq->dest_mode)) continue; -if (irq->delivery_mode !=APIC_DM_LOWEST ) { +if (!kvm_is_dm_lowest_prio (irq)) {if (r <0 ) r =0 ; r +=kvm_apic_set_irq (vcpu, irq); --Gleb.
Avi Kivity
AppliedQuoted 2 lines · Gleb Natapov
Signed-off-by Gleb Natapov <[email protected]>
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function