All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] qemu.bbclass: Allow use different QEMU binary depending of target
@ 2016-09-23 16:42 Otavio Salvador
  2016-09-23 16:43 ` [PATCH 2/2] tune-ppc[65]00.inc: Disable QEMU usermode usage Otavio Salvador
  2016-09-26 13:06 ` [PATCH 1/2] qemu.bbclass: Allow use different QEMU binary depending of target Alexander Kanavin
  0 siblings, 2 replies; 6+ messages in thread
From: Otavio Salvador @ 2016-09-23 16:42 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List; +Cc: Otavio Salvador

There are architectures which support running in 32 and 64 bit
flavours however the simulation is provided in a specific QEMU
setting, requiring us to use a different binary. This patch allow this
to be done using, for example:

QEMU_TARGET_BINARY_ppce5500 = "qemu-ppc64abi32"

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

 meta/classes/qemu.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/qemu.bbclass b/meta/classes/qemu.bbclass
index 75739db..f2d4d1c 100644
--- a/meta/classes/qemu.bbclass
+++ b/meta/classes/qemu.bbclass
@@ -4,6 +4,11 @@
 #
 
 def qemu_target_binary(data):
+    package_arch = data.getVar("PACKAGE_ARCH", True)
+    qemu_target_binary = (data.getVar("QEMU_TARGET_BINARY_%s" % package_arch, True) or "")
+    if qemu_target_binary:
+        return qemu_target_binary
+
     target_arch = data.getVar("TARGET_ARCH", True)
     if target_arch in ("i486", "i586", "i686"):
         target_arch = "i386"
-- 
2.10.0



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

* [PATCH 2/2] tune-ppc[65]00.inc: Disable QEMU usermode usage
  2016-09-23 16:42 [PATCH 1/2] qemu.bbclass: Allow use different QEMU binary depending of target Otavio Salvador
@ 2016-09-23 16:43 ` Otavio Salvador
  2016-09-23 18:49   ` Khem Raj
  2016-09-26 13:06 ` [PATCH 1/2] qemu.bbclass: Allow use different QEMU binary depending of target Alexander Kanavin
  1 sibling, 1 reply; 6+ messages in thread
From: Otavio Salvador @ 2016-09-23 16:43 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List; +Cc: Otavio Salvador

The QEMU usermode fails with invalid instruction error when used with those tunes.

The issue is being tracked in [YOCTO: #10304].

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

 meta/conf/machine/include/tune-ppce5500.inc | 3 +++
 meta/conf/machine/include/tune-ppce6500.inc | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/meta/conf/machine/include/tune-ppce5500.inc b/meta/conf/machine/include/tune-ppce5500.inc
index ace2614..cebb244 100644
--- a/meta/conf/machine/include/tune-ppce5500.inc
+++ b/meta/conf/machine/include/tune-ppce5500.inc
@@ -18,3 +18,6 @@ PACKAGE_EXTRA_ARCHS_tune-ppc64e5500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc
 
 # glibc configure options to get e5500 specific library (for sqrt)
 GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'e5500', '--with-cpu=e5500', '', d)}"
+
+# QEMU usermode fails with invalid instruction error (YOCTO: #10304)
+MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'e5500', ' qemu-usermode', '', d)}"
diff --git a/meta/conf/machine/include/tune-ppce6500.inc b/meta/conf/machine/include/tune-ppce6500.inc
index da1e864..5db7e76 100644
--- a/meta/conf/machine/include/tune-ppce6500.inc
+++ b/meta/conf/machine/include/tune-ppce6500.inc
@@ -19,3 +19,6 @@ PACKAGE_EXTRA_ARCHS_tune-ppc64e6500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc
 # glibc configure options to get e6500 specific library
 GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'e6500', '--with-cpu=e6500', '', d)}"
 GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'e6500', '--with-cpu=e6500', '', d)}"
+
+# QEMU usermode fails with invalid instruction error (YOCTO: #10304)
+MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'e6500', ' qemu-usermode', '', d)}"
-- 
2.10.0



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

* Re: [PATCH 2/2] tune-ppc[65]00.inc: Disable QEMU usermode usage
  2016-09-23 16:43 ` [PATCH 2/2] tune-ppc[65]00.inc: Disable QEMU usermode usage Otavio Salvador
@ 2016-09-23 18:49   ` Khem Raj
  2016-09-23 19:06     ` Otavio Salvador
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2016-09-23 18:49 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: OpenEmbedded Core Mailing List

