From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVdOz-00040B-W4 for qemu-devel@nongnu.org; Fri, 05 Aug 2016 07:34:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVdOv-0001DT-To for qemu-devel@nongnu.org; Fri, 05 Aug 2016 07:34:57 -0400 Date: Fri, 5 Aug 2016 20:56:58 +1000 From: David Gibson Message-ID: <20160805105658.GA22112@voom.fritz.box> References: <1470254107-14842-1-git-send-email-lvivier@redhat.com> <20160804023800.GE9189@voom.fritz.box> <20160805092647.2p7uxntwpys65l7d@hawk.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: <20160805092647.2p7uxntwpys65l7d@hawk.localdomain> Subject: Re: [Qemu-devel] [PATCH] ppc64: fix compressed dump with pseries kernel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Jones Cc: Laurent Vivier , Thomas Huth , qemu-ppc@nongnu.org, Alexander Graf , qemu-devel@nongnu.org --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 05, 2016 at 11:26:47AM +0200, Andrew Jones wrote: > On Thu, Aug 04, 2016 at 10:41:16AM +0200, Laurent Vivier wrote: > >=20 > >=20 > > On 04/08/2016 04:38, David Gibson wrote: > > > On Wed, Aug 03, 2016 at 09:55:07PM +0200, Laurent Vivier wrote: > > >> If we don't provide the page size in target-ppc:cpu_get_dump_info(), > > >> the default one (TARGET_PAGE_SIZE, 4KB) is used to create > > >> the compressed dump. It works fine with Macintosh, but not with > > >> pseries as the kernel default page size is 64KB. > > >> > > >> Without this patch, if we generate a compressed dump in the QEMU mon= itor: > > >> > > >> (qemu) dump-guest-memory -z qemu.dump > > >> > > >> This dump cannot be read by crash: > > >> > > >> # crash vmlinux qemu.dump > > >> ... > > >> WARNING: cannot translate vmemmap kernel virtual addresses: > > >> commands requiring page structure contents will fail > > >> ... > > >> > > >> Signed-off-by: Laurent Vivier > > >> --- > > >> target-ppc/arch_dump.c | 5 +++++ > > >> 1 file changed, 5 insertions(+) > > >=20 > > > Urgh.. so, really the page size used by the guest kernel is a > > > guest-side detail, and it's certainly possible to build a 4kiB page > > > guest kernel, although 64kiB is the norm. > >=20 > > virtio-balloon doesn't work with 4K kernel. > >=20 > > > This might be the best we can do, but it'd be nice if we could probe > > > or otherwise avoid relying on this assumption about the guest kernel. > >=20 > > I agree with you but none of the other architectures probes for the page > > size. > >=20 > > For instance ARM: |I cc: Drew to know how he has chosen the values] > >=20 > > if (arm_feature(env, ARM_FEATURE_AARCH64)) { > > ... > > info->page_size =3D (1 << 16); > > ... > > } else { > > ... > > info->page_size =3D (1 << 12); > > ... > > } > > >=20 > info->page_size is used to determine the dumpfile's block size. The > block size needs to be at least the page size, but a multiple of page > size works fine too. As we can't probe for the currently used guest > page size, and a multiple of page size is fine, then using the guest's > maximum allowed page size is the best we can do. Aha! Well that makes life much easier. I'll adjust the commit message and apply. --=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 --BXVAT5kNtrzKuDFl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXpHD6AAoJEGw4ysog2bOSz7QP/07VlxMpbc0vsiXDLIxOwLIu rC2lyp8fSbMAIy5z5xB4H8NRLIrtpijyWSwJ4c4hYD559mA1X1GhYKwKAjx8Pzyk /IdoCKotTnUsVVkGZcOUWDu9Zdgv6kYRyiOynRiz7/DWp4F2BMexpgbSWdKPC0Ua yFPfAAlqRGF9i91bH0M9KHe1NRC90XCjq/wkb44yIwsVANW2DkaMrEIWiDDlMWYA PYneFwQlwIdn5X3FaAvYvL1dumgMxcuxDpCqLF+JW7f2WKibQVbHCS5CCLpWjMc0 AWj/NNkHdz1imHWdQlkLk/jFcLZlVGqPsXdj91AR8qgWvdY2Jb7jm36SNY4HF2R+ dH9ET0Xh/5CyOQBCCASfYbbmzFiCXREFkCGlNAEdD4IlqSm3LTc1EFjGKR6dpD2t pIADoPjsMFWixmuoDgJwfGuF85iTee3yffnhfOKOnwsV/7GbmKoloFCczzlpq4Lt 3BvV2hlnw80PC9ToKhi6MFR/LaIugoBheKyC1fJXP29FT8mf0+rwsVvgENKOQetX Ew9fnxj6i1ihNfq50oO8IBaSOYXM3Hwi//i5Px6NO9V4Ccpw1aBsMf0wXSRuwkE1 IB85xrv6c7rdEAUyvu5mr4Q/upHWOakQ82y05pwd2c7Ie2emvwKdbXGSAztaU9MO 1VTQO8Cl/J8fB2D9r7GF =iDiG -----END PGP SIGNATURE----- --BXVAT5kNtrzKuDFl--