Movatterモバイル変換


[0]ホーム

URL:


PDF, PPTX8,285 views

Introduction of AMD Virtual Interrupt Controller

The document introduces AMD's Advanced Virtual Interrupt Controller (AVIC), a hardware enhancement for efficient virtualization of APIC functionality in AMD's SVM architecture. AVIC allows guest operating systems to access APIC registers directly, improving performance by reducing the overhead associated with interrupt delivery and scheduling. Key components include the virtual APIC, physical and logical ID tables, and a doorbell mechanism for delivering interrupts to specific physical cores.

Embed presentation

Download as PDF, PPTX
Introduction of AMDAdvanced Virtual InterruptControllerXenSummit 2012Wei HuangAugust 2012
What is AVIC?  AVIC is Advanced Virtual Interrupt Controller  A virtual APIC to guest OSs with hardware acceleration  Enhancement to the AMD SVM architecture  Changes to CPU, NorthBridge, and IOMMU2 | Introduction of AMD AVIC | Xen Summit | August, 2012
Agenda  Motivation for AVIC  AVIC Architecture   – APIC backing page   – Physical & logical APIC ID tables   – Door bell & IOMMU extension  Hypervisor Design for AVIC  Summary3 | Introduction of AMD AVIC | Xen Summit | August, 2012
Agenda  Motivation for AVIC  AVIC Architecture   – APIC backing page   – Physical & logical APIC ID tables   – Door bell & IOMMU extension  Hypervisor Design for AVIC  Summary4 | Introduction of AMD AVIC | Xen Summit | August, 2012
Local APIC in x86  Local APIC (LAPIC) is vital for x86 SMP system  Handles various interrupt sources:   – Inter-processor interrupts (IPIs)   – I/O devices   – APIC timer-generated interrupts   – Internal events                   CPU 1                               CPU 2                 CPU 3                          CPU 4                 Local APIC                          Local APIC            Local APIC                      Local APIC          Interrupt                           Interrupt               Interrupt                       Interrupt                             IPIs                           IPIs                  IPIs                            IPIs          messages                            messages                messages                        messages                                           Interrupt messages                                                                                          External                                                                I/O APIC                 interrupts5 | Introduction of AMD AVIC | Xen Summit | August, 2012
Many LAPIC Registers…            *AMD APM Vol 26 | Introduction of AMD AVIC | Xen Summit | August, 2012
LAPIC + Virtualization = Slow1. APIC register reads/writes                                                2. Inter-processor Interrupts                              Guest OS                                                              Guest OS                   vCPU                                                                                           vCPU       X        vCPU                               X APIC Reg Rd/Wrt                                                      IPI                          Hypervisor                                                              Hypervisor3. I/O interrupts from peripherals (e.g., pass-through device)                                                                     Guest OS                                                                                  device                                                            vCPU                   mem                                                           Hypervisor                                                                                 IOMMU                                                                                      DMA                                                                                 I/O                                                             dev interrupt                                                                                Device7 | Introduction of AMD AVIC | Xen Summit | August, 2012
Attacking Problems with AVIC  We define new architectural components to present a virtualized APIC to  guests, thus allowing most APIC accesses and interrupt delivery into the  guests directly.  AVIC components:                        Component                                         Problem Solved      vAPIC                                                Direct access to APIC registers      Physical & logical APIC ID tables                    Mapping of physical & virtual cores (scheduling)      Doorbell interrupt                                   Interrupt delivery      IOMMU extension                                      I/O interrupt delivery8 | Introduction of AMD AVIC | Xen Summit | August, 2012
Agenda  Motivation for AVIC  AVIC Architecture   – APIC backing page   – Physical & logical APIC ID tables   – Doorbell & IOMMU extension  Hypervisor Design for AVIC  Summary9 | Introduction of AMD AVIC | Xen Summit | August, 2012
vAPIC   vAPIC is a virtual APIC to the guest    – Backed by a 4KB memory page    – Allocated and initialized by hypervisor    – vAPIC pages are allocated on a per-vCPU basis    – Contains storage for guest APIC values for the vCPU    – Mapped into the guest physical address space                                                            APIC Backing Page                                                              ICR                                                                                guest memory                                                               ICR                                                                ICR                                                              IRR                                                               IRR                                                                IRR                                                              ISR                                                               ISR                                                                ISR                   guest APIC                                                                                      ICR                                                              TPR                      ICR                                                               TPR                      ICR                                                                TPR                                                                                      IRR                                                              EOI                      IRR                                                               EOI                      IRR                                                                EOI                                     BACKING_PAGE ptr                                 ISR                                      myAPIC                                           ISR                                       myAPIC                                           ISR                                     Physical APIC Table                                      Physical APIC Table                                                                                      TPR                                     Logical APIC Table                                TPR                                      Logical APIC Table                                TPR                                     V_APIC_BAR                                       EOI                                                                                       EOI                                                                      =                 EOI                                          VMCB10 | Introduction of AMD AVIC | Xen Summit | August, 2012
Handling Guest APIC Accesses   Four types of actions for guest APIC accesses:              Action                         VMEXIT?                             Details     ALLOWED                           NO                     The field will be updated (for Write) or read                                                              (for Read).     ACCLERATED                        NO                     The field will be updated and CPU will take                                                              further actions, such as sending IPI to CPUs.     TRAP                              YES                    The field will be updated and CPU will take                                                              VMEXIT immediately after access.     FAULT                             YES                    The field will NOT be updated and CPU will                                                              take VMEXIT immediately before the access.   Example              Offset                APIC Register Name                Read                   Write            200-270h       Interrupt Request Register (IRR)    ALLOWED            FAULT            300h           Interrupt Command Register Low (ICR) ALLOWED           ACCLERATED or TRAP11 | Introduction of AMD AVIC | Xen Summit | August, 2012
Regarding APIC Acceleration…   Three performance-critical areas are accelerated    – TPR reads and writes    – EOI writes    – ICRL writes12 | Introduction of AMD AVIC | Xen Summit | August, 2012
Agenda   Motivation for AVIC   AVIC Architecture    – APIC backing page    – Physical & logical APIC ID tables    – Door bell & IOMMU extension   Hypervisor Design for AVIC   Summary13 | Introduction of AMD AVIC | Xen Summit | August, 2012
How About vCPU Scheduling?   Hypervisor schedules guest VM’s VCPUs on-the-fly    – VCPUs can be ON or OFF    – VCPUs can be migrated   AVIC uses physical and logical APIC ID tables to show VCPU’s   mapping relationship with physical cores14 | Introduction of AMD AVIC | Xen Summit | August, 2012
Physical APIC ID Table   Purpose:   Used by the hardware to route the virtual interrupt messages to the proper   physical core                                          vAPIC Backing Page                                                                                  Guest CPU 4                                                            Physical APIC Table                                                                Guest APIC ID 5                                                                    entry               VMCB                                             Guest APIC ID 4                                                                    entry                                                                Guest APIC ID 3    Doorbell Destination ID                                                                    entry               AVIC_PHYSICAL_TABLE                       ptr15 | Introduction of AMD AVIC | Xen Summit | August, 2012
Logical APIC ID Table   Purpose:    – Maps guest logical APIC IDs to guest physical APIC IDs    – Used to route logically addressed IPIs within a guest VM                           vAPIC Backing Page                                                                                            Guest CPU 0                                                                  Physical APIC Table                                         Logical APIC Table                                                                      Guest APIC ID 2                                                                          entry                                                Guest logical 7       Guest APIC ID 1VMCB                                            to physical ID            entry                                                Guest logical 6       Guest APIC ID 0                                                 to physical 0            entry                                                Guest logical 5                         Doorbell Destination ID                                                to physical IDAVIC_PHYSICAL_TABLE        ptr16 | Introduction of AMD AVIC | Xen Summit | August, 2012
Agenda   Motivation for AVIC   AVIC Architecture    – APIC backing page    – Physical & logical APIC ID tables    – Doorbell & IOMMU extension   Hypervisor Design for AVIC   Summary17 | Introduction of AMD AVIC | Xen Summit | August, 2012
Doorbell   A new interrupt mechanism that is used to deliver guest interrupts to a   specific physical core   Doorbell interrupts are sent in three ways:       Doorbell Source                                                    Reason   AVIC hardware                               In response to a guest ICRL write for a supported IPI type   IOMMU                                       An incoming I/O interrupt is remapped to an AVIC mode guest   System software                             Writing to the doorbell interrupt MSR18 | Introduction of AMD AVIC | Xen Summit | August, 2012
IOMMU Extension   The AVIC architecture leverages the existing IOMMU interrupt redirection   mechanism to provide a new guest-delivered interrupt type   A new field in the IOMMU device table specifies whether AVIC is available   IOMMU uses doorbell mechanism to delivery interrupts into guest VMs19 | Introduction of AMD AVIC | Xen Summit | August, 2012
Agenda   Motivation for AVIC   AVIC Architecture    – APIC backing page    – Physical & logical APIC ID tables    – Door bell & IOMMU extension   Hypervisor Design for AVIC   Summary20 | Introduction of AMD AVIC | Xen Summit | August, 2012
How to Design a Hypervisor for AVIC?   At guest start-up:    – Allocate and initialize one vAPIC page for each vCPU    – Allocate one physical APIC table and logical APIC table for the guest    – Set up VMCB pointers for these structures and enable AVIC mode in      VMCB    – Set up IOMMU tables for direct-assigned I/O devices   While running:    – Handle un-accelerated cases similar to current approach    – Update physical APIC table and IOMMU IRTE entries to change      running status whenever a vCPU is moved to or from a physical CPU21 | Introduction of AMD AVIC | Xen Summit | August, 2012
Setting up AVIC TablesvAPIC backing pages and physical/logical ID tables are allocated in hostphysical memoryRelated VMCB fields:                 VMCB Field                                                       Details        V_APIC_BAR                                   Guest physical base address of the virtual APIC.        AVIC_BACKING_PAGE                            Host physical address of the APIC backing page for the associated                                                     VM.        AVIC_LOGICAL_PAGE                            Host physical address of the logical APIC look-up table for the                                                     associated VM.        AVIC_PHYSICAL_PAGE                           Host physical address for the physical APIC look-up table for the                                                     associated VM.22 | Introduction of AMD AVIC | Xen Summit | August, 2012
Handle New VMEXITs   VMEXIT 401h    – For incomplete IPI Delivery    – This VMEXIT describes the specific reason for the IPI delivery failure   VMEXIT 402h    – For ccess to un-accelerated vAPIC field    – This VMEXIT indicates the offset of the un-accelerated vAPIC register,      as well as whether a read or write operation was attempted23 | Introduction of AMD AVIC | Xen Summit | August, 2012
Summary   AVIC is an hardware extension to AMD SVM for APIC acceleration   AVIC targets critical APIC operations for optimal performance    – APIC read/write accesses    – Interrupt delivery   The design of AVIC is simple for fast hypervisor integration   We expect AVIC to eliminate lots of overhead introduced by virtual local   APIC24 | Introduction of AMD AVIC | Xen Summit | August, 2012
Questions?25 | Introduction of AMD AVIC | Xen Summit | August, 2012
Trademark AttributionAMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc. in the United Statesand/or other jurisdictions. Other names used in this presentation are for identification purposes only and may be trademarks oftheir respective owners.©2012 Advanced Micro Devices, Inc. All rights reserved.26 | Introduction of AMD AVIC | Xen Summit | August, 2012

