xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: Jan Beulich <jbeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH] x86/shadow: fix build without PV or HVM
Date: Tue, 27 Apr 2021 12:49:46 +0200	[thread overview]
Message-ID: <YIfsSsoAnCJX4V4D@Air-de-Roger> (raw)
In-Reply-To: <20210427104003.28075-1-roger.pau@citrix.com>

On Tue, Apr 27, 2021 at 12:40:03PM +0200, Roger Pau Monne wrote:
> When trying to build an hypervisor without PV or HVM (ie: using
> automation/configs/x86/no_hvm_pv_config) it fails to link with:
> 
> prelink.o: In function `sh_remove_write_access_from_sl1p':
> arch/x86/mm/shadow/common.c:(.text+0x72b4c): undefined reference to `sh_rm_write_access_from_sl1p__guest_4'
> arch/x86/mm/shadow/common.c:(.text+0x72b4c): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sh_rm_write_access_from_sl1p__guest_4'
> prelink.o: In function `sh_remove_shadow_via_pointer':
> arch/x86/mm/shadow/common.c:(.text+0x72bfa): undefined reference to `sh_clear_shadow_entry__guest_4'
> arch/x86/mm/shadow/common.c:(.text+0x72bfa): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sh_clear_shadow_entry__guest_4'
> prelink.o: In function `_sh_resync':
> arch/x86/mm/shadow/common.c:(.text+0x72e4a): undefined reference to `sh_resync_l1__guest_4'
> arch/x86/mm/shadow/common.c:(.text+0x72e4a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sh_resync_l1__guest_4'
> prelink.o: In function `shadow_vcpu_init':
> (.text+0x72eeb): undefined reference to `sh_paging_mode__guest_4'
> prelink.o: In function `shadow_vcpu_init':
> (.text+0x72eeb): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sh_paging_mode__guest_4'
> prelink.o: In function `sh_resync_all':
> (.text+0x73315): undefined reference to `sh_safe_not_to_sync__guest_4'
> prelink.o: In function `sh_resync_all':
> (.text+0x73315): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sh_safe_not_to_sync__guest_4'
> prelink.o: In function `sh_resync_all':
> (.text+0x7336a): undefined reference to `sh_resync_l1__guest_4'
> prelink.o: In function `sh_resync_all':
> (.text+0x7336a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sh_resync_l1__guest_4'
> prelink.o: In function `sh_validate_guest_entry':
> (.text+0x736bd): undefined reference to `sh_map_and_validate_gl4e__guest_4'
> prelink.o: In function `sh_validate_guest_entry':
> (.text+0x736bd): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sh_map_and_validate_gl4e__guest_4'
> prelink.o: In function `sh_validate_guest_entry':
> (.text+0x736dd): undefined reference to `sh_map_and_validate_gl1e__guest_4'
> prelink.o: In function `sh_validate_guest_entry':
> (.text+0x736dd): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sh_map_and_validate_gl1e__guest_4'
> prelink.o: In function `sh_validate_guest_entry':
> (.text+0x736fd): undefined reference to `sh_map_and_validate_gl2e__guest_4'
> prelink.o: In function `sh_validate_guest_entry':
> (.text+0x736fd): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sh_map_and_validate_gl2e__guest_4'
> prelink.o: In function `sh_validate_guest_entry':
> (.text+0x7371d): undefined reference to `sh_map_and_validate_gl2he__guest_4'
> prelink.o: In function `sh_validate_guest_entry':
> (.text+0x7371d): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sh_map_and_validate_gl2he__guest_4'
> prelink.o: In function `sh_validate_guest_entry':
> (.text+0x7373d): undefined reference to `sh_map_and_validate_gl3e__guest_4'
> prelink.o: In function `sh_validate_guest_entry':
> (.text+0x7373d): additional relocation overflows omitted from the output
> prelink.o: In function `shadow_unhook_mappings':
> (.text+0x7379b): undefined reference to `sh_unhook_64b_mappings__guest_4'
> prelink.o: In function `sh_destroy_shadow':
> (.text+0x74183): undefined reference to `sh_destroy_l1_shadow__guest_4'
> prelink.o: In function `sh_destroy_shadow':
> (.text+0x74199): undefined reference to `sh_destroy_l4_shadow__guest_4'
> prelink.o: In function `sh_destroy_shadow':
> (.text+0x741a1): undefined reference to `sh_destroy_l3_shadow__guest_4'
> prelink.o: In function `sh_destroy_shadow':
> (.text+0x741a9): undefined reference to `sh_destroy_l2_shadow__guest_4'
> prelink.o:(.data.rel.ro.local+0x1018): undefined reference to `sh_remove_l1_shadow__guest_4'
> prelink.o:(.data.rel.ro.local+0x1020): undefined reference to `sh_remove_l1_shadow__guest_4'
> prelink.o:(.data.rel.ro.local+0x1028): undefined reference to `sh_remove_l2_shadow__guest_4'
> prelink.o:(.data.rel.ro.local+0x1030): undefined reference to `sh_remove_l3_shadow__guest_4'
> prelink.o:(.data.rel.ro.local+0x1068): undefined reference to `sh_rm_mappings_from_l1__guest_4'
> prelink.o:(.data.rel.ro.local+0x1070): undefined reference to `sh_rm_mappings_from_l1__guest_4'
> ld: /root/src/xen/xen/.xen-syms.0: hidden symbol `sh_destroy_l2_shadow__guest_4' isn't defined
> ld: final link failed: Bad value
> 
> Fix this by making shadow depend on either PV or HVM being selected in
> Kconfig.
> 
> Fixes: aff8bf94ce6 ('x86/shadow: only 4-level guest code needs building when !HVM')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Urg, I see this has already been fixed. Not sure why my rebase didn't
clear the patch.

Sorry for the noise.


      reply	other threads:[~2021-04-27 10:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 10:40 [PATCH] x86/shadow: fix build without PV or HVM Roger Pau Monne
2021-04-27 10:49 ` Roger Pau Monné [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YIfsSsoAnCJX4V4D@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).