qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] de-register mem region for MMIO.
Date: Mon, 10 Nov 2008 16:37:31 -0200	[thread overview]
Message-ID: <1226342253-8887-3-git-send-email-glommer@redhat.com> (raw)
In-Reply-To: <1226342253-8887-2-git-send-email-glommer@redhat.com>

Besides unassigned memory, we also don't care about MMIO.
So if we're giving an MMIO area that is already registered,
wipe it out.

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 kvm-all.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index 4379071..6d50609 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -317,7 +317,8 @@ void kvm_set_phys_mem(target_phys_addr_t start_addr,
 
     mem = kvm_lookup_slot(s, start_addr);
     if (mem) {
-        if (flags == IO_MEM_UNASSIGNED) {
+        if ((flags == IO_MEM_UNASSIGNED) || (flags >= TLB_MMIO)) {
+            dprintf("deleting memory %llx with flags %d\n", mem->guest_phys_addr, mem->flags);
             mem->memory_size = 0;
             mem->guest_phys_addr = start_addr;
             mem->userspace_addr = 0;
-- 
1.5.6.5

  reply	other threads:[~2008-11-10 16:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-10 18:37 [Qemu-devel] [PATCH 0/4] VGA optimization Glauber Costa
2008-11-10 16:44 ` Glauber Costa
2008-11-10 18:37 ` [Qemu-devel] [PATCH] move vga_io_address to VGA State Glauber Costa
2008-11-10 18:37   ` Glauber Costa [this message]
2008-11-10 18:37     ` [Qemu-devel] [PATCH] Introduce kvm logging interface Glauber Costa
2008-11-10 17:15       ` Anthony Liguori
2008-11-10 17:24       ` Anthony Liguori
2008-11-10 18:37       ` [Qemu-devel] [PATCH] vga optimization Glauber Costa
2008-11-10 18:39 ` [Qemu-devel] [PATCH 0/4] VGA optimization Anthony Liguori
2008-11-10 18:47   ` Anthony Liguori
2008-11-10 18:50     ` Glauber Costa
2008-11-10 20:17   ` Glauber Costa

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=1226342253-8887-3-git-send-email-glommer@redhat.com \
    --to=glommer@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).