Great write-up on AMD’s RVI (Rapid Virtualization Indexing) hardware assisted virtualization feature

I came across an awesome Q&Q where Tim Mueting from AMD described the hardware virtualization features in AMD Opteron CPUs. The following excerpt from the interview was especially interesting:

“Prior to the introduction of RVI, software solutions used something called shadow paging to translate a virtual machine “guest” physical address to the system’s physical address. Because the original page table architecture wasn’t designed with virtualization in mind, a mirror of the page tables had to be created in software, called shadow page tables, to keep information about the physical location of “guest” memory. With shadow paging, the hypervisor must keep the shadow page tables “in sync” with the page tables in hardware. Every time the guest OS modifies its page mapping, the hypervisor must adjust the shadow page tables to reflect the modification. The constant updating of the shadow pages tables takes a lot of CPU cycles. As you might expect, for memory intensive applications, this process can make up the largest part of the performance overhead for virtualization.”

“With Rapid Virtualization indexing the virtual memory (Guest OS) to physical memory (Guest OS) and the physical memory (Guest OS) to real physical memory translations are cached in the TLB. As described earlier, we also added a new identifier to the TLB called an Address Space Identifier (ASID) which assigns each entry to a specific VM. With this tag, the TLB entries do not need to be flushed each time execution switches from one VM to another. This simplifies the work that the hypervisor needs to do and removes the need for the hypervisor to update shadow page tables. We can now rely on the hardware to determine the physical location of the guest memory.”

I just ordered a second AMD Opteron 1354 for my lab, and am looking to forward to testing out the VMWare fault tolerance feature once I receive my new CPU. Viva la virtualization!

Leave a Reply

Your email address will not be published. Required fields are marked *