Recommended

PDF
Physical Memory Management.pdf
PDF
Hands-on ethernet driver
PDF
Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven Rostedt
PPTX
The TCP/IP Stack in the Linux Kernel
PDF
Faster packet processing in Linux: XDP
PPTX
Linux Network Stack
PDF
Fun with Network Interfaces
PDF
Analysis of Open-Source Drivers for IEEE 802.11 WLANs
PPTX
Understanding eBPF in a Hurry!
PDF
Windows 10 Nt Heap Exploitation (Chinese version)
PDF
Introduction to eBPF and XDP
PDF
Memory Mapping Implementation (mmap) in Linux Kernel
PDF
BPF - in-kernel virtual machine
PDF
LCA13: Power State Coordination Interface
 
PDF
Arm device tree and linux device drivers
PPTX
Dataplane programming with eBPF: architecture and tools
PDF
Introduction to Linux Drivers
PDF
Build a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
PDF
Ixgbe internals
PDF
VLANs in the Linux Kernel
PPTX
Linux Initialization Process (2)
PDF
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
PDF
Boosting I/O Performance with KVM io_uring
PPTX
Berkeley Packet Filters
PDF
eBPF - Rethinking the Linux Kernel
PDF
ACPI Debugging from Linux Kernel
PDF
Page cache in Linux kernel
PPTX
Linux Kernel Module - For NLKB
KEY
Hardware supports for Virtualization
PPT
Segment tree

