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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 78E33C433F5 for ; Fri, 10 Sep 2021 08:14:04 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3C56161186 for ; Fri, 10 Sep 2021 08:14:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3C56161186 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=z/r924bdACOksiAB6W4lV0UMbNeGbE91MZNaaFFRCik=; b=0pWkje7v0YuveM 2bUtId/VCzo8N27hhKLvXFmog4eJkD4crvixl06cAA/fGgXoFIvKYZkDM9nd7qnPicTrv6sx4aKFq ayg5GuoHxuJsN4eUb/00yCycH/1XnjKxitH+n+g5CJx0y2S2uBP0R5UJdNh/0HBCDRl+zWCPN4OWM BEjxuMyNKo09H6R/ioB9l5Iod9Ayx6CLLdrCu5lC8iXwRWzbEobHnAjUNhIr+YYEffcB7omnDEYsI LcTmBo5vGawVn6/oebwvhhvcHD7RGHj+FWPbzv0UpSyhn3II/DuNGgG8PWSPZTL6Cki0sIvkO4+RB YAuMrnw4tpaL/oK0fmew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mObby-00CAA0-90; Fri, 10 Sep 2021 08:10:14 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mObbu-00CA94-Iq for linux-arm-kernel@lists.infradead.org; Fri, 10 Sep 2021 08:10:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631261406; 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=04dg9eLo5DobwnbTP7RmzFwFoUSaWkodvk2ic+H8548=; b=LItJBSy3DHmwpkZiTV8nTOaBEjmbjBx0MM7KbZrNZMAez1LrJIGSPPcqEHbwiV8aeJyN5g kHpSk6RZdlMFc4q2syUlTgELQewXUazzSyz+cwJIKNPrSue0+00Gd0zaPEQ8RFxRcv4ky8 S6AQE+ufAUYsv0K5Ts66rbsL+Wix1LI= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-559-9gmD38CwOtOjBmGDSM4ZPA-1; Fri, 10 Sep 2021 04:10:05 -0400 X-MC-Unique: 9gmD38CwOtOjBmGDSM4ZPA-1 Received: by mail-wm1-f72.google.com with SMTP id v2-20020a7bcb420000b02902e6b108fcf1so594230wmj.8 for ; Fri, 10 Sep 2021 01:10:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=04dg9eLo5DobwnbTP7RmzFwFoUSaWkodvk2ic+H8548=; b=vYJbf9cVcGRSad7xGe2spLqixgZasaTc5x3JfFMp/5t0NjZj1zRAdvW9aAg9bY/C8R 294OiZe1eVvhdoEYzCmlf7MzgeZaueIg8FlQgAyEZ+xGZ/Fjfj6KpKQcpZzC4a6pJiRa JNybuKCLNsqPRGCe4JeHZEW7KQQBL/jPqcUUSU087AWdf58Phfk0i1CXgOrIrhLucsuS 2JB+dNJsFvpwWIbHoE+GwWvnw9RWnSPoJrmdPEg1iO54pcWJ4IxnVJMZT5d0b/q/toD9 741RLGa0JlvcsMckVKMyh4Qa+0KVmb8/JDci+SSqmlRZkgJiypddqa994MrWqk5cfnO0 HMcQ== X-Gm-Message-State: AOAM530P4bx6Ddpz1diD/BapIbRooikUMbPr5n4izDUDIMmMPH1fAurH B8HASxq6g3NdOmK3506Rbw5++yim0zrqfZZzGaCqrIlqiiDnbjzc4WqEeZ352RVl0D4kn06yAad S/C+AOAIg/IeRl1+NRdWGX5tfHDR5rR7WhIk= X-Received: by 2002:a05:600c:3b0e:: with SMTP id m14mr7171042wms.118.1631261404089; Fri, 10 Sep 2021 01:10:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznq/1Zr/LhNYqj/gZ4OdPBVawbvoIodEWaQXNr0cQS5ZYlI1VWvjYdpXqwAPwN0hOtTSUxVw== X-Received: by 2002:a05:600c:3b0e:: with SMTP id m14mr7170994wms.118.1631261403703; Fri, 10 Sep 2021 01:10:03 -0700 (PDT) Received: from gator (cst2-174-132.cust.vodafone.cz. [31.30.174.132]) by smtp.gmail.com with ESMTPSA id j7sm322322wrr.27.2021.09.10.01.10.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 01:10:03 -0700 (PDT) Date: Fri, 10 Sep 2021 10:10:01 +0200 From: Andrew Jones To: Raghavendra Rao Ananta Cc: Paolo Bonzini , Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , Peter Shier , Ricardo Koller , Oliver Upton , Reiji Watanabe , Jing Zhang , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH v4 09/18] KVM: arm64: selftests: Add guest support to get the vcpuid Message-ID: <20210910081001.4gljsvmcovvoylwt@gator> References: <20210909013818.1191270-1-rananta@google.com> <20210909013818.1191270-10-rananta@google.com> <20210909075643.fhngqu6tqrpe33gl@gator> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=drjones@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210910_011010_746020_71E2F280 X-CRM114-Status: GOOD ( 17.26 ) 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, Sep 09, 2021 at 10:10:56AM -0700, Raghavendra Rao Ananta wrote: > On Thu, Sep 9, 2021 at 12:56 AM Andrew Jones wrote: > > > > On Thu, Sep 09, 2021 at 01:38:09AM +0000, Raghavendra Rao Ananta wrote: ... > > > + for (i = 0; i < KVM_MAX_VCPUS; i++) { > > > + vcpuid = vcpuid_map[i].vcpuid; > > > + GUEST_ASSERT_1(vcpuid != VM_VCPUID_MAP_INVAL, mpidr); > > > > We don't want this assert if it's possible to have sparse maps, which > > it probably isn't ever going to be, but... > > > If you look at the way the array is arranged, the element with > VM_VCPUID_MAP_INVAL acts as a sentinel for us and all the proper > elements would lie before this. So, I don't think we'd have a sparse > array here. If we switch to my suggestion of adding map entries at vcpu-add time and removing them at vcpu-rm time, then the array may become sparse depending on the order of removals. Thanks, drew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel