All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: [PATCH] libkvm: fix physical_memory calculation
Date: Wed, 30 Apr 2008 11:22:03 +0200	[thread overview]
Message-ID: <48183A3B.3080802@siemens.com> (raw)

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;
 
 	memory.slot = get_free_slot(kvm);
 	r = ioctl(kvm->vm_fd, KVM_SET_USER_MEMORY_REGION, &memory);

-------------------------------------------------------------------------
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-04-30  9:22 UTC|newest]

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

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=48183A3B.3080802@siemens.com \
    --to=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 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.