public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: Re: [PATCH] libkvm: fix physical_memory calculation
Date: Fri, 02 May 2008 12:48:55 +0300	[thread overview]
Message-ID: <481AE387.2000405@qumranet.com> (raw)
In-Reply-To: <48183A3B.3080802@siemens.com>

Jan Kiszka wrote:
> This looks bogus, but it is so far without practical impact (phys_start
> is always 0 when we do the calculation).
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  libkvm/libkvm.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: b/libkvm/libkvm.c
> ===================================================================
> --- a/libkvm/libkvm.c
> +++ b/libkvm/libkvm.c
> @@ -550,7 +550,7 @@ int kvm_register_userspace_phys_mem(kvm_
>  	int r;
>  
>  	if (!kvm->physical_memory)
> -		kvm->physical_memory = userspace_addr - phys_start;
> +		kvm->physical_memory = userspace_addr + phys_start;
>  
>   

I think it's correct. The intent (probably) was that 
kvm->physical_memory[x] would refer to the contents of physical memory 
address x.

In another way, it's incorrect, since nothing guarantees (now) that 
memory is contiguous.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

      reply	other threads:[~2008-05-02  9:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30  9:22 [PATCH] libkvm: fix physical_memory calculation Jan Kiszka
2008-05-02  9:48 ` Avi Kivity [this message]

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=481AE387.2000405@qumranet.com \
    --to=avi@qumranet.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm-devel@lists.sourceforge.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox