Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350183
b: refs/heads/master
c: 70733e0
h: refs/heads/master
i:
  350181: 9582d11
  350179: 8ab3640
  350175: 0f5dcda
v: v3
  • Loading branch information
Joerg Roedel committed Jan 28, 2013
1 parent e894484 commit 228da32
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3b4a505821615b6c055536a0c23ea37c349bb6a9
refs/heads/master: 70733e0c7ed22177e2cfe660fa2a0e90f1f39126
8 changes: 4 additions & 4 deletions trunk/arch/x86/include/asm/kvm_para.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ static inline long kvm_hypercall4(unsigned int nr, unsigned long p1,
return ret;
}

static inline bool kvm_para_available(void)
static inline int kvm_para_available(void)
{
unsigned int eax, ebx, ecx, edx;
char signature[13];

if (boot_cpu_data.cpuid_level < 0)
return false; /* So we don't blow up on old processors */
return 0; /* So we don't blow up on old processors */

if (cpu_has_hypervisor) {
cpuid(KVM_CPUID_SIGNATURE, &eax, &ebx, &ecx, &edx);
Expand All @@ -101,10 +101,10 @@ static inline bool kvm_para_available(void)
signature[12] = 0;

if (strcmp(signature, "KVMKVMKVM") == 0)
return true;
return 1;
}

return false;
return 0;
}

static inline unsigned int kvm_arch_para_features(void)
Expand Down
9 changes: 3 additions & 6 deletions trunk/arch/x86/kernel/apic/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1477,8 +1477,7 @@ void __init bsp_end_local_APIC_setup(void)
* Now that local APIC setup is completed for BP, configure the fault
* handling for interrupt remapping.
*/
if (irq_remapping_enabled)
irq_remap_enable_fault_handling();
irq_remap_enable_fault_handling();

}

Expand Down Expand Up @@ -2251,8 +2250,7 @@ static int lapic_suspend(void)
local_irq_save(flags);
disable_local_APIC();

if (irq_remapping_enabled)
irq_remapping_disable();
irq_remapping_disable();

local_irq_restore(flags);
return 0;
Expand Down Expand Up @@ -2320,8 +2318,7 @@ static void lapic_resume(void)
apic_write(APIC_ESR, 0);
apic_read(APIC_ESR);

if (irq_remapping_enabled)
irq_remapping_reenable(x2apic_mode);
irq_remapping_reenable(x2apic_mode);

local_irq_restore(flags);
}
Expand Down
11 changes: 9 additions & 2 deletions trunk/drivers/iommu/irq_remapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,29 @@ int __init irq_remapping_enable(void)

void irq_remapping_disable(void)
{
if (!remap_ops || !remap_ops->disable)
if (!irq_remapping_enabled ||
!remap_ops ||
!remap_ops->disable)
return;

remap_ops->disable();
}

int irq_remapping_reenable(int mode)
{
if (!remap_ops || !remap_ops->reenable)
if (!irq_remapping_enabled ||
!remap_ops ||
!remap_ops->reenable)
return 0;

return remap_ops->reenable(mode);
}

int __init irq_remap_enable_fault_handling(void)
{
if (!irq_remapping_enabled)
return 0;

if (!remap_ops || !remap_ops->enable_faulting)
return -ENODEV;

Expand Down

0 comments on commit 228da32

Please sign in to comment.