* [Qemu-devel] [PATCH for-2.0 V2] tests/acpi-test: do not run iasl on big endian machines
@ 2014-03-20 18:40 Marcel Apfelbaum
2014-03-20 20:16 ` Michael S. Tsirkin
0 siblings, 1 reply; 3+ messages in thread
From: Marcel Apfelbaum @ 2014-03-20 18:40 UTC (permalink / raw)
To: qemu-devel; +Cc: aik, afaerber, mst
There is an issue with iasl on big endian machines: It
cannot disassemble acpi tables taken from little endian
machines, so we cannot check the expected tables.
Do not run iasl on those machines until this
problem is solved by the acpica community.
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
---
V1 -> V2:
Addressed an offline tip for a much cleaner
macro line, thanks!
tests/acpi-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/acpi-test.c b/tests/acpi-test.c
index 249fe03..88e876f 100644
--- a/tests/acpi-test.c
+++ b/tests/acpi-test.c
@@ -145,7 +145,7 @@ static uint8_t boot_sector[0x7e000] = {
static const char *disk = "tests/acpi-test-disk.raw";
static const char *data_dir = "tests/acpi-test-data";
-#ifdef CONFIG_IASL
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN && defined(CONFIG_IASL)
static const char *iasl = stringify(CONFIG_IASL);
#else
static const char *iasl;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.0 V2] tests/acpi-test: do not run iasl on big endian machines
2014-03-20 18:40 [Qemu-devel] [PATCH for-2.0 V2] tests/acpi-test: do not run iasl on big endian machines Marcel Apfelbaum
@ 2014-03-20 20:16 ` Michael S. Tsirkin
2014-03-20 21:57 ` Paolo Bonzini
0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2014-03-20 20:16 UTC (permalink / raw)
To: Marcel Apfelbaum; +Cc: aik, qemu-devel, afaerber
On Thu, Mar 20, 2014 at 08:40:08PM +0200, Marcel Apfelbaum wrote:
> There is an issue with iasl on big endian machines: It
> cannot disassemble acpi tables taken from little endian
> machines, so we cannot check the expected tables.
>
> Do not run iasl on those machines until this
> problem is solved by the acpica community.
>
> Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Seems too aggressive: can't we detect the broken iasl?
E.g. won't it fail to disassemble expected AML files?
Also, won't this broken iasl generate corrupt AML
on output? If yes we should detect this at configure
time instead?
> ---
> V1 -> V2:
> Addressed an offline tip for a much cleaner
> macro line, thanks!
>
> tests/acpi-test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/acpi-test.c b/tests/acpi-test.c
> index 249fe03..88e876f 100644
> --- a/tests/acpi-test.c
> +++ b/tests/acpi-test.c
> @@ -145,7 +145,7 @@ static uint8_t boot_sector[0x7e000] = {
>
> static const char *disk = "tests/acpi-test-disk.raw";
> static const char *data_dir = "tests/acpi-test-data";
> -#ifdef CONFIG_IASL
> +#if G_BYTE_ORDER == G_LITTLE_ENDIAN && defined(CONFIG_IASL)
> static const char *iasl = stringify(CONFIG_IASL);
> #else
> static const char *iasl;
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.0 V2] tests/acpi-test: do not run iasl on big endian machines
2014-03-20 20:16 ` Michael S. Tsirkin
@ 2014-03-20 21:57 ` Paolo Bonzini
0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2014-03-20 21:57 UTC (permalink / raw)
To: Michael S. Tsirkin, Marcel Apfelbaum; +Cc: aik, qemu-devel, afaerber
Il 20/03/2014 21:16, Michael S. Tsirkin ha scritto:
> Seems too aggressive: can't we detect the broken iasl?
> E.g. won't it fail to disassemble expected AML files?
Yes.
> Also, won't this broken iasl generate corrupt AML
> on output? If yes we should detect this at configure
> time instead?
No, the output is fine. There are patches from Debian (that I updated
and applied to Fedora last year) that take care of fixing endianness on
output, but no such patches for the disassembly.
On one hand, I'm fine with not running IASL at all on big-endian
machines. On the other hand, it will certainly cause the patches to bitrot.
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-20 21:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-20 18:40 [Qemu-devel] [PATCH for-2.0 V2] tests/acpi-test: do not run iasl on big endian machines Marcel Apfelbaum
2014-03-20 20:16 ` Michael S. Tsirkin
2014-03-20 21:57 ` Paolo Bonzini
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).