 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 09/14] xen: Introduce HAS_M2P config and use to protect mfn_to_gmfn call
 Hi, On 10/05/2019 13:31, Jan Beulich wrote: On 07.05.19 at 17:14, <julien.grall@xxxxxxx> wrote: I never suggested that as I have no idea who is using it on x86.But then, we would still need to implement mfn_to_gfn on Arm to make it compile. I really want to avoid such macro on Arm. 
 Because code has been changed over the revision and I forgot to update the commit message. It does not matter as long as the GFN is invalid so it can't be mapped afterwards. The exact value is not documented in the header to avoid any assumption. 
 Well, it at least tell you the function can't work. So I think it is still makes sense to have it. 
 Spelling out the exact value gives us less freedom. What matters here is the GFN return can't be mapped. 
 With enough time to rework the headers maybe. At the moment, no because mfn_to_gfn is implemented in p2m.h which depends on domain.h for the definition of struct domain d: 
In file included from /home/julieng/works/xen/xen/include/xen/sched.h:11:0,
                 from x86_64/asm-offsets.c:9:
/home/julieng/works/xen/xen/include/xen/domain.h: In function 
‘domain_shared_info_gfn’:
/home/julieng/works/xen/xen/include/xen/domain.h:124:12: error: implicit 
declaration of function ‘mfn_to_gfn’ [-Werror=implicit-function-declaration]
     return mfn_to_gfn(d, _mfn(__virt_to_mfn(d->shared_info)));
            ^~~~~~~~~~
/home/julieng/works/xen/xen/include/xen/domain.h:124:5: error: nested extern 
declaration of ‘mfn_to_gfn’ [-Werror=nested-externs]
     return mfn_to_gfn(d, _mfn(__virt_to_mfn(d->shared_info)));
     ^~~~~~
In file included from /home/julieng/works/xen/xen/include/asm/current.h:12:0,
                 from /home/julieng/works/xen/xen/include/asm/smp.h:10,
                 from /home/julieng/works/xen/xen/include/xen/smp.h:4,
                 from /home/julieng/works/xen/xen/include/asm/processor.h:10,
                 from /home/julieng/works/xen/xen/include/asm/system.h:6,
                 from /home/julieng/works/xen/xen/include/xen/spinlock.h:4,
                 from /home/julieng/works/xen/xen/include/xen/sched.h:6,
                 from x86_64/asm-offsets.c:9:
/home/julieng/works/xen/xen/include/xen/domain.h:124:46: error: dereferencing 
pointer to incomplete type ‘struct domain’
     return mfn_to_gfn(d, _mfn(__virt_to_mfn(d->shared_info)));
                                              ^
/home/julieng/works/xen/xen/include/asm/page.h:265:61: note: in definition of 
macro ‘virt_to_maddr’
 #define virt_to_maddr(va)   __virt_to_maddr((unsigned long)(va))
                                                             ^~
/home/julieng/works/xen/xen/include/xen/domain.h:124:31: note: in expansion of 
macro ‘__virt_to_mfn’
     return mfn_to_gfn(d, _mfn(__virt_to_mfn(d->shared_info)));
                               ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:217: recipe for target 'asm-offsets.s' failed
make[2]: *** [asm-offsets.s] Error 1
make[2]: Leaving directory '/home/julieng/works/xen/xen/arch/x86'
Makefile:136: recipe for target '/home/julieng/works/xen/xen/xen' failed
make[1]: *** [/home/julieng/works/xen/xen/xen] Error 2
make[1]: Leaving directory '/home/julieng/works/xen/xen'
Makefile:45: recipe for target 'build' failed
make: *** [build] Error 2
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
 
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |