api-user.c 975 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * QEMU Plugin API - user-mode only implementations
  3. *
  4. * This provides the APIs that have a user-mode specific
  5. * implementations or are only relevant to user-mode.
  6. *
  7. * Copyright (C) 2017, Emilio G. Cota <cota@braap.org>
  8. * Copyright (C) 2019-2025, Linaro
  9. *
  10. * SPDX-License-Identifier: GPL-2.0-or-later
  11. */
  12. #include "qemu/osdep.h"
  13. #include "qemu/plugin.h"
  14. /*
  15. * Virtual Memory queries - these are all NOPs for user-mode which
  16. * only ever has visibility of virtual addresses.
  17. */
  18. struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info,
  19. uint64_t vaddr)
  20. {
  21. return NULL;
  22. }
  23. bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr)
  24. {
  25. return false;
  26. }
  27. uint64_t qemu_plugin_hwaddr_phys_addr(const struct qemu_plugin_hwaddr *haddr)
  28. {
  29. return 0;
  30. }
  31. const char *qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr *h)
  32. {
  33. return g_intern_static_string("Invalid");
  34. }