[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH qemu v3 3/6] vfio/spapr: Rename local systempagesi
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH qemu v3 3/6] vfio/spapr: Rename local systempagesize variable |
Date: |
Thu, 28 Feb 2019 13:26:00 +1100 |
User-agent: |
Mutt/1.11.3 (2019-02-01) |
On Wed, Feb 27, 2019 at 07:51:46PM +1100, Alexey Kardashevskiy wrote:
> The "systempagesize" name suggests that it is the host system page size
> while it is the smallest page size of memory backing the guest RAM so
> let's rename it to stop confusion. This should cause no behavioral change.
>
> Signed-off-by: Alexey Kardashevskiy <address@hidden>
Definitely a good idea, applied.
> ---
> hw/vfio/spapr.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c
> index 88437a7..57fe758 100644
> --- a/hw/vfio/spapr.c
> +++ b/hw/vfio/spapr.c
> @@ -148,14 +148,14 @@ int vfio_spapr_create_window(VFIOContainer *container,
> uint64_t pagesize = memory_region_iommu_get_min_page_size(iommu_mr);
> unsigned entries, bits_total, bits_per_level, max_levels;
> struct vfio_iommu_spapr_tce_create create = { .argsz = sizeof(create) };
> - long systempagesize = qemu_getrampagesize();
> + long rampagesize = qemu_getrampagesize();
>
> /*
> * The host might not support the guest supported IOMMU page size,
> * so we will use smaller physical IOMMU pages to back them.
> */
> - if (pagesize > systempagesize) {
> - pagesize = systempagesize;
> + if (pagesize > rampagesize) {
> + pagesize = rampagesize;
> }
> pagesize = 1ULL << (63 - clz64(container->pgsizes &
> (pagesize | (pagesize - 1))));
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-ppc] [PATCH qemu v3 0/6] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough, Alexey Kardashevskiy, 2019/02/27
- [Qemu-ppc] [PATCH qemu v3 3/6] vfio/spapr: Rename local systempagesize variable, Alexey Kardashevskiy, 2019/02/27
- Re: [Qemu-ppc] [PATCH qemu v3 3/6] vfio/spapr: Rename local systempagesize variable,
David Gibson <=
- [Qemu-ppc] [PATCH qemu v3 1/6] pci: Move NVIDIA vendor id to the rest of ids, Alexey Kardashevskiy, 2019/02/27
- [Qemu-ppc] [PATCH qemu v3 5/6] vfio: Make vfio_get_region_info_cap public, Alexey Kardashevskiy, 2019/02/27
- [Qemu-ppc] [PATCH qemu v3 2/6] vfio/spapr: Fix indirect levels calculation, Alexey Kardashevskiy, 2019/02/27
- [Qemu-ppc] [PATCH qemu v3 4/6] spapr_iommu: Do not replay mappings from just created DMA window, Alexey Kardashevskiy, 2019/02/27