mirror of https://github.com/xemu-project/xemu.git
hw/virtio/vhost-vdpa: Inline TARGET_PAGE_ALIGN() macro
Use TARGET_PAGE_SIZE to calculate TARGET_PAGE_ALIGN (see the rationale in previous commits). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230710094931.84402-4-philmd@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
8b1a8884c6
commit
1dca36fb3d
|
@ -331,7 +331,7 @@ static void vhost_vdpa_listener_region_add(MemoryListener *listener,
|
|||
return;
|
||||
}
|
||||
|
||||
iova = TARGET_PAGE_ALIGN(section->offset_within_address_space);
|
||||
iova = ROUND_UP(section->offset_within_address_space, TARGET_PAGE_SIZE);
|
||||
llend = vhost_vdpa_section_end(section, TARGET_PAGE_MASK);
|
||||
if (int128_ge(int128_make64(iova), llend)) {
|
||||
return;
|
||||
|
@ -415,7 +415,7 @@ static void vhost_vdpa_listener_region_del(MemoryListener *listener,
|
|||
return;
|
||||
}
|
||||
|
||||
iova = TARGET_PAGE_ALIGN(section->offset_within_address_space);
|
||||
iova = ROUND_UP(section->offset_within_address_space, TARGET_PAGE_SIZE);
|
||||
llend = vhost_vdpa_section_end(section, TARGET_PAGE_MASK);
|
||||
|
||||
trace_vhost_vdpa_listener_region_del(v, iova,
|
||||
|
|
Loading…
Reference in New Issue