Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5279982pxb; Wed, 19 Jan 2022 15:09:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyR/v6MZWb0jX462vLU7liyFa8YHBdNZtACY3MvgNCW62Mxu85lLv3SkmfFY78uj+MeePn5 X-Received: by 2002:a63:8c4c:: with SMTP id q12mr29391578pgn.149.1642633762379; Wed, 19 Jan 2022 15:09:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642633762; cv=none; d=google.com; s=arc-20160816; b=iNzlB1fhMYSyu/uywFiDrmtIPa7PCxswW4I3tzhwwxAQFNnPEiQXIJ5fYsjUl3lLV0 CoiP3PZLJxFnVTNpFDwcAoSzgnMjALx9faNgjyqCQq27kLd3qATfqY3X9Tptv0h94rdV w+zMFL7tavTwEnffjD3dkXPvRzCxtZLzBJMpUg0vtfXUfssS+17kPtjEo+pZ5kxQ9nq4 RxMXFOiD7lcejhe8whJjP+9PSBb/U50LC9PGOCWr/MDTCbZw7Cz5FyOFne7gGm8inCxS A1b4bmtS9fPewEqngyOxs7W4cde9GvxS9akhaqD7MQKl9yVJpfgp6efNaXGK68t8lNM0 8+iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ZTb5A3HHYcL7QYMP1DncJCS6Mg4uIaaBO9xs0b1g8Ck=; b=j5yROi5cpQN7qGwhaXUakZ3Zhp9MQXv0ULwL1ayfAbDgNRHeJMEzDozhyGhllUvf1v dt3KX19Zw9nsUHYsI9BEicYAzWjLyyce3ms7A1azGkMt7YJuhwbmkS44QyGxMSB13elK LgZ7hgq4PNrvpZPuV6pLVyjv8VOoFYa8Ud/mtEICRNlu/Om+Ck3d4qatvoykqqPFqTVR Lw1rqQqYHqgyAueJV/vP2YmpvLaff90zKYW8YntbV+IUvAhW1Ew/bHnKx9Et12ws56fy vIl1pp/KnNRN3JHeh85tTWhqmmM13VnX6Umx+IADw3zCMlFrcUyiyNKHKnEs8BZWJWDg zqYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RMUAYXDl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x6si1000101pjo.82.2022.01.19.15.09.09; Wed, 19 Jan 2022 15:09:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RMUAYXDl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344825AbiARIoR (ORCPT + 99 others); Tue, 18 Jan 2022 03:44:17 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50525 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235174AbiARIoQ (ORCPT ); Tue, 18 Jan 2022 03:44:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642495455; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZTb5A3HHYcL7QYMP1DncJCS6Mg4uIaaBO9xs0b1g8Ck=; b=RMUAYXDluKwRBsszpeQQw3LmAqxC76zzjAU1Z6eel2OVMHdDCvjIAijaGgiKbx5mA7g1Yb QfoiAklEOrOq346DEy4KyoJ6u9E8LIx4jJJ74mgm2FgnOUZDUdr6gn814vyw8TAPBTBcHw Zx29QwxLmHEu24iFfBnl+zDI2Z640Cg= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-94-WAekAxwIOJKxV9pzX72oQA-1; Tue, 18 Jan 2022 03:44:14 -0500 X-MC-Unique: WAekAxwIOJKxV9pzX72oQA-1 Received: by mail-wm1-f71.google.com with SMTP id a3-20020a05600c348300b0034a0dfc86aaso1281559wmq.6 for ; Tue, 18 Jan 2022 00:44:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=ZTb5A3HHYcL7QYMP1DncJCS6Mg4uIaaBO9xs0b1g8Ck=; b=5RLy0dZ1M3CWioWdnjDtAgCa9HISSnoL6s5j1MTY/2EOqkWdzG8XVz7KRrCpzQlhpB I8Lh8ygend6ttN+xVSuroHR8nvYX0Pa4bHWs+bnis1v6IDKonV/qzpA4Ot2/gdS4VDWK c0mB1aQD+ywQ44X7Qj+kxJUQTe3aFjEE6x0sLEfVcfq5BcVxdKnzlgKKdTVUQY5gFBJ8 YGcJ+rmsSJq9+fAMPR3509TJvlD4Lce32/iC2FXzd+sWr+jJty3bza6QXKRxL/uo3/Fg 7aM8GStgxsuQYKvCEPAx4UxXYYxz3Jvz5XiODRRupwG9j5a6b7obZYG8N/cUMgz2IxdK 2Jnw== X-Gm-Message-State: AOAM531L2ZyewrrNwkvNuuGV/DD9P+T75HV1AKn/LTvBOva0W9rSkyAx /2CflonuYM0TEHTkLnmMO45OXJuJtpp51F9qQJAdevgUOP0gATKQqSEMy5Lb8vvE7rLjb6Mikxr BEUxn3YRXLMaSa0OBPjWpWK5u X-Received: by 2002:adf:f287:: with SMTP id k7mr23717210wro.417.1642495453015; Tue, 18 Jan 2022 00:44:13 -0800 (PST) X-Received: by 2002:adf:f287:: with SMTP id k7mr23717186wro.417.1642495452833; Tue, 18 Jan 2022 00:44:12 -0800 (PST) Received: from ?IPV6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.googlemail.com with ESMTPSA id n15sm14269604wrf.79.2022.01.18.00.44.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jan 2022 00:44:12 -0800 (PST) Message-ID: <14380a1b-669f-8f0f-139b-7c89fabd4276@redhat.com> Date: Tue, 18 Jan 2022 09:44:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH] KVM: avoid warning on s390 in mark_page_dirty Content-Language: en-US To: Christian Borntraeger , dwmw2@infradead.org Cc: butterflyhuangxx@gmail.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, seanjc@google.com, Cornelia Huck , Janosch Frank , David Hildenbrand , linux-s390 , Thomas Huth , Claudio Imbrenda References: <20220113122924.740496-1-borntraeger@linux.ibm.com> From: Paolo Bonzini In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/18/22 09:37, Christian Borntraeger wrote: > Am 13.01.22 um 13:29 schrieb Christian Borntraeger: >> Avoid warnings on s390 like >> [ 1801.980931] CPU: 12 PID: 117600 Comm: kworker/12:0 Tainted: >> G            E >> 5.17.0-20220113.rc0.git0.32ce2abb03cf.300.fc35.s390x+next #1 >> [ 1801.980938] Workqueue: events irqfd_inject [kvm] >> [...] >> [ 1801.981057] Call Trace: >> [ 1801.981060]  [<000003ff805f0f5c>] mark_page_dirty_in_slot+0xa4/0xb0 >> [kvm] >> [ 1801.981083]  [<000003ff8060e9fe>] adapter_indicators_set+0xde/0x268 >> [kvm] >> [ 1801.981104]  [<000003ff80613c24>] set_adapter_int+0x64/0xd8 [kvm] >> [ 1801.981124]  [<000003ff805fb9aa>] kvm_set_irq+0xc2/0x130 [kvm] >> [ 1801.981144]  [<000003ff805f8d86>] irqfd_inject+0x76/0xa0 [kvm] >> [ 1801.981164]  [<0000000175e56906>] process_one_work+0x1fe/0x470 >> [ 1801.981173]  [<0000000175e570a4>] worker_thread+0x64/0x498 >> [ 1801.981176]  [<0000000175e5ef2c>] kthread+0x10c/0x110 >> [ 1801.981180]  [<0000000175de73c8>] __ret_from_fork+0x40/0x58 >> [ 1801.981185]  [<000000017698440a>] ret_from_fork+0xa/0x40 >> >> when writing to a guest from an irqfd worker as long as we do not have >> the dirty ring. >> >> Signed-off-by: Christian Borntraeger >> --- >>   virt/kvm/kvm_main.c | 2 ++ >>   1 file changed, 2 insertions(+) >> >> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c >> index 504158f0e131..1a682d3e106d 100644 >> --- a/virt/kvm/kvm_main.c >> +++ b/virt/kvm/kvm_main.c >> @@ -3163,8 +3163,10 @@ void mark_page_dirty_in_slot(struct kvm *kvm, >>   { >>       struct kvm_vcpu *vcpu = kvm_get_running_vcpu(); >> +#ifdef CONFIG_HAVE_KVM_DIRTY_RING >>       if (WARN_ON_ONCE(!vcpu) || WARN_ON_ONCE(vcpu->kvm != kvm)) >>           return; >> +#endif >>       if (memslot && kvm_slot_dirty_track_enabled(memslot)) { >>           unsigned long rel_gfn = gfn - memslot->base_gfn; > > Paolo, are you going to pick this for next for the time being? > Yep, done now. Paolo