From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uph0U-0001mD-OO for qemu-devel@nongnu.org; Thu, 20 Jun 2013 11:42:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uph0T-0001yK-7I for qemu-devel@nongnu.org; Thu, 20 Jun 2013 11:42:42 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:59181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uph0T-0001yA-3X for qemu-devel@nongnu.org; Thu, 20 Jun 2013 11:42:41 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 20 Jun 2013 11:42:40 -0400 From: Anthony Liguori In-Reply-To: <51C31DD1.2030603@suse.de> References: <1371674435-14973-1-git-send-email-aliguori@us.ibm.com> <1371674435-14973-3-git-send-email-aliguori@us.ibm.com> <51C31DD1.2030603@suse.de> Date: Thu, 20 Jun 2013 10:42:28 -0500 Message-ID: <8738sc23h7.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 02/12] qtest: add spapr hypercall support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: Alexey Kardashevskiy , Paul Mackerras , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Alex Graf Andreas F=C3=A4rber writes: > Am 19.06.2013 22:40, schrieb Anthony Liguori: >> Signed-off-by: Anthony Liguori >> --- >> qtest.c | 29 +++++++++++++++++++++++++++++ >> tests/libqtest.c | 18 ++++++++++++++++++ >> tests/libqtest.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ >> 3 files changed, 93 insertions(+) >>=20 >> diff --git a/qtest.c b/qtest.c >> index 07a9612..f8c8f44 100644 >> --- a/qtest.c >> +++ b/qtest.c >> @@ -19,6 +19,9 @@ >> #include "hw/irq.h" >> #include "sysemu/sysemu.h" >> #include "sysemu/cpus.h" >> +#ifdef TARGET_PPC64 >> +#include "hw/ppc/spapr.h" >> +#endif >>=20=20 >> #define MAX_IRQ 256 >>=20=20 >> @@ -141,6 +144,13 @@ static bool qtest_opened; >> * where NUM is an IRQ number. For the PC, interrupts can be intercept= ed >> * simply with "irq_intercept_in ioapic" (note that IRQ0 comes out with >> * NUM=3D0 even though it is remapped to GSI 2). >> + * >> + * Platform specific (sPAPR): >> + * >> + * > papr_hypercall NR ARG0 ARG1 ... ARG8 > > The functions are called spapr_hcall*() but the protocol uses > papr_hypercall? The discrepancy is inherited in the KVM vs. QEMU interfaces. It's called papr_hypercall in the KVM interface vs. spapr in QEMU. I honestly don't know what the distinction between spapr and papr is. >> +static inline uint64_t spapr_hcall5(uint64_t nr, uint64_t a0, uint64_t = a1, >> + uint64_t a2, uint64_t a3, uint64_t = a4) >> +{ >> + return qtest_spapr_hcall9(global_qtest, nr, a0, a1, a2, a3, a4, 0, = 0, 0, 0); >> +} > > While for a large number of almost identical helpers this certainly > sucks, I made an effort to document all functions in that file, so > please keep it that way. :) Seems a bit redundant to document every one of these but I don't mind doing it. Regards, Anthony Liguori > > Looks very similar to what I had proposed for s390x, so fine with me. > > Regards, > Andreas > >> + >> #endif >>=20 > > > --=20 > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3= =BCrnberg