From patchwork Mon Jun 1 12:18:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11581947 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 D158192A for ; Mon, 1 Jun 2020 12:21:26 +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 A71F920679 for ; Mon, 1 Jun 2020 12:21:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="q12Klci9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A71F920679 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:45440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfjRV-00046r-U2 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 01 Jun 2020 08:21:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfjOa-0007t5-Pa for qemu-devel@nongnu.org; Mon, 01 Jun 2020 08:18:24 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:37261) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfjOZ-0007ln-Cv for qemu-devel@nongnu.org; Mon, 01 Jun 2020 08:18:24 -0400 Received: by mail-wr1-x435.google.com with SMTP id x13so11299184wrv.4 for ; Mon, 01 Jun 2020 05:18:21 -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 :mime-version:content-transfer-encoding; bh=nBjzGdklMexKb/6JWGFmjUnmUd5clhjwawZNup6d0kc=; b=q12Klci94bQLSwvtIvi3d5KLFfcW6pzYrbMPJA9RTXZCEanXUcGW2rcBiLT+V8dC5g FDEXH7DQO8pQsMrF8VD0EoU+Rf23m9tj6bKHSWIbk9JwX/m/GJl1sY8fpzVrkyTzTT91 I/TwJ9ZNRKCX/yIeK1JT86JjNkeQ20+F1hrrcp0VkhSaSBtpZqC811k1rG9K7CjFEYqp aKMcGOpneCNM7giMCnuJutl+n4kypaqR7bCEJELk0dVtYWYzgipNc5ZfiW7pYk7EiPtA +Q0KD7bbHu9wWiCDaVj6Ss0+5BbbCsSoJ8/NwP6BlxEx3UsJEIfsGwleVwFBTo27vIpV Kydw== 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:mime-version:content-transfer-encoding; bh=nBjzGdklMexKb/6JWGFmjUnmUd5clhjwawZNup6d0kc=; b=n2JGxdtzH8cRF97BMwG8Xdxb70aCOvuFJqmmHPEWfn00dvNftMxFWKY0iHTYkY9x8r icDwS5rqOc3P4rOCUSyiz/1WhAhDaqphB8VvJpIrWzRYRESqhtANOxstFkl0+gRGRGKG oDABQEXdD6WWTFCpBxdy7RjBOCCYzNXQvvR6mPv/uJqhgCi4mFCCehnaW9LbHogR8TqA hQ47/CREVEj9mvRPK+JInqTNkUQbF5d3a1eCH2VvtMHtdUEFfshxHEfXlUigo9rUlj8h 1UTyzZ8ZkY5azc9gj5k/4X1p1C7k/81iLlel6PWGq5mn2+gVCOcTCaRgdradMZIefmeO ar8w== X-Gm-Message-State: AOAM533SY8pOCVDhRiDCSiqJDlZ5HjJ/Lw6UCw+vVKURCikxmA8nhE6h /Na/d7pNz3HefGcNzOay70nzAeBmL18= X-Google-Smtp-Source: ABdhPJzCWKDCOewTjt4W2dM2UIlxLtxeF8kyJ/pZiRyoCTlS9q1HvuYDhBYAKQF2tIyfXw4M6DOUoA== X-Received: by 2002:adf:ab08:: with SMTP id q8mr2937029wrc.216.1591013900556; Mon, 01 Jun 2020 05:18:20 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id y185sm12332136wmy.11.2020.06.01.05.18.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jun 2020 05:18:20 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PULL 1/6] tests/Makefile: Fix description of "make check" Date: Mon, 1 Jun 2020 14:18:13 +0200 Message-Id: <1591013898-23391-2-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591013898-23391-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591013898-23391-1-git-send-email-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x435.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: peter.maydell@linaro.org, aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Huacai Chen The description of "make check" is out-of-date, so fix it by adding block and softfloat. Reviewed-by: Claudio Fontana Signed-off-by: Huacai Chen Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Message-Id: <1588674291-6486-1-git-send-email-chenhc@lemote.com> --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index a00ccc9..6e3d637 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -4,7 +4,7 @@ check-help: @echo "Regression testing targets:" @echo - @echo " $(MAKE) check Run unit, qapi-schema, qtest and decodetree" + @echo " $(MAKE) check Run block, qapi-schema, unit, softfloat, qtest and decodetree tests" @echo @echo " $(MAKE) check-qtest-TARGET Run qtest tests for given target" @echo " $(MAKE) check-qtest Run qtest tests" From patchwork Mon Jun 1 12:18:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11581941 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 DD18C90 for ; Mon, 1 Jun 2020 12:19:39 +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 B4B38206C3 for ; Mon, 1 Jun 2020 12:19:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ONVMm7YY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4B38206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:38336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfjPl-00018Z-BA for patchwork-qemu-devel@patchwork.kernel.org; Mon, 01 Jun 2020 08:19:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfjOa-0007t7-Pd for qemu-devel@nongnu.org; Mon, 01 Jun 2020 08:18:24 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:44021) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfjOZ-0007lu-Cz for qemu-devel@nongnu.org; Mon, 01 Jun 2020 08:18:24 -0400 Received: by mail-wr1-x42c.google.com with SMTP id l10so11259560wrr.10 for ; Mon, 01 Jun 2020 05:18:22 -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=jkTOq2PXmEwc1GxRKr+8vq1tSIfxuDyzzjRCTdzClcU=; b=ONVMm7YY0GG1O4Ohs3j5TE7fE8gk7muSeB178ct+vA0Ie2wSJTeFKbX2ynDQaOojjA t9o6ALI6c69Nui8hwIdB/s5pWIXwNvsSoDUvfj+k1t7htn/NII1nzj1jWZiCIyaEKXLv /w8tPr+v7CyriwpbufsSdsIT2yoPETTlj1tONt+p7Av7KvcImV478zaZn+b1dbPZqMtH nT3ua27Voc5yIZ1O4Oeu4IGjTGGPTBStZylnZEutM+vwZ+JTYsXXVttz1ffwGHvNH2RD mFuXsDGIbsFspmgwag4RTACQyhzqqmzyQXOAdwhzA6NjMRSI0hskNRlyxWcZt/4qjfN5 GMrA== 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=jkTOq2PXmEwc1GxRKr+8vq1tSIfxuDyzzjRCTdzClcU=; b=hAK0QHRAdPBi2Hgyu77xQ+gonPZ6UUsONDdR7XzCgwtvkgcKMrKK/Joj9piIB2rn64 myE7KkEflvL53I67wnb1QvudILTec23mEcJyiJEOcVKKNwlaL5uUy+M5bk6kFONmXjOI 6PdnsXkuxaxIJqt+LIdlYbsRvLhrMkhwobDeG9/TIrjmgm21iSoSXxtu+98ixfMtP/cX xBezPAZ5VF87aQKjdGSGfVqw/T5gYTfdv20Q/1SSW+dOOxzEIa3ZbcyFRDD7x1v5OWVc SpY2x+is4HIpYA4qdPc6amygDo5lGykqKENQbpNCY/c7elt8cSH7rpogNa9jvefJREbI JYYQ== X-Gm-Message-State: AOAM5315CXM6rjbMcIP5bGg1Bv+oGhbCs80EQFUp408AhvY/j6R9EhGN fJYgDnlvrTyk34bNqmEOTl8sJYoxc10= X-Google-Smtp-Source: ABdhPJyGUuNMBQRAHEsn7vbTWNIxAvSWJ1grr7ymwPO6j14jM//lGUFiYRyrWzTZk+KjqotEPYb6uA== X-Received: by 2002:a5d:4a89:: with SMTP id o9mr9628372wrq.267.1591013901405; Mon, 01 Jun 2020 05:18:21 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id y185sm12332136wmy.11.2020.06.01.05.18.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jun 2020 05:18:21 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PULL 2/6] configure: Add KVM target support for MIPS64 Date: Mon, 1 Jun 2020 14:18:14 +0200 Message-Id: <1591013898-23391-3-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591013898-23391-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591013898-23391-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x42c.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: peter.maydell@linaro.org, aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Huacai Chen Preparing for Loongson-3 virtualization, add KVM target support for MIPS64 in configure script. Signed-off-by: Huacai Chen Co-developed-by: Jiaxun Yang Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Message-Id: <1588501221-1205-2-git-send-email-chenhc@lemote.com> --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index af2ba83..f087d2b 100755 --- a/configure +++ b/configure @@ -198,7 +198,7 @@ supported_kvm_target() { arm:arm | aarch64:aarch64 | \ i386:i386 | i386:x86_64 | i386:x32 | \ x86_64:i386 | x86_64:x86_64 | x86_64:x32 | \ - mips:mips | mipsel:mips | \ + mips:mips | mipsel:mips | mips64:mips | mips64el:mips | \ ppc:ppc | ppc64:ppc | ppc:ppc64 | ppc64:ppc64 | ppc64:ppc64le | \ s390x:s390x) return 0 From patchwork Mon Jun 1 12:18:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11581965 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 E9F1290 for ; Mon, 1 Jun 2020 12:23:10 +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 BFB8D2077D for ; Mon, 1 Jun 2020 12:23:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VCGjytDF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFB8D2077D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfjTC-0006Sb-39 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 01 Jun 2020 08:23:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfjOc-0007vB-9q for qemu-devel@nongnu.org; Mon, 01 Jun 2020 08:18:26 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:41380) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfjOZ-0007m0-L2 for qemu-devel@nongnu.org; Mon, 01 Jun 2020 08:18:25 -0400 Received: by mail-wr1-x42a.google.com with SMTP id j10so11252062wrw.8 for ; Mon, 01 Jun 2020 05:18:23 -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=sHSdc0omkhqpxjCauytiNdW8vYCwQDAfVEOw9sLViU4=; b=VCGjytDFUd6wPDJwvbAH36a10LWO7guhj1HKmoTs8f5NbTYM8TTc7ZZVLnCFwDHga3 /kWon1hYWhMriLnnLvQYFcKPDlN1ug/W7NB7Ut4GEpXAPDL2m/xcO3bnQb3mzHQDKchg dmW6i3fiB0UTxnHWHBPcgw4EcTjwY02HUTPoDpuvvfegGCfVS7yf9ogSWcxZE7Nu8tFq r5DhFZm3MT7RSCR2JzusMAKj9qzBo733mNIZMqvwrGWAeqUB9FrTQt/kvEcxrTYvfvhI zvvGW86qp5sg/KiPFOKNBG8Y27myQHbfE6rTWa2ObDNtdBIP9UrGyjkU5bm34arrYPoB 3c9w== 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=sHSdc0omkhqpxjCauytiNdW8vYCwQDAfVEOw9sLViU4=; b=Ly4+/59cMqYN6XcGvgg+Lms0jUcmAgqIML2oX3IAGb2Xg7s/+XbKHOJLt+CtRVyt6G Ln7BUbN4xla+fUCV3rl8i6Ixf9fQqjd/oxgqv9E2gD9chiJfsBdrudXAZsQMabxryB7v AlfHEAn40Xt0rXYiPvZJoeaajdrsyzk8U+bLSiafcULZhnnSoZMLiobYm0ECG3Wxtne/ rdTmCyHjW4UqJ9fy03OavyfRm/W8P0lmkfK9LT8oTwhTfe+gwUx8RulnMhXyyjbPAR5k gMt6zNeSd6rJbH6v+bMynvbmJvlDlILx2E3na3jRt2ixUDeN1LPgVrbsNu6seo1bigT7 f6MA== X-Gm-Message-State: AOAM530dfaspbj1pIIqRhj7Ub6AKNqNwiiHQwX8WksgvfmlttegAPOo6 zdTBGVl2G6rA1ONK0bLe6XGrln0/UtE= X-Google-Smtp-Source: ABdhPJw9FSeeA705vA8g4+eCmPdd/aIDeQm/77McHNqVRm70+8Qmn9oC6KcBkJgJ75UkmFhKVsoV0A== X-Received: by 2002:adf:e4d1:: with SMTP id v17mr6524836wrm.224.1591013902112; Mon, 01 Jun 2020 05:18:22 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id y185sm12332136wmy.11.2020.06.01.05.18.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jun 2020 05:18:21 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PULL 3/6] hw/mips: Add CPU IRQ3 delivery for KVM Date: Mon, 1 Jun 2020 14:18:15 +0200 Message-Id: <1591013898-23391-4-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591013898-23391-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591013898-23391-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x42a.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: peter.maydell@linaro.org, aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Huacai Chen 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 Signed-off-by: Aleksandar Markovic Message-Id: <1588501221-1205-4-git-send-email-chenhc@lemote.com> --- hw/mips/mips_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c index 4a1bf84..0f9c6f0 100644 --- a/hw/mips/mips_int.c +++ b/hw/mips/mips_int.c @@ -51,7 +51,7 @@ static void cpu_mips_irq_request(void *opaque, int irq, int level) env->CP0_Cause &= ~(1 << (irq + CP0Ca_IP)); } - if (kvm_enabled() && irq == 2) { + if (kvm_enabled() && (irq == 2 || irq == 3)) { kvm_mips_set_interrupt(cpu, irq, level); } From patchwork Mon Jun 1 12:18:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11581943 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 1329C90 for ; Mon, 1 Jun 2020 12:19:43 +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 CE9AD206C3 for ; Mon, 1 Jun 2020 12:19:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="j+Yd5BR1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE9AD206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:38616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfjPp-0001Fa-Vp for patchwork-qemu-devel@patchwork.kernel.org; Mon, 01 Jun 2020 08:19:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfjOc-0007v0-60 for qemu-devel@nongnu.org; Mon, 01 Jun 2020 08:18:26 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:46355) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfjOa-0007mC-Jq for qemu-devel@nongnu.org; Mon, 01 Jun 2020 08:18:25 -0400 Received: by mail-wr1-x429.google.com with SMTP id x6so11189482wrm.13 for ; Mon, 01 Jun 2020 05:18:24 -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=WNPUP/r+5/DPaWuNSMO+6NTmV/gUF2YqpOpzfB1z7f8=; b=j+Yd5BR1p3Q4yDODoA+3JAJbIXuJPmiem7mSgVvy7xxKPXCxH/K7/IOdcjVUbM57Kz uv6yOp8mcd1LNy+qhFiyj/F9cv/c6uUWkOSLmCsaIL+648+nJepQvTe4oPiEfYWyIAWd 7INJ54BMf0d5hAbg3ZCJxO5SufXUuFreKtSH1Ojt9i4PfEtQrpmngHYfJry84wQzhnO6 uyOtap9uDjifl35pOqzg1x6IXRcMseCtPVfHn0wDQjmdID5p5hIzJcHut1CWwy9uyUPN Ok39lyv/tE2/wD1U3PBaTbJkaI6KNSREbMcp4M72EDrT5qJMPo2lKfGVfjSGci7CpFQM pI2Q== 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=WNPUP/r+5/DPaWuNSMO+6NTmV/gUF2YqpOpzfB1z7f8=; b=aW51wo8Cj+lwRoXKbQM6/UtBI2cOOhlLibf0fXUaVB36frJ0I+K7DFJnUpo0gH/Yht Q1+GaerO2NwCk+3j96wlhSpMzEx562qHi8cFOBptKpFCF5zOhGXg+mBsTNoxkBml5pSO nMvdHwpUyezJAW0qWbtXDsg9ivLsy0SV8wvqBS5coPkXqprNc4iblJ1W1CrsNTxG8Byj lgS4wNt1vTe6vegNGxZ80L9RtkOJApDDWldICLzaLSyfAfOSxYbLTLKA8sZ/O9HyORqA L4m1287dEEUdECvlxW/jOLyHg43RU9rDto9QIGj1K8uT5KsLRr9MO+1nsD5nyGw4fv+e C8fw== X-Gm-Message-State: AOAM530Rr2zN4FVmfKgB0AuuZtiBjv4m+u2m5xFjNa/sKs/LI2Ft2p97 qEomqjfYHaShWqwtKqS625/FrpQAc0o= X-Google-Smtp-Source: ABdhPJzryu3KOYTn90FMj1Tz1Bp5AKiUBMIH4LIAFDGYHBNHVqoothGLH1XAIFRwoQYMN2P2XXLWNg== X-Received: by 2002:adf:db09:: with SMTP id s9mr21301163wri.256.1591013902861; Mon, 01 Jun 2020 05:18:22 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id y185sm12332136wmy.11.2020.06.01.05.18.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jun 2020 05:18:22 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PULL 4/6] target/mips: Add more CP0 register for save/restore Date: Mon, 1 Jun 2020 14:18:16 +0200 Message-Id: <1591013898-23391-5-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591013898-23391-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591013898-23391-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x429.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: peter.maydell@linaro.org, aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Huacai Chen Add more CP0 register for save/restore, including: EBase, XContext, PageGrain, PWBase, PWSize, PWField, PWCtl, Config*, KScratch1~KScratch6. Signed-off-by: Huacai Chen Co-developed-by: Jiaxun Yang Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Message-Id: <1588501221-1205-6-git-send-email-chenhc@lemote.com> --- target/mips/kvm.c | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++ target/mips/machine.c | 6 +- 2 files changed, 216 insertions(+), 2 deletions(-) diff --git a/target/mips/kvm.c b/target/mips/kvm.c index de3e26e..96cfa10 100644 --- a/target/mips/kvm.c +++ b/target/mips/kvm.c @@ -245,10 +245,16 @@ int kvm_mips_set_ipi_interrupt(MIPSCPU *cpu, int irq, int level) (KVM_REG_MIPS_CP0 | KVM_REG_SIZE_U64 | (8 * (_R) + (_S))) #define KVM_REG_MIPS_CP0_INDEX MIPS_CP0_32(0, 0) +#define KVM_REG_MIPS_CP0_RANDOM MIPS_CP0_32(1, 0) #define KVM_REG_MIPS_CP0_CONTEXT MIPS_CP0_64(4, 0) #define KVM_REG_MIPS_CP0_USERLOCAL MIPS_CP0_64(4, 2) #define KVM_REG_MIPS_CP0_PAGEMASK MIPS_CP0_32(5, 0) +#define KVM_REG_MIPS_CP0_PAGEGRAIN MIPS_CP0_32(5, 1) +#define KVM_REG_MIPS_CP0_PWBASE MIPS_CP0_64(5, 5) +#define KVM_REG_MIPS_CP0_PWFIELD MIPS_CP0_64(5, 6) +#define KVM_REG_MIPS_CP0_PWSIZE MIPS_CP0_64(5, 7) #define KVM_REG_MIPS_CP0_WIRED MIPS_CP0_32(6, 0) +#define KVM_REG_MIPS_CP0_PWCTL MIPS_CP0_32(6, 6) #define KVM_REG_MIPS_CP0_HWRENA MIPS_CP0_32(7, 0) #define KVM_REG_MIPS_CP0_BADVADDR MIPS_CP0_64(8, 0) #define KVM_REG_MIPS_CP0_COUNT MIPS_CP0_32(9, 0) @@ -258,13 +264,22 @@ int kvm_mips_set_ipi_interrupt(MIPSCPU *cpu, int irq, int level) #define KVM_REG_MIPS_CP0_CAUSE MIPS_CP0_32(13, 0) #define KVM_REG_MIPS_CP0_EPC MIPS_CP0_64(14, 0) #define KVM_REG_MIPS_CP0_PRID MIPS_CP0_32(15, 0) +#define KVM_REG_MIPS_CP0_EBASE MIPS_CP0_64(15, 1) #define KVM_REG_MIPS_CP0_CONFIG MIPS_CP0_32(16, 0) #define KVM_REG_MIPS_CP0_CONFIG1 MIPS_CP0_32(16, 1) #define KVM_REG_MIPS_CP0_CONFIG2 MIPS_CP0_32(16, 2) #define KVM_REG_MIPS_CP0_CONFIG3 MIPS_CP0_32(16, 3) #define KVM_REG_MIPS_CP0_CONFIG4 MIPS_CP0_32(16, 4) #define KVM_REG_MIPS_CP0_CONFIG5 MIPS_CP0_32(16, 5) +#define KVM_REG_MIPS_CP0_CONFIG6 MIPS_CP0_32(16, 6) +#define KVM_REG_MIPS_CP0_XCONTEXT MIPS_CP0_64(20, 0) #define KVM_REG_MIPS_CP0_ERROREPC MIPS_CP0_64(30, 0) +#define KVM_REG_MIPS_CP0_KSCRATCH1 MIPS_CP0_64(31, 2) +#define KVM_REG_MIPS_CP0_KSCRATCH2 MIPS_CP0_64(31, 3) +#define KVM_REG_MIPS_CP0_KSCRATCH3 MIPS_CP0_64(31, 4) +#define KVM_REG_MIPS_CP0_KSCRATCH4 MIPS_CP0_64(31, 5) +#define KVM_REG_MIPS_CP0_KSCRATCH5 MIPS_CP0_64(31, 6) +#define KVM_REG_MIPS_CP0_KSCRATCH6 MIPS_CP0_64(31, 7) static inline int kvm_mips_put_one_reg(CPUState *cs, uint64_t reg_id, int32_t *addr) @@ -394,6 +409,29 @@ static inline int kvm_mips_get_one_ureg64(CPUState *cs, uint64_t reg_id, (1U << CP0C5_UFE) | \ (1U << CP0C5_FRE) | \ (1U << CP0C5_UFR)) +#define KVM_REG_MIPS_CP0_CONFIG6_MASK ((1U << CP0C6_BPPASS) | \ + (0x3fU << CP0C6_KPOS) | \ + (1U << CP0C6_KE) | \ + (1U << CP0C6_VTLBONLY) | \ + (1U << CP0C6_LASX) | \ + (1U << CP0C6_SSEN) | \ + (1U << CP0C6_DISDRTIME) | \ + (1U << CP0C6_PIXNUEN) | \ + (1U << CP0C6_SCRAND) | \ + (1U << CP0C6_LLEXCEN) | \ + (1U << CP0C6_DISVC) | \ + (1U << CP0C6_VCLRU) | \ + (1U << CP0C6_DCLRU) | \ + (1U << CP0C6_PIXUEN) | \ + (1U << CP0C6_DISBLKLYEN) | \ + (1U << CP0C6_UMEMUALEN) | \ + (1U << CP0C6_SFBEN) | \ + (1U << CP0C6_FLTINT) | \ + (1U << CP0C6_VLTINT) | \ + (1U << CP0C6_DISBTB) | \ + (3U << CP0C6_STPREFCTL) | \ + (1U << CP0C6_INSTPREF) | \ + (1U << CP0C6_DATAPREF)) static inline int kvm_mips_change_one_reg(CPUState *cs, uint64_t reg_id, int32_t *addr, int32_t mask) @@ -729,6 +767,11 @@ static int kvm_mips_put_cp0_registers(CPUState *cs, int level) DPRINTF("%s: Failed to put CP0_INDEX (%d)\n", __func__, err); ret = err; } + err = kvm_mips_put_one_reg(cs, KVM_REG_MIPS_CP0_RANDOM, &env->CP0_Random); + if (err < 0) { + DPRINTF("%s: Failed to put CP0_RANDOM (%d)\n", __func__, err); + ret = err; + } err = kvm_mips_put_one_ulreg(cs, KVM_REG_MIPS_CP0_CONTEXT, &env->CP0_Context); if (err < 0) { @@ -747,11 +790,40 @@ static int kvm_mips_put_cp0_registers(CPUState *cs, int level) DPRINTF("%s: Failed to put CP0_PAGEMASK (%d)\n", __func__, err); ret = err; } + err = kvm_mips_put_one_reg(cs, KVM_REG_MIPS_CP0_PAGEGRAIN, + &env->CP0_PageGrain); + if (err < 0) { + DPRINTF("%s: Failed to put CP0_PAGEGRAIN (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_put_one_ulreg(cs, KVM_REG_MIPS_CP0_PWBASE, + &env->CP0_PWBase); + if (err < 0) { + DPRINTF("%s: Failed to put CP0_PWBASE (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_put_one_ulreg(cs, KVM_REG_MIPS_CP0_PWFIELD, + &env->CP0_PWField); + if (err < 0) { + DPRINTF("%s: Failed to put CP0_PWField (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_put_one_ulreg(cs, KVM_REG_MIPS_CP0_PWSIZE, + &env->CP0_PWSize); + if (err < 0) { + DPRINTF("%s: Failed to put CP0_PWSIZE (%d)\n", __func__, err); + ret = err; + } err = kvm_mips_put_one_reg(cs, KVM_REG_MIPS_CP0_WIRED, &env->CP0_Wired); if (err < 0) { DPRINTF("%s: Failed to put CP0_WIRED (%d)\n", __func__, err); ret = err; } + err = kvm_mips_put_one_reg(cs, KVM_REG_MIPS_CP0_PWCTL, &env->CP0_PWCtl); + if (err < 0) { + DPRINTF("%s: Failed to put CP0_PWCTL (%d)\n", __func__, err); + ret = err; + } err = kvm_mips_put_one_reg(cs, KVM_REG_MIPS_CP0_HWRENA, &env->CP0_HWREna); if (err < 0) { DPRINTF("%s: Failed to put CP0_HWRENA (%d)\n", __func__, err); @@ -799,6 +871,11 @@ static int kvm_mips_put_cp0_registers(CPUState *cs, int level) DPRINTF("%s: Failed to put CP0_PRID (%d)\n", __func__, err); ret = err; } + err = kvm_mips_put_one_ulreg(cs, KVM_REG_MIPS_CP0_EBASE, &env->CP0_EBase); + if (err < 0) { + DPRINTF("%s: Failed to put CP0_EBASE (%d)\n", __func__, err); + ret = err; + } err = kvm_mips_change_one_reg(cs, KVM_REG_MIPS_CP0_CONFIG, &env->CP0_Config0, KVM_REG_MIPS_CP0_CONFIG_MASK); @@ -841,12 +918,61 @@ static int kvm_mips_put_cp0_registers(CPUState *cs, int level) DPRINTF("%s: Failed to change CP0_CONFIG5 (%d)\n", __func__, err); ret = err; } + err = kvm_mips_change_one_reg(cs, KVM_REG_MIPS_CP0_CONFIG6, + &env->CP0_Config6, + KVM_REG_MIPS_CP0_CONFIG6_MASK); + if (err < 0) { + DPRINTF("%s: Failed to change CP0_CONFIG6 (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_put_one_ulreg(cs, KVM_REG_MIPS_CP0_XCONTEXT, + &env->CP0_XContext); + if (err < 0) { + DPRINTF("%s: Failed to put CP0_XCONTEXT (%d)\n", __func__, err); + ret = err; + } err = kvm_mips_put_one_ulreg(cs, KVM_REG_MIPS_CP0_ERROREPC, &env->CP0_ErrorEPC); if (err < 0) { DPRINTF("%s: Failed to put CP0_ERROREPC (%d)\n", __func__, err); ret = err; } + err = kvm_mips_put_one_ulreg(cs, KVM_REG_MIPS_CP0_KSCRATCH1, + &env->CP0_KScratch[0]); + if (err < 0) { + DPRINTF("%s: Failed to put CP0_KSCRATCH1 (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_put_one_ulreg(cs, KVM_REG_MIPS_CP0_KSCRATCH2, + &env->CP0_KScratch[1]); + if (err < 0) { + DPRINTF("%s: Failed to put CP0_KSCRATCH2 (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_put_one_ulreg(cs, KVM_REG_MIPS_CP0_KSCRATCH3, + &env->CP0_KScratch[2]); + if (err < 0) { + DPRINTF("%s: Failed to put CP0_KSCRATCH3 (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_put_one_ulreg(cs, KVM_REG_MIPS_CP0_KSCRATCH4, + &env->CP0_KScratch[3]); + if (err < 0) { + DPRINTF("%s: Failed to put CP0_KSCRATCH4 (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_put_one_ulreg(cs, KVM_REG_MIPS_CP0_KSCRATCH5, + &env->CP0_KScratch[4]); + if (err < 0) { + DPRINTF("%s: Failed to put CP0_KSCRATCH5 (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_put_one_ulreg(cs, KVM_REG_MIPS_CP0_KSCRATCH6, + &env->CP0_KScratch[5]); + if (err < 0) { + DPRINTF("%s: Failed to put CP0_KSCRATCH6 (%d)\n", __func__, err); + ret = err; + } return ret; } @@ -862,6 +988,11 @@ static int kvm_mips_get_cp0_registers(CPUState *cs) DPRINTF("%s: Failed to get CP0_INDEX (%d)\n", __func__, err); ret = err; } + err = kvm_mips_get_one_reg(cs, KVM_REG_MIPS_CP0_RANDOM, &env->CP0_Random); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_RANDOM (%d)\n", __func__, err); + ret = err; + } err = kvm_mips_get_one_ulreg(cs, KVM_REG_MIPS_CP0_CONTEXT, &env->CP0_Context); if (err < 0) { @@ -880,11 +1011,40 @@ static int kvm_mips_get_cp0_registers(CPUState *cs) DPRINTF("%s: Failed to get CP0_PAGEMASK (%d)\n", __func__, err); ret = err; } + err = kvm_mips_get_one_reg(cs, KVM_REG_MIPS_CP0_PAGEGRAIN, + &env->CP0_PageGrain); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_PAGEGRAIN (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_get_one_ulreg(cs, KVM_REG_MIPS_CP0_PWBASE, + &env->CP0_PWBase); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_PWBASE (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_get_one_ulreg(cs, KVM_REG_MIPS_CP0_PWFIELD, + &env->CP0_PWField); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_PWFIELD (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_get_one_ulreg(cs, KVM_REG_MIPS_CP0_PWSIZE, + &env->CP0_PWSize); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_PWSIZE (%d)\n", __func__, err); + ret = err; + } err = kvm_mips_get_one_reg(cs, KVM_REG_MIPS_CP0_WIRED, &env->CP0_Wired); if (err < 0) { DPRINTF("%s: Failed to get CP0_WIRED (%d)\n", __func__, err); ret = err; } + err = kvm_mips_get_one_reg(cs, KVM_REG_MIPS_CP0_PWCTL, &env->CP0_PWCtl); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_PWCtl (%d)\n", __func__, err); + ret = err; + } err = kvm_mips_get_one_reg(cs, KVM_REG_MIPS_CP0_HWRENA, &env->CP0_HWREna); if (err < 0) { DPRINTF("%s: Failed to get CP0_HWRENA (%d)\n", __func__, err); @@ -932,6 +1092,11 @@ static int kvm_mips_get_cp0_registers(CPUState *cs) DPRINTF("%s: Failed to get CP0_PRID (%d)\n", __func__, err); ret = err; } + err = kvm_mips_get_one_ulreg(cs, KVM_REG_MIPS_CP0_EBASE, &env->CP0_EBase); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_EBASE (%d)\n", __func__, err); + ret = err; + } err = kvm_mips_get_one_reg(cs, KVM_REG_MIPS_CP0_CONFIG, &env->CP0_Config0); if (err < 0) { DPRINTF("%s: Failed to get CP0_CONFIG (%d)\n", __func__, err); @@ -962,12 +1127,59 @@ static int kvm_mips_get_cp0_registers(CPUState *cs) DPRINTF("%s: Failed to get CP0_CONFIG5 (%d)\n", __func__, err); ret = err; } + err = kvm_mips_get_one_reg(cs, KVM_REG_MIPS_CP0_CONFIG6, &env->CP0_Config6); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_CONFIG6 (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_get_one_ulreg(cs, KVM_REG_MIPS_CP0_XCONTEXT, + &env->CP0_XContext); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_XCONTEXT (%d)\n", __func__, err); + ret = err; + } err = kvm_mips_get_one_ulreg(cs, KVM_REG_MIPS_CP0_ERROREPC, &env->CP0_ErrorEPC); if (err < 0) { DPRINTF("%s: Failed to get CP0_ERROREPC (%d)\n", __func__, err); ret = err; } + err = kvm_mips_get_one_ulreg(cs, KVM_REG_MIPS_CP0_KSCRATCH1, + &env->CP0_KScratch[0]); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_KSCRATCH1 (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_get_one_ulreg(cs, KVM_REG_MIPS_CP0_KSCRATCH2, + &env->CP0_KScratch[1]); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_KSCRATCH2 (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_get_one_ulreg(cs, KVM_REG_MIPS_CP0_KSCRATCH3, + &env->CP0_KScratch[2]); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_KSCRATCH3 (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_get_one_ulreg(cs, KVM_REG_MIPS_CP0_KSCRATCH4, + &env->CP0_KScratch[3]); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_KSCRATCH4 (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_get_one_ulreg(cs, KVM_REG_MIPS_CP0_KSCRATCH5, + &env->CP0_KScratch[4]); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_KSCRATCH5 (%d)\n", __func__, err); + ret = err; + } + err = kvm_mips_get_one_ulreg(cs, KVM_REG_MIPS_CP0_KSCRATCH6, + &env->CP0_KScratch[5]); + if (err < 0) { + DPRINTF("%s: Failed to get CP0_KSCRATCH6 (%d)\n", __func__, err); + ret = err; + } return ret; } diff --git a/target/mips/machine.c b/target/mips/machine.c index 8d5b18b..5b23e3e 100644 --- a/target/mips/machine.c +++ b/target/mips/machine.c @@ -212,8 +212,8 @@ const VMStateDescription vmstate_tlb = { const VMStateDescription vmstate_mips_cpu = { .name = "cpu", - .version_id = 19, - .minimum_version_id = 19, + .version_id = 20, + .minimum_version_id = 20, .post_load = cpu_post_load, .fields = (VMStateField[]) { /* Active TC */ @@ -289,6 +289,8 @@ const VMStateDescription vmstate_mips_cpu = { VMSTATE_INT32(env.CP0_Config1, MIPSCPU), VMSTATE_INT32(env.CP0_Config2, MIPSCPU), VMSTATE_INT32(env.CP0_Config3, MIPSCPU), + VMSTATE_INT32(env.CP0_Config4, MIPSCPU), + VMSTATE_INT32(env.CP0_Config5, MIPSCPU), VMSTATE_INT32(env.CP0_Config6, MIPSCPU), VMSTATE_INT32(env.CP0_Config7, MIPSCPU), VMSTATE_UINT64(env.CP0_LLAddr, MIPSCPU), From patchwork Mon Jun 1 12:18:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11581945 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 3429192A for ; Mon, 1 Jun 2020 12:20:16 +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 0B51B20679 for ; Mon, 1 Jun 2020 12:20:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="P4rwZP0u" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0B51B20679 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:41930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfjQN-0002bS-3i for patchwork-qemu-devel@patchwork.kernel.org; Mon, 01 Jun 2020 08:20:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfjOb-0007uW-RR for qemu-devel@nongnu.org; Mon, 01 Jun 2020 08:18:25 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:45733) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfjOa-0007mI-VS for qemu-devel@nongnu.org; Mon, 01 Jun 2020 08:18:25 -0400 Received: by mail-wr1-x42f.google.com with SMTP id c3so11217889wru.12 for ; Mon, 01 Jun 2020 05:18:24 -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=//oQPQNfOG3Cowa0+33C2vqPBy/QAFTT+RnBfWuuERs=; b=P4rwZP0ur4zLD7xp41abf8XXhYkcQoSJMaTcob0POFfaQ66U9jPZFPthTvSoejU1PP JpcM0tvnQjyLLiHWoVhCQ5d+LEpNkDgNpwzP2WCbwtjGdwVvkcPMfiEoy7p1uUvzqYsu C/x/p7SUH5PX/3GuCsAgpvLrOl+b0TE5M8/QbPUnCJ8h4tR3E2cPsmIMZJdJ0LlfMvZR 9ICnMxre2peDpk1I7NZC6R5YVPQAUKitJejNyRAMO3cdmHl4YlrfKfP2RHHWe5Lf1D6M yN9BIrAlKaUWeRIhqQXEXJWR10oDri7wlLZ8BSfIMDhzR1fZKygT12QPFzx3cBtZC1lQ xWqQ== 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=//oQPQNfOG3Cowa0+33C2vqPBy/QAFTT+RnBfWuuERs=; b=XIGMRXlNH2tf80gI0TLu9E5mXa+EhSy9qq/q0X8qpka8NRTNPK9q1PCllS6AeNlJzC vv7/Wdw9+6aObRw8Yf+Fb0N3u9BTfuj5rxr+cpnHlnU7vc1qtQ/V9k7xR5Z8jzPINk6l 6OfLUQ8JvfFuv8RcxyzGdRjd9ErJURhrveHjstU+4/enf734TsTiECXF3O/2Jy7Ci+cJ J8WdunLg6ENqzYQ3GfO2Z5ox4/Izb8ZQ6KMpH0ms1Q0ObHP8J2nouTAXxAICEndWFv2N Jky2V/to+MnmHKk0k3WP9HPlDQOOWG6ibv/V3kp+8IGEZLpYoArxGR+FYOR/ZjmHLpTH Lxbg== X-Gm-Message-State: AOAM532SsLKsc7Gnn+ClYKZHUDKjCzCLonb2dOIlgY55gSnS3943z6oh I6YZ8iZSu1Q2jTfHi3qEO36Ur+Ee/6A= X-Google-Smtp-Source: ABdhPJwB2Zl8eZZ6wTr5rr7MyjfG0ANnNJOYawulcPiP+1amrvn6/CfknQs165lHS+dhQF74+o2Sjw== X-Received: by 2002:a05:6000:47:: with SMTP id k7mr20638875wrx.233.1591013903545; Mon, 01 Jun 2020 05:18:23 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id y185sm12332136wmy.11.2020.06.01.05.18.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jun 2020 05:18:23 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PULL 5/6] target/mips: Support variable page size Date: Mon, 1 Jun 2020 14:18:17 +0200 Message-Id: <1591013898-23391-6-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591013898-23391-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591013898-23391-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x42f.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: peter.maydell@linaro.org, aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Huacai Chen Traditionally, MIPS use 4KB page size, but Loongson prefer 16KB page size in system emulator. So, let's define TARGET_PAGE_BITS_VARY and TARGET_PAGE_BITS_MIN to support variable page size. Cc: Jiaxun Yang Signed-off-by: Huacai Chen Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Message-Id: <1586337380-25217-1-git-send-email-chenhc@lemote.com> --- target/mips/cpu-param.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/mips/cpu-param.h b/target/mips/cpu-param.h index 308660d..9c4a6ea 100644 --- a/target/mips/cpu-param.h +++ b/target/mips/cpu-param.h @@ -23,7 +23,12 @@ # define TARGET_VIRT_ADDR_SPACE_BITS 32 #endif #endif +#ifdef CONFIG_USER_ONLY #define TARGET_PAGE_BITS 12 +#else +#define TARGET_PAGE_BITS_VARY +#define TARGET_PAGE_BITS_MIN 12 +#endif #define NB_MMU_MODES 4 #endif From patchwork Mon Jun 1 12:18:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11581961 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 A742B90 for ; Mon, 1 Jun 2020 12:22:09 +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 7ECD62077D for ; Mon, 1 Jun 2020 12:22:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RjYjN99J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7ECD62077D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:48256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfjSC-0005Fe-QX for patchwork-qemu-devel@patchwork.kernel.org; Mon, 01 Jun 2020 08:22:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfjOc-0007vj-IJ for qemu-devel@nongnu.org; Mon, 01 Jun 2020 08:18:26 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:40444) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfjOb-0007mV-Iz for qemu-devel@nongnu.org; Mon, 01 Jun 2020 08:18:26 -0400 Received: by mail-wr1-x435.google.com with SMTP id h5so5351884wrc.7 for ; Mon, 01 Jun 2020 05:18:25 -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=aNhfYIaY3OUVVYH83lAIrkbP3NWpAGizZOAzH/eH6ZY=; b=RjYjN99J60wg0pQClHpv0+L7oNHibkCqoI+724iehOzAc/Ys2uujdLskNCWtsVFU5W 95LPQiqJ6ySf8c3KclmHd1jPkkDgWFqpVgCv/PoCyNYBe031gDeP8oYY5QnBqatCQ4LP 0+KnaVQyDTrUaW1MhNl82ZfaBy+Jb9yyYK0Sh6Epbt05Fige0wPFoWBycLLfBxAe7VAA YXDgk3IkiLcmPvmgkWjHu7tZnZuxUrzfaX9n7C7eVnMvPQsgHZK4RvrdAU5KsBnSw0Sn hDXWTlWrcQNnwutfdx7/wlsfscd4cMzU6P6xUuLos0LPN1+2SoJ0XhguSDKlRjwAC61x DXdw== 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=aNhfYIaY3OUVVYH83lAIrkbP3NWpAGizZOAzH/eH6ZY=; b=sjD0+KGngsLju/NcCe+fBbxVZM2XQEB+bEwfzNEAfX+Q/4iQ+DJiRiM1Cy9rWTa622 cKNmm75abO0mHPRbcnKzgVUzX/YXqoCAhm3ADInGEl/OJExtpuaAp//R+yrC5ZI/tOv2 xPXF9YOyHa67C59Gcwoqxjw7vLY9jlvvVb8nLxzmzlFXXZbRCyubhc/E+nZvQSsiwxQC Iv9yv/WMNRWH/ggVCqWr8yyKEMb3PhgOPAEris4UUtS4afi2DJNOdrVgBUEo1glUNzew kcbGLqyhzb2dD1sVxi+QhatLNagMfYWI4/XhBbTQ4n1P+9RlS093J578Nu2PthIbfrPt M4cQ== X-Gm-Message-State: AOAM533RJ/+zXy5ABoOVgC2l5krADf+Yt/7O09y2tjQdwSI59YACV0mG cNE8Pwc7dpmWue1tF1FXoX5rFdiFRJg= X-Google-Smtp-Source: ABdhPJzf7dBQbHj6/4atDp9na+5oZFgVmjbSJdw3wi0R5IhpALMaaNQCWMdhCqkGi9Ha8XiQzT4QiQ== X-Received: by 2002:a05:6000:10d2:: with SMTP id b18mr21509361wrx.366.1591013904320; Mon, 01 Jun 2020 05:18:24 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id y185sm12332136wmy.11.2020.06.01.05.18.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jun 2020 05:18:23 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PULL 6/6] hw/mips: fuloong2e: Set preferred page size to 16KB Date: Mon, 1 Jun 2020 14:18:18 +0200 Message-Id: <1591013898-23391-7-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591013898-23391-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591013898-23391-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x435.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: peter.maydell@linaro.org, aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Huacai Chen Loongson processor prefers 16KB page size in system emulator, so let's define mc->minimum_page_bits to 14. Cc: Jiaxun Yang Signed-off-by: Huacai Chen Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Message-Id: <1586337380-25217-2-git-send-email-chenhc@lemote.com> --- hw/mips/fuloong2e.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index f583c44..7a65166 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -392,6 +392,7 @@ static void mips_fuloong2e_machine_init(MachineClass *mc) mc->default_cpu_type = MIPS_CPU_TYPE_NAME("Loongson-2E"); mc->default_ram_size = 256 * MiB; mc->default_ram_id = "fuloong2e.ram"; + mc->minimum_page_bits = 14; } DEFINE_MACHINE("fuloong2e", mips_fuloong2e_machine_init)