public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, drjones@redhat.com, rkrcmar@redhat.com,
	peterx@redhat.com
Subject: [kvm-unit-tests PATCH 1/3] x86: vm: add assert to avoid multiple vm init
Date: Tue, 25 Oct 2016 17:00:28 +0800	[thread overview]
Message-ID: <1477386030-13955-2-git-send-email-peterx@redhat.com> (raw)
In-Reply-To: <1477386030-13955-1-git-send-email-peterx@redhat.com>

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 lib/x86/vm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/x86/vm.c b/lib/x86/vm.c
index 906fbf2..f7e778b 100644
--- a/lib/x86/vm.c
+++ b/lib/x86/vm.c
@@ -151,6 +151,7 @@ static void setup_mmu(unsigned long len)
 
 void setup_vm()
 {
+    assert(!end_of_memory);
     end_of_memory = fwcfg_get_u64(FW_CFG_RAM_SIZE);
     free_memory(&edata, end_of_memory - (unsigned long)&edata);
     setup_mmu(end_of_memory);
-- 
2.7.4


  reply	other threads:[~2016-10-25  9:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-25  9:00 [kvm-unit-tests PATCH 0/3] check multiple init for vm/smp Peter Xu
2016-10-25  9:00 ` Peter Xu [this message]
2016-10-25 12:32   ` [kvm-unit-tests PATCH 1/3] x86: vm: add assert to avoid multiple vm init Andrew Jones
2016-10-25  9:00 ` [kvm-unit-tests PATCH 2/3] x86: smp: assert to avoid multiple init of smp Peter Xu
2016-10-25  9:00 ` [kvm-unit-tests PATCH 3/3] tests: don't call setup_idt() if with smp_init() Peter Xu
2016-10-25  9:53   ` Andrew Jones
2016-10-25 10:16     ` Andrew Jones
2016-10-25 16:00   ` Paolo Bonzini
2016-10-25 10:12 ` [kvm-unit-tests PATCH 0/3] check multiple init for vm/smp Andrew Jones
2016-10-25 11:56   ` Peter Xu
2016-10-25 16:00     ` Paolo Bonzini
2016-10-26  2:53       ` Peter Xu

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=1477386030-13955-2-git-send-email-peterx@redhat.com \
    --to=peterx@redhat.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    /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