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 55F54D0D7BA for ; Fri, 11 Oct 2024 15:28:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZVDpfrPn38iMJttp1evxDmmyklx8JXwqnWkoXRFLgJE=; b=4sJJFo5J9/hDEe4CLia2sYy19s muk7MuTnbYEk1/LvRnfbk0/KFkut/xgxORnbG4yobfCiQaNOfy2NXh8Oo5bl2FvHoKomu9ZuA6lKp mta4N2oZDA6gtGS46f1IDDvTPyQnKlGd1WcTrvBH0iJnbYj8TdHUhFJ55rG6P1lYZ0YXGH56PUvfM NPtstzTmu0qMLyZkTH9VYJ+d0Q7u5BSXcH0sqVxSUmHjcJ9eRT3u2h9OzSlKpuY4x4IHFEx23LvzE KxjJp/rsbtZrvlbgL3/7XGOTQlXvNrU7lyxyoZa7LHoVQKyLWVSmD3QeKMvkrZL6cXsJmGIll3S5e mwmbnOFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szHZG-0000000Gn72-1WkR; Fri, 11 Oct 2024 15:28:38 +0000 Received: from out-189.mta1.migadu.com ([95.215.58.189]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szHIb-0000000GjvA-1PDL for linux-arm-kernel@lists.infradead.org; Fri, 11 Oct 2024 15:11:27 +0000 Date: Fri, 11 Oct 2024 08:11:09 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1728659479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZVDpfrPn38iMJttp1evxDmmyklx8JXwqnWkoXRFLgJE=; b=wvfgoYeNPuVYgbFWTBuhRaZe+A4cMXn9We0kHN5fhSHh4OOv6q1FF0dIw1yQFVI9OvwaKS vg8vYolBR5oTl2pFHaOAMhV5lw5SF3xQgAN+ug2Lcxa/LA6H1QU0wKE+EAf+3wSfVZa5UA /BjOWOxcdEMgRndQ4ZSlRpfhGXZ4au8= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Marc Zyngier Cc: Shameerali Kolothum Thodi , "kvmarm@lists.linux.dev" , "catalin.marinas@arm.com" , "will@kernel.org" , "mark.rutland@arm.com" , "cohuck@redhat.com" , "eric.auger@redhat.com" , yuzenghui , "Wangzhou (B)" , jiangkunkun , Jonathan Cameron , Anthony Jebson , "linux-arm-kernel@lists.infradead.org" , Linuxarm Subject: Re: [RFC PATCH 0/6] KVM: arm64: Errata management for VM Live migration Message-ID: References: <20241011075053.80540-1-shameerali.kolothum.thodi@huawei.com> <86jzef53iz.wl-maz@kernel.org> <3f4469c49625413f9ab2c224d0d3fbea@huawei.com> <86ikty6f1b.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86ikty6f1b.wl-maz@kernel.org> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241011_081125_834925_1D1CBBFE X-CRM114-Status: GOOD ( 24.14 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 11, 2024 at 12:43:28PM +0100, Marc Zyngier wrote: > On Fri, 11 Oct 2024 11:57:10 +0100, Shameerali Kolothum Thodi wrote: > > > > > > > > Please take a look and let me know your thoughts. > > > > > > Having eyeballed this very superficially, I think we can do something > > > simpler, and maybe more future-proof: > > > > Thanks Marc for taking a look and the quick feedback. > > No worries, that's the least I could do given that you put the effort > implementing my silly ideas! ;-) > > > > - I don't think KVM should be concerned about the description of the > > > target CPUs. The hypercall you defined is the right thing to do, > > > but the VMM should completely handle it. That's an implementation > > > detail, but it would make things much simpler. > > > > Ok. So does that mean the hypercall will use some sort of shared memory > > to retrieve the list of target CPUs from VMM? > > Two possibilities: > > - either shared memory, in which case the hypercall would require the > guest to give an IPA and size for the VMM to write its stuff into > the guest memory, > > - or more simply return the data as an MIDR/REVIDR pair in registers, > the guest requesting an index, and getting an error when out of > range, leaving it with the freedom to organise the storage. > > The second option is a bit slower, but way simpler, and it only > happens once per guest boot, so it would probably be my preferred > option unless this is proved to be impractical. Also worth noting there's existing UAPI [*] for allowing userspace to register range(s) of hypercalls that it services directly. It's a bit weird that we'd allow userspace to do stuff in KVM's own hypercall range, but I don't think it really matters at this point since this is all prototyping. [*]: https://docs.kernel.org/virt/kvm/devices/vm.html#attribute-kvm-arm-vm-smccc-filter-w-o -- Thanks, Oliver