From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=a0ttrCfv; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id A9AFD5A063D for ; Sat, 15 Feb 2025 06:15:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739596552; 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=HuhuXLUJXII+XZzY3kkwUnSxqh5y6meA7EGQAOoBSVM=; b=a0ttrCfvNq1776n3nMj+aOzs5z6AO0U6BzxPiKyWSYvh8TsOv3wuXeSI+JDZ6nghc+8qmy MHXcjs5M3UTDIpOkxpjOlZS44EhEXrK6Hz4Ty8ycr/bYp2FZMDzDGw9Ex5qvpa/OrDqe5I tx3nZK8KJcbezEVWY3hpIH+xo4elUzU= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-49-XgO5f3_dMSeWcpKi5wfPwQ-1; Sat, 15 Feb 2025 00:15:50 -0500 X-MC-Unique: XgO5f3_dMSeWcpKi5wfPwQ-1 X-Mimecast-MFC-AGG-ID: XgO5f3_dMSeWcpKi5wfPwQ_1739596549 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-439640a1a8dso12751745e9.0 for ; Fri, 14 Feb 2025 21:15:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739596549; x=1740201349; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HuhuXLUJXII+XZzY3kkwUnSxqh5y6meA7EGQAOoBSVM=; b=MF9MRtvrRkdiP5HlN2qCbrqbzWlTTkmw6mt5q3zTbLooFEhY9pUNnQI8tNr+KziZrX fX48eN2vP4GqksuM4OKCwnZIx0YgqkFmbrpMgSAofQYoz7N8ELNYLJ0wJSohEiLn2eRM qILZPz0LCJQmutB2NXcWj/zW+R25aYwYxcH5jFXzMMlW9pNTzaAGatP0KKrAV5jacnEI ZRaraM3Pz1F7KhX96xgo9A59rSCuA6P1f4uwj0LXdEUuK8cb184upE2f6Wb3yfFHu237 3cDjF+sUq6uIPtI/QzWuwYUGR2PuIrJ6Dl69CEeeAlhqdJ/XYgm4Wcx2a7ZdnaGOP2XP bkTQ== X-Gm-Message-State: AOJu0YxwiSRt5FSNkzWCmCSrcRmadz6aDVyNtSxDxeEDXBgas206l07Q Vp60l/M1ZGSmCHgHkU+R/jk+RMccHv8Dq3I2bbd5TNWt80Hdh4PquFHzBvqRX5hfD8oc82721cM XxrtwWu6dky/efqc9hYY/+v52Si7SXLGWtuTIgF8358LMUFs08HWHnnqNTA== X-Gm-Gg: ASbGncu4khtFms9ugAMgL1gArHh3dzi0kuN4qhE1IPfLM6CucIPD3HPOurSM5sl7vAt I2YqlUzCqrxpj8ImcanEoYiX4ep7I5aAhgdRCkbG9p7zP1OTrtbD64oCv25k5tBp2bRjsSlQsDn RCBtKb/QmF3+t7nTTv1Q64/2oaytgPWlZhZi+xjdccQkoZscCBqaCKDQXSkW4Lk4B1I1Ad3LJ4N nqYg0ZRWqLZr0K9dXTBdJU6xRPdYwilz9Uj+XMxnu6VA3sVQhcNskRsIODy2wbjYy6TbQS1PpcG BY5pE2qRJur8HkJ1vHkCYZ81u6XGr2eZug== X-Received: by 2002:a05:600c:450e:b0:439:6a7b:7683 with SMTP id 5b1f17b1804b1-4396e6dfb39mr26662985e9.11.1739596548777; Fri, 14 Feb 2025 21:15:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGZlrbXg8BOW3FQ1kM/NEj/Ek5W9UZ2SM4HO0RUXSf0/JYpcP/B5kIwFPSFqsrIF8hfd9/V4A== X-Received: by 2002:a05:600c:450e:b0:439:6a7b:7683 with SMTP id 5b1f17b1804b1-4396e6dfb39mr26662845e9.11.1739596548408; Fri, 14 Feb 2025 21:15:48 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4395a04f8a2sm91920035e9.2.2025.02.14.21.15.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2025 21:15:47 -0800 (PST) Date: Sat, 15 Feb 2025 06:15:46 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v24 1/5] vhost_user: Clear ring address on GET_VRING_BASE Message-ID: <20250215061546.5f5c4eb2@elisabeth> In-Reply-To: <20250214130845.3475757-2-david@gibson.dropbear.id.au> References: <20250214130845.3475757-1-david@gibson.dropbear.id.au> <20250214130845.3475757-2-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 1ml3JV3adGlb7vdoge3myQk6SV1GxJWJyOKJAK_-PQs_1739596549 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: K332R4LCJKWJD7QTGSWKZZ4VWJNJNBN6 X-Message-ID-Hash: K332R4LCJKWJD7QTGSWKZZ4VWJNJNBN6 X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Sat, 15 Feb 2025 00:08:41 +1100 David Gibson wrote: > GET_VRING_BASE stops the queue, clearing the call and kick fds. However, > we don't clear vring.avail. That means that if vu_queue_notify() is called > it won't realise the queue isn't ready and will die with an EBADFD. > > We get this during migration, because for some reason, qemu reconfigures > the vhost-user device when a migration is triggered. There's a window > between the GET_VRING_BASE and re-establishing the call fd where the > notify function can be called, causing a crash. > > Signed-off-by: David Gibson Applied. -- Stefano