Re: [PATCH] KVM: LAPIC: ARBPRI is a reserved register for x2APIC

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

 



On 05/07/19 14:37, Liran Alon wrote:
>> +	u64 rmask = 0x43ff01ffffffe70cULL;
> Why not rename this to “used_bits_mask” and calculate it properly by macros?
> It seems a lot nicer than having a pre-calculated magic.

Yes, I wanted to do the same but I didn't have time right now.  I am
planning to cleanup after the merge window, but if a patch comes soon I
can apply it instead of course. :)

Something like

#define APIC_VALID_REG_MASK(reg)	(1ull << ((reg) >> 4))
#define APIC_VALID_REGS_MASK(first, count) \
	(APIC_VALID_REG_MASK(first) * (1ull << ((count) - 1)))

followed by

	if (offset > 0x3f0 ||
	    !(valid_regs_mask & APIC_VALID_REG_MASK(offset))

Paolo

> -Liran
> 




[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