All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: anthony.perard@citrix.com
Cc: Xen Devel <xen-devel@lists.xensource.com>,
	QEMU-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH 2/2] xen: Introduce VGA sync dirty bitmap support
Date: Wed, 12 Jan 2011 11:03:19 +0100	[thread overview]
Message-ID: <4D2D7C67.90801@siemens.com> (raw)
In-Reply-To: <1294760223-26151-3-git-send-email-anthony.perard@citrix.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Jan Kiszka <jan.kiszka@siemens.com>
To: anthony.perard@citrix.com
Cc: Xen Devel <xen-devel@lists.xensource.com>,
	QEMU-devel <qemu-devel@nongnu.org>
Subject: Re: [PATCH 2/2] xen: Introduce VGA sync dirty bitmap support
Date: Wed, 12 Jan 2011 11:03:19 +0100	[thread overview]
Message-ID: <4D2D7C67.90801@siemens.com> (raw)
In-Reply-To: <1294760223-26151-3-git-send-email-anthony.perard@citrix.com>

Am 11.01.2011 16:37, anthony.perard@citrix.com wrote:
> From: Anthony PERARD <anthony.perard@citrix.com>
> 
> 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@citrix.com>
> ---
>  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	other threads:[~2011-01-12 10:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11 15:37 [Qemu-devel] [PATCH 0/2] Xen VGA dirtybit support anthony.perard
2011-01-11 15:37 ` anthony.perard
2011-01-11 15:37 ` [Qemu-devel] [PATCH 1/2] xen: Add xc_domain_add_to_physmap to xen_interface anthony.perard
2011-01-11 15:37   ` anthony.perard
2011-01-11 15:37 ` [Qemu-devel] [PATCH 2/2] xen: Introduce VGA sync dirty bitmap support anthony.perard
2011-01-11 15:37   ` anthony.perard
2011-01-12 10:03   ` Jan Kiszka [this message]
2011-01-12 10:03     ` Jan Kiszka
2011-01-12 16:53     ` [Qemu-devel] " Anthony PERARD
2011-01-12 16:53       ` Anthony PERARD
2011-01-12 11:15   ` [Qemu-devel] Re: [Xen-devel] " Stefano Stabellini
2011-01-12 11:15     ` Stefano Stabellini
2011-01-12 17:15     ` [Qemu-devel] Re: [Xen-devel] " Anthony PERARD
2011-01-12 17:15       ` Anthony PERARD

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=4D2D7C67.90801@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=anthony.perard@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xen-devel@lists.xensource.com \
    /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.