From: Julien Grall <julien.grall@arm.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>, xen-devel@lists.xen.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: ARM cross-compile build fix
Date: Wed, 7 Sep 2016 09:46:28 +0100 [thread overview]
Message-ID: <f9042df5-dbac-c897-6b53-75a92f5de50c@arm.com> (raw)
In-Reply-To: <4829a7fd-8f8f-4b92-ebec-1264c333f47e@bitdefender.com>
On 07/09/2016 09:24, Razvan Cojocaru wrote:
> Hello,
Hello Razvan,
>
> The fastest way to compile-check the patches that touch ARM bits is to
> simply cross-compile, and I've followed the instructions here:
>
> https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/CrossCompiling#64-bit_crossbuild
>
> However, there was an error trying to build master, several macros were
> redefined in arch-arm.h (originally defined in ptrace.h). The following
> patch has fixed the problem for me, but it's rather crude:
>
> diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
> index 870bc3b..e4560a5 100644
> --- a/xen/include/public/arch-arm.h
> +++ b/xen/include/public/arch-arm.h
> @@ -362,13 +362,27 @@ typedef uint64_t xen_callback_t;
>
> /* 64 bit modes */
> #define PSR_MODE_BIT 0x10 /* Set iff AArch32 */
> +#ifndef PSR_MODE_EL3h
> #define PSR_MODE_EL3h 0x0d
> +#endif
> +#ifndef PSR_MODE_EL3t
> #define PSR_MODE_EL3t 0x0c
> +#endif
> +#ifndef PSR_MODE_EL2h
> #define PSR_MODE_EL2h 0x09
> +#endif
> +#ifndef PSR_MODE_EL2t
> #define PSR_MODE_EL2t 0x08
> +#endif
> +#ifndef PSR_MODE_EL1h
> #define PSR_MODE_EL1h 0x05
> +#endif
> +#ifndef PSR_MODE_EL1t
> #define PSR_MODE_EL1t 0x04
> +#endif
> +#ifndef PSR_MODE_EL0t
> #define PSR_MODE_EL0t 0x00
> +#endif
>
> #define PSR_GUEST32_INIT
> (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC)
> #define PSR_GUEST64_INIT
> (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
>
> I'm not sure this is the right fix, which is why I didn't send the patch
> for review the usual way, but I hope it's helpful. Please let me know if
> you'd like me to send a proper patch.
This is a glibc bug and is already documented on the wiki:
https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions#error:_.22PSR_MODE_EL3h.22_redefined
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
prev parent reply other threads:[~2016-09-07 8:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 8:24 ARM cross-compile build fix Razvan Cojocaru
2016-09-07 8:46 ` Julien Grall [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=f9042df5-dbac-c897-6b53-75a92f5de50c@arm.com \
--to=julien.grall@arm.com \
--cc=JBeulich@suse.com \
--cc=rcojocaru@bitdefender.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xen.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).