Work is not much and basically it sum up into two parts:
Identify if the X2Apic is supported, if yes enable it
Update the write_apic_register/read_apic_register functions to check what type of apic is being used and use the correct instructions to access the register.
Work is not much and basically it sum up into two parts: