Re: [PATCH 2/2] KVM: lapic: Fixup LDR on load in x2apic

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

 



On 20/11/2017 02:04, Liran Alon wrote:
>>
> First of all, I understand we agree that what I mentioned is indeed a
> bug in original commit?
> 
> Second, if I understood original commit purpose correctly, you want to
> make sure s->regs APIC_LDR value is correct and matches the s->regs
> APIC_ID value. Instead of trusting userspace providing these values
> synced correctly. Therefore, you should re-calc LDR regardless of if
> x2apic_format was used by userspace or not.
> 
> BTW, I would expect that if this is the intent, there should also be a
> commit which adds the "if (*id != vcpu->vcpu_id)" check to the case of
> the non-x2apic_format after value was shifted-right by 24.

I'm not sure you can do that for backwards-compatibility reasons.  I'm
applying your fixup, thanks.

Paolo



[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