All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Paul Mackerras <paulus@samba.org>
Cc: Alexander Graf <agraf@suse.de>,
	linuxppc-dev@ozlabs.org, kvm-ppc@vger.kernel.org,
	kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: Move gfn_to_memslot() to kvm_host.h
Date: Mon, 26 Dec 2011 13:22:48 +0000	[thread overview]
Message-ID: <4EF87528.8000305@redhat.com> (raw)
In-Reply-To: <20111220092102.GA5626@bloggs.ozlabs.ibm.com>

On 12/20/2011 11:21 AM, Paul Mackerras wrote:
> This moves gfn_to_memslot(), and the functions it calls, that is,
> search_memslots() and __gfn_to_memslot(), from kvm_main.c to kvm_host.h
> so that gfn_to_memslot() can be called from non-modular code even
> when KVM is a module.  On powerpc, the Book3S HV style of KVM has
> code that is called from real mode which needs to call gfn_to_memslot()
> and thus needs this.  (Module code is allocated in the vmalloc region,
> which can't be accessed in real mode.)
>
> With this, we can remove builtin_gfn_to_memslot() from book3s_hv_rm_mmu.c
> and thus eliminate a little bit of duplication.

Those functions are too big to be inlined IMO.  How about moving them to
another C file, and making it builtin for ppc?

The only issue is what to call it. virt/kvm/builtin-for-ppc seems silly.

Or we could move the implementation into a header file, with an extra __
prefix, and have the C stubs call those inlines, so we have exactly on
instantiation.  Your real mode code can then call the inlines.

-- 
error compiling committee.c: too many arguments to function


WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org, Alexander Graf <agraf@suse.de>,
	kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: Move gfn_to_memslot() to kvm_host.h
Date: Mon, 26 Dec 2011 15:22:48 +0200	[thread overview]
Message-ID: <4EF87528.8000305@redhat.com> (raw)
In-Reply-To: <20111220092102.GA5626@bloggs.ozlabs.ibm.com>

On 12/20/2011 11:21 AM, Paul Mackerras wrote:
> This moves gfn_to_memslot(), and the functions it calls, that is,
> search_memslots() and __gfn_to_memslot(), from kvm_main.c to kvm_host.h
> so that gfn_to_memslot() can be called from non-modular code even
> when KVM is a module.  On powerpc, the Book3S HV style of KVM has
> code that is called from real mode which needs to call gfn_to_memslot()
> and thus needs this.  (Module code is allocated in the vmalloc region,
> which can't be accessed in real mode.)
>
> With this, we can remove builtin_gfn_to_memslot() from book3s_hv_rm_mmu.c
> and thus eliminate a little bit of duplication.

Those functions are too big to be inlined IMO.  How about moving them to
another C file, and making it builtin for ppc?

The only issue is what to call it. virt/kvm/builtin-for-ppc seems silly.

Or we could move the implementation into a header file, with an extra __
prefix, and have the C stubs call those inlines, so we have exactly on
instantiation.  Your real mode code can then call the inlines.

-- 
error compiling committee.c: too many arguments to function

WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Paul Mackerras <paulus@samba.org>
Cc: Alexander Graf <agraf@suse.de>,
	linuxppc-dev@ozlabs.org, kvm-ppc@vger.kernel.org,
	kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: Move gfn_to_memslot() to kvm_host.h
Date: Mon, 26 Dec 2011 15:22:48 +0200	[thread overview]
Message-ID: <4EF87528.8000305@redhat.com> (raw)
In-Reply-To: <20111220092102.GA5626@bloggs.ozlabs.ibm.com>

On 12/20/2011 11:21 AM, Paul Mackerras wrote:
> This moves gfn_to_memslot(), and the functions it calls, that is,
> search_memslots() and __gfn_to_memslot(), from kvm_main.c to kvm_host.h
> so that gfn_to_memslot() can be called from non-modular code even
> when KVM is a module.  On powerpc, the Book3S HV style of KVM has
> code that is called from real mode which needs to call gfn_to_memslot()
> and thus needs this.  (Module code is allocated in the vmalloc region,
> which can't be accessed in real mode.)
>
> With this, we can remove builtin_gfn_to_memslot() from book3s_hv_rm_mmu.c
> and thus eliminate a little bit of duplication.

Those functions are too big to be inlined IMO.  How about moving them to
another C file, and making it builtin for ppc?

The only issue is what to call it. virt/kvm/builtin-for-ppc seems silly.

Or we could move the implementation into a header file, with an extra __
prefix, and have the C stubs call those inlines, so we have exactly on
instantiation.  Your real mode code can then call the inlines.

-- 
error compiling committee.c: too many arguments to function

  parent reply	other threads:[~2011-12-26 13:22 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-20  9:21 [PATCH] KVM: Move gfn_to_memslot() to kvm_host.h Paul Mackerras
2011-12-20  9:21 ` Paul Mackerras
2011-12-23 13:33 ` Alexander Graf
2011-12-23 13:33   ` Alexander Graf
2011-12-23 13:33   ` Alexander Graf
2011-12-26 13:22 ` Avi Kivity [this message]
2011-12-26 13:22   ` Avi Kivity
2011-12-26 13:22   ` Avi Kivity
2012-01-02 15:23   ` Alexander Graf
2012-01-02 15:23     ` Alexander Graf
2012-01-02 15:23     ` Alexander Graf
2012-01-02 16:13     ` Avi Kivity
2012-01-02 16:13       ` Avi Kivity
2012-01-02 16:13       ` Avi Kivity
2012-01-12 10:41 ` Paul Mackerras
2012-01-12 10:41   ` Paul Mackerras
2012-01-12 10:41   ` Paul Mackerras
2012-01-12 14:57   ` Alexander Graf
2012-01-12 14:57     ` Alexander Graf
2012-01-12 14:57     ` Alexander Graf
2012-01-12 15:47   ` Avi Kivity
2012-01-12 15:47     ` Avi Kivity
2012-01-12 15:47     ` Avi Kivity
2012-01-13  6:09   ` [PATCH v3] " Paul Mackerras
2012-01-13  6:09     ` Paul Mackerras
2012-01-13  6:09     ` Paul Mackerras
2012-01-16 13:18     ` Alexander Graf
2012-01-16 13:18       ` Alexander Graf
2012-01-16 13:18       ` Alexander Graf
2012-01-16 13:21       ` Avi Kivity
2012-01-16 13:21         ` Avi Kivity
2012-01-16 13:30     ` Alexander Graf
2012-01-16 13:30       ` Alexander Graf
2012-01-16 13:30       ` Alexander Graf
2012-01-17  5:02       ` Paul Mackerras
2012-01-17  5:02         ` Paul Mackerras

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=4EF87528.8000305@redhat.com \
    --to=avi@redhat.com \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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.