On 11.01.21 09:41, Jan Beulich wrote:
Hi Jan
On 08.01.2021 18:37, Oleksandr wrote:
On 08.01.21 19:01, Jan Beulich wrote:
Hi Jan
On 08.01.2021 17:38, Oleksandr wrote:
On 05.01.21 10:48, Jan Beulich wrote:
On 04.01.2021 17:57, Oleksandr Tyshchenko wrote:
Hello all.
[Sorry for the possible format issues]
On Tue, Dec 22, 2020 at 12:41 PM Andrew Cooper <andrew.coop...@citrix.com>
wrote:
On 21/12/2020 08:10, Jan Beulich wrote:
On 17.12.2020 20:18, Andrew Cooper wrote:
On 15/12/2020 16:26, Jan Beulich wrote:
This is together with its only caller, xenmem_add_to_physmap_one().
I can't parse this sentence. Perhaps "... as is it's only caller," as a
follow-on from the subject sentence.
Move
the latter next to p2m_add_foreign(), allowing this one to become
static
at the same time.
Signed-off-by: Jan Beulich <jbeul...@suse.com>
Acked-by: Andrew Cooper <andrew.coop...@citrix.com>
So I had to ask Andrew to revert this (I was already at home when
noticing the breakage), as it turned out to break the shim build.
The problem is that xenmem_add_to_physmap() is non-static and
hence can't be eliminated altogether by the compiler when !HVM.
We could make the function conditionally static
"#if !defined(CONFIG_X86) && !defined(CONFIG_HVM)", but this
looks uglier to me than this extra hunk:
--- unstable.orig/xen/common/memory.c
+++ unstable/xen/common/memory.c
@@ -788,7 +788,11 @@ int xenmem_add_to_physmap(struct domain
union add_to_physmap_extra extra = {};
struct page_info *pages[16];
- ASSERT(paging_mode_translate(d));
+ if ( !paging_mode_translate(d) )
+ {
+ ASSERT_UNREACHABLE();
+ return -EACCES;
+ }
if ( xatp->space == XENMAPSPACE_gmfn_foreign )
extra.foreign_domid = DOMID_INVALID;
Andrew, please let me know whether your ack stands with this (or
said alternative) added, or whether you'd prefer me to re-post.
Yeah, this is probably neater than the ifdefary. My ack stands.
~Andrew
I might miss something or did incorrect tests, but ...
... trying to build current staging
(7ba2ab495be54f608cb47440e1497b2795bd301a) for x86 (with # CONFIG_HVM is
not set) I got the following:
/media/b/build/build/tmp/work/x86_64-xt-linux/domd-image-weston/1.0-r0/repo/build/tmp/work/aarch64-poky-linux/xen/4.14.0+gitAUTOINC+2c6e5a8ceb-r0/git/xen/common/memory.c:941:
undefined reference to `xenmem_add_to_physmap_one'
/media/b/build/build/tmp/work/x86_64-xt-linux/domd-image-weston/1.0-r0/repo/build/tmp/work/aarch64-poky-linux/xen/4.14.0+gitAUTOINC+2c6e5a8ceb-r0/git/xen/common/memory.c:941:(.text+0x1e391):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`xenmem_add_to_physmap_one'
ld:
/media/b/build/build/tmp/work/x86_64-xt-linux/domd-image-weston/1.0-r0/repo/build/tmp/work/aarch64-poky-linux/xen/4.14.0+gitAUTOINC+2c6e5a8ceb-r0/git/xen/.xen-syms.0:
hidden symbol `xenmem_add_to_physmap_one' isn't defined
ld: final link failed: Bad value
It is worth mentioning that I do not use pvshim_defconfig (I disable HVM
support via menuconfig manually before building).
The specific .config may matter. The specific compiler version may
also matter. Things work fine for me, both for the shim config and
a custom !HVM one, with gcc10.
ok, after updating my a little bit ancient compiler to the latest
possible (?) on xenial gcc-9 the build issue had gone away. Sorry for
the noise.
There's no reason to be sorry - we want Xen to build with a wide
range of compiler versions. It's just that if a build issue is
version dependent, it is often up to the person running into it
to determine how to address the issue (and submit a patch).
ok, the issue was observed with gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12)
5.4.0 20160609
I think (but not 100% sure), to address the build issue something like
the stub below could help:
I'm sure this would help, but personally I'd prefer if we could limit
the number of such stubs and rely on the compiler DCE-ing the calls.
Hence it would be at least desirable (imo necessary) to understand
what prevents this to happen here, with this gcc version.
Sounds reasonable
If you could also provide your exact .config, I could see whether I
can repro here with some of the gcc5 versions I have laying around.
Please see attached
--
Regards,
Oleksandr Tyshchenko
#
# Automatically generated file; DO NOT EDIT.
# Xen/x86 4.15-unstable Configuration
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=50400
CONFIG_CLANG_VERSION=0
CONFIG_CC_HAS_VISIBILITY_ATTRIBUTE=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
CONFIG_INDIRECT_THUNK=y
#
# Architecture Features
#
CONFIG_NR_CPUS=256
CONFIG_PV=y
CONFIG_PV32=y
CONFIG_PV_LINEAR_PT=y
# CONFIG_HVM is not set
CONFIG_SHADOW_PAGING=y
# CONFIG_BIGMEM is not set
CONFIG_TBOOT=y
CONFIG_XEN_ALIGN_DEFAULT=y
# CONFIG_XEN_ALIGN_2M is not set
# CONFIG_XEN_GUEST is not set
# CONFIG_HYPERV_GUEST is not set
# end of Architecture Features
#
# Common Features
#
CONFIG_COMPAT=y
CONFIG_CORE_PARKING=y
CONFIG_GRANT_TABLE=y
CONFIG_HAS_ALTERNATIVE=y
CONFIG_HAS_EX_TABLE=y
CONFIG_HAS_FAST_MULTIPLY=y
CONFIG_HAS_IOPORTS=y
CONFIG_HAS_KEXEC=y
CONFIG_HAS_MEM_PAGING=y
CONFIG_HAS_PDX=y
CONFIG_HAS_SCHED_GRANULARITY=y
CONFIG_HAS_UBSAN=y
CONFIG_MEM_ACCESS_ALWAYS_ON=y
CONFIG_MEM_ACCESS=y
CONFIG_NEEDS_LIBELF=y
#
# Speculative hardening
#
CONFIG_SPECULATIVE_HARDEN_ARRAY=y
CONFIG_SPECULATIVE_HARDEN_BRANCH=y
# end of Speculative hardening
CONFIG_HYPFS=y
CONFIG_HYPFS_CONFIG=y
CONFIG_KEXEC=y
CONFIG_XENOPROF=y
# CONFIG_XSM is not set
CONFIG_SCHED_CREDIT=y
CONFIG_SCHED_CREDIT2=y
CONFIG_SCHED_RTDS=y
CONFIG_SCHED_ARINC653=y
CONFIG_SCHED_NULL=y
CONFIG_SCHED_DEFAULT="credit2"
CONFIG_CRYPTO=y
CONFIG_LIVEPATCH=y
CONFIG_FAST_SYMBOL_LOOKUP=y
CONFIG_ENFORCE_UNIQUE_SYMBOLS=y
CONFIG_CMDLINE=""
CONFIG_DOM0_MEM=""
CONFIG_TRACEBUFFER=y
# end of Common Features
#
# Device Drivers
#
CONFIG_ACPI=y
CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
CONFIG_NUMA=y
CONFIG_HAS_NS16550=y
CONFIG_HAS_EHCI=y
CONFIG_HAS_CPUFREQ=y
CONFIG_HAS_PASSTHROUGH=y
CONFIG_HAS_PCI=y
CONFIG_VIDEO=y
CONFIG_VGA=y
# end of Device Drivers
# CONFIG_EXPERT is not set
CONFIG_ARCH_SUPPORTS_INT128=y
#
# Debugging Options
#
CONFIG_DEBUG=y
# CONFIG_CRASH_DEBUG is not set
CONFIG_GDBSX=y
CONFIG_DEBUG_INFO=y
CONFIG_FRAME_POINTER=y
# CONFIG_DEBUG_LOCK_PROFILE is not set
CONFIG_DEBUG_LOCKS=y
# CONFIG_PERF_COUNTERS is not set
CONFIG_VERBOSE_DEBUG=y
CONFIG_SCRUB_DEBUG=y
# CONFIG_UBSAN is not set
# CONFIG_DEBUG_TRACE is not set
CONFIG_XMEM_POOL_POISON=y
# end of Debugging Options