Skip to main content

Runtime properties and counters

Mirrored from the FEMU repository

This page is hw/femu/docs/reference/runtime-properties.md at FEMU 39a55eeb6 (2026-10-02), licensed GPL-2.0-or-later. Send corrections to the FEMU repository.

QOM properties that a running device exposes. Read and set them through QMP at /machine/peripheral/<id>, where <id> is the id= given on -device:

{"execute": "qom-get", "arguments": {"path": "/machine/peripheral/cxl-ssd0", "property": "read-hits"}}
{"execute": "qom-set", "arguments": {"path": "/machine/peripheral/cxl-ssd0", "property": "stats-reset", "value": true}}

or in the HMP monitor with qom-get and qom-set. Event counters are cleared by stats-reset; gauges and totals keep their value. Descriptions are the ones -device <type>,help prints.

femu: NVMe controller​

Power loss trigger​

PropertyTypeDescription
simulate-power-lossboolWrite-only: setting true on a realized controller with power_loss=on drops the write buffer and resets the controller as a power cut would

femu-cxl-ssd: CXL Type-3 SSD​

Cache tunables (also accepted on -device)​

PropertyTypeDescription
cache-waysuint32Entries per cache set, non-zero and dividing cache-pages (1 is direct mapped); default 16, and a qom-set at run time writes back and rebuilds the cache
prefetch-degreeuint32Up to this many pages inserted into the cache after each demand miss, at most the media page count, with no NAND read; default 0, changeable with qom-set
prefetch-strideuint32Distance in pages from a missed page to the first prefetched page, at most the media page count; default 1, changeable with qom-set

Actions and control​

PropertyTypeDescription
der-ratiouint64Run time only: direct-map this fraction of pages, one of 0, 50, 75, 90, 95, 97, 98, 99, 995 (99.5%), 999 (99.9%) or 100 percent; needs der other than off and no uncached ranges, and der=memslot refuses a ratio whose unmapped gaps outnumber the free aliases
control-commanduint64Run time only: writing runs that experiment control command with control-argument before qom-set returns; reading gives the last command
control-argumentuint64Argument for the next control-command write; reading gives the last argument used, which a Get LSA control command also sets
control-statusuint64Read-only result of the last control command: 0 success, 1 error, 2 a Get LSA command still queued
flush-cacheboolWrite-only: true revokes direct mappings, writes dirty pages back, drops unpinned pages and waits for the modelled media time
stats-resetboolWrite-only: true copies the counters to the last-* properties, then clears the event counters

Cache counters​

PropertyTypeDescription
cache-entriesuint64Read-only gauge: pages resident in the cache, pinned ones included
cache-hitsuint64Read-only event counter: MMIO page lookups that found a resident page
cache-missesuint64Read-only event counter: MMIO page lookups that missed, including accesses with no cache
read-hitsuint64Read-only event counter: cache-hits caused by reads
read-missesuint64Read-only event counter: cache-misses caused by reads
write-hitsuint64Read-only event counter: cache-hits caused by writes
write-missesuint64Read-only event counter: cache-misses caused by writes
cache-insertsuint64Read-only event counter: pages admitted by demand misses, prefetch and PIN fills
cache-evictionsuint64Read-only event counter: pages the replacement policy removed, including those a flush or a cache-ways change drops
prefetch-insertsuint64Read-only event counter: pages inserted by prefetch

Snapshot counters​

PropertyTypeDescription
last-read-hitsuint64Read-only: read-hits at the last stats-reset or control command 1
last-read-missesuint64Read-only: read-misses at the last stats-reset or control command 1
last-write-hitsuint64Read-only: write-hits at the last stats-reset or control command 1
last-write-missesuint64Read-only: write-misses at the last stats-reset or control command 1
last-insertsuint64Read-only: cache-inserts at the last stats-reset or control command 1
last-evictionsuint64Read-only: cache-evictions at the last stats-reset or control command 1
last-entriesuint64Read-only: cache-entries at the last stats-reset or control command 1
last-prefetch-insertsuint64Read-only: prefetch-inserts at the last stats-reset or control command 1

Media counters​

PropertyTypeDescription
media-time-nsuint64Read-only: total modelled media time in ns returned by FTL requests, including contention
media-readsuint64Read-only: page reads the FTL performed for cache fills, uncached reads and PIN fills, not counting reads that cylon-first-touch-program turned into programs; stays 0 with ftl=off
media-writesuint64Read-only: user page programs counted by the FTL, garbage collection copies excluded, refreshed at each media request of this device, so writes from a linked NVMe controller appear after the next one
media-fulluint64Read-only: accesses whose NAND program found no free page; that program is not timed and the access completes uncached, though a fill read already issued is charged; stats-reset keeps it, and a measurement is valid only while it is 0

Direct mapping counters​

PropertyTypeDescription
der-activeboolRead-only: whether direct mapping is available on this device
der-probesuint64Read-only: probe attempts, one per realize with der=cylon
der-mappeduint64Read-only gauge: pages currently mapped for direct guest access
der-remapsuint64Read-only: direct page mappings installed
der-revocationsuint64Read-only: direct page mappings removed
der-quiet-revocationsuint64Read-only: Cylon revocations of entries whose accessed bit was clear, done without a TLB flush
der-replacementsuint64Read-only: memslot aliases displaced by a hotter page
der-fallbacksuint64Read-only: refused direct mapping attempts and device disablements

Caching API counters​

PropertyTypeDescription
cca-commandsuint64Read-only event counter: caching API commands completed, whatever their status
cca-errorsuint64Read-only event counter: caching API commands completed with a non-zero status
cca-pinneduint64Read-only gauge: pages currently pinned in the cache
cca-uncacheduint64Read-only gauge: pages currently in caching API uncached ranges
cca-pin-fillsuint64Read-only event counter: pages PIN read from the media
cca-writebacksuint64Read-only event counter: dirty pages programmed by caching API commands
cca-droppeduint64Read-only event counter: resident pages dropped by INVALIDATE and CACHE_DISABLE
cca-pinned-set-missesuint64Read-only event counter: misses served from the media because every way of the set is pinned

Other counters​

PropertyTypeDescription
invalidationsuint64Read-only: generation count bumped by PCI configuration writes, component register writes, every mailbox command other than a control Get LSA, and reset; each revokes all direct mappings
nvme-dropsuint64Read-only: resident pages a linked NVMe write, copy or deallocate dropped or cleaned
log-droppeduint64Read-only: statistics appends refused, I/O logs closed at log-limit and SPT dumps truncated