public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Glauber Costa <gcosta@redhat.com>
To: kvm@vger.kernel.org
Cc: avi@qumranet.com, aliguori@us.ibm.com
Subject: [PATCH 9/9] remove explicit calls to kvm_qemu_register_coalesced_mmio
Date: Tue, 12 Aug 2008 21:48:09 -0300	[thread overview]
Message-ID: <1218588489-17182-10-git-send-email-gcosta@redhat.com> (raw)
In-Reply-To: <1218588489-17182-9-git-send-email-gcosta@redhat.com>

It is now done automatically for IO regions inside
kvm_cpu_register_physical_memory().
---
 qemu/hw/cirrus_vga.c |    2 --
 qemu/hw/e1000.c      |   12 ------------
 qemu/hw/pci.c        |    3 ---
 qemu/hw/vga.c        |    4 ----
 4 files changed, 0 insertions(+), 21 deletions(-)

diff --git a/qemu/hw/cirrus_vga.c b/qemu/hw/cirrus_vga.c
index c7e8f2c..42bca4f 100644
--- a/qemu/hw/cirrus_vga.c
+++ b/qemu/hw/cirrus_vga.c
@@ -3291,8 +3291,6 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci)
                                            cirrus_vga_mem_write, s);
     cpu_register_physical_memory(isa_mem_base + 0x000a0000, 0x20000,
                                  vga_io_memory);
-    if (kvm_enabled())
-        qemu_kvm_register_coalesced_mmio(isa_mem_base + 0x000a0000, 0x20000);
 
     s->sr[0x06] = 0x0f;
     if (device_id == CIRRUS_ID_CLGD5446) {
diff --git a/qemu/hw/e1000.c b/qemu/hw/e1000.c
index 8d60ea6..ce3496b 100644
--- a/qemu/hw/e1000.c
+++ b/qemu/hw/e1000.c
@@ -951,18 +951,6 @@ e1000_mmio_map(PCIDevice *pci_dev, int region_num,
 
     d->mmio_base = addr;
     cpu_register_physical_memory(addr, PNPMMIO_SIZE, d->mmio_index);
-
-    if (kvm_enabled()) {
-	int i;
-        uint32_t excluded_regs[] = {
-            E1000_MDIC, E1000_ICR, E1000_ICS, E1000_IMS,
-            E1000_IMC, E1000_TCTL, E1000_TDT, PNPMMIO_SIZE
-        };
-        qemu_kvm_register_coalesced_mmio(addr, excluded_regs[0]);
-        for (i = 0; excluded_regs[i] != PNPMMIO_SIZE; i++)
-            qemu_kvm_register_coalesced_mmio(addr + excluded_regs[i] + 4,
-                             excluded_regs[i + 1] - excluded_regs[i] - 4);
-    }
 }
 
 static int
diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c
index 92683d1..f58c634 100644
--- a/qemu/hw/pci.c
+++ b/qemu/hw/pci.c
@@ -324,9 +324,6 @@ static void pci_update_mappings(PCIDevice *d)
                         cpu_register_physical_memory(pci_to_cpu_addr(r->addr),
                                                      r->size,
                                                      IO_MEM_UNASSIGNED);
-                        if (kvm_enabled())
-                                qemu_kvm_unregister_coalesced_mmio(r->addr,
-                                                                 r->size);
                     }
                 }
                 r->addr = new_addr;
diff --git a/qemu/hw/vga.c b/qemu/hw/vga.c
index 95d6033..17b5a36 100644
--- a/qemu/hw/vga.c
+++ b/qemu/hw/vga.c
@@ -2257,8 +2257,6 @@ void vga_init(VGAState *s)
     vga_io_memory = cpu_register_io_memory(0, vga_mem_read, vga_mem_write, s);
     cpu_register_physical_memory(isa_mem_base + 0x000a0000, 0x20000,
                                  vga_io_memory);
-    if (kvm_enabled())
-        qemu_kvm_register_coalesced_mmio(isa_mem_base + 0x000a0000, 0x20000);
 }
 
 /* Memory mapped interface */
@@ -2334,8 +2332,6 @@ static void vga_mm_init(VGAState *s, target_phys_addr_t vram_base,
     cpu_register_physical_memory(ctrl_base, 0x100000, s_ioport_ctrl);
     s->bank_offset = 0;
     cpu_register_physical_memory(vram_base + 0x000a0000, 0x20000, vga_io_memory);
-    if (kvm_enabled())
-        qemu_kvm_register_coalesced_mmio(vram_base + 0x000a0000, 0x20000);
 }
 
 int isa_vga_init(DisplayState *ds, uint8_t *vga_ram_base,
-- 
1.5.5.1


  reply	other threads:[~2008-08-13  0:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-13  0:48 [RFC 0/9] Memory registration rework Glauber Costa
2008-08-13  0:48 ` [PATCH 1/9] add debuging facilities to memory registration at libkvm Glauber Costa
2008-08-13  0:48   ` [PATCH 2/9] experimental change to avoid doing the same thing twice Glauber Costa
2008-08-13  0:48     ` [PATCH 3/9] do not use mem_hole anymore Glauber Costa
2008-08-13  0:48       ` [PATCH 4/9] allow intersecting region to be on the boundary Glauber Costa
2008-08-13  0:48         ` [PATCH 5/9] substitute is_allocated_mem with more general is_containing_region Glauber Costa
2008-08-13  0:48           ` [PATCH 6/9] move kvm_cpu_register_memory_area into qemu's Glauber Costa
2008-08-13  0:48             ` [PATCH 7/9] cleanup kvm memory registration Glauber Costa
2008-08-13  0:48               ` [PATCH 8/9] coalesce mmio regions without an explicit call Glauber Costa
2008-08-13  0:48                 ` Glauber Costa [this message]
2008-08-13 14:11             ` [PATCH 6/9] move kvm_cpu_register_memory_area into qemu's Anthony Liguori
2008-08-13 14:33               ` Glauber Costa
2008-08-13 11:41           ` [PATCH 5/9] substitute is_allocated_mem with more general is_containing_region Avi Kivity
2008-08-13 13:02             ` Glauber Costa
2008-08-13 11:43 ` [RFC 0/9] Memory registration rework Avi Kivity
2008-08-13 14:13   ` Anthony Liguori
  -- strict thread matches above, loose matches on Subject: below --
2008-09-12 15:10 [PATCH 0/9] Simplify memory registration Glauber Costa
2008-09-12 15:10 ` [PATCH 9/9] remove explicit calls to kvm_qemu_register_coalesced_mmio 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=1218588489-17182-10-git-send-email-gcosta@redhat.com \
    --to=gcosta@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@qumranet.com \
    --cc=kvm@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox