qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 2/2] xen: Introduce VGA sync dirty bitmap suppor


From: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH 2/2] xen: Introduce VGA sync dirty bitmap support
Date: Wed, 12 Jan 2011 11:03:19 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Am 11.01.2011 16:37, address@hidden wrote:
> From: Anthony PERARD <address@hidden>
> 
> This patch introduces phys memory client for Xen.
> 
> Only sync dirty_bitmap and set_memory are actually implemented.
> migration_log will stay empty for the moment.
> 
> Xen can only log one range for bit change, so only the range in the
> first call will be synced.
> 
> Signed-off-by: Anthony PERARD <address@hidden>
> ---
>  hw/vga.c   |    7 ++
>  hw/xen.h   |    2 +
>  xen-all.c  |  233 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  xen-stub.c |   11 +++
>  4 files changed, 253 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/vga.c b/hw/vga.c
> index c057f4f..5f7a181 100644
> --- a/hw/vga.c
> +++ b/hw/vga.c
> @@ -29,6 +29,7 @@
>  #include "pixel_ops.h"
>  #include "qemu-timer.h"
>  #include "kvm.h"
> +#include "xen.h"
>  
>  //#define DEBUG_VGA
>  //#define DEBUG_VGA_MEM
> @@ -1599,6 +1600,9 @@ void vga_dirty_log_start(VGACommonState *s)
>  {
>      if (kvm_enabled() && s->map_addr)
>          kvm_log_start(s->map_addr, s->map_end - s->map_addr);
> +    if (xen_enabled() && s->map_addr) {
> +        xen_log_start(s->map_addr, s->map_end - s->map_addr);
> +    }
>  
>      if (kvm_enabled() && s->lfb_vram_mapped) {
>          kvm_log_start(isa_mem_base + 0xa0000, 0x8000);
> @@ -1616,6 +1620,9 @@ void vga_dirty_log_stop(VGACommonState *s)
>  {
>      if (kvm_enabled() && s->map_addr)
>       kvm_log_stop(s->map_addr, s->map_end - s->map_addr);
> +    if (xen_enabled() && s->map_addr) {
> +        xen_log_stop(s->map_addr, s->map_end - s->map_addr);
> +    }
>  
>      if (kvm_enabled() && s->lfb_vram_mapped) {
>       kvm_log_stop(isa_mem_base + 0xa0000, 0x8000);

This is probably the right time to make dirty_log_start/stop callbacks
in CPUPhysMemoryClient as well. Would remove any KVM or Xen reference
from vga code.

We just need to think about how to deal with the quirks of its users:
KVM requires the isa vram to be reported in two chunks, Xen can't handle
more than one region at all. If Xen is able to filter out those events
it can handle, we could replace kvm_log_start/stop with some
cpu_notify_log_start/stop.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux



reply via email to

[Prev in Thread] Current Thread [Next in Thread]