[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/23] softmmu: Move dirtylimit.c into the target independent sour
From: |
Thomas Huth |
Subject: |
[PULL 16/23] softmmu: Move dirtylimit.c into the target independent source set |
Date: |
Thu, 20 Apr 2023 12:12:09 +0200 |
dirtylimit.c just uses one TARGET_PAGE_SIZE macro - change it to
qemu_target_page_size() so we can move thefile into the target
independent source set. Then we only have to compile this file
once during the build instead of multiple times (one time for
each target).
Message-Id: <20230413054509.54421-1-thuth@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
softmmu/dirtylimit.c | 3 ++-
softmmu/meson.build | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/softmmu/dirtylimit.c b/softmmu/dirtylimit.c
index c56f0f58c8..82986c1499 100644
--- a/softmmu/dirtylimit.c
+++ b/softmmu/dirtylimit.c
@@ -20,6 +20,7 @@
#include "monitor/hmp.h"
#include "monitor/monitor.h"
#include "exec/memory.h"
+#include "exec/target_page.h"
#include "hw/boards.h"
#include "sysemu/kvm.h"
#include "trace.h"
@@ -236,7 +237,7 @@ static inline int64_t
dirtylimit_dirty_ring_full_time(uint64_t dirtyrate)
static uint64_t max_dirtyrate;
uint32_t dirty_ring_size = kvm_dirty_ring_size();
uint64_t dirty_ring_size_meory_MB =
- dirty_ring_size * TARGET_PAGE_SIZE >> 20;
+ dirty_ring_size * qemu_target_page_size() >> 20;
if (max_dirtyrate < dirtyrate) {
max_dirtyrate = dirtyrate;
diff --git a/softmmu/meson.build b/softmmu/meson.build
index b392f0bd35..974732b0f3 100644
--- a/softmmu/meson.build
+++ b/softmmu/meson.build
@@ -3,7 +3,6 @@ specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files(
'ioport.c',
'memory.c',
'physmem.c',
- 'dirtylimit.c',
'watchpoint.c',
)])
@@ -18,6 +17,7 @@ softmmu_ss.add(files(
'cpu-throttle.c',
'cpu-timers.c',
'datadir.c',
+ 'dirtylimit.c',
'dma-helpers.c',
'globals.c',
'memory_mapping.c',
--
2.31.1
- [PULL 04/23] test: Fix test-crypto-secret when compiling without keyring support, (continued)
- [PULL 04/23] test: Fix test-crypto-secret when compiling without keyring support, Thomas Huth, 2023/04/20
- [PULL 13/23] include/exec: Provide the tswap() functions for target independent code, too, Thomas Huth, 2023/04/20
- [PULL 15/23] hw/display: Compile vga.c as target-independent code, Thomas Huth, 2023/04/20
- [PULL 12/23] softmmu/qtest: Move the target-specific pseries RTAS code out of qtest.c, Thomas Huth, 2023/04/20
- [PULL 17/23] hw/core: Move numa.c into the target independent source set, Thomas Huth, 2023/04/20
- [PULL 21/23] qtest: Move tpm_util_tis_transmit() into tpm-tis-utils.c and rename it, Thomas Huth, 2023/04/20
- [PULL 23/23] tests/vm/freebsd: Update to FreeBSD 13.2, Thomas Huth, 2023/04/20
- [PULL 09/23] tests/migration: Only run auto_converge in slow mode, Thomas Huth, 2023/04/20
- [PULL 11/23] hw/char: Move two more files from specific_ss to softmmu_ss, Thomas Huth, 2023/04/20
- [PULL 18/23] cpu: Remove parameter of list_cpus(), Thomas Huth, 2023/04/20
- [PULL 16/23] softmmu: Move dirtylimit.c into the target independent source set,
Thomas Huth <=
- [PULL 20/23] qtest: Add functions for accessing devices on Aspeed I2C controller, Thomas Huth, 2023/04/20
- [PULL 22/23] qtest: Add a test case for TPM TIS I2C connected to Aspeed I2C controller, Thomas Huth, 2023/04/20
- [PULL 19/23] MAINTAINERS: Add Juan Quintela to developer guides review, Thomas Huth, 2023/04/20
- Re: [PULL 00/23] First batch of testing and misc patches for 8.1, Richard Henderson, 2023/04/21