* __supported_pte_mask |= _PAGE_IOMAP twice?
@ 2010-08-22 12:06 Josip Rodin
2010-08-22 12:13 ` Josip Rodin
2010-08-22 13:07 ` Ian Campbell
0 siblings, 2 replies; 3+ messages in thread
From: Josip Rodin @ 2010-08-22 12:06 UTC (permalink / raw)
To: xen-devel
Hi,
I don't really understand this, but in xen-2.6.36/dom0/core there's this:
% git diff 0c2b1aa4c31830d3b9a40061d1b5f6c8cd837d57 057e5006127460b11e03bf80227881c528b0590d
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 167ca78..0850bd6 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1195,12 +1195,12 @@ asmlinkage void __init xen_start_kernel(void)
pgd = (pgd_t *)xen_start_info->pt_base;
- if (xen_initial_domain())
- __supported_pte_mask |= _PAGE_IOMAP;
- else
+ if (!xen_initial_domain())
__supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD);
__supported_pte_mask |= _PAGE_IOMAP;
+
+ __supported_pte_mask |= _PAGE_IOMAP;
/* Don't do the full vcpu_info placement stuff until we have a
possible map and a non-dummy shared_info. */
per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];
What's the point of doing the same thing twice at the end? Maybe it's
a mis-merge?
--
2. That which causes joy or happiness.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: __supported_pte_mask |= _PAGE_IOMAP twice?
2010-08-22 12:06 __supported_pte_mask |= _PAGE_IOMAP twice? Josip Rodin
@ 2010-08-22 12:13 ` Josip Rodin
2010-08-22 13:07 ` Ian Campbell
1 sibling, 0 replies; 3+ messages in thread
From: Josip Rodin @ 2010-08-22 12:13 UTC (permalink / raw)
To: xen-devel
On Sun, Aug 22, 2010 at 02:06:36PM +0200, joy wrote:
> Hi,
>
> I don't really understand this, but in xen-2.6.36/dom0/core there's this:
>
> % git diff 0c2b1aa4c31830d3b9a40061d1b5f6c8cd837d57 057e5006127460b11e03bf80227881c528b0590d
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index 167ca78..0850bd6 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -1195,12 +1195,12 @@ asmlinkage void __init xen_start_kernel(void)
>
> pgd = (pgd_t *)xen_start_info->pt_base;
>
> - if (xen_initial_domain())
> - __supported_pte_mask |= _PAGE_IOMAP;
> - else
> + if (!xen_initial_domain())
> __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD);
>
> __supported_pte_mask |= _PAGE_IOMAP;
> +
> + __supported_pte_mask |= _PAGE_IOMAP;
> /* Don't do the full vcpu_info placement stuff until we have a
> possible map and a non-dummy shared_info. */
> per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];
>
>
> What's the point of doing the same thing twice at the end? Maybe it's
> a mis-merge?
It looks like it, because in:
% git diff 3fe0344faf7fdcb158bd5c1a9aec960a8d70c8e8 xen/dom0/core
...that hunk is just:
@@ -1031,6 +1066,8 @@ asmlinkage void __init xen_start_kernel(void)
if (!xen_initial_domain())
__supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD);
+ __supported_pte_mask |= _PAGE_IOMAP;
+
#ifdef CONFIG_X86_64
/* Work out if we support NX */
check_efer();
--
2. That which causes joy or happiness.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: __supported_pte_mask |= _PAGE_IOMAP twice?
2010-08-22 12:06 __supported_pte_mask |= _PAGE_IOMAP twice? Josip Rodin
2010-08-22 12:13 ` Josip Rodin
@ 2010-08-22 13:07 ` Ian Campbell
1 sibling, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2010-08-22 13:07 UTC (permalink / raw)
To: Josip Rodin; +Cc: xen-devel@lists.xensource.com
On Sun, 2010-08-22 at 13:06 +0100, Josip Rodin wrote:
> Hi,
>
> I don't really understand this, but in xen-2.6.36/dom0/core there's this:
>
> % git diff 0c2b1aa4c31830d3b9a40061d1b5f6c8cd837d57 057e5006127460b11e03bf80227881c528b0590d
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index 167ca78..0850bd6 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -1195,12 +1195,12 @@ asmlinkage void __init xen_start_kernel(void)
>
> pgd = (pgd_t *)xen_start_info->pt_base;
>
> - if (xen_initial_domain())
> - __supported_pte_mask |= _PAGE_IOMAP;
> - else
> + if (!xen_initial_domain())
> __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD);
>
> __supported_pte_mask |= _PAGE_IOMAP;
> +
> + __supported_pte_mask |= _PAGE_IOMAP;
> /* Don't do the full vcpu_info placement stuff until we have a
> possible map and a non-dummy shared_info. */
> per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];
>
>
> What's the point of doing the same thing twice at the end? Maybe it's
> a mis-merge?
Yes, I think its a mismerge. The same thing was in xen/stable-2.6.32.x
until recently as well.
Ian.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-22 13:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-22 12:06 __supported_pte_mask |= _PAGE_IOMAP twice? Josip Rodin
2010-08-22 12:13 ` Josip Rodin
2010-08-22 13:07 ` Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).