Recommended Free Tools
libvirt cannot set an arbitrary CPU cache capacity such as “8 MiB of L3” through its documented <cpu><cache> element. That element controls what cache information the guest sees: emulate supplies synthetic data, passthrough exposes host-reported data, and disable hides it. If you need to describe a virtual cache hierarchy, QEMU has separate smp-cache machine properties in applicable configurations, but support depends on the installed QEMU release, architecture, machine type, and CPU model.
First determine what “set CPU cache size” means
The error or unexpected result can represent several different goals. They are not interchangeable:
- Report the host cache: let the guest inspect cache information associated with the physical CPU.
- Present synthetic cache information: make the virtual CPU expose an emulated cache hierarchy.
- Hide cache information: prevent the guest from reporting cache levels.
- Allocate or partition real hardware cache: reserve a specified amount of host cache for a VM. The documented libvirt cache element does not establish this as a resource-control feature.
Only the first three are covered by libvirt’s documented cache element. The element has a mode and an optional level; it has no documented numeric size attribute. See the libvirt Domain XML reference.
What libvirt’s cache XML actually does
| Guest-facing goal | Configuration | What it means | Important limitation |
|---|---|---|---|
| Expose host cache information | mode='passthrough' |
Passes through cache data reported by the host CPU. | The result follows the host CPU and interacts with CPU-model and migration choices. |
| Provide synthetic cache information | mode='emulate' |
Supplies fake cache data to the guest. | It is not documented as a general control for choosing an arbitrary capacity in MiB. |
| Hide cache information | mode='disable' |
Suppresses cache reporting for the selected level, or for all levels when no level is supplied. | Hiding a report does not remove or resize the host’s physical cache. |
The optional level attribute selects the cache level described by the element. For example:
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
<cpu>
<cache level='3' mode='emulate'/>
</cpu>
Without level, the element describes all CPU cache levels at once. Elements that specify a level cannot be mixed with elements that omit it. If the cache element is absent, the hypervisor uses a sensible default, according to libvirt’s documentation.
Valid libvirt examples—and what they do not promise
Emulate cache information
<cpu>
<cache level='3' mode='emulate'/>
</cpu>
This asks libvirt/QEMU to present emulated information for level 3. It does not mean that the VM receives a physically reserved 3 MiB or any other specified amount.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Pass through host-reported cache data
<cpu mode='host-passthrough' migratable='off'>
<cache mode='passthrough'/>
</cpu>
This combination is appropriate only when exposing the host CPU is acceptable. Host passthrough can reduce live-migration portability because another host may not provide a compatible CPU model or cache description. QEMU’s CPU-model guidance recommends a compatible model across hosts when migration is required, and host passthrough when migration is not needed; verify the guidance for your installed release at QEMU CPU model configuration.
Disable cache reporting
<cpu>
<cache mode='disable'/>
</cpu>
With no level, this suppresses reporting for all cache levels covered by the element. It does not change the underlying hardware resources used by the VM.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Why a numeric cache-size attribute fails
XML such as <cache size='8192'/> is not a documented libvirt interface for assigning an L3 capacity. A failure may therefore be an XML schema rejection before QEMU starts. A different failure may occur later when QEMU rejects a property that the selected machine type or CPU model does not support. A guest can also boot successfully while reporting cache information different from what you expected.
Separate those cases by reading the complete error text:
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
- Validation error: the XML structure, attribute, nesting, or level combination is not accepted by libvirt.
- QEMU startup error: libvirt accepted the XML, but the generated QEMU command line or selected machine/CPU configuration is unsupported.
- Guest-observation problem: the VM starts, but its operating system reports a different cache topology or size.
QEMU’s separate cache-topology path
Current QEMU documentation describes smp-cache machine properties for supported configurations. These properties can describe cache types and hierarchy levels, including L1 data, L1 instruction, L2 unified, and L3 unified caches. This is a QEMU machine-option path, not a universal libvirt XML attribute for setting arbitrary cache capacity.
Check the documentation for the exact QEMU release installed on the host rather than assuming that the current master manual applies. Confirm the architecture, machine type, and CPU model as well. The relevant references are QEMU User Documentation and QEMU CPU model configuration. A property shown there may still be unavailable for a particular combination.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
A diagnostic procedure for a rejected or ineffective configuration
- Write down the intended result. Decide whether you want host data, synthetic topology, hidden data, or actual hardware-cache allocation. Do not troubleshoot these as one feature.
- Capture the full domain XML. Inspect both the running definition and the persistent definition, then check the
<cpu>nesting, CPU mode, cache mode, and everylevelattribute. For example, usevirsh dumpxml VMNAMEfor the active definition andvirsh dumpxml --inactive VMNAMEfor the persistent definition. - Check versions and platform details. Record
virsh version, the QEMU version, guest architecture, machine type, host CPU vendor/model, and selected CPU mode. Cache and CPU options are version- and configuration-dependent. - Inspect capabilities. Run
virsh domcapabilitiesfor the relevant emulator, architecture, and machine configuration. The resulting capabilities XML shows CPU modes and model information exposed by that libvirt/QEMU/host combination; see the libvirt domain capabilities reference. - Correct libvirt-level mistakes. Remove undocumented numeric size attributes, use one documented mode, and avoid mixing cache elements with and without
level. If no special guest presentation is required, removing the cache element lets the hypervisor choose its default. - Validate QEMU-specific topology support. If synthetic hierarchy is the goal, compare the exact installed QEMU manual with the selected architecture, machine type, and CPU model before adding
smp-cacheproperties. - Test migration separately. If live migration matters, compare CPU-model compatibility on every destination host. A host-passthrough setup that works locally can be unsuitable across heterogeneous hosts.
Choosing the right approach
| If you need… | Use or investigate… | Trade-off |
|---|---|---|
| The guest to see the physical host’s cache description | libvirt mode='passthrough' |
Couples the guest view to host CPU information and may complicate migration. |
| A guest-visible synthetic cache description | libvirt mode='emulate'; for a detailed hierarchy, applicable QEMU smp-cache properties |
Emulation/topology support is configuration- and version-dependent, and does not by itself reserve host cache. |
| No cache information exposed to the guest | libvirt mode='disable' |
The guest loses cache reporting; physical cache use is unchanged. |
| A fixed share of real host cache | Not provided by the documented libvirt cache element | Requires a separate hardware/host resource-partitioning facility, if the platform supports one; do not substitute cache-reporting XML. |
Bottom line for the common error
If your XML tries to assign a numeric cache size, replace that assumption with a choice between emulate, passthrough, and disable. Use QEMU’s smp-cache only after confirming local support, and treat it as cache-topology configuration rather than a guaranteed libvirt mechanism for allocating a specific number of megabytes. The exact error, complete XML, versions, architecture, machine type, and CPU mode are required to identify any remaining failure.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

