system.c 570 B

123456789101112131415161718192021222324
  1. /*
  2. * QEMU Plugin system-emulation helpers
  3. *
  4. * Helpers that are specific to system emulation.
  5. *
  6. * Copyright (C) 2017, Emilio G. Cota <cota@braap.org>
  7. * Copyright (C) 2019-2025, Linaro
  8. *
  9. * SPDX-License-Identifier: GPL-2.0-or-later
  10. */
  11. #include "qemu/osdep.h"
  12. #include "qemu/plugin.h"
  13. #include "hw/boards.h"
  14. #include "plugin.h"
  15. void qemu_plugin_fillin_mode_info(qemu_info_t *info)
  16. {
  17. MachineState *ms = MACHINE(qdev_get_machine());
  18. info->system_emulation = true;
  19. info->system.smp_vcpus = ms->smp.cpus;
  20. info->system.max_vcpus = ms->smp.max_cpus;
  21. }