From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A764AC433ED for ; Mon, 12 Apr 2021 11:45:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 830D66102A for ; Mon, 12 Apr 2021 11:45:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239874AbhDLLph (ORCPT ); Mon, 12 Apr 2021 07:45:37 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54102 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237792AbhDLLpg (ORCPT ); Mon, 12 Apr 2021 07:45:36 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13CBZD1E099481; Mon, 12 Apr 2021 07:44:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : mime-version; s=pp1; bh=zROa97CJSkAXDOF05z4b0Av2x+Xi+AT9U3HHYG8ufmY=; b=S/YN7IiKGelyXqKY0i22tmArFpC34sB1LlAfdzOUEOXI0SL7f7E29TnDyvIwTkiDNOx8 QhV/yZjyH3iY4U0S1b+DNm3b1dIjNZ5pwdlCovk1PPuYtEWgMImTZ/iMClSl+shvw9oh 3IUw7+WNqNWOrsOn2H5dy2sCcly2c6f3X06enL21DMJ+djrm492y/5hew3ikdJYXjyOd Zr8AyuP2QdaHLohmnINJxkDb9b0oIgJBjwQxbpXqt/Wc9kU/hrL3+9afBPoZSjA0gwqW NkF8svOo+tfKVv7EjU7s72Yt38KpMt66RXwiT7EuWGBgsDmKknR2fua0VdZyXNE6CW/6 XQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 37vkphcdpd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 12 Apr 2021 07:44:43 -0400 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 13CBZcWe100457; Mon, 12 Apr 2021 07:44:43 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 37vkphcdmv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 12 Apr 2021 07:44:43 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 13CBiNr1006407; Mon, 12 Apr 2021 11:44:40 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma04ams.nl.ibm.com with ESMTP id 37u3n8srn3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 12 Apr 2021 11:44:40 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 13CBicZq41484710 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Apr 2021 11:44:38 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7811FAE045; Mon, 12 Apr 2021 11:44:38 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AAE58AE053; Mon, 12 Apr 2021 11:44:34 +0000 (GMT) Received: from bangoria.ibmuc.com (unknown [9.199.37.145]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 12 Apr 2021 11:44:34 +0000 (GMT) From: Ravi Bangoria To: paulus@samba.org, david@gibson.dropbear.id.au Cc: ravi.bangoria@linux.ibm.com, mpe@ellerman.id.au, mikey@neuling.org, pbonzini@redhat.com, mst@redhat.com, clg@kaod.org, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, kvm@vger.kernel.org, cohuck@redhat.com, groug@kaod.org Subject: [PATCH v5 0/3] ppc: Enable 2nd DAWR support on Power10 Date: Mon, 12 Apr 2021 17:14:30 +0530 Message-Id: <20210412114433.129702-1-ravi.bangoria@linux.ibm.com> X-Mailer: git-send-email 2.30.2 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 9VwWoDvnhcUD0pSTkFrnUVwF-rNHsrwX X-Proofpoint-ORIG-GUID: 2iGnkR8121EAucctxYslK97SjSRNfqM7 Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-04-12_09:2021-04-12,2021-04-12 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 impostorscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 phishscore=0 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104120079 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This series enables 2nd DAWR support on p10 qemu guest. 2nd DAWR is new watchpoint added in Power10 processor. Kernel/kvm patches are already in[1]. Watchpoint on powerpc TCG guest is not supported and thus 2nd DAWR is not enabled for TCG mode. Patches apply fine on qemu/master branch (f2afdc2ad94b). v4: https://lore.kernel.org/r/20210406053833.282907-1-ravi.bangoria@linux.ibm.com v3->v4: - Make error message more proper. v3: https://lore.kernel.org/r/20210330095350.36309-1-ravi.bangoria@linux.ibm.com v3->v4: - spapr_dt_pa_features(): POWER10 processor is compatible with 3.0 (PCR_COMPAT_3_00). No need to ppc_check_compat(3_10) for now as ppc_check_compati(3_00) will also be true. ppc_check_compat(3_10) can be added while introducing pa_features_310 in future. - Use error_append_hint() for hints. Also add ERRP_GUARD(). - Add kvmppc_set_cap_dawr1() stub function for CONFIG_KVM=n. v2: https://lore.kernel.org/r/20210329041906.213991-1-ravi.bangoria@linux.ibm.com v2->v3: - Don't introduce pa_features_310[], instead, reuse pa_features_300[] for 3.1 guests, as there is no difference between initial values of them atm. - Call gen_spr_book3s_310_dbg() from init_proc_POWER10() instead of init_proc_POWER8(). Also, Don't call gen_spr_book3s_207_dbg() from gen_spr_book3s_310_dbg() as init_proc_POWER10() already calls it. v1: https://lore.kernel.org/r/20200723104220.314671-1-ravi.bangoria@linux.ibm.com [Apologies for long gap] v1->v2: - Introduce machine capability cap-dawr1 to enable/disable the feature. By default, 2nd DAWR is OFF for guests even when host kvm supports it. User has to manually enable it with -machine cap-dawr1=on if he wishes to use it. - Split the header file changes into separate patch. (Sync headers from v5.12-rc3) [1] https://git.kernel.org/torvalds/c/bd1de1a0e6eff Ravi Bangoria (3): Linux headers: update from 5.12-rc3 ppc: Rename current DAWR macros and variables ppc: Enable 2nd DAWR support on p10 hw/ppc/spapr.c | 7 +- hw/ppc/spapr_caps.c | 32 +++++++ include/hw/ppc/spapr.h | 8 +- include/standard-headers/drm/drm_fourcc.h | 23 ++++- include/standard-headers/linux/input.h | 2 +- .../standard-headers/rdma/vmw_pvrdma-abi.h | 7 ++ linux-headers/asm-generic/unistd.h | 4 +- linux-headers/asm-mips/unistd_n32.h | 1 + linux-headers/asm-mips/unistd_n64.h | 1 + linux-headers/asm-mips/unistd_o32.h | 1 + linux-headers/asm-powerpc/kvm.h | 2 + linux-headers/asm-powerpc/unistd_32.h | 1 + linux-headers/asm-powerpc/unistd_64.h | 1 + linux-headers/asm-s390/unistd_32.h | 1 + linux-headers/asm-s390/unistd_64.h | 1 + linux-headers/asm-x86/kvm.h | 1 + linux-headers/asm-x86/unistd_32.h | 1 + linux-headers/asm-x86/unistd_64.h | 1 + linux-headers/asm-x86/unistd_x32.h | 1 + linux-headers/linux/kvm.h | 89 +++++++++++++++++++ linux-headers/linux/vfio.h | 27 ++++++ target/ppc/cpu.h | 6 +- target/ppc/kvm.c | 12 +++ target/ppc/kvm_ppc.h | 12 +++ target/ppc/translate_init.c.inc | 19 +++- 25 files changed, 250 insertions(+), 11 deletions(-) -- 2.17.1