Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v2 0/1] qemu: add wrapper for qemu-mips binary
@ 2012-10-03 10:47 Laurentiu Palcu
  2012-10-03 10:47 ` [PATCH v2 1/1] " Laurentiu Palcu
  0 siblings, 1 reply; 3+ messages in thread
From: Laurentiu Palcu @ 2012-10-03 10:47 UTC (permalink / raw)
  To: openembedded-core

In v2:
 - bumped PR

Thanks,
Laurentiu

Laurentiu Palcu (1):
  qemu: add wrapper for qemu-mips binary

 meta/recipes-devtools/qemu/qemu_1.2.0.bb |   16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

-- 
1.7.9.5




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2 1/1] qemu: add wrapper for qemu-mips binary
  2012-10-03 10:47 [PATCH v2 0/1] qemu: add wrapper for qemu-mips binary Laurentiu Palcu
@ 2012-10-03 10:47 ` Laurentiu Palcu
  2012-10-03 11:16   ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Laurentiu Palcu @ 2012-10-03 10:47 UTC (permalink / raw)
  To: openembedded-core

qemu-mips user emulation binary segfaults when running any kind of
binary. This is due to a MMU access fault in the virtual CPU. This
problem has been introduced in qemu when 4GB of vmem were reserved for
32-on-64 bit.

This workaround will need to be reverted once the proper fix is found.

[YOCTO #3143]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
 meta/recipes-devtools/qemu/qemu_1.2.0.bb |   16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/qemu/qemu_1.2.0.bb b/meta/recipes-devtools/qemu/qemu_1.2.0.bb
index 191ee48..fa53e57 100644
--- a/meta/recipes-devtools/qemu/qemu_1.2.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_1.2.0.bb
@@ -17,7 +17,7 @@ SRC_URI = "\
 SRC_URI[md5sum] = "78eb1e984f4532aa9f2bdd3c127b5b61"
 SRC_URI[sha256sum] = "c8b84420d9f4869397f84cad2dabd9a475b7723d619a924a873740353e9df936"
 
-PR = "r2"
+PR = "r3"
 
 SRC_URI_append_virtclass-nativesdk = "\
     file://relocatable_sdk.patch \
@@ -29,6 +29,20 @@ do_configure_prepend_virtclass-nativesdk() {
 		sed -i 's/-lX11//g' Makefile.target
 	fi
 }
+
+# The following fragment will create a wrapper for qemu-mips user emulation
+# binary in order to work around a segmentation fault issue. Basically, by
+# default, the reserved virtual address space for 32-on-64 bit is set to 4GB.
+# This will trigger a MMU access fault in the virtual CPU. With this change,
+# the qemu-mips works fine.
+# IMPORTANT: This piece needs to be removed once the root cause is fixed!
+inherit utils
+do_install_append() {
+	create_wrapper ${D}/${bindir}/qemu-mips \
+		QEMU_RESERVED_VA=0x0
+}
+# END of qemu-mips workaround
+
 do_configure_prepend_virtclass-native() {
 	# Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
 	sed -i 's/-lX11//g' Makefile.target
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/1] qemu: add wrapper for qemu-mips binary
  2012-10-03 10:47 ` [PATCH v2 1/1] " Laurentiu Palcu
@ 2012-10-03 11:16   ` Richard Purdie
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2012-10-03 11:16 UTC (permalink / raw)
  To: Laurentiu Palcu; +Cc: openembedded-core

On Wed, 2012-10-03 at 13:47 +0300, Laurentiu Palcu wrote:
> qemu-mips user emulation binary segfaults when running any kind of
> binary. This is due to a MMU access fault in the virtual CPU. This
> problem has been introduced in qemu when 4GB of vmem were reserved for
> 32-on-64 bit.
> 
> This workaround will need to be reverted once the proper fix is found.
> 
> [YOCTO #3143]
> 
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> ---
>  meta/recipes-devtools/qemu/qemu_1.2.0.bb |   16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/qemu/qemu_1.2.0.bb b/meta/recipes-devtools/qemu/qemu_1.2.0.bb
> index 191ee48..fa53e57 100644
> --- a/meta/recipes-devtools/qemu/qemu_1.2.0.bb
> +++ b/meta/recipes-devtools/qemu/qemu_1.2.0.bb
> @@ -17,7 +17,7 @@ SRC_URI = "\
>  SRC_URI[md5sum] = "78eb1e984f4532aa9f2bdd3c127b5b61"
>  SRC_URI[sha256sum] = "c8b84420d9f4869397f84cad2dabd9a475b7723d619a924a873740353e9df936"
>  
> -PR = "r2"
> +PR = "r3"
>  
>  SRC_URI_append_virtclass-nativesdk = "\
>      file://relocatable_sdk.patch \
> @@ -29,6 +29,20 @@ do_configure_prepend_virtclass-nativesdk() {
>  		sed -i 's/-lX11//g' Makefile.target
>  	fi
>  }
> +
> +# The following fragment will create a wrapper for qemu-mips user emulation
> +# binary in order to work around a segmentation fault issue. Basically, by
> +# default, the reserved virtual address space for 32-on-64 bit is set to 4GB.
> +# This will trigger a MMU access fault in the virtual CPU. With this change,
> +# the qemu-mips works fine.
> +# IMPORTANT: This piece needs to be removed once the root cause is fixed!
> +inherit utils

You don't need this inherit since utils is inherited as part of
base.bbclass. Otherwise it looks good.

Cheers,

Richard



> +do_install_append() {
> +	create_wrapper ${D}/${bindir}/qemu-mips \
> +		QEMU_RESERVED_VA=0x0
> +}
> +# END of qemu-mips workaround
> +
>  do_configure_prepend_virtclass-native() {
>  	# Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
>  	sed -i 's/-lX11//g' Makefile.target





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-03 11:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-03 10:47 [PATCH v2 0/1] qemu: add wrapper for qemu-mips binary Laurentiu Palcu
2012-10-03 10:47 ` [PATCH v2 1/1] " Laurentiu Palcu
2012-10-03 11:16   ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox