Files
qemu/include/system/physmem.h
Richard Henderson 942b0d378a Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
* cleanup include/hw headers
* cleanup memory headers
* rust: preludes
* rust: support for dtrace
* rust/hpet: first part of reorganization
* meson: small cleanups
* target/i386: Diamond Rapids CPU model including CET, APX, AVX10.2

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCgAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmlPov8UHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroPN1wf9HCceQ1273g7HbNeamay2bSaqypyM
# sEUBk4ipwO0dp7AYaaX5MeJ8NxeYcK82oFgm35WLY1tMOv0BZG5ez02dLoh5C4fb
# Bmy3kV1aY9cxF0IwTyD4dIADlZoaMnGgMElUKFY2/EixjxOUMLe90b1MO2KczqFa
# jvC4gmjx5PC1r+BHycSEdKm2Rbunueb/5eSkKeyTX7rjxQ/Eij0uGjrWrZkMWtgs
# ERJ2xo+D6a38w/uJ88KuqUV1BqYxNNwKmvOwVBU2xFB9o9bm20TNOJZ3+D+Ki8Aj
# idv+rU0XY1bWseo4USuozsqxfkjLJ5lj2YYUkSVO/I1wJmuO7Bq6xzrCxg==
# =/nIt
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 27 Dec 2025 08:12:31 PM AEDT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [unknown]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (152 commits)
  block: rename block/aio-wait.h to qemu/aio-wait.h
  block: rename block/aio.h to qemu/aio.h
  block: reduce files included by block/aio.h
  block: extract include/qemu/aiocb.h out of include/block/aio.h
  hw: add missing includes hidden by block/aio.h
  qmp: Fix thread race
  thread-pool: Fix thread race
  dosc/cpu-models-x86: Add documentation for DiamondRapids
  i386/cpu: Add CPU model for Diamond Rapids
  i386/cpu: Define dependency for VMX_VM_ENTRY_LOAD_IA32_FRED
  i386/cpu: Add an option in X86CPUDefinition to control CPUID 0x1f
  i386/cpu: Allow cache to be shared at thread level
  i386/cpu: Allow unsupported avx10_version with x-force-features
  i386/cpu: Add a helper to get host avx10 version
  i386/cpu: Support AVX10.2 with AVX10 feature models
  i386/cpu: Add support for AVX10_VNNI_INT in CPUID enumeration
  i386/cpu: Add CPUID.0x1E.0x1 subleaf for AMX instructions
  i386/cpu: Add support for MOVRS in CPUID enumeration
  run: introduce a script for running devel commands
  gitlab-ci: enable rust for msys2-64bit
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-12-29 09:10:40 +11:00

56 lines
2.0 KiB
C

/*
* QEMU physical memory interfaces (target independent).
*
* Copyright (c) 2003 Fabrice Bellard
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef QEMU_SYSTEM_PHYSMEM_H
#define QEMU_SYSTEM_PHYSMEM_H
#include "exec/hwaddr.h"
#include "system/ramlist.h"
#define DIRTY_CLIENTS_ALL ((1 << DIRTY_MEMORY_NUM) - 1)
#define DIRTY_CLIENTS_NOCODE (DIRTY_CLIENTS_ALL & ~(1 << DIRTY_MEMORY_CODE))
bool physical_memory_get_dirty_flag(ram_addr_t addr, unsigned client);
bool physical_memory_is_clean(ram_addr_t addr);
uint8_t physical_memory_range_includes_clean(ram_addr_t start,
ram_addr_t length,
uint8_t mask);
void physical_memory_set_dirty_flag(ram_addr_t addr, unsigned client);
void physical_memory_set_dirty_range(ram_addr_t start, ram_addr_t length,
uint8_t mask);
/*
* Contrary to physical_memory_sync_dirty_bitmap() this function returns
* the number of dirty pages in @bitmap passed as argument. On the other hand,
* physical_memory_sync_dirty_bitmap() returns newly dirtied pages that
* weren't set in the global migration bitmap.
*/
uint64_t physical_memory_set_dirty_lebitmap(unsigned long *bitmap,
ram_addr_t start,
ram_addr_t pages);
void physical_memory_dirty_bits_cleared(ram_addr_t start, ram_addr_t length);
uint64_t physical_memory_test_and_clear_dirty(ram_addr_t start,
ram_addr_t length,
unsigned client,
unsigned long *bmap);
DirtyBitmapSnapshot *
physical_memory_snapshot_and_clear_dirty(MemoryRegion *mr, hwaddr offset,
hwaddr length, unsigned client);
bool physical_memory_snapshot_get_dirty(DirtyBitmapSnapshot *snap,
ram_addr_t start,
ram_addr_t length);
#endif