Вход на сайт

Просмотр новости

Найдите то, что Вас интересует

"KVM Chainsaw" Expected To Hit Linux 7.3 For Dealing With God Data Structure

Дата публикации: 26-07-2026 15:32:26

A patch series that appears destined for the upcoming Linux 7.3 merge window is what's dubbed the "KVM Chainsaw" as a major code clean-up in dealing with the kvm_mmu "god data structure"...

Основное содержимое страницы с новостью.

VIRTUALIZATION

A patch series that appears destined for the upcoming Linux 7.3 merge window is what's dubbed the "KVM Chainsaw" as a major code clean-up in dealing with the kvm_mmu "god data structure".

Red Hat engineer and KVM maintainer Paolo Bonzini has merged the kvm-chainsaw branch to KVM's "next" Git branch. With this KVM Chainsaw work now in the next branch, it should be submitted for the upcoming Linux 7.3 cycle.

KVM chainsaw

The KVM Chainsaw work deals with the kvm_mmu structure being overloaded with multiple uses and splits it down into three parts for better handling current KVM usage. Paolo explains of KVM Chainsaw with the merge to the KVM.git next branch:

"The kvm_mmu is a "god data structure" that includes three different tasks: describing the guest page table's format, walking the guest page tables and building the page tables. This means that the (already poorly named) nested_mmu is only used in part, since it has no page tables to construct.

Furthermore, some parts are reused across guest and host page tables (such as the reserved bits detector) but others are not; for example permission_fault is replaced by simplified code such as is_executable_pte().

This series cleans this up by splitting kvm_mmu in three parts:

- kvm_pagewalk is the page table walker. There are two of them per vCPU, gva_walk and ngpa_walk. walk_mmu is *always* replaced by a single gva_walk no matter if running an L1 or L2 guest, unlike in the current code that moves it between root_mmu and nested_mmu.

- kvm_mmu retains the page table building functionality. It uses a page table walker to build shadow pages; that is always gva_walk for root_mmu or ngpa_walk for guest_mmu.

- kvm_page_format allows KVM to operate on PTEs that already exist, and merges the code around permission_mask() with the pre-existing struct rsvd_bits_validate. Both kvm_pagewalk and kvm_mmu have their own kvm_page_format, just like struct kvm_mmu had two instances of struct rsvd_bits_validate for gPTE and SPTE reserved bit checks.

The cleanup alone already does something useful, which is to reduce the confusion between guest_mmu and nested_mmu. nested_mmu came to exist long before the introduction of guest_mmu and stole the obvious name, resulting in comments like "Exempt nested MMUs" where the code actually exempts guest_mmu. Renaming guest_mmu could be the next step, though the RFC had multiple opinions about how to do this.

However, the last patch also shows the code reuse benefits can be used for new features too. By adapting the permission_fault() machinery and using it to test SPTEs against struct kvm_page_fault, it makes it possible to support SPTEs that have XS!=XU; these were not supported yet by KVM, but could now be added via memory attributes."

Look for this and a lot more with Linux 7.3, with the merge window opening up during the back half of August.

Схожие новости

#Наименование новостиТональностьИнформативностьДата публикации
1Imagination PowerVR Driver Marking BXM-4-64 MC1 GPU As Supported In Linux 7.3017.5524-07-2026
2Linux 7.3 To Make It Easier To Disable Syscall User Dispatch0708-07-2026
3Linux 7.2-rc5 Released: "Once More We Have Quite A Massive -rc5"010.8626-07-2026
4Linux 7.2-rc5 Fixing Longstanding Bug In IPv4 Networking Over Firewire010.3226-07-2026
5Linux 7.2 Fixes Where PCIe Devices Could Be Inadvertently Restricted To 2.5 GT/s0526-06-2026
6More AMD Zen 6 Prepping, Many ASUS / Lenovo / HP Laptop Improvements For Linux 7.20526-06-2026
7Linux Cache Aware Scheduling Extended For Even Better Performance: Up To 360% In MySQL7825-06-2026
8Linux 7.3 Enabling Second Graphics Pipe For Modern AMD APUs0510-07-2026
9AMD Linux Graphics Driver Working To Clear Out All Of Its BUG()s0507-07-2026
10Fedora 45 Looks To Begin Phasing Out In-Kernel Crypto Userspace API014.2424-07-2026

Классификация: . Схожих патентов: 0. Схожих новостей: 10. Тональность: 0. Информативность: 9.8. Источник: www.phoronix.com.