All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fixing 32-bit guest support on x86_64 xen
@ 2005-12-03  0:07 Nakajima, Jun
  2005-12-04 17:41 ` Matt Ayres
  0 siblings, 1 reply; 3+ messages in thread
From: Nakajima, Jun @ 2005-12-03  0:07 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 332 bytes --]

The patch fixes unmodified 32-bit guest support on the x86_64 Xen.
Please apply.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>

shadow.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)
 
Jun
---
Intel Open Source Technology Center 

[-- Attachment #2: 32bit_guest.patch --]
[-- Type: application/octet-stream, Size: 1652 bytes --]

diff -r 265f68795ebf xen/arch/x86/shadow.c
--- a/xen/arch/x86/shadow.c	Fri Dec  2 14:16:37 2005
+++ b/xen/arch/x86/shadow.c	Fri Dec  2 16:02:03 2005
@@ -637,6 +637,11 @@
         gpl1e = (guest_l1_pgentry_t *) map_domain_page(tmp_gmfn);
 
         /* If the PGT_l1_shadow has two continual pages */
+#if CONFIG_PAGING_LEVELS >=3
+        if (d->arch.ops->guest_paging_levels == PAGING_L2)
+            __shadow_get_l2e(v,  va & ~((1<<L2_PAGETABLE_SHIFT_32) - 1), &tmp_sl2e);
+        else
+#endif
         __shadow_get_l2e(v, va, &tmp_sl2e);
         spl1e = (l1_pgentry_t *) map_domain_page(l2e_get_pfn(tmp_sl2e));
 
@@ -1809,9 +1814,12 @@
     }
 #endif
 
-    need_flush |= resync_all(d, PGT_l2_shadow);
-
 #if CONFIG_PAGING_LEVELS >= 3
+    if (d->arch.ops->guest_paging_levels == PAGING_L2)
+        need_flush |= resync_all(d, PGT_l4_shadow);
+    else
+        need_flush |= resync_all(d, PGT_l2_shadow);
+
     if (d->arch.ops->guest_paging_levels >= PAGING_L3) 
     {
         need_flush |= resync_all(d, PGT_l3_shadow);
@@ -2943,6 +2951,8 @@
        sl2_p[sl2_idx + 1] =
             entry_from_pfn(sl1mfn + 1, entry_get_flags(sl2_p[sl2_idx]));
     }
+    else
+        sl2_p[sl2_idx + 1] = (pgentry_64_t){0};
     unmap_domain_page(sl2_p);
 
 }
@@ -3528,9 +3538,9 @@
 
     __shadow_sync_va(v, va);
 
-    if ( __shadow_get_l1e(v, va, &old_sl1e) )
+    if ( shadow_mode_external(d) && __shadow_get_l1e(v, va, &old_sl1e) )
         if ( l1e_get_flags(old_sl1e) & _PAGE_PRESENT )
-            shadow_put_page_from_l1e(old_sl1e, d);
+            put_page_from_l1e(old_sl1e, d);
 
     sl1e = l1e_empty();
     __shadow_set_l1e(v, va, &sl1e);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fixing 32-bit guest support on x86_64 xen
  2005-12-03  0:07 [PATCH] Fixing 32-bit guest support on x86_64 xen Nakajima, Jun
@ 2005-12-04 17:41 ` Matt Ayres
  0 siblings, 0 replies; 3+ messages in thread
From: Matt Ayres @ 2005-12-04 17:41 UTC (permalink / raw)
  To: Nakajima, Jun; +Cc: xen-devel



Nakajima, Jun wrote:
> The patch fixes unmodified 32-bit guest support on the x86_64 Xen.
> Please apply.
> 

Is this supposed to allow 32-bit domU kernels running under a 64-bit 
Xen/dom0 or just a 32-bit user land under a 64-bit setup?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] Fixing 32-bit guest support on x86_64 xen
@ 2005-12-04 19:16 Nakajima, Jun
  0 siblings, 0 replies; 3+ messages in thread
From: Nakajima, Jun @ 2005-12-04 19:16 UTC (permalink / raw)
  To: Matt Ayres; +Cc: xen-devel

Matt Ayres wrote:
> Nakajima, Jun wrote:
>> The patch fixes unmodified 32-bit guest support on the x86_64 Xen.
>> Please apply. 
>> 
> 
> Is this supposed to allow 32-bit domU kernels running under a 64-bit
> Xen/dom0 or just a 32-bit user land under a 64-bit setup?

The domU kernels are xenlinux, and 32-bit xenlinux does not run on a
64-hit Xen. The patch is supposed to fix 32-bit _unmodified_ guests
support (e.g. native Linux, Windows, etc.) on a 64-bit Xen when the H/W
virtualization technology is present.

32-bit userland apps are supposed to run in x86_64 xenlinux today.

Jun
---
Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-12-04 19:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-03  0:07 [PATCH] Fixing 32-bit guest support on x86_64 xen Nakajima, Jun
2005-12-04 17:41 ` Matt Ayres
  -- strict thread matches above, loose matches on Subject: below --
2005-12-04 19:16 Nakajima, Jun

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.