More Related Content

PDF
Physical Memory Management.pdf
PDF
Hands-on ethernet driver
PDF
Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven Rostedt
PPTX
The TCP/IP Stack in the Linux Kernel
PDF
Faster packet processing in Linux: XDP
PPTX
Linux Network Stack
PDF
Fun with Network Interfaces
PDF
Analysis of Open-Source Drivers for IEEE 802.11 WLANs
Physical Memory Management.pdf
Hands-on ethernet driver
Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven Rostedt
The TCP/IP Stack in the Linux Kernel
Faster packet processing in Linux: XDP
Linux Network Stack
Fun with Network Interfaces
Analysis of Open-Source Drivers for IEEE 802.11 WLANs

What's hot

PPTX
Understanding eBPF in a Hurry!
PDF
Windows 10 Nt Heap Exploitation (Chinese version)
PDF
Introduction to eBPF and XDP
PDF
Memory Mapping Implementation (mmap) in Linux Kernel
PDF
BPF - in-kernel virtual machine
PDF
LCA13: Power State Coordination Interface
 
PDF
Arm device tree and linux device drivers
PPTX
Dataplane programming with eBPF: architecture and tools
PDF
Introduction to Linux Drivers
PDF
Build a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
PDF
Ixgbe internals
PDF
VLANs in the Linux Kernel
PPTX
Linux Initialization Process (2)
PDF
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
PDF
Boosting I/O Performance with KVM io_uring
PPTX
Berkeley Packet Filters
PDF
eBPF - Rethinking the Linux Kernel
PDF
ACPI Debugging from Linux Kernel
PDF
Page cache in Linux kernel
PPTX
Linux Kernel Module - For NLKB
Understanding eBPF in a Hurry!
Windows 10 Nt Heap Exploitation (Chinese version)
Introduction to eBPF and XDP
Memory Mapping Implementation (mmap) in Linux Kernel
BPF - in-kernel virtual machine
LCA13: Power State Coordination Interface
 
