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

Re: [Xen-devel] [PATCH v2 09/10] x86/irqs: Move interrupt-stub generation out of C



>>> On 16.05.14 at 12:39, <andrew.cooper3@xxxxxxxxxx> wrote:
> v2:
>  * Far less .macro hackary, inspired by Feng's patch of a similar nature.  On
>    consideration, having literal symbol names is very little use, either in
>    the disassembly, or running hypervisor. In hindsight this is new version is
>    substantially more likely to compile under clang, although I don't have a
>    compiler to hand.

Iirc assembly code gets translated by gas even when clang is used for C.

> --- a/xen/arch/x86/x86_64/entry.S
> +++ b/xen/arch/x86/x86_64/entry.S
> @@ -475,6 +475,12 @@ ENTRY(common_interrupt)
>          callq do_IRQ
>          jmp ret_from_intr
>  
> +ENTRY(reserved_exception)
> +        SAVE_ALL CLAC
> +        movq %rsp,%rdi
> +        callq do_reserved_exception
> +        jmp ret_from_intr

Sadly this still doesn't take care of auto-detecting whether an error
code got pushed.

Also - is there a particular reason you don't have this go though
handle_exception?

> @@ -717,13 +713,13 @@ ENTRY(exception_table)
>          .quad do_invalid_op
>          .quad do_device_not_available
>          .quad BAD_VIRT_ADDR         /* double_fault, IST entry */
> -        .quad do_coprocessor_segment_overrun
> +        .quad BAD_VIRT_ADDR         /* coproc_seg_overrun, reserved */
>          .quad do_invalid_TSS
>          .quad do_segment_not_present
>          .quad do_stack_segment
>          .quad do_general_protection
>          .quad do_page_fault
> -        .quad do_spurious_interrupt_bug
> +        .quad BAD_VIRT_ADDR         /* PIC IRQ7 spurious, reserved */

And the comment here didn't get much (if at all) adjusted either.

> --- /dev/null
> +++ b/xen/arch/x86/x86_64/irqgen.S
> @@ -0,0 +1,52 @@
> +/* Automatically generated interrupt entry points */
> +#include <asm/processor.h>
> +#include <irq_vectors.h>
> +
> +.section ".init.rodata", "a", @progbits
> +
> +/* Table of automatically generated entry points.  One per vector. */
> +GLOBAL(autogen_entrypoints)
> +
> +/* pop into the .init.rodata section and record an entry point. */
> +.macro entrypoint ent
> +    .pushsection ".init.rodata", "a", @progbits

Actually it's quite pointless to repeat the attributes - they can't be
different than in the first section declaration anyway.

Also I think this more legible version would now better go into entry.S
rather than having a new file for it.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.