From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Huth Subject: Re: [kvm-unit-tests PATCH 2/2] powerpc: restore TOC pointer Date: Wed, 20 Apr 2016 12:28:47 +0200 Message-ID: <571759DF.70202@redhat.com> References: <1461086788-3102-1-git-send-email-lvivier@redhat.com> <1461086788-3102-3-git-send-email-lvivier@redhat.com> <20160420155942.3123963e@voom.fritz.box> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="S9FFCIC9Ujxmmu8nnpVBvTXm9jwmE8dDD" Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, drjones@redhat.com, pbonzini@redhat.com To: David Gibson , Laurent Vivier Return-path: Received: from mx1.redhat.com ([209.132.183.28]:34842 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751869AbcDTK24 (ORCPT ); Wed, 20 Apr 2016 06:28:56 -0400 In-Reply-To: <20160420155942.3123963e@voom.fritz.box> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --S9FFCIC9Ujxmmu8nnpVBvTXm9jwmE8dDD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 20.04.2016 07:59, David Gibson wrote: > On Tue, 19 Apr 2016 19:26:28 +0200 > Laurent Vivier wrote: >=20 >> As the TOC pointer can be corrupted by the main program, >> we must restore it in the exception handler. >> >> As we know where we are loaded, we can now compute it easily. >> >> To compute it only in the common part of the exception handler >> (call_handler), store the address of call_handler at an absolute >> address in memory to be able to call the handler from the exception >> table (as SLOF does). >> >> Reported-by: Thomas Huth >> Signed-off-by: Laurent Vivier >=20 > So, this looks ok as long as the unit tests are built with a single > TOC. In case there would be multiple TOCs, the previous exception handler would not work at all anymore, since it does not set up r2 at all. So for the current scope of kvm-unit-tests, I think this here is already enough - we can still extend it later in case we ever need to support multiple TOCs. So to me, this patch looks fine: Reviewed-by: Thomas Huth --S9FFCIC9Ujxmmu8nnpVBvTXm9jwmE8dDD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJXF1nkAAoJEC7Z13T+cC212NgP/1JhxUtZDlinBcBk8ZT6b8zF lWCJAqglXLouEHnZkzx4IakRsZtDyaErWhe7QHW2gBEx19PL23PHBJkeY/lCSc6D Gx9RT6sTk0b5IyzJ/oaamn403lF1wjqrLK9NFoD2hLz+Hz2yB4hXG9/BVJdzcunS hgsbQD6d+ly8onL0nH5q6ueq4cImE4WwB5Q0vBiEtPQ3oppAtgwcXZ10kKL4OmCz lwGX/s6PwRfuuJHWCiHKDfuNiXJt7IUJKVhKPRe2UhJyyQXVaNhqm8e82FsQU2Jz kLk0w8w+/r7X7xQa2OvKSEZ+PzJq9GRe06qzZk2e1VnOb38ns0IenAcUXm2MZU6K QgMdRT9C9D/G6FCjiwCq0QmKChQbMxZow+BtW7Ru3C4W4SUsyXMJqEWPVJutUvu1 lcUcbTf8h/Ne1VF6rJPydtaCDzT2TmLIGPZAn8g9f+E+FXOSXAEuhJ91MBIJav+/ 4XEEYa1YdQV/sY2JDBSz0oXVarl3/UyCd19+r+JpqG22zZ5mVXeLC8TKLbR6ESD/ VxRlXATmgwXCxso7jYzU/ljD3V8o6a56C7CDmLsjKiXPWoMfRsiI2OpjQCoFgylH uM9USIaflP7ln4zxkB3two+AdZkX/T2vdcbipy4Ave0NSQbcUy4Vw8gEEQWEkKbF QIsmNH+qPdXyYG6CGYDv =mnEs -----END PGP SIGNATURE----- --S9FFCIC9Ujxmmu8nnpVBvTXm9jwmE8dDD--