Skip to contentSkip to conversation

Introduce a grant_entry_v2 structure.

Xen-changelog Juergen Gross 4 participants 10 messages Oct 7, 2009 – Oct 8, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 8 lines · Xen patchbot-unstable

# HG changeset patch
# User Keir Fraser <[email protected]> # Date 1254897996 -3600
# Node ID 95ea2052b41b209fa913d6861143915140be4171 # Parent 7d4f05a65d5a840eca5fdf1319c696d5583f100d Introduce a grant_entry_v2 structure.

This patch breaks my build:

make[3]: Entering directory `/home/gross/xen-unstable.hg/tools/libxc' gcc -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -MMD -MF .xc_core.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Werror -Wmissing-prototypes -I. -I../xenstore -I../include -c -o xc_core.o xc_core.c
In file included from xg_private.h:14,

                 from xc_core.c:52:

xenctrl.h:948: error: ‘grant_entry_v2’ defined as wrong kind of tag make[3]: *** [xc_core.o] Error 1
make[3]: Leaving directory `/home/gross/xen-unstable.hg/tools/libxc' make[2]: *** [build] Error 2
make[2]: Leaving directory `/home/gross/xen-unstable.hg/tools/libxc' make[1]: *** [subdir-all-libxc] Error 2
make[1]: Leaving directory `/home/gross/xen-unstable.hg/tools'
make: *** [subdirs-all] Error 2

Juergen

Signature · 5 lines
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 636 47950
Fujitsu Technolgy Solutions               e-mail: [email protected]
Otto-Hahn-Ring 6                        Internet: ts.fujitsu.com
D-81739 Muenchen                 Company details: ts.fujitsu.com/imprint.html
#3 lore raw
Quoted 8 lines · Keir Fraser
Quoted 4 lines · Juergen Gross
Quoted 3 lines

Introduce a grant_entry_v2 structure.

This patch breaks my build:

Should be fixed by c/s 20288.

Build still not okay:

cc1: warnings being treated as errors
xc_minios.c:417: error: no previous prototype for ‘xc_gnttab_map_table’ make[4]: *** [xc_minios.o] Error 1
make[4]: Leaving directory `/home/gross/xen-unstable.hg/stubdom/libxc-x86_64' make[3]: *** [build] Error 2
make[3]: Leaving directory `/home/gross/xen-unstable.hg/stubdom/libxc-x86_64' make[2]: *** [libxc-x86_64/libxenctrl.a] Error 2
make[2]: Leaving directory `/home/gross/xen-unstable.hg/stubdom' make[1]: *** [install-stubdom] Error 2
make[1]: Leaving directory `/home/gross/xen-unstable.hg'
make: *** [world] Error 2

Juergen

Signature · 5 lines
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 636 47950
Fujitsu Technolgy Solutions               e-mail: [email protected]
Otto-Hahn-Ring 6                        Internet: ts.fujitsu.com
D-81739 Muenchen                 Company details: ts.fujitsu.com/imprint.html
#4 lore raw
Quoted 11 lines · Juergen Gross
Quoted 8 lines · Keir Fraser
Quoted 4 lines · Juergen Gross
Quoted 3 lines

Introduce a grant_entry_v2 structure.

This patch breaks my build:

Should be fixed by c/s 20288.

Build still not okay:

Fixed by c/s 20291.

-- Keir

#5 lore raw
Quoted 9 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines

Introduce a grant_entry_v2 structure.

This patch breaks my build:

Should be fixed by c/s 20288.

Build still not okay:

Fixed by c/s 20291.

Oops; sorry about that. I completely forgot about the non-Linux dom0 OSes.

Steven.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#6 lore raw
Quoted 11 lines · Steven Smith
Quoted 9 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines

Introduce a grant_entry_v2 structure.

This patch breaks my build:

Should be fixed by c/s 20288.

Build still not okay:

Fixed by c/s 20291.

Oops; sorry about that. I completely forgot about the non-Linux dom0 OSes.

