On Mon, 10 May 2010, Avi Kivity wrote:
On 05/09/2010 10:35 PM, Gerhard Wiesinger wrote:
For 256 color more the first priority is to find out why direct mapping is
not used. I'd suggest tracing the code that makes this decision (in
hw/*vga.c) and seeing if it's right or not.
I think this is because A000 is not initialized for KVM (see log below
and logging patch attached).
Switches tried without success:
-vga std (log is from this one)
-vga cirrus
-vga vmware
I tried also to force the mapping (see patch where it is commented out)
but some errors occour (see 2nd log below) and performance is still
low at ~1MB/s:
s->lfb_vram_mapped = 1;
On testing the following line occour:
vga_dirty_log_start
vga_dirty_log_start
vga_dirty_log_start
vga_dirty_log_start
vga_dirty_log_start
vga_dirty_log_start
...
Any ideas? Can you reproduce it?
Thnx.
Ciao,
Gerhard
--
http://www.wiesinger.com/
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_map_addr, start=0xF0000000, len=0x01000000
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start
vga_dirty_log_start_mapping_map_addr, start=0xF0000000, len=0x01000000
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_map_addr, start=0xF0000000, len=0x01000000
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
--------------------------------------------------------------------------------------
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
vga_dirty_log_start_mapping_map_addr, start=0xF0000000, len=0x01000000
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
vga_dirty_log_start
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start
vga_dirty_log_start_mapping_map_addr, start=0xF0000000, len=0x01000000
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start
vga_dirty_log_start_mapping_map_addr, start=0xF0000000, len=0x01000000
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A0000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a0000-00000000000a7fff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x000A8000, len=0x00008000
BUG: kvm_dirty_pages_log_change: invalid parameters 00000000000a8000-00000000000affff
vga_dirty_log_start_mapping_lfb_vram_mapped, start=0xE0000000, len=0x01000000
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index 571044f..68c6083 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -2581,6 +2581,7 @@ static void map_linear_vram(CirrusVGAState *s)
cpu_register_physical_memory(isa_mem_base + 0xa8000, 0x8000,
(s->vga.vram_offset + s->cirrus_bank_base[1]) | IO_MEM_RAM);
+ printf("Cirrus VGA: lfb_vram_mapped=1\n");
s->vga.lfb_vram_mapped = 1;
}
else {
diff --git a/hw/vga.c b/hw/vga.c
index a5e2387..cb8a209 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -1612,15 +1612,19 @@ static void mark_dirty(target_phys_addr_t start, target_phys_addr_t len)
void vga_dirty_log_start(VGACommonState *s)
{
+ printf("vga_dirty_log_start\n");
if (kvm_enabled() && s->map_addr)
if (!s1) {
+ printf("vga_dirty_log_start_mapping_map_addr, start=0x%08X, len=0x%08X\n", s->map_addr, s->map_end - s->map_addr);
kvm_log_start(s->map_addr, s->map_end - s->map_addr);
mark_dirty(s->map_addr, s->map_end - s->map_addr);
s1 = 1;
}
if (kvm_enabled() && s->lfb_vram_mapped) {
if (!s2) {
+ printf("vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x%08X, len=0x%08X\n", (unsigned int)(isa_mem_base + 0xa0000), 0x8000);
kvm_log_start(isa_mem_base + 0xa0000, 0x8000);
+ printf("vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x%08X, len=0x%08X\n", (unsigned int)(isa_mem_base + 0xa8000), 0x8000);
kvm_log_start(isa_mem_base + 0xa8000, 0x8000);
mark_dirty(isa_mem_base + 0xa0000, 0x10000);
}
@@ -1630,6 +1634,7 @@ void vga_dirty_log_start(VGACommonState *s)
#ifdef CONFIG_BOCHS_VBE
if (kvm_enabled() && s->vbe_mapped) {
if (!s3) {
+ printf("vga_dirty_log_start_mapping_lfb_vram_mapped, start=0x%08X, len=0x%08X\n", VBE_DISPI_LFB_PHYSICAL_ADDRESS, s->vram_size);
kvm_log_start(VBE_DISPI_LFB_PHYSICAL_ADDRESS, s->vram_size);
}
s3 = 1;
@@ -1965,6 +1970,7 @@ void vga_common_reset(VGACommonState *s)
s->map_addr = 0;
s->map_end = 0;
s->lfb_vram_mapped = 0;
+// s->lfb_vram_mapped = 1;
s->bios_offset = 0;
s->bios_size = 0;
s->sr_index = 0;