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 3/5] de-register mem region for MMIO.
Date: Tue, 11 Nov 2008 00:16:07 -0200	[thread overview]
Message-ID: <1226369769-5109-4-git-send-email-glommer@redhat.com> (raw)
In-Reply-To: <1226369769-5109-3-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-11  0:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-11  2:16 [Qemu-devel] [PATCH 0/5] VGA Optimization Episode IV - A new hope Glauber Costa
2008-11-11  2:16 ` [Qemu-devel] [PATCH 1/5] better type checking for vga Glauber Costa
2008-11-11  2:16   ` [Qemu-devel] [PATCH 2/5] move vga_io_address to VGA State Glauber Costa
2008-11-11  2:16     ` Glauber Costa [this message]
2008-11-11  2:16       ` [Qemu-devel] [PATCH 4/5] Introduce kvm logging interface Glauber Costa
2008-11-11  2:16         ` [Qemu-devel] [PATCH 5/5] vga optimization Glauber Costa
2008-11-11 14:44           ` Anthony Liguori
2008-11-11 15:33             ` Stefano Stabellini
2008-11-11 15:33               ` Glauber Costa
2008-11-11 15:50                 ` Stefano Stabellini

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=1226369769-5109-4-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).