File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 30
30
#include "exec/address-spaces.h"
31
31
#include "exec/memory.h"
32
32
#include "exec/ram_addr.h"
33
+ #include "exec/target_page.h"
33
34
#include "hw/hw.h"
34
35
#include "qemu/error-report.h"
35
36
#include "qemu/main-loop.h"
@@ -393,13 +394,14 @@ static void vfio_register_ram_discard_listener(VFIOContainerBase *bcontainer,
393
394
MemoryRegionSection * section )
394
395
{
395
396
RamDiscardManager * rdm = memory_region_get_ram_discard_manager (section -> mr );
397
+ int target_page_size = qemu_target_page_size ();
396
398
VFIORamDiscardListener * vrdl ;
397
399
398
400
/* Ignore some corner cases not relevant in practice. */
399
- g_assert (QEMU_IS_ALIGNED (section -> offset_within_region , TARGET_PAGE_SIZE ));
401
+ g_assert (QEMU_IS_ALIGNED (section -> offset_within_region , target_page_size ));
400
402
g_assert (QEMU_IS_ALIGNED (section -> offset_within_address_space ,
401
- TARGET_PAGE_SIZE ));
402
- g_assert (QEMU_IS_ALIGNED (int128_get64 (section -> size ), TARGET_PAGE_SIZE ));
403
+ target_page_size ));
404
+ g_assert (QEMU_IS_ALIGNED (int128_get64 (section -> size ), target_page_size ));
403
405
404
406
vrdl = g_new0 (VFIORamDiscardListener , 1 );
405
407
vrdl -> bcontainer = bcontainer ;
You can’t perform that action at this time.
0 commit comments