[Bug 115081] arch/x86/kvm/vmx.c:8719: Error: symbol `vmx_return' is already defined

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

 



https://bugzilla.kernel.org/show_bug.cgi?id=115081

--- Comment #4 from Linda Walsh <lkml@xxxxxxxxx> ---
Looking at this and not being very familiar w/the dialect of x86-64 assembler
used,  it looks like the intent of the extern with the 

    extern const ulong vmx_return;

was to create a forward reference for the C-statement:

    vmcs_writel(HOST_RIP, vmx_return); /* 22.2.5 */

With 'vmx_return' being defined in the assembler, below:

        ".pushsection .rodata \n\t"
        ".global vmx_return \n\t"
        "vmx_return: " _ASM_PTR " 2b \n\t"
        ".popsection"

It appears with the "push+pop-section, the bit in between is not "inline",
but placed in the separate "rodata" area.

Is 2b supposed to be a value for initialization, or a size, or
some number of _ASM_PTR's?

Either way, it sorta looks it might be easier if the ASM
code defining the symbol should come before the C-Reference.

As it is now, the C-statement:

    [extern] const ulong vmx_return

defines the "vmx_return" symbol as either an external reference, or
as a global symbol (a "first" definition), with the ASM-code,

        ".global vmx_return \n\t"

declaring a 2nd vmx_return that is global and 
and defined /allocated/initialized by the 

        "vmx_return: " _ASM_PTR " 2b \n\t"

statement.

But I really don't know this asm dialect nor whether or not the usage of
"vmx_return" in C must occur after the ASM definition or not.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux