Re: [PATCH 1/3 v2] Add Directed EOI support to APIC emulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/28/2009 03:15 PM, Gleb Natapov wrote:
Directed EOI is specified by x2APIC, but is available even when lapic is
in xAPIC mode.

  #define APIC_LVT_NUM			6
  /* 14 is the version for Xeon and Pentium 8.4.8*/
-#define APIC_VERSION			(0x14UL | ((APIC_LVT_NUM - 1)<<  16))
+#define APIC_VERSION			(0x14UL | ((APIC_LVT_NUM - 1)<<  16) | \
+					 APIC_LVR_DIRECTED_EOI)

Better make that depend on the x2apic cpuid bit.

  static void apic_send_ipi(struct kvm_lapic *apic)
@@ -683,7 +686,7 @@ static void apic_mmio_write(struct kvm_io_device *this,
  		break;

  	case APIC_SPIV:
-		apic_set_reg(apic, APIC_SPIV, val&  0x3ff);
+		apic_set_reg(apic, APIC_SPIV, val&  0xfff);
  		if (!(val&  APIC_SPIV_APIC_ENABLED)) {
  			int i;
  			u32 lvt_val;

Confused, you're adding bits 10 and 11 while APIC_SPIV_DIRECTED_EOI is bit 12?

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux