qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6] Add optionrom compatible with fw_cfg DMA ver


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v6] Add optionrom compatible with fw_cfg DMA version
Date: Mon, 9 May 2016 16:31:26 +0100

On Mon, May 9, 2016 at 2:24 PM, Stefan Hajnoczi <address@hidden> wrote:
> On Mon, Apr 25, 2016 at 05:04:40PM +0100, Richard W.M. Jones wrote:
>> v5 -> v6:
>>
>>  - Changed the xen_load_linux assertion as suggested by Stefan.
>>
>>  - I renamed the variables in get_e801_addr function, since the
>>    registers were really (16 bit 8086-style) AX, not EAX etc.  Also I
>>    changed the GCC asm to make it a little bit more efficient.  I
>>    verified by disassembling the function that GCC is still generating
>>    the right code after this change.
>>
>>  - Re-tested with small (342K) libguestfs initramfs and with large
>>    (20M) Fedora initramfs, and works fine in both cases.
>
> No one has picked this up, so I have (for QEMU 2.7).
>
> Thanks, applied to my block tree:
> https://github.com/stefanha/qemu/commits/block

The bad news is this patch breaks the build under clang:

CC optionrom/linuxboot_dma.o
<inline asm>:29:1: error: unexpected directive .code16gcc
.code16gcc
^
<inline asm>:29:11: error: .code16gcc not supported yet
.code16gcc
^
linuxboot_dma.c:104:9: error: unexpected token in argument list
asm("addr32 movw %%es:(%1), %0" : "=r"(val) : "r"((uint32_t)offset));
^
<inline asm>:1:17: note: instantiated into assembly here
addr32 movw %es:(%eax), %cx
^
linuxboot_dma.c:120:9: error: invalid instruction mnemonic 'addr32'
asm("addr32 movl %0, %%es:(%1)" : : "r"(val), "r"((uint32_t)offset));
^
<inline asm>:1:2: note: instantiated into assembly here
addr32 movl %eax, %es:(%edx)
^~~~~~
linuxboot_dma.c:112:9: error: unexpected token in argument list
asm("addr32 movl %%es:(%1), %0" : "=r"(val) : "r"((uint32_t)offset));
^
<inline asm>:1:17: note: instantiated into assembly here
addr32 movl %es:(%eax), %eax
^

The .code16gcc issue can probably be resolved with -m16 (which gcc
4.9+ also supports!).  I haven't looked into the other issues though.

Dropped from my block tree.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]