Arm device tree and linux device drivers
Dataplane programming with eBPF: architecture and tools
Introduction to Linux Drivers
Build a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
Ixgbe internals
VLANs in the Linux Kernel
Linux Initialization Process (2)
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Boosting I/O Performance with KVM io_uring
Berkeley Packet Filters
eBPF - Rethinking the Linux Kernel
ACPI Debugging from Linux Kernel
Page cache in Linux kernel
Linux Kernel Module - For NLKB

Viewers also liked

KEY
Hardware supports for Virtualization
PPT
Segment tree
PPTX
Segment tree
PPTX
Hardware support for efficient virtualization
PDF
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PDF
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
byAMD
 
Hardware supports for Virtualization
Segment tree
Segment tree
Hardware support for efficient virtualization
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
byAMD
 

Similar to Introduction of AMD Virtual Interrupt Controller

PDF
XS Boston 2008 SR-IOV
PDF
Benefits of Using FPGAs for Embedded Processing: Embedded World 2010
PDF
Intel update
PDF
Hardware assisted Virtualization in Embedded
PDF
A series presentation
PPTX
Meeting SEP 2.0 Compliance: Developing Power Aware Embedded Systems for the M...
PDF
Xen summit spring2010_tom_woller_amd
PPTX
Hyper V R2 Deep Dive
PDF
virtualization tutorial at ACM bangalore Compute 2009
PDF
ACPI and FreeBSD (Part 1)
PDF
X86 hardware for packet processing
PDF
Porting Xen Paravirtualization to MIPS Architecture
PDF
I/O仮想化最前線〜ネットワークI/Oを中心に〜
PDF
VMware Performance for Gurus - A Tutorial
PDF
XS Boston 2008 VT-D PCI
PDF
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
PDF
Blackfin system services
PDF
Bobcat hotchips final 8 2 10
PDF
Linux Foundation Collaboration Summit 13 :10 years of Xen and Beyond
PDF
XS Japan 2008 Services English
XS Boston 2008 SR-IOV
Benefits of Using FPGAs for Embedded Processing: Embedded World 2010
Intel update
Hardware assisted Virtualization in Embedded
A series presentation
Meeting SEP 2.0 Compliance: Developing Power Aware Embedded Systems for the M...
Xen summit spring2010_tom_woller_amd
Hyper V R2 Deep Dive
virtualization tutorial at ACM bangalore Compute 2009
ACPI and FreeBSD (Part 1)
X86 hardware for packet processing
Porting Xen Paravirtualization to MIPS Architecture
I/O仮想化最前線〜ネットワークI/Oを中心に〜
VMware Performance for Gurus - A Tutorial
XS Boston 2008 VT-D PCI
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Blackfin system services
Bobcat hotchips final 8 2 10
Linux Foundation Collaboration Summit 13 :10 years of Xen and Beyond
XS Japan 2008 Services English

