From: Paolo Bonzini <pbonzini@redhat.com>
To: Bharata B Rao <bharata@linux.vnet.ibm.com>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, david@gibson.dropbear.id.au,
thuth@redhat.com, imammedo@redhat.com
Subject: Re: [Qemu-devel] [RFC PATCH v0 1/2] kvm: API to obtain max supported mem slots
Date: Wed, 1 Jun 2016 11:56:07 +0200 [thread overview]
Message-ID: <15984072-dfda-b4e8-f8b7-7b002c054fe5@redhat.com> (raw)
In-Reply-To: <201606010952.u519n7R2025378@mx0a-001b2d01.pphosted.com>
On 01/06/2016 11:51, Bharata B Rao wrote:
> Introduce kvm_get_max_memslots() API that can be used to obtain the
> maximum number of memslots supported by KVM.
>
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
> ---
> include/sysemu/kvm.h | 1 +
> kvm-all.c | 7 +++++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
> index 65569ed..ad6f837 100644
> --- a/include/sysemu/kvm.h
> +++ b/include/sysemu/kvm.h
> @@ -527,4 +527,5 @@ int kvm_set_one_reg(CPUState *cs, uint64_t id, void *source);
> * Returns: 0 on success, or a negative errno on failure.
> */
> int kvm_get_one_reg(CPUState *cs, uint64_t id, void *target);
> +int kvm_get_max_memslots(void);
> #endif
> diff --git a/kvm-all.c b/kvm-all.c
> index d317dcb..fbd2d93 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -126,6 +126,13 @@ static const KVMCapabilityInfo kvm_required_capabilites[] = {
> KVM_CAP_LAST_INFO
> };
>
> +int kvm_get_max_memslots(void)
> +{
> + KVMState *s = KVM_STATE(current_machine->accelerator);
> +
> + return s->nr_slots;
> +}
> +
> static KVMSlot *kvm_get_free_slot(KVMMemoryListener *kml)
> {
> KVMState *s = kvm_state;
>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
next prev parent reply other threads:[~2016-06-01 9:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1464774685-7885-1-git-send-email-bharata@linux.vnet.ibm.com>
2016-06-01 9:51 ` [Qemu-devel] [RFC PATCH v0 1/2] kvm: API to obtain max supported mem slots Bharata B Rao
2016-06-01 9:51 ` [Qemu-devel] [RFC PATCH v0 2/2] spapr: Increase max memslots to 512 Bharata B Rao
[not found] ` <201606010952.u519n7R2025378@mx0a-001b2d01.pphosted.com>
2016-06-01 9:56 ` Paolo Bonzini [this message]
2016-06-02 0:41 ` [Qemu-devel] [RFC PATCH v0 1/2] kvm: API to obtain max supported mem slots David Gibson
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=15984072-dfda-b4e8-f8b7-7b002c054fe5@redhat.com \
--to=pbonzini@redhat.com \
--cc=bharata@linux.vnet.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=imammedo@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).