qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: David Gibson <david@gibson.dropbear.id.au>,
	Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: lvivier@redhat.com, thuth@redhat.com, qemu-devel@nongnu.org,
	qemu-ppc@nongnu.org, paulus@samba.org
Subject: Re: [Qemu-devel] [RFC 0/3] Draft implementation of HPT resizing (qemu side)
Date: Thu, 28 Jan 2016 22:04:58 +0100	[thread overview]
Message-ID: <56AA827A.2070905@suse.de> (raw)
In-Reply-To: <20160119110233.GE27454@voom.redhat.com>



On 01/19/2016 12:02 PM, David Gibson wrote:
> On Tue, Jan 19, 2016 at 01:18:17PM +0530, Bharata B Rao wrote:
>> On Mon, Jan 18, 2016 at 04:44:38PM +1100, David Gibson wrote:
>>> Here is a draft qemu implementation of my proposed PAPR extension for
>>> allowing runtime resizing of a KVM/ppc64 guest's hash page table.
>>> That in turn will allow for more flexible memory hotplug.
>>>
>>> This should work with the guest kernel side patches I also posted
>>> recently [1].
>>>
>>> Still required to make this into a full implementation:
>>>    * Guest needs to auto-resize HPT on memory hotplug events
>>>
>>>    * qemu needs to allocate HPT size based on current rather than
>>>      maximum memory if the guest is HPT resize aware
>>>
>>>    * KVM host side implementation
>>>
>>>    * PAPR standardization
>> So with the current patchset (QEMU and guest kernel changes), I should
>> be able to change the HTAB size of a PR guest right ? I see the below
>> failure though:
> Uh.. to be honest I haven't really considered the KVM case at all.
> I'm kind of surprised it didn't just refuse to do anything.
>
>> [root@localhost ~]# cat /sys/kernel/debug/powerpc/pft-size
>> 24
>> [root@localhost ~]# echo 26 > /sys/kernel/debug/powerpc/pft-size
>> [   65.996845] lpar: Attempting to resize HPT to shift 26
>> [   65.996845] lpar: Attempting to resize HPT to shift 26
>> [   66.113596] lpar: HPT resize to shift 26 complete (109 ms / 6 ms)
>> [   66.113596] lpar: HPT resize to shift 26 complete (109 ms / 6 ms)
>>
>> PR guest just hangs here while I see tons of below messages in
>> the 1st level guest:
>>
>> KVM can't copy data from 0x3fff99e91400!
>> ...
>> Couldn't emulate instruction 0x00000000 (op 0 xop 0)
>> kvmppc_handle_exit_pr: emulation at 700 failed (00000000)
> Hm, not sure why that's happening.  At first I thought it was because
> we weren't updating SDR1 with the address of the new htab, but that's
> actually in there.  Maybe the KVM PR code isn't rereading it after
> initial VM startup.

The KVM PR code doesn't care - it just rereads SDR1 on every pteg lookup 
;). There's no caching at all.

Of course, the guest needs to invalidate all pending tlb entries if 
they're now invalid.

Does this work on real hardware? Say, a G5?


Alex

  reply	other threads:[~2016-01-28 21:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18  5:44 [Qemu-devel] [RFC 0/3] Draft implementation of HPT resizing (qemu side) David Gibson
2016-01-18  5:44 ` [Qemu-devel] [RFC 1/3] pseries: Stub hypercalls for HPT resizing David Gibson
2016-01-18  5:44 ` [Qemu-devel] [RFC 2/3] pseries: Implement " David Gibson
2016-01-18  5:44 ` [Qemu-devel] [RFC 3/3] pseries: Advertise HPT resize capability David Gibson
2016-01-18  5:45 ` [Qemu-devel] [RFC 0/3] Draft implementation of HPT resizing (qemu side) David Gibson
2016-01-19  7:48 ` Bharata B Rao
2016-01-19 11:02   ` David Gibson
2016-01-28 21:04     ` Alexander Graf [this message]
2016-01-28 22:09       ` Paul Mackerras
2016-01-29  2:47       ` David Gibson
2016-01-29  6:18         ` Alexander Graf
2016-01-29 23:11           ` 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=56AA827A.2070905@suse.de \
    --to=agraf@suse.de \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=lvivier@redhat.com \
    --cc=paulus@samba.org \
    --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).