On Fri, Sep 23, 2016 at 9:43 AM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> The QEMU usermode fails with invalid instruction error when used with those tunes.
>
> The issue is being tracked in [YOCTO: #10304].
>

Does this option remove using particular SPE option when invoking QEMU
in usermode ? if so there may be another issue where these
instructions are emitted by compiler and they wont be emulated.

What will this change do which fixes the problem ?
from bug it seems it needs a Qemu with 32bit ABI, are we building that
version of qemu-ppc

> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>
>  meta/conf/machine/include/tune-ppce5500.inc | 3 +++
>  meta/conf/machine/include/tune-ppce6500.inc | 3 +++
>  2 files changed, 6 insertions(+)
>
> diff --git a/meta/conf/machine/include/tune-ppce5500.inc b/meta/conf/machine/include/tune-ppce5500.inc
> index ace2614..cebb244 100644
> --- a/meta/conf/machine/include/tune-ppce5500.inc
> +++ b/meta/conf/machine/include/tune-ppce5500.inc
> @@ -18,3 +18,6 @@ PACKAGE_EXTRA_ARCHS_tune-ppc64e5500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc
>
>  # glibc configure options to get e5500 specific library (for sqrt)
>  GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'e5500', '--with-cpu=e5500', '', d)}"
> +
> +# QEMU usermode fails with invalid instruction error (YOCTO: #10304)
> +MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'e5500', ' qemu-usermode', '', d)}"
> diff --git a/meta/conf/machine/include/tune-ppce6500.inc b/meta/conf/machine/include/tune-ppce6500.inc
> index da1e864..5db7e76 100644
> --- a/meta/conf/machine/include/tune-ppce6500.inc
> +++ b/meta/conf/machine/include/tune-ppce6500.inc
> @@ -19,3 +19,6 @@ PACKAGE_EXTRA_ARCHS_tune-ppc64e6500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc
>  # glibc configure options to get e6500 specific library
>  GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'e6500', '--with-cpu=e6500', '', d)}"
>  GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'e6500', '--with-cpu=e6500', '', d)}"
> +
> +# QEMU usermode fails with invalid instruction error (YOCTO: #10304)
> +MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'e6500', ' qemu-usermode', '', d)}"
> --
> 2.10.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [PATCH 2/2] tune-ppc[65]00.inc: Disable QEMU usermode usage
  2016-09-23 18:49   ` Khem Raj
@ 2016-09-23 19:06     ` Otavio Salvador
  0 siblings, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2016-09-23 19:06 UTC (permalink / raw)
  To: Khem Raj; +Cc: Otavio Salvador, OpenEmbedded Core Mailing List

On Fri, Sep 23, 2016 at 3:49 PM, Khem Raj <raj.khem@gmail.com> wrote:
> On Fri, Sep 23, 2016 at 9:43 AM, Otavio Salvador
> <otavio@ossystems.com.br> wrote:
>> The QEMU usermode fails with invalid instruction error when used with those tunes.
>>
>> The issue is being tracked in [YOCTO: #10304].
>>
>
> Does this option remove using particular SPE option when invoking QEMU
> in usermode ? if so there may be another issue where these
> instructions are emitted by compiler and they wont be emulated.
>
> What will this change do which fixes the problem ?
> from bug it seems it needs a Qemu with 32bit ABI, are we building that
> version of qemu-ppc

We are not, at this moment.

I did a local patch to enable it and test the usermode and it still
produces an exception at runtime:

http://termbin.com/9g6t

if we can fix the underlying issue, better, but disabling it allow for
better user experience in meanwhile.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH 1/2] qemu.bbclass: Allow use different QEMU binary depending of target
  2016-09-23 16:42 [PATCH 1/2] qemu.bbclass: Allow use different QEMU binary depending of target Otavio Salvador
  2016-09-23 16:43 ` [PATCH 2/2] tune-ppc[65]00.inc: Disable QEMU usermode usage Otavio Salvador
@ 2016-09-26 13:06 ` Alexander Kanavin
  2016-09-26 13:13   ` Otavio Salvador
  1 sibling, 1 reply; 6+ messages in thread
From: Alexander Kanavin @ 2016-09-26 13:06 UTC (permalink / raw)
  To: openembedded-core

On 09/23/2016 07:42 PM, Otavio Salvador wrote:
> There are architectures which support running in 32 and 64 bit
> flavours however the simulation is provided in a specific QEMU
> setting, requiring us to use a different binary. This patch allow this
> to be done using, for example:
>
> QEMU_TARGET_BINARY_ppce5500 = "qemu-ppc64abi32"

Should there also be a patch that makes use of this feature?

Alex



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

* Re: [PATCH 1/2] qemu.bbclass: Allow use different QEMU binary depending of target
  2016-09-26 13:06 ` [PATCH 1/2] qemu.bbclass: Allow use different QEMU binary depending of target Alexander Kanavin
@ 2016-09-26 13:13   ` Otavio Salvador
  0 siblings, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2016-09-26 13:13 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Patches and discussions about the oe-core layer

On Mon, Sep 26, 2016 at 10:06 AM, Alexander Kanavin
<alexander.kanavin@linux.intel.com> wrote:
> On 09/23/2016 07:42 PM, Otavio Salvador wrote:
>>
>> There are architectures which support running in 32 and 64 bit
>> flavours however the simulation is provided in a specific QEMU
>> setting, requiring us to use a different binary. This patch allow this
>> to be done using, for example:
>>
>> QEMU_TARGET_BINARY_ppce5500 = "qemu-ppc64abi32"
>
>
> Should there also be a patch that makes use of this feature?

QEMU for e5500 is not working for us; until it is working it is no
sense to submit the patch however I am using it for test.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

end of thread, other threads:[~2016-09-26 13:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23 16:42 [PATCH 1/2] qemu.bbclass: Allow use different QEMU binary depending of target Otavio Salvador
2016-09-23 16:43 ` [PATCH 2/2] tune-ppc[65]00.inc: Disable QEMU usermode usage Otavio Salvador
2016-09-23 18:49   ` Khem Raj
2016-09-23 19:06     ` Otavio Salvador
2016-09-26 13:06 ` [PATCH 1/2] qemu.bbclass: Allow use different QEMU binary depending of target Alexander Kanavin
2016-09-26 13:13   ` Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.