From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLUE5-00086r-Oe for qemu-devel@nongnu.org; Tue, 19 Jan 2016 06:13:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLUE2-0000tg-5u for qemu-devel@nongnu.org; Tue, 19 Jan 2016 06:13:29 -0500 Date: Tue, 19 Jan 2016 22:02:33 +1100 From: David Gibson Message-ID: <20160119110233.GE27454@voom.redhat.com> References: <1453095881-16704-1-git-send-email-david@gibson.dropbear.id.au> <20160119074817.GA16048@in.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BQPnanjtCNWHyqYD" Content-Disposition: inline In-Reply-To: <20160119074817.GA16048@in.ibm.com> Subject: Re: [Qemu-devel] [RFC 0/3] Draft implementation of HPT resizing (qemu side) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao Cc: lvivier@redhat.com, thuth@redhat.com, qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, paulus@samba.org --BQPnanjtCNWHyqYD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. > >=20 > > This should work with the guest kernel side patches I also posted > > recently [1]. > >=20 > > Still required to make this into a full implementation: > > * Guest needs to auto-resize HPT on memory hotplug events > >=20 > > * qemu needs to allocate HPT size based on current rather than > > maximum memory if the guest is HPT resize aware > >=20 > > * KVM host side implementation > >=20 > > * PAPR standardization >=20 > 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=20 > 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) >=20 > PR guest just hangs here while I see tons of below messages in > the 1st level guest: >=20 > 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. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --BQPnanjtCNWHyqYD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWnhfJAAoJEGw4ysog2bOSY1QP/jxRP0ERxQ307zEH6jfDXtWW w3XabXzMUNcRaqZbxcWhm3Rd+skNnAT7qU/rkRLJxJKBwptp+om9W1C7ulUvJgPg JLMjJXgFnLfEEJq2t6kg+rcDD1oHh8HlaDnCQH0EqRNItlsSUmKxyAJcOFutr37l snCyYesIWJzGMCmqtv/kRnWfgtNDPtP7o8Bn01HGibwUAc4hCYT9Avtlzz9g5Qhd JAb1sshQ59Lox+PaNxVJ/zgbNrdwnk9AplGZcOKexp1Gv04kZVw+GHimUtIW9q8O 7jHqu/7J2NTlgAmAOeBSHnsjCJZ9VXTzmHWnXegKO3LhC348x1RhMKcpuGExfIFL lAHkzcSMpT4uuLhr0w7a1AUUkAta6suxrqFrrDbpsrhYOLPTMdJYCp3vYXMRUQ4Z FJk8Z+ZPFZEkQPtYli+B8O34Sdwe4rL+4yl7T4dtCWb/Eo5pczP0lDO0yM+r/Bnj xwOgqagxFGoVaBqif27EsklagfiEhrgj1r7bHg7fEa5iBWoS/7+whxbLkGKljMaZ ps8DbmfasM+m/kT9gk0Nnr+mZqAe0o+pT5yaeVvrHPzhIrKXAH3RLkDruVz7lMgm bd9zzJZZrkTcXYpFfd+zw1+D3fAHXDH0xPPEFP4bnI8P5kStIdjcRjzAL6qygrFQ EGRipI6MD0C2WMeks1L4 =RBzF -----END PGP SIGNATURE----- --BQPnanjtCNWHyqYD--