mbox series

[v3,0/3] svm: avic: Allow AVIC support on system w/ physical APIC ID > 255

Message ID 20211213113110.12143-1-suravee.suthikulpanit@amd.com (mailing list archive)
Headers show
Series svm: avic: Allow AVIC support on system w/ physical APIC ID > 255 | expand

Message

Suthikulpanit, Suravee Dec. 13, 2021, 11:31 a.m. UTC
Originally, AMD SVM AVIC supports 8-bit host physical APIC ID.
However, newer AMD systems can have physical APIC ID larger than 255,
and AVIC hardware has been extended to support upto the maximum physical
APIC ID available in the system.

This series introduces a helper function in the APIC subsystem to get
the maximum physical APIC ID allowing the SVM AVIC driver to calculate
the number of bits to program the host physical APIC ID in the AVIC
physical APIC ID table entry.

Regards,
Suravee Suthikulpanit

Changes from V2 (https://www.spinics.net/lists/kvm/msg261351.html)

 * Use global variable npt_enabled instead (patch 1/3)

 * Use BIT_ULL() instead of BIT() since avic_host_physical_id_mask
   is 64-bit value (patch 3/3)

Suravee Suthikulpanit (3):
  KVM: SVM: Refactor AVIC hardware setup logic into helper function
  x86/apic: Add helper function to get maximum physical APIC ID
  KVM: SVM: Extend host physical APIC ID field to support more than
    8-bit

 arch/x86/include/asm/apic.h |  1 +
 arch/x86/kernel/apic/apic.c |  6 ++++++
 arch/x86/kvm/svm/avic.c     | 38 +++++++++++++++++++++++++++++--------
 arch/x86/kvm/svm/svm.c      |  8 +-------
 arch/x86/kvm/svm/svm.h      |  2 +-
 5 files changed, 39 insertions(+), 16 deletions(-)

Comments

Suthikulpanit, Suravee Dec. 20, 2021, 4:53 a.m. UTC | #1
Are there any other concerns with this series?

Regards,
Suravee

On 12/13/21 6:31 PM, Suravee Suthikulpanit wrote:
> Originally, AMD SVM AVIC supports 8-bit host physical APIC ID.
> However, newer AMD systems can have physical APIC ID larger than 255,
> and AVIC hardware has been extended to support upto the maximum physical
> APIC ID available in the system.
> 
> This series introduces a helper function in the APIC subsystem to get
> the maximum physical APIC ID allowing the SVM AVIC driver to calculate
> the number of bits to program the host physical APIC ID in the AVIC
> physical APIC ID table entry.
> 
> Regards,
> Suravee Suthikulpanit
> 
> Changes from V2 (https://www.spinics.net/lists/kvm/msg261351.html)
> 
>   * Use global variable npt_enabled instead (patch 1/3)
> 
>   * Use BIT_ULL() instead of BIT() since avic_host_physical_id_mask
>     is 64-bit value (patch 3/3)
> 
> Suravee Suthikulpanit (3):
>    KVM: SVM: Refactor AVIC hardware setup logic into helper function
>    x86/apic: Add helper function to get maximum physical APIC ID
>    KVM: SVM: Extend host physical APIC ID field to support more than
>      8-bit
> 
>   arch/x86/include/asm/apic.h |  1 +
>   arch/x86/kernel/apic/apic.c |  6 ++++++
>   arch/x86/kvm/svm/avic.c     | 38 +++++++++++++++++++++++++++++--------
>   arch/x86/kvm/svm/svm.c      |  8 +-------
>   arch/x86/kvm/svm/svm.h      |  2 +-
>   5 files changed, 39 insertions(+), 16 deletions(-)
>