From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by sourceware.org (Postfix) with ESMTPS id CAF923858405 for ; Tue, 4 Jan 2022 18:10:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CAF923858405 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pj1-x1035.google.com with SMTP id l16-20020a17090a409000b001b2e9628c9cso3973683pjg.4 for ; Tue, 04 Jan 2022 10:10:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=At5GU3PdjKbzGJ2Xlp3uiPtJw2Ew3GvlX+KkvRHs7Eg=; b=h1Fo4tGEKR+nOD4V6X9aUOly+756AGkd+pvDNZtkw9WhvZkD/AMI53iwVZWtPuPEAa pWjSUJdYdbCaImVfTbgMy5UW0pcKqkKRg2cWrWHhuUI49eMnqy4qnC/ZD4ePUkT+yE0g rjkfhdWljsRXM4KJ01jK3PypVrYWbXnx55o7b5sHZnCFmbnxyABHBE/peJqRCykYszny /YUkhnVHhfiQv6pfqkfKPyFdJhjbjQa241hjtadOyB8EicEtwa4rW9CC9bJBumhZyn2v mckQtQ8p3HrqqhNszQOcRbSivpIQnOnMOZUeERVZeioKq81ixbZ3PtqQrmEQZL4NwfiD /3Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=At5GU3PdjKbzGJ2Xlp3uiPtJw2Ew3GvlX+KkvRHs7Eg=; b=VS2IILXb0RNOIyzjJXZ7rYJnfL0JooiijoNoDKRDdC4Al+n/B9N+cvvACmeTHh69P0 lJvDNiBUr741jg8coPdg5Dxy87FXrcmz/oLkt01JrPStETjPoK03BFY0ByZQvBojJmHz WigJ4pojLVMOV+NENcbKL7MUNBuRzv9vRs6Z1kDZ0O4bK/LfgSqrjfaK9BhMDtNYaYM6 PaZ+YvEAU5qiYR+1OrcBzzb0BDJJ2vaaQRoWQitNBb8nceWQrnsUytNRwAY/jHVvbqch MiNEK3e/JGC/N413UUebm/IDG5HvG0Zffz9c4QWgsN7Bk43OTHZDn2NEuFINPkR0LZ8C KPKg== X-Gm-Message-State: AOAM5321CgHG+g5kguAZfYRqA4QlZue6gxs9be8vpTlCBc4azcz4BzdQ It5xVS5y4YoS9kOjrkyCgsyG5Q== X-Google-Smtp-Source: ABdhPJz4KuZAzJjfAify4cZBflv85zxYajHZLS6oXVuAcYo5/IOwMMpkGlph8SoFxDSFjBFMLIEtxQ== X-Received: by 2002:a17:90a:5d83:: with SMTP id t3mr5570888pji.159.1641319859003; Tue, 04 Jan 2022 10:10:59 -0800 (PST) Received: from [192.168.50.50] (c-24-4-73-83.hsd1.ca.comcast.net. [24.4.73.83]) by smtp.gmail.com with ESMTPSA id u35sm9168517pfg.157.2022.01.04.10.10.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Jan 2022 10:10:58 -0800 (PST) Subject: Re: [v1 2/4] RISC-V: Hypervisor ext: support Privileged Spec 1.12 To: Jan Beulich Cc: Kito Cheng , Binutils , Nelson Chu , Anup Patel References: <20211221023415.2211328-1-vineetg@rivosinc.com> <20211221023415.2211328-3-vineetg@rivosinc.com> <7398dcf9-b87b-a28c-c19e-ecc2bd3408ba@suse.com> From: Vineet Gupta Message-ID: Date: Tue, 4 Jan 2022 10:10:57 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <7398dcf9-b87b-a28c-c19e-ecc2bd3408ba@suse.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, KAM_NUMSUBJECT, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jan 2022 18:11:01 -0000 +CC Anup On 1/4/22 12:09 AM, Jan Beulich wrote: >> --- a/opcodes/riscv-opc.c >> +++ b/opcodes/riscv-opc.c >> @@ -1729,8 +1729,30 @@ const struct riscv_opcode riscv_opcodes[] = >> {"sinval.vma", 0, INSN_CLASS_SVINVAL, "s,t", MATCH_SINVAL_VMA, MASK_SINVAL_VMA, match_opcode, 0 }, >> {"sfence.w.inval", 0, INSN_CLASS_SVINVAL, "", MATCH_SFENCE_W_INVAL, MASK_SFENCE_W_INVAL, match_opcode, 0 }, >> {"sfence.inval.ir", 0, INSN_CLASS_SVINVAL, "", MATCH_SFENCE_INVAL_IR, MASK_SFENCE_INVAL_IR, match_opcode, 0 }, >> -{"hinval.vvma", 0, INSN_CLASS_SVINVAL, "s,t", MATCH_HINVAL_VVMA, MASK_HINVAL_VVMA, match_opcode, 0 }, >> -{"hinval.gvma", 0, INSN_CLASS_SVINVAL, "s,t", MATCH_HINVAL_GVMA, MASK_HINVAL_GVMA, match_opcode, 0 }, >> + >> +/* Svinval instructions + Hypervisor Ext v1.0. */ >> +{"hinval.vvma", 0, INSN_CLASS_SVINVAL_AND_H, "s,t", MATCH_HINVAL_VVMA, MASK_HINVAL_VVMA, match_opcode, 0 }, >> +{"hinval.gvma", 0, INSN_CLASS_SVINVAL_AND_H, "s,t", MATCH_HINVAL_GVMA, MASK_HINVAL_GVMA, match_opcode, 0 }, >> +{"hfence.vvma", 0, INSN_CLASS_SVINVAL_AND_H, "s,t", MATCH_HFENCE_VVMA, MASK_HFENCE_VVMA, match_opcode, 0 }, >> +{"hfence.gvma", 0, INSN_CLASS_SVINVAL_AND_H, "", MATCH_HFENCE_GVMA, MASK_HFENCE_GVMA|MASK_RS1|MASK_RS2, match_opcode, 0 }, >> +{"hfence.gvma", 0, INSN_CLASS_SVINVAL_AND_H, "s", MATCH_HFENCE_GVMA, MASK_HFENCE_GVMA|MASK_RS2, match_opcode, 0 }, >> +{"hfence.gvma", 0, INSN_CLASS_SVINVAL_AND_H, "s,t", MATCH_HFENCE_GVMA, MASK_HFENCE_GVMA, match_opcode, 0 }, > I've not been able to spot pseudos with zero or one operands in the spec. > Did I miss anything? Same actually appears to apply to the pre-existing > sfence.vma ... Some of that information is there but scattered. e.g. last but one paragraph 8.3.2       "HFENCE.GVMA with rs1=x0 (and rs2 set to either x0 or the VMID)" When I did the RFC, I was pointed to a post from Anup from lkml [1] where the additional encodings were specified. Perhaps there needs to be a pull request to priv spec to explicit'ify it. [1] https://sourceware.org/pipermail/binutils/2021-December/118944.html