More from The Linux Foundation

PDF
ELC2019: Static Partitioning Made Simple
PDF
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
PDF
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
PDF
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
PDF
XPDDS19 Keynote: Unikraft Weather Report
PDF
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
PDF
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
PDF
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
PDF
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
PPTX
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
PPTX
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
PDF
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
PDF
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
PDF
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
PDF
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
PDF
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
PDF
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
PDF
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
PDF
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
PDF
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
ELC2019: Static Partitioning Made Simple
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Unikraft Weather Report
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE

Recently uploaded

PPTX
Support, Monitoring, Continuous Improvement & Scaling Agentic Automation [3/3]
PPTX
Guardrails in Action - Ensuring Safe AI with Azure AI Content Safety.pptx
PDF
MuleSoft Meetup: Dreamforce'25 Tour- Vibing With AI & Agents.pdf
PDF
Transcript: The partnership effect: Libraries and publishers on collaborating...
PDF
[BDD 2025 - Mobile Development] Crafting Immersive UI with E2E and AGSL Shade...
PDF
Running Non-Cloud-Native Databases in Cloud-Native Environments_ Challenges a...
PDF
The partnership effect: Libraries and publishers on collaborating and thrivin...
PDF
Mastering UiPath Maestro – Session 2 – Building a Live Use Case - Session 2
PDF
KMWorld - KM & AI Bring Collectivity, Nostalgia, & Selectivity
PDF
Supervised Machine Learning Approaches for Log-Based Anomaly Detection: A Cas...
PPTX
Leon Brands - Intro to GPU Occlusion (Graphics Programming Conference 2024)
PPTX
How to Choose the Right Vendor for ADA PDF Accessibility and Compliance in 2026
PDF
Dev Dives: Build smarter agents with UiPath Agent Builder
PDF
So You Want to Work at Google | DevFest Seattle 2025
PDF
DUBAI IT MODERNIZATION WITH AZURE MANAGED SERVICES.pdf
PPTX
The power of Slack and MuleSoft | Bangalore MuleSoft Meetup #60
PDF
Lets Build a Serverless Function with Kiro
PDF
[BDD 2025 - Mobile Development] Exploring Apple’s On-Device FoundationModels
PDF
[BDD 2025 - Full-Stack Development] PHP in AI Age: The Laravel Way. (Rizqy Hi...
PDF
Top 10 AI Development Companies in UK 2025
Support, Monitoring, Continuous Improvement & Scaling Agentic Automation [3/3]
Guardrails in Action - Ensuring Safe AI with Azure AI Content Safety.pptx
MuleSoft Meetup: Dreamforce'25 Tour- Vibing With AI & Agents.pdf
Transcript: The partnership effect: Libraries and publishers on collaborating...
[BDD 2025 - Mobile Development] Crafting Immersive UI with E2E and AGSL Shade...
Running Non-Cloud-Native Databases in Cloud-Native Environments_ Challenges a...
The partnership effect: Libraries and publishers on collaborating and thrivin...
Mastering UiPath Maestro – Session 2 – Building a Live Use Case - Session 2
KMWorld - KM & AI Bring Collectivity, Nostalgia, & Selectivity
Supervised Machine Learning Approaches for Log-Based Anomaly Detection: A Cas...
Leon Brands - Intro to GPU Occlusion (Graphics Programming Conference 2024)
How to Choose the Right Vendor for ADA PDF Accessibility and Compliance in 2026
Dev Dives: Build smarter agents with UiPath Agent Builder
So You Want to Work at Google | DevFest Seattle 2025
DUBAI IT MODERNIZATION WITH AZURE MANAGED SERVICES.pdf
The power of Slack and MuleSoft | Bangalore MuleSoft Meetup #60
Lets Build a Serverless Function with Kiro
[BDD 2025 - Mobile Development] Exploring Apple’s On-Device FoundationModels
[BDD 2025 - Full-Stack Development] PHP in AI Age: The Laravel Way. (Rizqy Hi...
Top 10 AI Development Companies in UK 2025
In this document
Powered by AI

Introduction of Advanced Virtual Interrupt Controller (AVIC) at XenSummit 2012 by Wei Huang.

Definition of AVIC as a virtual APIC with hardware acceleration, enhancing AMD SVM architecture.

Overview of the presentation agenda including motivation, architecture, hypervisor design, and summary.

Local APIC's role in managing interrupts within x86 SMP systems, including types of interrupt sources.

Details on various individual LAPIC registers influencing system operations.

Challenges of LAPIC performance in virtual environments, detailing issues with APIC accesses and interrupts.

AVIC's architectural components that provide direct APIC access, enhance mapping, and improve interrupt delivery.

Details on vAPIC and its backing page with memory allocations for context in a virtual environment.

Four access actions for guest APIC, defining behaviors and performance implications in virtualization.

Critical areas of performance acceleration targeting TPR, EOI, and ICRL writes.

The hypervisor’s management of VCPUs utilizing the physical and logical APIC ID tables for scheduling.

Functionality of the physical APIC ID table in routing virtual interrupts to appropriate physical cores.

Mapping between guest logical to physical APIC IDs for proper interrupt routing.

Doorbell as a mechanism for sending guest interrupts and IOMMU's role in AVIC architecture.

Key design elements for hypervisors implementing AVIC, focusing on initialization and running processes.

Allocation of necessary AVIC tables in physical memory for guest VM management.

New VMEXITs for handling specific scenarios in AVIC context, focusing on IPI delivery failures.

Summary emphasizing AVIC as a hardware extension for APIC acceleration targeting key performance improvements.

Open floor for questions regarding the AVIC presentation.

Trademark attribution for AMD and related entities, disclaimer regarding names used.

Introduction of AMD Virtual Interrupt Controller

  • 1.
    Introduction of AMDAdvancedVirtual InterruptControllerXenSummit 2012Wei HuangAugust 2012
  • 2.
    What is AVIC? AVIC is Advanced Virtual Interrupt Controller A virtual APIC to guest OSs with hardware acceleration Enhancement to the AMD SVM architecture Changes to CPU, NorthBridge, and IOMMU2 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 3.
    Agenda Motivationfor AVIC AVIC Architecture – APIC backing page – Physical & logical APIC ID tables – Door bell & IOMMU extension Hypervisor Design for AVIC Summary3 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 4.
    Agenda Motivationfor AVIC AVIC Architecture – APIC backing page – Physical & logical APIC ID tables – Door bell & IOMMU extension Hypervisor Design for AVIC Summary4 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 5.
    Local APIC inx86 Local APIC (LAPIC) is vital for x86 SMP system Handles various interrupt sources: – Inter-processor interrupts (IPIs) – I/O devices – APIC timer-generated interrupts – Internal events CPU 1 CPU 2 CPU 3 CPU 4 Local APIC Local APIC Local APIC Local APIC Interrupt Interrupt Interrupt Interrupt IPIs IPIs IPIs IPIs messages messages messages messages Interrupt messages External I/O APIC interrupts5 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 6.
    Many LAPIC Registers… *AMD APM Vol 26 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 7.
    LAPIC + Virtualization= Slow1. APIC register reads/writes 2. Inter-processor Interrupts Guest OS Guest OS vCPU vCPU X vCPU X APIC Reg Rd/Wrt IPI Hypervisor Hypervisor3. I/O interrupts from peripherals (e.g., pass-through device) Guest OS device vCPU mem Hypervisor IOMMU DMA I/O dev interrupt Device7 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 8.
    Attacking Problems withAVIC We define new architectural components to present a virtualized APIC to guests, thus allowing most APIC accesses and interrupt delivery into the guests directly. AVIC components: Component Problem Solved vAPIC Direct access to APIC registers Physical & logical APIC ID tables Mapping of physical & virtual cores (scheduling) Doorbell interrupt Interrupt delivery IOMMU extension I/O interrupt delivery8 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 9.
    Agenda Motivationfor AVIC AVIC Architecture – APIC backing page – Physical & logical APIC ID tables – Doorbell & IOMMU extension Hypervisor Design for AVIC Summary9 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 10.
    vAPICvAPIC is a virtual APIC to the guest – Backed by a 4KB memory page – Allocated and initialized by hypervisor – vAPIC pages are allocated on a per-vCPU basis – Contains storage for guest APIC values for the vCPU – Mapped into the guest physical address space APIC Backing Page ICR guest memory ICR ICR IRR IRR IRR ISR ISR ISR guest APIC ICR TPR ICR TPR ICR TPR IRR EOI IRR EOI IRR EOI BACKING_PAGE ptr ISR myAPIC ISR myAPIC ISR Physical APIC Table Physical APIC Table TPR Logical APIC Table TPR Logical APIC Table TPR V_APIC_BAR EOI EOI = EOI VMCB10 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 11.
    Handling Guest APICAccesses Four types of actions for guest APIC accesses: Action VMEXIT? Details ALLOWED NO The field will be updated (for Write) or read (for Read). ACCLERATED NO The field will be updated and CPU will take further actions, such as sending IPI to CPUs. TRAP YES The field will be updated and CPU will take VMEXIT immediately after access. FAULT YES The field will NOT be updated and CPU will take VMEXIT immediately before the access. Example Offset APIC Register Name Read Write 200-270h Interrupt Request Register (IRR) ALLOWED FAULT 300h Interrupt Command Register Low (ICR) ALLOWED ACCLERATED or TRAP11 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 12.
    Regarding APIC Acceleration… Three performance-critical areas are accelerated – TPR reads and writes – EOI writes – ICRL writes12 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 13.
    AgendaMotivation for AVIC AVIC Architecture – APIC backing page – Physical & logical APIC ID tables – Door bell & IOMMU extension Hypervisor Design for AVIC Summary13 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 14.
    How About vCPUScheduling? Hypervisor schedules guest VM’s VCPUs on-the-fly – VCPUs can be ON or OFF – VCPUs can be migrated AVIC uses physical and logical APIC ID tables to show VCPU’s mapping relationship with physical cores14 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 15.
    Physical APIC IDTable Purpose: Used by the hardware to route the virtual interrupt messages to the proper physical core vAPIC Backing Page Guest CPU 4 Physical APIC Table Guest APIC ID 5 entry VMCB Guest APIC ID 4 entry Guest APIC ID 3 Doorbell Destination ID entry AVIC_PHYSICAL_TABLE ptr15 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 16.
    Logical APIC IDTable Purpose: – Maps guest logical APIC IDs to guest physical APIC IDs – Used to route logically addressed IPIs within a guest VM vAPIC Backing Page Guest CPU 0 Physical APIC Table Logical APIC Table Guest APIC ID 2 entry Guest logical 7 Guest APIC ID 1VMCB to physical ID entry Guest logical 6 Guest APIC ID 0 to physical 0 entry Guest logical 5 Doorbell Destination ID to physical IDAVIC_PHYSICAL_TABLE ptr16 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 17.
    AgendaMotivation for AVIC AVIC Architecture – APIC backing page – Physical & logical APIC ID tables – Doorbell & IOMMU extension Hypervisor Design for AVIC Summary17 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 18.
    DoorbellA new interrupt mechanism that is used to deliver guest interrupts to a specific physical core Doorbell interrupts are sent in three ways: Doorbell Source Reason AVIC hardware In response to a guest ICRL write for a supported IPI type IOMMU An incoming I/O interrupt is remapped to an AVIC mode guest System software Writing to the doorbell interrupt MSR18 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 19.
    IOMMU Extension The AVIC architecture leverages the existing IOMMU interrupt redirection mechanism to provide a new guest-delivered interrupt type A new field in the IOMMU device table specifies whether AVIC is available IOMMU uses doorbell mechanism to delivery interrupts into guest VMs19 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 20.
    AgendaMotivation for AVIC AVIC Architecture – APIC backing page – Physical & logical APIC ID tables – Door bell & IOMMU extension Hypervisor Design for AVIC Summary20 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 21.
    How to Designa Hypervisor for AVIC? At guest start-up: – Allocate and initialize one vAPIC page for each vCPU – Allocate one physical APIC table and logical APIC table for the guest – Set up VMCB pointers for these structures and enable AVIC mode in VMCB – Set up IOMMU tables for direct-assigned I/O devices While running: – Handle un-accelerated cases similar to current approach – Update physical APIC table and IOMMU IRTE entries to change running status whenever a vCPU is moved to or from a physical CPU21 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 22.
    Setting up AVICTablesvAPIC backing pages and physical/logical ID tables are allocated in hostphysical memoryRelated VMCB fields: VMCB Field Details V_APIC_BAR Guest physical base address of the virtual APIC. AVIC_BACKING_PAGE Host physical address of the APIC backing page for the associated VM. AVIC_LOGICAL_PAGE Host physical address of the logical APIC look-up table for the associated VM. AVIC_PHYSICAL_PAGE Host physical address for the physical APIC look-up table for the associated VM.22 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 23.
    Handle New VMEXITs VMEXIT 401h – For incomplete IPI Delivery – This VMEXIT describes the specific reason for the IPI delivery failure VMEXIT 402h – For ccess to un-accelerated vAPIC field – This VMEXIT indicates the offset of the un-accelerated vAPIC register, as well as whether a read or write operation was attempted23 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 24.
    SummaryAVIC is an hardware extension to AMD SVM for APIC acceleration AVIC targets critical APIC operations for optimal performance – APIC read/write accesses – Interrupt delivery The design of AVIC is simple for fast hypervisor integration We expect AVIC to eliminate lots of overhead introduced by virtual local APIC24 | Introduction of AMD AVIC | Xen Summit | August, 2012
  • 25.
    Questions?25 | Introductionof AMD AVIC | Xen Summit | August, 2012
  • 26.
    Trademark AttributionAMD, theAMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc. in the United Statesand/or other jurisdictions. Other names used in this presentation are for identification purposes only and may be trademarks oftheir respective owners.©2012 Advanced Micro Devices, Inc. All rights reserved.26 | Introduction of AMD AVIC | Xen Summit | August, 2012

[8]ページ先頭

©2009-2025 Movatter.jp