From nobody Mon Sep 16 18:54:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1588501547; cv=none; d=zohomail.com; s=zohoarc; b=SoAJrh8/zHyULsFlx2bOO+JTNpiOWFnliCBn6ep5Sh9MWvVzVEKobr78yxNHWuJ23wiB5eLDTAiFs8oKfQ7dqjmxjMUFcWoDbbQ/35i4fhQDhnJHYRVfwNSvwXQLLSgxZrESm0h2MGFtaiK2ghQxE90qVHm/JMr3mux4T9DjXSk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588501547; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=jfwiI8//wmy3ik49uBy2rjnF1vTWGg8mq8vj0CK4ofw=; b=KQOcf+WeKfjhK6g6HfftLmui1I2x3D+kzw2VihXd/Ry1szmgDs9iY3Y2fv5I5wSejBkMb+JHixunRmZfFrCMMuaOpuO08KhvuPsEttlFvIGrlMv0cJHAQ+hb85w7SZXDQ2lOOjjoN6TXJeaIkwbB0+gBLddsylUaL2bnjCynQKY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588501547888256.4458888584895; Sun, 3 May 2020 03:25:47 -0700 (PDT) Received: from localhost ([::1]:49484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVBog-0002id-KP for importer@patchew.org; Sun, 03 May 2020 06:25:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVBnY-0001kG-E2 for qemu-devel@nongnu.org; Sun, 03 May 2020 06:24:36 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:33017) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVBnX-00076R-0g for qemu-devel@nongnu.org; Sun, 03 May 2020 06:24:36 -0400 Received: by mail-pf1-x432.google.com with SMTP id x77so4072857pfc.0 for ; Sun, 03 May 2020 03:24:34 -0700 (PDT) Received: from software.domain.org (28.144.92.34.bc.googleusercontent.com. [34.92.144.28]) by smtp.gmail.com with ESMTPSA id a12sm6173654pfr.28.2020.05.03.03.24.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 May 2020 03:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jfwiI8//wmy3ik49uBy2rjnF1vTWGg8mq8vj0CK4ofw=; b=RttYHTIhvZo/D26CBwySPgcn7G8ibBnGNBAwnhx/ypIcXAbp8/crplIxiGfWhHPBD8 O+kSM1uu7X0cXy2UqVeWTwNVHqpQ7j4xaDmuSMcy8LbWmRRLsrt4/H0pPLAcS/cTbGWG oJ4qlPgd7A/3+Mw41bRqAy8R4YPTCpPd1bq4fnXymmgM+nR4Sc4rHzsfFRlfoQZdWEG+ vvZr3Oqg5KmEO2Q9Kx24GppXSx2kBYK397iAXWFLM+WmYgJFrMxKZU9BbS8Qv9tfXhwY HnH8MCV6beByIQIYuelYDXpRHrh/7RwW0hxGTXjjUwgXnLXki+ItAlAHWMLtWi3zV/ia 2T9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jfwiI8//wmy3ik49uBy2rjnF1vTWGg8mq8vj0CK4ofw=; b=r12cK27EBWUrCW0eanWmHd6/RX1d8KTGzQ6NAgqO5Vm02Cf2mzWZx1Rrm4hXZAOMF0 CBUcaWVXPwqz9u8IAYORJ+jMevQrd+se5Wo4MTZ6RXUgoh2pcxiyriZVXkqdXvTog6C/ B+BU8AvcRrn/JUtqNS1GWJnPG+YMTWuF0ooyzdImpnMiSO6HHvFY9kTNNTytxhIwfXaq o92sWt21+yCXEIfQPQpT3R0/XX46z5wcUxnqdqmCfQNNe+RP08wZZRPHI+scBOLKREJS w2J9pj6WFIa94VoUjRd1XGfaTf0lwTboiov86aPhCqZjduyrJtu73vHObUQv3DORMsL5 Q2yg== X-Gm-Message-State: AGi0PuYMIwJBXu4zPoW4LFw4QeFssber3uouqwemh4NEtt+y+7x0HOeW OpQxKO7W4HGvb2CqxEgYiVo= X-Google-Smtp-Source: APiQypLGQT02ho06oeV1+twps5Giu+0OgK9nQUiYgUt1UsfSVAAYCfY6+61FrWjL9WVDH91Wog7pRQ== X-Received: by 2002:a62:3857:: with SMTP id f84mr13246113pfa.56.1588501473618; Sun, 03 May 2020 03:24:33 -0700 (PDT) From: Huacai Chen X-Google-Original-From: Huacai Chen To: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic Subject: [PATCH for-5.1 V3 3/7] hw/mips: Add CPU IRQ3 delivery for KVM Date: Sun, 3 May 2020 18:20:17 +0800 Message-Id: <1588501221-1205-4-git-send-email-chenhc@lemote.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1588501221-1205-1-git-send-email-chenhc@lemote.com> References: <1588501221-1205-1-git-send-email-chenhc@lemote.com> Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=zltjiangshi@gmail.com; helo=mail-pf1-x432.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Huacai Chen , Huacai Chen , Aleksandar Rikalo , qemu-devel@nongnu.org, Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Currently, KVM/MIPS only deliver I/O interrupt via IP2, this patch add IP3 delivery as well, because Loongson-3 based machine use both IRQ2 (CPU's IP2) and IRQ3 (CPU's IP3). Signed-off-by: Huacai Chen Co-developed-by: Jiaxun Yang Reviewed-by: Aleksandar Markovic --- hw/mips/mips_int.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c index 796730b..982ce34 100644 --- a/hw/mips/mips_int.c +++ b/hw/mips/mips_int.c @@ -48,14 +48,14 @@ static void cpu_mips_irq_request(void *opaque, int irq,= int level) if (level) { env->CP0_Cause |=3D 1 << (irq + CP0Ca_IP); =20 - if (kvm_enabled() && irq =3D=3D 2) { + if (kvm_enabled() && (irq =3D=3D 2 || irq =3D=3D 3)) { kvm_mips_set_interrupt(cpu, irq, level); } =20 } else { env->CP0_Cause &=3D ~(1 << (irq + CP0Ca_IP)); =20 - if (kvm_enabled() && irq =3D=3D 2) { + if (kvm_enabled() && (irq =3D=3D 2 || irq =3D=3D 3)) { kvm_mips_set_interrupt(cpu, irq, level); } } --=20 2.7.0