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

[Xen-devel] Re: [PATCH 2/2] xen: Introduce VGA sync dirty bitmap support



Am 11.01.2011 16:37, anthony.perard@xxxxxxxxxx wrote:
> From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> 
> 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 <anthony.perard@xxxxxxxxxx>
> ---
>  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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.