qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/4] fixup! pc: implement pc-dimm device abstraction
Date: Tue, 17 Jun 2014 14:16:11 +0300	[thread overview]
Message-ID: <20140617111611.GB7217@redhat.com> (raw)
In-Reply-To: <1402936423-25147-5-git-send-email-imammedo@redhat.com>

On Mon, Jun 16, 2014 at 06:33:43PM +0200, Igor Mammedov wrote:
> fix typecheck error in DEFINE_PROP_UINT64 when building with with clang,
> on OS X ram_addr_t is uintptr_t with size 8 bytes but compiler
> still refuses to accept type_check() macro as valid.
> 
> It's still fixing consequences of how ram_addr_t is defined
> but it's safer this way than to change ram_addr_t to uint64_t
> unconditionally last minute.
> 
> TODO:
> is to fix ram_addr_t on 32-bit host so that it could represent
> 64-bit guest addresses which is broken now if --disable-xen
> configure option was used.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
>  include/hw/mem/pc-dimm.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h
> index 5f80d14..0f4a6ba 100644
> --- a/include/hw/mem/pc-dimm.h
> +++ b/include/hw/mem/pc-dimm.h
> @@ -52,7 +52,7 @@ typedef struct PCDIMMDevice {
>      DeviceState parent_obj;
>  
>      /* public */
> -    ram_addr_t addr;
> +    uint64_t addr;
>      uint32_t node;
>      int32_t slot;
>      HostMemoryBackend *hostmem;

This needs some thought.
HACKING explicitly says:
    Guest RAM memory offsets must use ram_addr_t, but only for RAM, it
    may not cover whole guest address space.

I think we need to validate addresses where they
are used/defined.

> -- 
> 1.7.1

  reply	other threads:[~2014-06-17 11:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16 16:33 [Qemu-devel] [PATCH 0/4] memory hotplug fixups when building with clang Igor Mammedov
2014-06-16 16:33 ` [Qemu-devel] [PATCH 1/4] pc: acpi: do not hardcode preprocessor Igor Mammedov
2014-06-16 16:33 ` [Qemu-devel] [PATCH 2/4] fixup! pc: initialize memory hotplug address space Igor Mammedov
2014-06-16 16:33 ` [Qemu-devel] [PATCH 3/4] fixup! pc: add memory hotplug handler to PC_MACHINE Igor Mammedov
2014-06-17 11:14   ` Michael S. Tsirkin
2014-06-16 16:33 ` [Qemu-devel] [PATCH 4/4] fixup! pc: implement pc-dimm device abstraction Igor Mammedov
2014-06-17 11:16   ` Michael S. Tsirkin [this message]
2014-06-17 11:21 ` [Qemu-devel] [PATCH 0/4] memory hotplug fixups when building with clang 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=20140617111611.GB7217@redhat.com \
    --to=mst@redhat.com \
    --cc=imammedo@redhat.com \
    --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).