Could you have a stab at fixing the IA64 gnttab hooks? Either that or solicit help from the ia64 devs (cc'ing Isaku).

K.

grant_table.c: In function 'gnttab_populate_status_frames':
grant_table.c:1026: warning: implicit declaration of function 'gnttab_create_status_page'
grant_table.c: In function 'gnttab_grow_table':
grant_table.c:1088: error: 'struct grant_table' has no member named 'shared' grant_table.c:1088: error: 'struct grant_table' has no member named 'shared' grant_table.c: In function '__acquire_grant_for_copy':
grant_table.c:1757: error: 'INVALID_GFN' undeclared (first use in this function)
grant_table.c:1757: error: (Each undeclared identifier is reported only once grant_table.c:1757: error: for each function it appears in.) grant_table.c: In function 'gnttab_get_status_frames':
grant_table.c:2083: warning: implicit declaration of function 'gnttab_status_gmfn'
grant_table.c: In function 'grant_table_create':
grant_table.c:2326: error: 'struct grant_table' has no member named 'shared' grant_table.c:2326: error: 'struct grant_table' has no member named 'shared'

#7 lore raw
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines

Introduce a grant_entry_v2 structure.

This patch breaks my build:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines
Quoted 1 line

Should be fixed by c/s 20288.

Build still not okay:

Fixed by c/s 20291.

Oops; sorry about that. I completely forgot about the non-Linux dom0 OSes.

Could you have a stab at fixing the IA64 gnttab hooks? Either that or solicit help from the ia64 devs (cc'ing Isaku).

I don't have an IA64 build environment set up right now. Do you know if there are any Citrix (or other) ones which I could borrow for a bit, please?

Steven.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#8 lore raw
Quoted 7 lines · Steven Smith
Quoted 4 lines
Quoted 2 lines

Oops; sorry about that. I completely forgot about the non-Linux dom0 OSes.

Could you have a stab at fixing the IA64 gnttab hooks? Either that or solicit help from the ia64 devs (cc'ing Isaku).

I don't have an IA64 build environment set up right now. Do you know if there are any Citrix (or other) ones which I could borrow for a bit, please?

We usually just take a stab and let the ia64 guys fix up if necessary. :-) I suggest just run a draft patch by Isaku.

-- Keir

#9 lore raw
In reply to Steven Smith
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines

Introduce a grant_entry_v2 structure.

This patch breaks my build:

Should be fixed by c/s 20288.

Build still not okay:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Fixed by c/s 20291.

Oops; sorry about that. I completely forgot about the non-Linux dom0 OSes.

Could you have a stab at fixing the IA64 gnttab hooks? Either that or solicit help from the ia64 devs (cc'ing Isaku).

I don't have an IA64 build environment set up right now. Do you know if there are any Citrix (or other) ones which I could borrow for a bit, please?

After some fiddling, I managed to get an IA64 cross toolchain set up, and the attached patch fixes the IA64 build of the hypervisor. I don't have any IA64 test boxes, so I've no idea whether it actually works, but it does build.

I've not looked at the changes to libxc, because my cross-compiler doesn't seem to be able to cope with userspace stuff, but I'd guess they'll probably be okay.

Sorry about the mess.

Steven.

Fix the IA64 build of the hypervisor.

This is completely untested, beyond confirming that it compiles.

xen/arch/ia64/xen/mm.c +1 -1
diff -r 1d7221667204 xen/arch/ia64/xen/mm.c
@@ -3335,7 +3335,7 @@
                 gnttab_grow_table(d, xatp.idx + 1);
 
             if (xatp.idx < nr_grant_frames(d->grant_table))
-                mfn = virt_to_mfn(d->grant_table->shared[xatp.idx]);
+                mfn = virt_to_mfn(d->grant_table->shared_raw[xatp.idx]);
 
             spin_unlock(&d->grant_table->lock);
             break;
xen/common/grant_table.c +1 -1
diff -r 1d7221667204 xen/common/grant_table.c
@@ -1754,7 +1754,7 @@
                blocks mappings of transitive grants. */
             is_sub_page = 1;
             *owning_domain = rrd;
-            act->gfn = INVALID_GFN;
+            act->gfn = -1ul;
         }
         else if ( sha1 )
         {
xen/include/asm-ia64/grant_table.h +24 -2
diff -r 1d7221667204 xen/include/asm-ia64/grant_table.h
@@ -31,8 +31,12 @@
 /* Guest physical address of the grant table.  */
 #define IA64_GRANT_TABLE_PADDR  IA64_XMAPPEDREGS_PADDR(NR_CPUS)
 
-#define gnttab_shared_maddr(t, i)       (virt_to_maddr((t)->shared[(i)]))
-#define gnttab_shared_page(t, i)        (virt_to_page((t)->shared[(i)]))
+#define gnttab_shared_maddr(t, i)       (virt_to_maddr((t)->shared_raw[(i)]))
+#define gnttab_shared_page(t, i)        (virt_to_page((t)->shared_raw[(i)]))
+
+#define gnttab_status_maddr(t, i)       (virt_to_maddr((t)->status[(i)]))
+#define gnttab_status_mfn(t, i)       (virt_to_maddr((t)->status[(i)]) >> PAGE_SHIFT)
+#define gnttab_status_page(t, i)        (virt_to_page((t)->status[(i)]))
 
 #define ia64_gnttab_create_shared_page(d, t, i)                         \
     do {                                                                \
@@ -55,8 +59,26 @@
             ia64_gnttab_create_shared_page((d), (t), (i));      \
     } while (0)
 
+#define ia64_gnttab_create_status_page(d, t, i)                         \
+    do {                                                                \
+        BUG_ON((d)->arch.mm.pgd == NULL);                               \
+        assign_domain_page((d),                                         \
+                           IA64_GRANT_TABLE_PADDR + ((i) << PAGE_SHIFT), \
+                           gnttab_status_maddr((t), (i)));              \
+    } while (0)
+
+#define gnttab_create_status_page(d, t, i)                      \
+    do {                                                        \
+        share_xen_page_with_guest(gnttab_status_page((t), (i)), \
+                                  (d), XENSHARE_writable);      \
+        if ((d)->arch.mm.pgd)                                   \
+            ia64_gnttab_create_status_page((d), (t), (i));      \
+    } while (0)
+
 #define gnttab_shared_gmfn(d, t, i)                 \
     ((IA64_GRANT_TABLE_PADDR >> PAGE_SHIFT) + (i))
+#define gnttab_status_gmfn(d, t, i)                     \
+    (mfn_to_gmfn(d, gnttab_status_mfn(t, i)))
 
 #define gnttab_mark_dirty(d, f) ((void)f)
 
xen/include/asm-x86/grant_table.h +1 -1
diff -r 1d7221667204 xen/include/asm-x86/grant_table.h
@@ -44,7 +44,7 @@
     ((virt_to_maddr((t)->status[i]) >> PAGE_SHIFT))
 
 #define gnttab_status_gmfn(d, t, i)                     \
-    (mfn_to_gmfn(d, gnttab_status_mfn(d, t, i)))
+    (mfn_to_gmfn(d, gnttab_status_mfn(t, i)))
 
 #define gnttab_mark_dirty(d, f) paging_mark_dirty((d), (f))
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#10 lore raw
In reply to Keir Fraser

I'll look into it tomorrow or next week.
thanks,

Quoted 38 lines · Keir Fraser
Quoted 11 lines · Steven Smith
Quoted 9 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines

Introduce a grant_entry_v2 structure.

This patch breaks my build:

Should be fixed by c/s 20288.

Build still not okay:

Fixed by c/s 20291.

Oops; sorry about that. I completely forgot about the non-Linux dom0 OSes.

Could you have a stab at fixing the IA64 gnttab hooks? Either that or solicit help from the ia64 devs (cc'ing Isaku).

K.

grant_table.c: In function 'gnttab_populate_status_frames':
grant_table.c:1026: warning: implicit declaration of function 'gnttab_create_status_page'
grant_table.c: In function 'gnttab_grow_table':
grant_table.c:1088: error: 'struct grant_table' has no member named 'shared' grant_table.c:1088: error: 'struct grant_table' has no member named 'shared' grant_table.c: In function '__acquire_grant_for_copy':
grant_table.c:1757: error: 'INVALID_GFN' undeclared (first use in this function)
grant_table.c:1757: error: (Each undeclared identifier is reported only once grant_table.c:1757: error: for each function it appears in.) grant_table.c: In function 'gnttab_get_status_frames':
grant_table.c:2083: warning: implicit declaration of function 'gnttab_status_gmfn'
grant_table.c: In function 'grant_table_create':
grant_table.c:2326: error: 'struct grant_table' has no member named 'shared' grant_table.c:2326: error: 'struct grant_table' has no member named 'shared'

Signature · 1 line
yamahata