From patchwork Tue Dec 17 04:42:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 11296611 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 53DD414B7 for ; Tue, 17 Dec 2019 05:07:33 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 262D12072D for ; Tue, 17 Dec 2019 05:07:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b="B/VxeNQ2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 262D12072D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:35438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih551-00077a-ND for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 00:07:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33708) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih4iG-0008JO-5S for qemu-devel@nongnu.org; Mon, 16 Dec 2019 23:44:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih4iB-0005ZB-C8 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 23:43:58 -0500 Received: from ozlabs.org ([203.11.71.1]:59995) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih4iA-0005Qt-3f; Mon, 16 Dec 2019 23:43:54 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 47cQWT4m6Kz9sSq; Tue, 17 Dec 2019 15:43:30 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1576557813; bh=rqWdDbUCcpNjWZZpcK2jNRyA4bZeefxs9gm4nLiAqUM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B/VxeNQ25Ptsu8PVHK1qRpKomuP7Z9uRb5/EpuD/ky6m5jTzA0VoS3XjljzR2kmIq lI8853r20DoThbJx7NSrepkK5BIjiVD1tVulKsazZvdGTD7ei83a/e2kubthKTQDwz D5r+QxAKRpX+VuUlZvL0rkqwgEz4dPvdBx6CeDrA= From: David Gibson To: peter.maydell@linaro.org Subject: [PULL 23/88] ppc/xive: Check V bit in TM_PULL_POOL_CTX Date: Tue, 17 Dec 2019 15:42:17 +1100 Message-Id: <20191217044322.351838-24-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191217044322.351838-1-david@gibson.dropbear.id.au> References: <20191217044322.351838-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, aik@ozlabs.ru, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Cédric Le Goater A context should be 'valid' when pulled from the thread interrupt context registers. Signed-off-by: Cédric Le Goater Message-Id: <20191115162436.30548-8-clg@kaod.org> Signed-off-by: David Gibson --- hw/intc/xive.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/intc/xive.c b/hw/intc/xive.c index 42e9a11ef7..511e1a9363 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -377,6 +377,11 @@ static uint64_t xive_tm_pull_os_ctx(XiveTCTX *tctx, hwaddr offset, qw1w2 = xive_tctx_get_os_cam(tctx, &nvt_blk, &nvt_idx, &vo); + if (!vo) { + qemu_log_mask(LOG_GUEST_ERROR, "XIVE: pulling invalid NVT %x/%x !?\n", + nvt_blk, nvt_idx); + } + /* Invalidate CAM line */ qw1w2_new = xive_set_field32(TM_QW1W2_VO, qw1w2, 0); xive_tctx_set_os_cam(tctx, qw1w2_new);