Re: [PATCH] KVM: x86: Fix reserved x2apic registers

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

 



The commit message has a typo - it should be “DFR and ICR2”.
I didn’t post a new version in order not to confuse.

Nadav

Nadav Amit <namit@xxxxxxxxxxxxxxxxx> wrote:

> x2APIC has no registers for DFR and ICR (see Intel SDM 10.12.1.2 "x2APIC
> Register Address Space"). KVM needs to cause #GP on such accesses.
> 
> Fix it.
> 
> Signed-off-by: Nadav Amit <namit@xxxxxxxxxxxxxxxxx>
> ---
> arch/x86/kvm/lapic.c | 6 ++++++
> 1 file changed, 6 insertions(+)
> 
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index e0e5642..7611b75 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -1897,6 +1897,12 @@ int kvm_x2apic_msr_read(struct kvm_vcpu *vcpu, u32 msr, u64 *data)
> 	if (!irqchip_in_kernel(vcpu->kvm) || !apic_x2apic_mode(apic))
> 		return 1;
> 
> +	if (reg == APIC_DFR || reg == APIC_ICR2) {
> +		apic_debug("KVM_APIC_READ: read x2apic reserved register %x\n",
> +			   reg);
> +		return 1;
> +	}
> +
> 	if (apic_reg_read(apic, reg, 4, &low))
> 		return 1;
> 	if (msr == 0x830)
> -- 
> 1.9.1
> 
> --
> 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


--
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