All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Cornelia Huck <cohuck@redhat.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-block@nongnu.org, David Hildenbrand <david@redhat.com>,
	Alexey Kardashevskiy <aik@ozlabs.ru>,
	Juan Quintela <quintela@redhat.com>,
	qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	qemu-s390x@nongnu.org, qemu-ppc@nongnu.org,
	Keith Busch <kbusch@kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH 05/10] exec: Move qemu_minrampagesize/qemu_maxrampagesize to 'qemu-common.h'
Date: Mon, 11 May 2020 11:32:29 +1000	[thread overview]
Message-ID: <20200511013229.GJ2183@umbus.fritz.box> (raw)
In-Reply-To: <20200507173958.25894-6-philmd@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3399 bytes --]

On Thu, May 07, 2020 at 07:39:53PM +0200, Philippe Mathieu-Daudé wrote:
> Move these generic functions to a more common place, with other
> functions related to host page size. Document a little.
> 
> Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

ppc parts
Acked-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  include/exec/ram_addr.h    |  3 ---
>  include/qemu-common.h      | 10 ++++++++++
>  hw/ppc/spapr_caps.c        |  2 +-
>  hw/s390x/s390-virtio-ccw.c |  1 +
>  hw/vfio/spapr.c            |  2 +-
>  5 files changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
> index 06096e8c6a..195b67d3c8 100644
> --- a/include/exec/ram_addr.h
> +++ b/include/exec/ram_addr.h
> @@ -93,9 +93,6 @@ static inline unsigned long int ramblock_recv_bitmap_offset(void *host_addr,
>  
>  bool ramblock_is_pmem(RAMBlock *rb);
>  
> -long qemu_minrampagesize(void);
> -long qemu_maxrampagesize(void);
> -
>  /**
>   * qemu_ram_alloc_from_file,
>   * qemu_ram_alloc_from_fd:  Allocate a ram block from the specified backing
> diff --git a/include/qemu-common.h b/include/qemu-common.h
> index d0142f29ac..2821a6ef76 100644
> --- a/include/qemu-common.h
> +++ b/include/qemu-common.h
> @@ -80,6 +80,16 @@ bool set_preferred_target_page_bits(int bits);
>   */
>  void finalize_target_page_bits(void);
>  
> +/**
> + * qemu_minrampagesize:
> + * qemu_maxrampagesize:
> + *
> + * If backed via -memdev, return the device page size,
> + * else return the host kernel page size.
> + */
> +long qemu_minrampagesize(void);
> +long qemu_maxrampagesize(void);
> +
>  /**
>   * Sends a (part of) iovec down a socket, yielding when the socket is full, or
>   * Receives data into a (part of) iovec from a socket,
> diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c
> index eb54f94227..33a802a103 100644
> --- a/hw/ppc/spapr_caps.c
> +++ b/hw/ppc/spapr_caps.c
> @@ -23,11 +23,11 @@
>   */
>  
>  #include "qemu/osdep.h"
> +#include "qemu-common.h"
>  #include "qemu/error-report.h"
>  #include "qapi/error.h"
>  #include "qapi/visitor.h"
>  #include "sysemu/hw_accel.h"
> -#include "exec/ram_addr.h"
>  #include "target/ppc/cpu.h"
>  #include "target/ppc/mmu-hash64.h"
>  #include "cpu-models.h"
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index f660070d22..c009384505 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -12,6 +12,7 @@
>   */
>  
>  #include "qemu/osdep.h"
> +#include "qemu-common.h"
>  #include "qapi/error.h"
>  #include "cpu.h"
>  #include "hw/boards.h"
> diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c
> index 2900bd1941..c64db940a7 100644
> --- a/hw/vfio/spapr.c
> +++ b/hw/vfio/spapr.c
> @@ -9,13 +9,13 @@
>   */
>  
>  #include "qemu/osdep.h"
> +#include "qemu-common.h"
>  #include "cpu.h"
>  #include <sys/ioctl.h>
>  #include <linux/vfio.h>
>  
>  #include "hw/vfio/vfio-common.h"
>  #include "hw/hw.h"
> -#include "exec/ram_addr.h"
>  #include "qemu/error-report.h"
>  #include "qapi/error.h"
>  #include "trace.h"

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2020-05-11  1:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 17:39 [PATCH 00/10] exec: Shear 'exec/ram_addr.h' and make NVMe device target-agnostic Philippe Mathieu-Daudé
2020-05-07 17:39 ` [PATCH 01/10] exec: Rename qemu_ram_writeback() as qemu_ram_msync() Philippe Mathieu-Daudé
2020-05-08  7:59   ` Juan Quintela
2020-05-07 17:39 ` [PATCH 02/10] exec/ramblock: Add missing 'qemu/rcu.h' include Philippe Mathieu-Daudé
2020-05-08  7:59   ` Juan Quintela
2020-05-07 17:39 ` [PATCH 03/10] exec: Move tb_invalidate_phys_range() to 'exec/exec-all.h' Philippe Mathieu-Daudé
2020-05-07 17:39 ` [PATCH 04/10] exec/memory-internal: Check CONFIG_SOFTMMU instead of CONFIG_USER_ONLY Philippe Mathieu-Daudé
2020-05-08  8:01   ` Juan Quintela
2020-05-07 17:39 ` [PATCH 05/10] exec: Move qemu_minrampagesize/qemu_maxrampagesize to 'qemu-common.h' Philippe Mathieu-Daudé
2020-05-08  8:03   ` Juan Quintela
2020-05-08  9:09   ` Cornelia Huck
2020-05-11  1:32   ` David Gibson [this message]
2020-05-07 17:39 ` [PATCH 06/10] exec: Move ramblock_recv_bitmap_offset() to migration/ram.c Philippe Mathieu-Daudé
2020-05-08  8:07   ` Juan Quintela
2020-05-08  9:27     ` Philippe Mathieu-Daudé
2020-05-07 17:39 ` [PATCH 07/10] exec: Move all RAMBlock functions to 'exec/ramblock.h' Philippe Mathieu-Daudé
2020-05-08  8:08   ` Juan Quintela
2020-05-08  9:32   ` Cornelia Huck
2020-05-11  1:33   ` David Gibson
2020-05-07 17:39 ` [PATCH 08/10] hw/block: Let the NVMe emulated device be target-agnostic Philippe Mathieu-Daudé
2020-05-07 17:42   ` Philippe Mathieu-Daudé
2020-05-08  8:09   ` Juan Quintela
2020-05-07 17:39 ` [PATCH 09/10] exec: Update coding style to make checkpatch.pl happy Philippe Mathieu-Daudé
2020-05-08  9:05   ` Juan Quintela
2020-05-07 17:39 ` [PATCH 10/10] exec: Move cpu_physical_memory_* functions to 'exec/memory-internal.h' Philippe Mathieu-Daudé
2020-05-08  8:12   ` Juan Quintela
2020-05-11  1:35   ` David Gibson
2020-05-07 22:15 ` [PATCH 00/10] exec: Shear 'exec/ram_addr.h' and make NVMe device target-agnostic Paolo Bonzini
2020-05-08  8:21   ` Juan Quintela
2020-05-08  6:19 ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200511013229.GJ2183@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=kbusch@kernel.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.