From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 827BE1C35 for ; Thu, 2 Mar 2023 09:18:24 +0000 (UTC) Received: by mail-wm1-f43.google.com with SMTP id r19-20020a05600c459300b003eb3e2a5e7bso1098008wmo.0 for ; Thu, 02 Mar 2023 01:18:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677748702; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=+v85GLUDrQ2zVLBvlWtS8ia1HQWcVPpr7GzHsjdX2Jw=; b=MswMY0eyIVOvB1BGlIsjT7T7ZB+Coenk8J9ktojT2m4Q1VRDdt++rgRUovNUXlnJ8+ 0n9yemw+T01QZcvWjHA+IRLf1JeQT4kgvMDTRAYyxhxbxVWsHDg9iQgAYLNOQNwzA9OF sDZz74KhVDusvK5O1ZzeFkSdIarEHU0F40BXnkkl9lMTBvYQ5MhVKpY3D2OmLJcBkAEy KcO16Kf5TQjdh+qmv8d3ljlMfUjsN/SwOUJhPHytWIHGEv2W78sjXEO3RFhRyQIfEBHP PMv71bBDjxuLO7cV0gbppJac2jsSFYaYorLS8teQTqi/lzN5ml/LLJzfs4CWnvoIVFYD TWyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677748703; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+v85GLUDrQ2zVLBvlWtS8ia1HQWcVPpr7GzHsjdX2Jw=; b=h4GgCwhJaWkq3VmvSjcQgQ4kaA3yyGUE5nyCb4F2rtHN0cD178ioYJsWkdACSRmvQ1 qKCd6KEJRuxvqwKPveNRFqsCjxE2wM0pVUDAZYwO7vKPyejp3Ucen6nfBtIrCejV3hc6 +i7Uol/L8y2hS4Kwl41JVq2LkK/qe5ZjWKJLFnOK6o/RklrL9lCjhHgy+b3v1sZZLZbR 2OezqIkEeCt5JLQSnlhH8GHz8vHJrGiTY1XiV3bb3/yYUJCxWMya+LtFuh0NLbYHlckg TSirkF0WgfglSwd3kmI2KwM6JPXWqbLbAmdykKKnh5XfB0H8+xpnBZsnHFdppsYh1Lx0 SNaQ== X-Gm-Message-State: AO0yUKVKaqatbkyd8zTzkfHRDQCwixrnqDLvE/+rePHBXdPgwiCYeNzK iq1raMS0DVfUdZj8qeAfUPaD/Q== X-Google-Smtp-Source: AK7set+YPw1lyaEwaI48fxgT8GolHPnYxo9XVJyK/m4+bNoNPlN8Bml3v5HR6wybgri48X3tq2AU1w== X-Received: by 2002:a05:600c:3d8e:b0:3ea:bc08:b55e with SMTP id bi14-20020a05600c3d8e00b003eabc08b55emr6973744wmb.25.1677748702713; Thu, 02 Mar 2023 01:18:22 -0800 (PST) Received: from myrica (054592b0.skybroadband.com. [5.69.146.176]) by smtp.gmail.com with ESMTPSA id x14-20020adfec0e000000b002c54536c662sm14745006wrn.34.2023.03.02.01.18.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 01:18:22 -0800 (PST) Date: Thu, 2 Mar 2023 09:18:24 +0000 From: Jean-Philippe Brucker To: Itaru Kitayama Cc: Suzuki K Poulose , linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Alexandru Elisei , Andrew Jones , Catalin Marinas , Chao Peng , Christoffer Dall , Fuad Tabba , James Morse , Joey Gouly , Marc Zyngier , Mark Rutland , Oliver Upton , Paolo Bonzini , Quentin Perret , Sean Christopherson , Steven Price , Thomas Huth , Will Deacon , Zenghui Yu , kvmarm@lists.cs.columbia.edu Subject: Re: [RFC] Support for Arm CCA VMs on Linux Message-ID: References: <20230127112248.136810-1-suzuki.poulose@arm.com> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Mar 02, 2023 at 07:12:24AM +0900, Itaru Kitayama wrote: > On Wed, Mar 1, 2023 at 6:20 PM Jean-Philippe Brucker > wrote: > > > > Hi Itaru, > > > > On Wed, Mar 01, 2023 at 08:35:05AM +0900, Itaru Kitayama wrote: > > > Hi Jean, > > > I've tried your series in Real on CCA Host, but the KVM arch init > > > emits an Invalid argument error and terminates. > > > > Do you know which call returns this error? Normally the RMEGuest support > > should print more detailed errors. Are you able to launch normal guests > > (without the rme-guest object and confidential-guest-support machine > > parameter)? Could you give the complete QEMU command-line? > > No, I cant say which. Yes, the CCA-capable QEMU boots if I don't set > RME-related options. > > Here's mine (based upon your command-line): > qemu-system-aarch64 -cpu host -accel kvm -machine > virt,gic-version=3,confidential-guest-support=rme0 -smp 2 -m 256M > -nographic -object rme-guest,id=rme0,measurement-algo=sha512 -kernel > Image -initrd rootfs.ext2 -append 'console=ttyAMA0 earlycon' > -overcommit mem-lock=on Thank you, this works on my setup so I'm not sure what's wrong. Check that KVM initialized successfully, with this in the host kernel log: "[ 0.267019] kvm [1]: Using prototype RMM support (version 56.0)" Next step would be to find out where the EINVAL comes from, with printfs or GDB. This seems rather specific so I'll email you directly to avoid filling up everyone's inbox. Thanks, Jean 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1CDCC678D4 for ; Thu, 2 Mar 2023 09:19:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gb6q1kyf5NmM+Qez/XdEs20WGjCdc0TiF0ZC7feChS8=; b=T2PO7Q6FS6Cnek 8chNUnpoqdujBV/yUt8Y151F7Hg8+qYYBTKbqkrbwT2yLXDjhMQEogMOxIooK0E5fEfJ4V5l6TW4S Ij1kwdUrP7OJt30i8zAv3O5PS2694yUeZBQ0DHvrvLClN/ghSnLL1aKuptSWTdLG/sk1GJhjNRApE 9iQi6HoY+ugIBljwoYBxr7iw5H4pdVQQMC2LOzUyquqHbAOXDq+RvpauzA+D/X6GCzXzQylowq9fR NYr2zXDo8aWQTDXIf0GUh6mmh4+EVM9DD7lJneaq2QtNfNMzXSPfNAF2fYKC9G89qaIUSgfkvhM+V mh2u+QOfxx7Zl3/LwFSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pXf52-001NhC-7O; Thu, 02 Mar 2023 09:18:28 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pXf4y-001Nfn-Rk for linux-arm-kernel@lists.infradead.org; Thu, 02 Mar 2023 09:18:26 +0000 Received: by mail-wm1-x329.google.com with SMTP id d41-20020a05600c4c2900b003e9e066550fso1068672wmp.4 for ; Thu, 02 Mar 2023 01:18:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677748702; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=+v85GLUDrQ2zVLBvlWtS8ia1HQWcVPpr7GzHsjdX2Jw=; b=MswMY0eyIVOvB1BGlIsjT7T7ZB+Coenk8J9ktojT2m4Q1VRDdt++rgRUovNUXlnJ8+ 0n9yemw+T01QZcvWjHA+IRLf1JeQT4kgvMDTRAYyxhxbxVWsHDg9iQgAYLNOQNwzA9OF sDZz74KhVDusvK5O1ZzeFkSdIarEHU0F40BXnkkl9lMTBvYQ5MhVKpY3D2OmLJcBkAEy KcO16Kf5TQjdh+qmv8d3ljlMfUjsN/SwOUJhPHytWIHGEv2W78sjXEO3RFhRyQIfEBHP PMv71bBDjxuLO7cV0gbppJac2jsSFYaYorLS8teQTqi/lzN5ml/LLJzfs4CWnvoIVFYD TWyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677748703; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+v85GLUDrQ2zVLBvlWtS8ia1HQWcVPpr7GzHsjdX2Jw=; b=o8qoRCKcjgnhto5mPJHdVJWHPW4k5na5kYXmhle5zOl9aEm+dU8BKYUSG3nPTrkyiG trwUoCpzFciyR02MEjDvzC96RLPuzFzJQlyArIeAKWNOfAH+8J8lqQkqNmawSoc1/CqS 5T2/hn7hvO3mGBhgGZQDNrfoRFEE08di3cN6jw3gbz5XiHUzGvERhr8pxM9dCJ00ARc3 Qbr9ZCTKgUWlPS1XGmumq6GvHeKBKJFfFJVMhZMXs834hXjIZKQ9vtogindZNozVFHEJ fvsTbyHlfa2Rq2v3IA87NkC9ofaSEr5vDMCXR0demxrmrmB0MoS8QiJYZRU73T8y1M1X 0OCA== X-Gm-Message-State: AO0yUKXMH4ZYHm6tFPpRKeM4gijYo5lJ/mVLn5Hv9qzlBtDQv6BRFeg5 iLNmph93x7E3+QqtKchDy0c7vQ== X-Google-Smtp-Source: AK7set+YPw1lyaEwaI48fxgT8GolHPnYxo9XVJyK/m4+bNoNPlN8Bml3v5HR6wybgri48X3tq2AU1w== X-Received: by 2002:a05:600c:3d8e:b0:3ea:bc08:b55e with SMTP id bi14-20020a05600c3d8e00b003eabc08b55emr6973744wmb.25.1677748702713; Thu, 02 Mar 2023 01:18:22 -0800 (PST) Received: from myrica (054592b0.skybroadband.com. [5.69.146.176]) by smtp.gmail.com with ESMTPSA id x14-20020adfec0e000000b002c54536c662sm14745006wrn.34.2023.03.02.01.18.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 01:18:22 -0800 (PST) Date: Thu, 2 Mar 2023 09:18:24 +0000 From: Jean-Philippe Brucker To: Itaru Kitayama Cc: Suzuki K Poulose , linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Alexandru Elisei , Andrew Jones , Catalin Marinas , Chao Peng , Christoffer Dall , Fuad Tabba , James Morse , Joey Gouly , Marc Zyngier , Mark Rutland , Oliver Upton , Paolo Bonzini , Quentin Perret , Sean Christopherson , Steven Price , Thomas Huth , Will Deacon , Zenghui Yu , kvmarm@lists.cs.columbia.edu Subject: Re: [RFC] Support for Arm CCA VMs on Linux Message-ID: References: <20230127112248.136810-1-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230302_011824_954573_0C18E1FF X-CRM114-Status: GOOD ( 17.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Mar 02, 2023 at 07:12:24AM +0900, Itaru Kitayama wrote: > On Wed, Mar 1, 2023 at 6:20 PM Jean-Philippe Brucker > wrote: > > > > Hi Itaru, > > > > On Wed, Mar 01, 2023 at 08:35:05AM +0900, Itaru Kitayama wrote: > > > Hi Jean, > > > I've tried your series in Real on CCA Host, but the KVM arch init > > > emits an Invalid argument error and terminates. > > > > Do you know which call returns this error? Normally the RMEGuest support > > should print more detailed errors. Are you able to launch normal guests > > (without the rme-guest object and confidential-guest-support machine > > parameter)? Could you give the complete QEMU command-line? > > No, I cant say which. Yes, the CCA-capable QEMU boots if I don't set > RME-related options. > > Here's mine (based upon your command-line): > qemu-system-aarch64 -cpu host -accel kvm -machine > virt,gic-version=3,confidential-guest-support=rme0 -smp 2 -m 256M > -nographic -object rme-guest,id=rme0,measurement-algo=sha512 -kernel > Image -initrd rootfs.ext2 -append 'console=ttyAMA0 earlycon' > -overcommit mem-lock=on Thank you, this works on my setup so I'm not sure what's wrong. Check that KVM initialized successfully, with this in the host kernel log: "[ 0.267019] kvm [1]: Using prototype RMM support (version 56.0)" Next step would be to find out where the EINVAL comes from, with printfs or GDB. This seems rather specific so I'll email you directly to avoid filling up everyone's inbox. Thanks, Jean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel