qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Marcel Apfelbaum <marcel.a@redhat.com>
Cc: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com,
	jan.kiszka@siemens.com, agraf@suse.de, qemu-devel@nongnu.org,
	aliguori@amazon.com, lcapitulino@redhat.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH for-1.7 v2 7/8] pc: s/INT64_MAX/UINT64_MAX/
Date: Tue, 19 Nov 2013 12:44:42 +0100	[thread overview]
Message-ID: <528B4F2A.2030904@redhat.com> (raw)
In-Reply-To: <1383820884-29596-8-git-send-email-marcel.a@redhat.com>

Il 07/11/2013 11:41, Marcel Apfelbaum ha scritto:
> From: Paolo Bonzini <pbonzini@redhat.com>
> 
> It doesn't make sense for a region to be INT64_MAX in size:
> memory core uses UINT64_MAX as a special value meaning
> "all 64 bit" this is what was meant here.
> 
> While this should never affect the PC system which at the moment always
> has < 63 bit size, this makes us hit all kind of corner case bugs with
> sub-pages, so users are probably better off if we just use UINT64_MAX
> instead.
> 
> Reported-by: Luiz Capitulino <lcapitulino@redhat.com>
> Tested-by: Luiz Capitulino <lcapitulino@redhat.com>
> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Michael, is this patch (and 8/8: spapr_pci: s/INT64_MAX/UINT64_MAX/)
queued for 1.7 and/or 1.8?

Paolo

> ---
>  hw/i386/pc_piix.c | 2 +-
>  hw/i386/pc_q35.c  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 4fdb7b6..8e8d354 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -115,7 +115,7 @@ static void pc_init1(QEMUMachineInitArgs *args,
>  
>      if (pci_enabled) {
>          pci_memory = g_new(MemoryRegion, 1);
> -        memory_region_init(pci_memory, NULL, "pci", INT64_MAX);
> +        memory_region_init(pci_memory, NULL, "pci", UINT64_MAX);
>          rom_memory = pci_memory;
>      } else {
>          pci_memory = NULL;
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index 4c191d3..ca44e05 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -102,7 +102,7 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
>      /* pci enabled */
>      if (pci_enabled) {
>          pci_memory = g_new(MemoryRegion, 1);
> -        memory_region_init(pci_memory, NULL, "pci", INT64_MAX);
> +        memory_region_init(pci_memory, NULL, "pci", UINT64_MAX);
>          rom_memory = pci_memory;
>      } else {
>          pci_memory = NULL;
> 

  reply	other threads:[~2013-11-19 11:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-07 10:41 [Qemu-devel] [PATCH for-1.7 v2 0/8] fix address space size issue Marcel Apfelbaum
2013-11-07 10:41 ` [Qemu-devel] [PATCH for-1.7 v2 1/8] exec: declare TARGET_PHYS_ADDR_SPACE_MAX to limit memory regions rendered by exec Marcel Apfelbaum
2013-11-07 10:49   ` Peter Maydell
2013-11-07 11:32     ` Marcel Apfelbaum
2013-11-07 12:04     ` Michael S. Tsirkin
2013-11-07 13:49       ` Paolo Bonzini
2013-11-07 15:40         ` Michael S. Tsirkin
2013-11-07 10:41 ` [Qemu-devel] [PATCH for-1.7 v2 2/8] hw/alpha: limit iommu-typhoon memory size Marcel Apfelbaum
2013-11-07 10:41 ` [Qemu-devel] [PATCH for-1.7 v2 3/8] hw/ppc: limit iommu-spapr " Marcel Apfelbaum
2013-11-07 10:41 ` [Qemu-devel] [PATCH for-1.7 v2 4/8] exec: don't ignore high address bits on lookup Marcel Apfelbaum
2013-11-07 10:41 ` [Qemu-devel] [PATCH for-1.7 v2 5/8] pci: fix address space size for bridge Marcel Apfelbaum
2013-11-07 10:41 ` [Qemu-devel] [PATCH for-1.7 v2 6/8] exec: don't ignore high address bits on set Marcel Apfelbaum
2013-11-07 10:41 ` [Qemu-devel] [PATCH for-1.7 v2 7/8] pc: s/INT64_MAX/UINT64_MAX/ Marcel Apfelbaum
2013-11-19 11:44   ` Paolo Bonzini [this message]
2013-11-19 12:04     ` Michael S. Tsirkin
2013-11-07 10:41 ` [Qemu-devel] [PATCH for-1.7 v2 8/8] spapr_pci: s/INT64_MAX/UINT64_MAX/ Marcel Apfelbaum
2013-11-07 11:07 ` [Qemu-devel] [PATCH for-1.7 v2 0/8] fix address space size issue Alexander Graf
2013-11-07 14:08 ` Paolo Bonzini
2013-11-07 15:05   ` Michael S. Tsirkin
2013-11-07 15:07     ` Paolo Bonzini
2013-11-07 15:20       ` Michael S. Tsirkin

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=528B4F2A.2030904@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=aliguori@amazon.com \
    --cc=ehabkost@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=lcapitulino@redhat.com \
    --cc=marcel.a@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).