From: Jan Kiszka <jan.kiszka@web.de>
To: Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
Avi Kivity <avi@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH v2 10/13] Drop dirty log start/stop infrastructure
Date: Thu, 23 Jun 2011 13:09:10 +0200 [thread overview]
Message-ID: <4E031ED6.1050804@web.de> (raw)
In-Reply-To: <7e392169046f7464027d3916b9cb081abd1f984d.1308070416.git.jan.kiszka@siemens.com>
From: Jan Kiszka <jan.kiszka@siemens.com>
No more users of vga_dirty_log_start/start, thus also no use anymore for
the log_start/stop CPUPhysMemoryClient callbacks. Drop the whole
infrastructure.
CC: Anthony PERARD <anthony.perard@citrix.com>
CC: Michael S. Tsirkin <mst@redhat.com>
CC: Avi Kivity <avi@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
Changes in v2:
- rebased over master, removing the freshly added Xen hooks
Avi, does this match your plans for a new memory API? Or would be end up
reintroducing such callbacks after the refactoring?
---
cpu-all.h | 6 ------
cpu-common.h | 4 ----
exec.c | 30 ------------------------------
hw/vga.c | 36 ------------------------------------
hw/vga_int.h | 3 ---
hw/vhost.c | 2 --
kvm-all.c | 47 -----------------------------------------------
xen-all.c | 18 ------------------
8 files changed, 0 insertions(+), 146 deletions(-)
diff --git a/cpu-all.h b/cpu-all.h
index 880f570..ac81a07 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -1015,12 +1015,6 @@ int cpu_physical_memory_get_dirty_tracking(void);
int cpu_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
target_phys_addr_t end_addr);
-int cpu_physical_log_start(target_phys_addr_t start_addr,
- ram_addr_t size);
-
-int cpu_physical_log_stop(target_phys_addr_t start_addr,
- ram_addr_t size);
-
void dump_exec_info(FILE *f, fprintf_function cpu_fprintf);
#endif /* !CONFIG_USER_ONLY */
diff --git a/cpu-common.h b/cpu-common.h
index b027e43..07379c5 100644
--- a/cpu-common.h
+++ b/cpu-common.h
@@ -112,10 +112,6 @@ struct CPUPhysMemoryClient {
target_phys_addr_t end_addr);
int (*migration_log)(struct CPUPhysMemoryClient *client,
int enable);
- int (*log_start)(struct CPUPhysMemoryClient *client,
- target_phys_addr_t phys_addr, ram_addr_t size);
- int (*log_stop)(struct CPUPhysMemoryClient *client,
- target_phys_addr_t phys_addr, ram_addr_t size);
QLIST_ENTRY(CPUPhysMemoryClient) list;
};
diff --git a/exec.c b/exec.c
index b03b5be..56b95ab 100644
--- a/exec.c
+++ b/exec.c
@@ -2127,36 +2127,6 @@ int cpu_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
return ret;
}
-int cpu_physical_log_start(target_phys_addr_t start_addr,
- ram_addr_t size)
-{
- CPUPhysMemoryClient *client;
- QLIST_FOREACH(client, &memory_client_list, list) {
- if (client->log_start) {
- int r = client->log_start(client, start_addr, size);
- if (r < 0) {
- return r;
- }
- }
- }
- return 0;
-}
-
-int cpu_physical_log_stop(target_phys_addr_t start_addr,
- ram_addr_t size)
-{
- CPUPhysMemoryClient *client;
- QLIST_FOREACH(client, &memory_client_list, list) {
- if (client->log_stop) {
- int r = client->log_stop(client, start_addr, size);
- if (r < 0) {
- return r;
- }
- }
- }
- return 0;
-}
-
static inline void tlb_update_dirty(CPUTLBEntry *tlb_entry)
{
ram_addr_t ram_addr;
diff --git a/hw/vga.c b/hw/vga.c
index fdfa3c4..a74f581 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -1570,42 +1570,6 @@ static void vga_sync_dirty_bitmap(VGACommonState *s)
}
-void vga_dirty_log_start(VGACommonState *s)
-{
- if (s->map_addr) {
- cpu_physical_log_start(s->map_addr, s->map_end - s->map_addr);
- }
-
- if (s->lfb_vram_mapped) {
- cpu_physical_log_start(isa_mem_base + 0xa0000, 0x8000);
- cpu_physical_log_start(isa_mem_base + 0xa8000, 0x8000);
- }
-
-#ifdef CONFIG_BOCHS_VBE
- if (s->vbe_mapped) {
- cpu_physical_log_start(VBE_DISPI_LFB_PHYSICAL_ADDRESS, s->vram_size);
- }
-#endif
-}
-
-void vga_dirty_log_stop(VGACommonState *s)
-{
- if (s->map_addr) {
- cpu_physical_log_stop(s->map_addr, s->map_end - s->map_addr);
- }
-
- if (s->lfb_vram_mapped) {
- cpu_physical_log_stop(isa_mem_base + 0xa0000, 0x8000);
- cpu_physical_log_stop(isa_mem_base + 0xa8000, 0x8000);
- }
-
-#ifdef CONFIG_BOCHS_VBE
- if (s->vbe_mapped) {
- cpu_physical_log_stop(VBE_DISPI_LFB_PHYSICAL_ADDRESS, s->vram_size);
- }
-#endif
-}
-
/*
* graphic modes
*/
diff --git a/hw/vga_int.h b/hw/vga_int.h
index 5cd9a6e..73328c2 100644
--- a/hw/vga_int.h
+++ b/hw/vga_int.h
@@ -194,9 +194,6 @@ void vga_init(VGACommonState *s);
int vga_init_io(VGACommonState *s);
void vga_common_reset(VGACommonState *s);
-void vga_dirty_log_start(VGACommonState *s);
-void vga_dirty_log_stop(VGACommonState *s);
-
extern const VMStateDescription vmstate_vga_common;
uint32_t vga_ioport_read(void *opaque, uint32_t addr);
void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val);
diff --git a/hw/vhost.c b/hw/vhost.c
index 80f771e..b7e6284 100644
--- a/hw/vhost.c
+++ b/hw/vhost.c
@@ -668,8 +668,6 @@ int vhost_dev_init(struct vhost_dev *hdev, int devfd, bool force)
hdev->client.set_memory = vhost_client_set_memory;
hdev->client.sync_dirty_bitmap = vhost_client_sync_dirty_bitmap;
hdev->client.migration_log = vhost_client_migration_log;
- hdev->client.log_start = NULL;
- hdev->client.log_stop = NULL;
hdev->mem = qemu_mallocz(offsetof(struct vhost_memory, regions));
hdev->log = NULL;
hdev->log_size = 0;
diff --git a/kvm-all.c b/kvm-all.c
index cbc2532..c95a64d 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -100,24 +100,6 @@ static KVMSlot *kvm_alloc_slot(KVMState *s)
abort();
}
-static KVMSlot *kvm_lookup_matching_slot(KVMState *s,
- target_phys_addr_t start_addr,
- target_phys_addr_t end_addr)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(s->slots); i++) {
- KVMSlot *mem = &s->slots[i];
-
- if (start_addr == mem->start_addr &&
- end_addr == mem->start_addr + mem->memory_size) {
- return mem;
- }
- }
-
- return NULL;
-}
-
/*
* Find overlapping slot with lowest start address
*/
@@ -274,33 +256,6 @@ static int kvm_slot_dirty_pages_log_change(KVMSlot *mem, bool log_dirty)
return kvm_set_user_memory_region(s, mem);
}
-static int kvm_dirty_pages_log_change(target_phys_addr_t phys_addr,
- ram_addr_t size, bool log_dirty)
-{
- KVMState *s = kvm_state;
- KVMSlot *mem = kvm_lookup_matching_slot(s, phys_addr, phys_addr + size);
-
- if (mem == NULL) {
- fprintf(stderr, "BUG: %s: invalid parameters " TARGET_FMT_plx "-"
- TARGET_FMT_plx "\n", __func__, phys_addr,
- (target_phys_addr_t)(phys_addr + size - 1));
- return -EINVAL;
- }
- return kvm_slot_dirty_pages_log_change(mem, log_dirty);
-}
-
-static int kvm_log_start(CPUPhysMemoryClient *client,
- target_phys_addr_t phys_addr, ram_addr_t size)
-{
- return kvm_dirty_pages_log_change(phys_addr, size, true);
-}
-
-static int kvm_log_stop(CPUPhysMemoryClient *client,
- target_phys_addr_t phys_addr, ram_addr_t size)
-{
- return kvm_dirty_pages_log_change(phys_addr, size, false);
-}
-
static int kvm_set_migration_log(int enable)
{
KVMState *s = kvm_state;
@@ -679,8 +634,6 @@ static CPUPhysMemoryClient kvm_cpu_phys_memory_client = {
.set_memory = kvm_client_set_memory,
.sync_dirty_bitmap = kvm_client_sync_dirty_bitmap,
.migration_log = kvm_client_migration_log,
- .log_start = kvm_log_start,
- .log_stop = kvm_log_stop,
};
static void kvm_handle_interrupt(CPUState *env, int mask)
diff --git a/xen-all.c b/xen-all.c
index fcb106f..3c87b36 100644
--- a/xen-all.c
+++ b/xen-all.c
@@ -416,22 +416,6 @@ static int xen_sync_dirty_bitmap(XenIOState *state,
return 0;
}
-static int xen_log_start(CPUPhysMemoryClient *client, target_phys_addr_t phys_addr, ram_addr_t size)
-{
- XenIOState *state = container_of(client, XenIOState, client);
-
- return xen_sync_dirty_bitmap(state, phys_addr, size);
-}
-
-static int xen_log_stop(CPUPhysMemoryClient *client, target_phys_addr_t phys_addr, ram_addr_t size)
-{
- XenIOState *state = container_of(client, XenIOState, client);
-
- state->log_for_dirtybit = NULL;
- /* Disable dirty bit tracking */
- return xc_hvm_track_dirty_vram(xen_xc, xen_domid, 0, 0, NULL);
-}
-
static int xen_client_sync_dirty_bitmap(struct CPUPhysMemoryClient *client,
target_phys_addr_t start_addr,
target_phys_addr_t end_addr)
@@ -451,8 +435,6 @@ static CPUPhysMemoryClient xen_cpu_phys_memory_client = {
.set_memory = xen_client_set_memory,
.sync_dirty_bitmap = xen_client_sync_dirty_bitmap,
.migration_log = xen_client_migration_log,
- .log_start = xen_log_start,
- .log_stop = xen_log_stop,
};
/* VCPU Operations, MMIO, IO ring ... */
next prev parent reply other threads:[~2011-06-23 11:09 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
2011-06-14 16:53 ` [Qemu-devel] [PATCH 01/13] spice: Use cpu_register_physical_memory_log for dirty log enabling Jan Kiszka
2011-06-15 6:42 ` Gerd Hoffmann
2011-06-15 7:23 ` [Qemu-devel] [PATCH v2 " Jan Kiszka
2011-06-15 8:50 ` Gerd Hoffmann
2011-06-14 16:53 ` [Qemu-devel] [PATCH 02/13] vga-pci: " Jan Kiszka
2011-06-14 16:53 ` [Qemu-devel] [PATCH 03/13] cirrus-vga: Drop redundant vga_dirty_log_start Jan Kiszka
2011-06-14 16:53 ` [Qemu-devel] [PATCH 04/13] vmware-vga: Disable verbose mode Jan Kiszka
2011-06-14 16:53 ` [Qemu-devel] [PATCH 05/13] vmware-vga: Remove dead DIRECT_VRAM mode Jan Kiszka
2011-06-14 16:53 ` [Qemu-devel] [PATCH 06/13] vmware-vga: Eliminate vga_dirty_log_restart Jan Kiszka
2011-06-15 23:48 ` andrzej zaborowski
2011-06-14 16:53 ` [Qemu-devel] [PATCH 07/13] vmware_vga: Do not enable dirty logging when in SVGA mode Jan Kiszka
2011-06-16 0:06 ` andrzej zaborowski
2011-06-14 16:53 ` [Qemu-devel] [PATCH 08/13] vmware-vga: Register reset service Jan Kiszka
2011-06-15 23:55 ` andrzej zaborowski
2011-06-14 16:53 ` [Qemu-devel] [PATCH 09/13] vmware-vga: Use cpu_register_physical_memory_log for dirty log enabling Jan Kiszka
2011-06-16 0:06 ` andrzej zaborowski
2011-06-14 16:53 ` [Qemu-devel] [PATCH 10/13] Drop dirty log start/stop infrastructure Jan Kiszka
2011-06-23 11:09 ` Jan Kiszka [this message]
2011-06-23 11:53 ` [Qemu-devel] [PATCH v2 " Avi Kivity
2011-06-14 16:53 ` [Qemu-devel] [PATCH 11/13] vga: Refactor lfb_vram_mapped to vga_mem_mapped Jan Kiszka
2011-06-14 16:53 ` [Qemu-devel] [PATCH 12/13] vga: Move vga_sync_dirty_bitmap Jan Kiszka
2011-06-14 16:53 ` [Qemu-devel] [PATCH 13/13] vga: Use linear mapping + dirty logging in chain 4 memory access mode Jan Kiszka
2011-06-23 11:11 ` [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Avi Kivity
2011-06-23 11:39 ` Jan Kiszka
2011-06-23 11:44 ` Avi Kivity
2011-06-23 11:52 ` Jan Kiszka
2011-06-23 11:54 ` Avi Kivity
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=4E031ED6.1050804@web.de \
--to=jan.kiszka@web.de \
--cc=aliguori@us.ibm.com \
--cc=anthony.perard@citrix.com \
--cc=avi@redhat.com \
--cc=mst@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 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.