All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Anthony Perard <anthony.perard@citrix.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Alexander Graf <agraf@suse.de>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] xen: avoid tracking the region 0xa0000 - 0xbffff
Date: Tue, 14 Jun 2011 13:59:32 +0200	[thread overview]
Message-ID: <4DF74D24.9000808@siemens.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1106141248230.12963@kaball-desktop>

On 2011-06-14 13:50, Stefano Stabellini wrote:
> On Tue, 14 Jun 2011, Jan Kiszka wrote:
>> On 2011-06-14 12:54, Alexander Graf wrote:
>>>
>>> On 03.06.2011, at 17:56, <stefano.stabellini@eu.citrix.com> <stefano.stabellini@eu.citrix.com> wrote:
>>>
>>>> From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>>>>
>>>> Xen can only do dirty bit tracking for one memory region, so we should
>>>> explicitly avoid trying to track the legacy VGA region between 0xa0000
>>>> and 0xbffff, rather than trying and failing.
>>>>
>>>> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>>>> ---
>>>> xen-all.c |    4 ++++
>>>> 1 files changed, 4 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/xen-all.c b/xen-all.c
>>>> index 9a5c3ec..1fdc2e8 100644
>>>> --- a/xen-all.c
>>>> +++ b/xen-all.c
>>>> @@ -218,6 +218,10 @@ static int xen_add_to_physmap(XenIOState *state,
>>>>     if (get_physmapping(state, start_addr, size)) {
>>>>         return 0;
>>>>     }
>>>> +    /* do not try to map legacy VGA memory */
>>>> +    if (start_addr >= 0xa0000 && start_addr + size <= 0xbffff) {
>>>
>>> I don't quite like the hardcoded range here. What exactly is the issue? The fact that you can only map a single region? Then do a counter and fail when it's > 1. If you don't want to map the VGA region as memory slot, why not change the actual mapping code in the cirrus adapter?
>>
>> Err, please no "if (xen_enabled())" in that code. We just got rid of the
>> kvm_enabled() mess. And it doesn't scale, it would be required in e1000
>> as well e.g.
> 
> agreed

[Actually, e1000 is not using dirty logging but coalesced MMIO.]

> 
> 
>> BTW, if Xen is not able to track more than one dirty region, I think
>> it's time to fix that limitation. At some point it may no longer be
>> possible to work around it (who knows how the new memory API will look
>> like in this regard).
> 
> you are right, however it is not a simple fix and at present we don't
> actually need to track more than one region...

Well, you already miss dirty logged VGA/VBE memory access this way
(everything that goes to legacy VGA mem, not the framebuffer BAR). Grub
provides a really poor use experience in that mode.

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: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Anthony Perard <anthony.perard@citrix.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Alexander Graf <agraf@suse.de>,
	"anthony@codemonkey.ws" <anthony@codemonkey.ws>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [PATCH] xen: avoid tracking the region 0xa0000 - 0xbffff
Date: Tue, 14 Jun 2011 13:59:32 +0200	[thread overview]
Message-ID: <4DF74D24.9000808@siemens.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1106141248230.12963@kaball-desktop>

On 2011-06-14 13:50, Stefano Stabellini wrote:
> On Tue, 14 Jun 2011, Jan Kiszka wrote:
>> On 2011-06-14 12:54, Alexander Graf wrote:
>>>
>>> On 03.06.2011, at 17:56, <stefano.stabellini@eu.citrix.com> <stefano.stabellini@eu.citrix.com> wrote:
>>>
>>>> From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>>>>
>>>> Xen can only do dirty bit tracking for one memory region, so we should
>>>> explicitly avoid trying to track the legacy VGA region between 0xa0000
>>>> and 0xbffff, rather than trying and failing.
>>>>
>>>> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>>>> ---
>>>> xen-all.c |    4 ++++
>>>> 1 files changed, 4 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/xen-all.c b/xen-all.c
>>>> index 9a5c3ec..1fdc2e8 100644
>>>> --- a/xen-all.c
>>>> +++ b/xen-all.c
>>>> @@ -218,6 +218,10 @@ static int xen_add_to_physmap(XenIOState *state,
>>>>     if (get_physmapping(state, start_addr, size)) {
>>>>         return 0;
>>>>     }
>>>> +    /* do not try to map legacy VGA memory */
>>>> +    if (start_addr >= 0xa0000 && start_addr + size <= 0xbffff) {
>>>
>>> I don't quite like the hardcoded range here. What exactly is the issue? The fact that you can only map a single region? Then do a counter and fail when it's > 1. If you don't want to map the VGA region as memory slot, why not change the actual mapping code in the cirrus adapter?
>>
>> Err, please no "if (xen_enabled())" in that code. We just got rid of the
>> kvm_enabled() mess. And it doesn't scale, it would be required in e1000
>> as well e.g.
> 
> agreed

[Actually, e1000 is not using dirty logging but coalesced MMIO.]

> 
> 
>> BTW, if Xen is not able to track more than one dirty region, I think
>> it's time to fix that limitation. At some point it may no longer be
>> possible to work around it (who knows how the new memory API will look
>> like in this regard).
> 
> you are right, however it is not a simple fix and at present we don't
> actually need to track more than one region...

Well, you already miss dirty logged VGA/VBE memory access this way
(everything that goes to legacy VGA mem, not the framebuffer BAR). Grub
provides a really poor use experience in that mode.

Jan

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

  reply	other threads:[~2011-06-14 11:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 15:56 [Qemu-devel] [PATCH] xen: avoid tracking the region 0xa0000 - 0xbffff stefano.stabellini
2011-06-03 15:56 ` stefano.stabellini
2011-06-03 15:56 ` [Qemu-devel] [PATCH] cirrus_vga: reset lfb_addr after a pci config write if the BAR is unmapped stefano.stabellini
2011-06-03 15:56   ` stefano.stabellini
2011-06-14 13:54   ` [Qemu-devel] " Alexander Graf
2011-06-14 13:54     ` Alexander Graf
2011-06-14 16:25     ` [Qemu-devel] " Jan Kiszka
2011-06-14 16:25       ` Jan Kiszka
2011-06-14 10:54 ` [PATCH] xen: avoid tracking the region 0xa0000 - 0xbffff Alexander Graf
2011-06-14 11:04   ` [Qemu-devel] " Jan Kiszka
2011-06-14 11:04     ` Jan Kiszka
2011-06-14 11:50     ` [Qemu-devel] " Stefano Stabellini
2011-06-14 11:50       ` Stefano Stabellini
2011-06-14 11:59       ` Jan Kiszka [this message]
2011-06-14 11:59         ` Jan Kiszka
2011-06-14 16:47     ` [Qemu-devel] [Xen-devel] " Avi Kivity
2011-06-14 16:47       ` Avi Kivity
2011-06-14 11:48   ` [Qemu-devel] " Stefano Stabellini
2011-06-14 11:48     ` Stefano Stabellini
2011-06-14 11:52     ` [Qemu-devel] " Alexander Graf
2011-06-14 11:52       ` Alexander Graf
2011-06-14 15:24       ` [Qemu-devel] " Stefano Stabellini
2011-06-14 15:24         ` Stefano Stabellini
2011-06-14 15:24         ` [Qemu-devel] " Alexander Graf
2011-06-14 15:24           ` Alexander Graf
2011-06-15  8:09         ` [Qemu-devel] " Alexander Graf
2011-06-15  8:09           ` Alexander Graf
2011-06-15 16:27           ` [Qemu-devel] " Stefano Stabellini
2011-06-15 16:27             ` Stefano Stabellini

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=4DF74D24.9000808@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=agraf@suse.de \
    --cc=anthony.perard@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --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.