[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-4.10 v2 3/5] tools/dombuilder: Switch to using gfn terminology for console and xenstore rings



On Thu, Oct 12, 2017 at 08:19:07PM +0100, Andrew Cooper wrote:
> The sole use of xc_dom_translated() and xc_dom_p2m() outside of the domain
> builder is for libxl_dom() to translate the console and xenstore pfns back
> into useful values.  PV guest pfns are only interesting to the domain builder,
> and gfns are the address space used by all other hypercalls.
> 
> Renaming the fields in xc_dom_image is deliberate, as it will cause
> out-of-tree users of the dombuilder to notice the different semantics.
> 
> Correct the terminology throughout xc_dom_gnttab{_hvm,}_seed(), which are all
> using gfns despite the existing variable names.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> Tested-by: Julien Grall <julien.grall@xxxxxxx>
> ---
> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> CC: Julien Grall <julien.grall@xxxxxxx>
> 
> v2:
>  * More style fixes
> ---
>  tools/libxc/include/xc_dom.h      | 10 +++++++--
>  tools/libxc/xc_dom_arm.c          | 12 +++++------
>  tools/libxc/xc_dom_boot.c         | 45 
> ++++++++++++++++++---------------------
>  tools/libxc/xc_dom_compat_linux.c |  4 ++--
>  tools/libxc/xc_dom_x86.c          | 45 
> ++++++++++++++++++++-------------------
>  tools/libxl/libxl_dom.c           | 11 +++-------
>  6 files changed, 63 insertions(+), 64 deletions(-)
> 
> diff --git a/tools/libxc/include/xc_dom.h b/tools/libxc/include/xc_dom.h
> index cdcdd07..5907559 100644
> --- a/tools/libxc/include/xc_dom.h
> +++ b/tools/libxc/include/xc_dom.h
> @@ -94,8 +94,6 @@ struct xc_dom_image {
>      struct xc_dom_seg devicetree_seg;
>      struct xc_dom_seg start_info_seg; /* HVMlite only */
>      xen_pfn_t start_info_pfn;
> -    xen_pfn_t console_pfn;
> -    xen_pfn_t xenstore_pfn;
>      xen_pfn_t shared_info_pfn;
>      xen_pfn_t bootstack_pfn;
>      xen_pfn_t pfn_alloc_end;
> @@ -103,6 +101,14 @@ struct xc_dom_image {
>      xen_vaddr_t bsd_symtab_start;
>  
>      /*
> +     * Details for the toolstack-prepared rings.
> +     *
> +     * *_gfn fields are allocated by the domain builder.
> +     */
> +    xen_pfn_t console_gfn;
> +    xen_pfn_t xenstore_gfn;
> +
> +    /*

Stubdom build is broken by this change:

mini-os.c:756:23: note: in expansion of macro ‘BOOTSEC_LOCATION’
     mbi.drives_addr = BOOTSEC_LOCATION + (60 * 1024);
                       ^~~~~~~~~~~~~~~~
gcc -mno-red-zone -O1 -fno-omit-frame-pointer -O1 -fno-omit-frame-pointer  -m64 
-mno-red-zone -fno-reorder-blocks -fno-asynchronous-unwind-tables -m64 
-DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall
 -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable 
-Wno-unused-local-typedefs   -fno-stack-protector -fno-exceptions -fno-builtin 
-Wall -Werror -Wredundant-decls -Wno-for
mat -Wno-redundant-decls -Wformat -fno-stack-protector -fgnu89-inline 
-Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline -g 
-D__INSIDE_MINIOS__ -m64 -mno-red-zone -fno-reorder-blocks -fno-
asynchronous-unwind-tables -DCONFIG_PARAVIRT -DCONFIG_SPARSE_BSS 
-DCONFIG_BLKFRONT -DCONFIG_TPMFRONT -DCONFIG_TPM_TIS -DCONFIG_TPMBACK 
-DCONFIG_XENBUS -D__XEN_INTERFACE_VERSION__=0x00030205 -isystem
/local/work/COMMITTER/xen.git/stubdom/../extras/mini-os/include -D__MINIOS__ 
-DHAVE_LIBC -isystem 
/local/work/COMMITTER/xen.git/stubdom/../extras/mini-os/include/posix -isystem 
/local/work/COMMITTER/
xen.git/stubdom/../tools/xenstore/include  -isystem 
/local/work/COMMITTER/xen.git/stubdom/../extras/mini-os/include/x86 -isystem 
/local/work/COMMITTER/xen.git/stubdom/../extras/mini-os/include/x86/x8
6_64 -U __linux__ -U __FreeBSD__ -U __sun__ -nostdinc -isystem 
/local/work/COMMITTER/xen.git/stubdom/../extras/mini-os/include/posix -isystem 
/local/work/COMMITTER/xen.git/stubdom/cross-root-x86_64/x
86_64-xen-elf/include -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -isystem 
/local/work/COMMITTER/xen.git/stubdom/lwip-x86_64/src/include -isystem 
/local/work/COMMITTER/xen.git/stubdom/lwip-x86_6
4/src/include/ipv4 -I/local/work/COMMITTER/xen.git/stubdom/include 
-I/local/work/COMMITTER/xen.git/stubdom/../xen/include -isystem 
/local/work/COMMITTER/xen.git/stubdom/../extras/mini-os/include -D__
MINIOS__ -DHAVE_LIBC -isystem 
/local/work/COMMITTER/xen.git/stubdom/../extras/mini-os/include/posix -isystem 
/local/work/COMMITTER/xen.git/stubdom/../tools/xenstore/include  -isystem 
/local/work/COMM
ITTER/xen.git/stubdom/../extras/mini-os/include/x86 -isystem 
/local/work/COMMITTER/xen.git/stubdom/../extras/mini-os/include/x86/x86_64 -c 
gntmap.c -o /local/work/COMMITTER/xen.git/stubdom/mini-os-x8
6_64-vtpmmgr/gntmap.o
In file included from 
/local/work/COMMITTER/xen.git/stubdom/include/xen/xen.h:30:0,
                 from 
/local/work/COMMITTER/xen.git/stubdom/grub/../../tools/libxc/include/xenctrl.h:35,
                 from kexec.c:22:
/local/work/COMMITTER/xen.git/stubdom/include/xen/xen-compat.h:34:0: warning: 
"__XEN_INTERFACE_VERSION__" redefined
 #define __XEN_INTERFACE_VERSION__ __XEN_LATEST_INTERFACE_VERSION__
<command-line>:0:0: note: this is the location of the previous definition
In file included from 
/local/work/COMMITTER/xen.git/extras/mini-os-remote/include/mm.h:39:0,
                 from 
/local/work/COMMITTER/xen.git/extras/mini-os-remote/include/x86/x86_64/hypercall-x86_64.h:39,
                 from 
/local/work/COMMITTER/xen.git/extras/mini-os-remote/include/hypervisor.h:20,
                 from 
/local/work/COMMITTER/xen.git/extras/mini-os-remote/include/x86/os.h:16,
                 from 
/local/work/COMMITTER/xen.git/extras/mini-os-remote/include/console.h:39,
                 from kexec.c:26:
kexec.c: In function ‘kexec’:
kexec.c:221:43: warning: taking address of expression of type ‘void’
     xen_pfn_t boot_page_mfn = virt_to_mfn(&_boot_page);
                                           ^
kexec.c:315:25: error: ‘struct xc_dom_image’ has no member named ‘console_pfn’; 
did you mean ‘console_gfn’?
     do_exchange(dom, dom->console_pfn, start_info.console.domU.mfn);
                         ^~
kexec.c:316:25: error: ‘struct xc_dom_image’ has no member named 
‘xenstore_pfn’; did you mean ‘xenstore_gfn’?
     do_exchange(dom, dom->xenstore_pfn, start_info.store_mfn);
                         ^~
In file included from 
/local/work/COMMITTER/xen.git/extras/mini-os-remote/include/mm.h:39:0,
                 from 
/local/work/COMMITTER/xen.git/extras/mini-os-remote/include/x86/x86_64/hypercall-x86_64.h:39,
                 from 
/local/work/COMMITTER/xen.git/extras/mini-os-remote/include/hypervisor.h:20,
                 from 
/local/work/COMMITTER/xen.git/extras/mini-os-remote/include/x86/os.h:16,
                 from 
/local/work/COMMITTER/xen.git/extras/mini-os-remote/include/console.h:39,
                 from kexec.c:26:
kexec.c:322:25: warning: taking address of expression of type ‘void’
             virt_to_mfn(&_boot_page));
                         ^
Makefile:80: recipe for target 
'/local/work/COMMITTER/xen.git/stubdom/grub-x86_64/kexec.o' failed
make[2]: *** [/local/work/COMMITTER/xen.git/stubdom/grub-x86_64/kexec.o] Error 1
make[2]: Leaving directory '/local/work/COMMITTER/xen.git/stubdom/grub'
Makefile:537: recipe for target 'grub' failed
make[1]: *** [grub] Error 2
make[1]: *** Waiting for unfinished jobs....

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.