Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3955815rwb; Tue, 16 Aug 2022 11:36:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR56W6hLHpTkjZHYifQNK0v4Q9Dlnz2GSOZpRZj1qtZJao7GMjpA4Xh5H+3zue0SOYxC72/m X-Received: by 2002:a05:6402:351:b0:445:9f7a:2866 with SMTP id r17-20020a056402035100b004459f7a2866mr1996658edw.252.1660675001404; Tue, 16 Aug 2022 11:36:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660675001; cv=none; d=google.com; s=arc-20160816; b=vzkQVwMKkKqs9LAjknS60z0VftP+w85HoBWqV7v3KOoerk33Z/KP/aCG2b2rGZChMH w7Ae00hA+TM2R/JUoWDw73wLCS9dpJlwQaI19yHAovuTCHOYTcs6VoV3qbrD/bGLJmdo A7m7wTa3zBPj1UELRiY4u4bEfJh/U0l3A6HcBvYPfb3FB0KUh9XVMewaE9rOlCpUcX/X ojUnbzTqZJPpAhZhuYHDIE/4VCdjqUEUMNYdOHwLKVSc8WeRewS3uwZgvW7uHnt1sXIo ckHtRRMdVmpu/E7CXW7gV9aG7ctsCkUUStN/7gsoEkgjadGAd5jYBHGBdyhH/VTJrZD5 E5mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=BaX6zUOOB6mOJWb9jOYpWn8KedE3Bw2epJs9deanoek=; b=WMV0tjIxgiXDIWGYxecqouFgJbuHwLliEMEjANU6yRihjThXoUCMXCrvC8cnRNq9mv C2csAPVJerZoAGF+X+VjT898/ynY5tyQs1WGYbv/4oNgDLuRd7F+L4EtqXx9yKWzKbuc pe+41j9LYTgyJu1uJ2qx+3rZHSg9eoe6GL62uc0y0tGlmZhDgeQaaLBm43L27miPSRdY sRygCf1OT6r2yLUBNHR1xxdT3BuGmDOriIa009YHwiQCSr3s0m8Xn52tfZJDBkcx0but 2IsYkaFv3wmiiAlgIr37KbYqlkiaWT2XFW1Pol6szutH/PwYvW3Qrck9+XorrhzjHWMz nfWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Rudm4t1F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du20-20020a17090772d400b0072ee40a2056si11134882ejc.862.2022.08.16.11.36.15; Tue, 16 Aug 2022 11:36:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Rudm4t1F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236227AbiHPSEn (ORCPT + 99 others); Tue, 16 Aug 2022 14:04:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236847AbiHPSE3 (ORCPT ); Tue, 16 Aug 2022 14:04:29 -0400 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4F6983079; Tue, 16 Aug 2022 11:04:25 -0700 (PDT) Date: Tue, 16 Aug 2022 18:04:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1660673064; 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=BaX6zUOOB6mOJWb9jOYpWn8KedE3Bw2epJs9deanoek=; b=Rudm4t1Ftj5lHfcxKtn0ZpHzQpjwhGziX0X92kJWRbepwloG2nQgfp4iFF+RiqxsUcORT7 aeXdekvkMNzXnMnwJqchFZDWdqIDKCF9ODWZOFesjho2XKHKB2GDJ+LG6sMH+NrcgqGawD xk5XXBb+IMM19PES1vEHmf4XPedLdLA= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Sean Christopherson Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot+744e173caec2e1627ee0@syzkaller.appspotmail.com, David Matlack Subject: Re: [PATCH 3/3] KVM: Move coalesced MMIO initialization (back) into kvm_create_vm() Message-ID: References: <20220816053937.2477106-1-seanjc@google.com> <20220816053937.2477106-4-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220816053937.2477106-4-seanjc@google.com> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 16, 2022 at 05:39:37AM +0000, Sean Christopherson wrote: > Invoke kvm_coalesced_mmio_init() from kvm_create_vm() now that allocating > and initializing coalesced MMIO objects is separate from registering any > associated devices. Moving coalesced MMIO cleans up the last oddity > where KVM does VM creation/initialization after kvm_create_vm(), and more > importantly after kvm_arch_post_init_vm() is called and the VM is added > to the global vm_list, i.e. after the VM is fully created as far as KVM > is concerned. > > Originally, kvm_coalesced_mmio_init() was called by kvm_create_vm(), but > the original implementation was completely devoid of error handling. > Commit 6ce5a090a9a0 ("KVM: coalesced_mmio: fix kvm_coalesced_mmio_init()'s > error handling" fixed the various bugs, and in doing so rightly moved the > call to after kvm_create_vm() because kvm_coalesced_mmio_init() also > registered the coalesced MMIO device. Commit 2b3c246a682c ("KVM: Make > coalesced mmio use a device per zone") cleaned up that mess by having > each zone register a separate device, i.e. moved device registration to > its logical home in kvm_vm_ioctl_register_coalesced_mmio(). As a result, > kvm_coalesced_mmio_init() is now a "pure" initialization helper and can > be safely called from kvm_create_vm(). > > Opportunstically drop the #ifdef, KVM provides stubs for > kvm_coalesced_mmio_{init,free}() when CONFIG_KVM_MMIO=n (arm). ^^^ We have CONFIG_KVM_MMIO=y on arm64. Is it actually s390? -- Thanks, Oliver