All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 115081] arch/x86/kvm/vmx.c:8719: Error: symbol `vmx_return' is already defined
Date: Thu, 24 Mar 2016 03:54:00 +0000	[thread overview]
Message-ID: <bug-115081-28872-qROf6VGtoS@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-115081-28872@https.bugzilla.kernel.org/>

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

--- Comment #4 from Linda Walsh <lkml@tlinx.org> ---
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.

  parent reply	other threads:[~2016-03-24  3:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 23:16 [Bug 115081] New: arch/x86/kvm/vmx.c:8719: Error: symbol `vmx_return' is already defined bugzilla-daemon
2016-03-21 23:17 ` [Bug 115081] " bugzilla-daemon
2016-03-23 20:09 ` bugzilla-daemon
2016-03-24  2:46 ` bugzilla-daemon
2016-03-24  3:54 ` bugzilla-daemon [this message]
2016-03-24  4:19 ` bugzilla-daemon
2016-03-24  8:30 ` bugzilla-daemon
2016-03-24 13:31 ` bugzilla-daemon
2016-03-24 13:34 ` bugzilla-daemon
2016-03-25 17:11 ` bugzilla-daemon
2016-03-25 17:19 ` bugzilla-daemon
2016-03-29  9:48 ` bugzilla-daemon
2016-03-29 16:44 ` bugzilla-daemon
2016-03-29 16:45 ` bugzilla-daemon
2016-03-29 16:45 ` bugzilla-daemon
2016-03-29 16:54 ` bugzilla-daemon
2016-03-29 16:54 ` bugzilla-daemon
2016-03-29 16:55 ` bugzilla-daemon
2016-03-29 16:57 ` bugzilla-daemon
2016-03-29 17:18 ` bugzilla-daemon
2016-03-29 17:27 ` bugzilla-daemon
2016-03-29 17:55 ` bugzilla-daemon
2016-03-30  9:18 ` bugzilla-daemon
2016-03-31  3:12 ` bugzilla-daemon
2016-03-31  3:13 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-115081-28872-qROf6VGtoS@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.