All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: penberg@kernel.org, gorcunov@gmail.com, asias.hejun@gmail.com,
	kvm@vger.kernel.org, ajsween@sandia.gov
Subject: Re: [PATCH] kvm tools: mmap guest kernel instead of reading it into memory
Date: Mon, 12 Dec 2011 18:18:23 +0100	[thread overview]
Message-ID: <20111212171822.GA23870@elte.hu> (raw)
In-Reply-To: <1323701258-17443-1-git-send-email-levinsasha928@gmail.com>


* Sasha Levin <levinsasha928@gmail.com> wrote:

> +	kvm->bz_start = mmap(NULL, kvm->bz_len, PROT_READ | PROT_WRITE,
> +				MAP_PRIVATE, kvm->bz_fd, setup_end);
>  
> +	/* NOP everything before the kernel start */
> +	memset(kvm->bz_start, 0x90, setup_size - setup_end);

You should really, really think about the case where mmap() 
fails.

Thanks,

	Ingo

  parent reply	other threads:[~2011-12-12 17:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-12 14:47 [PATCH] kvm tools: mmap guest kernel instead of reading it into memory Sasha Levin
2011-12-12 14:54 ` Pekka Enberg
2011-12-12 17:47   ` Sasha Levin
2011-12-12 16:40     ` Andrew Walrond
2011-12-12 15:59 ` Pekka Enberg
2011-12-12 18:14   ` Sasha Levin
2011-12-12 18:03     ` Avi Kivity
2011-12-12 17:18 ` Ingo Molnar [this message]
2011-12-12 18:08 ` Avi Kivity
2011-12-12 18:10 ` Avi Kivity
2011-12-13  6:46   ` Sasha Levin

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=20111212171822.GA23870@elte.hu \
    --to=mingo@elte.hu \
    --cc=ajsween@sandia.gov \
    --cc=asias.hejun@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=penberg@kernel.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 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.