From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 208BB3DD532 for ; Wed, 5 Aug 2026 06:59:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785913176; cv=none; b=AVnM1IUtISFxbyM0YgqNDmxIWNa7cTLmI6ZRrmImG8cuF+MFwHBAHRJga2lgU4RchNG7rh+yK3VgUdiexaLtZgz0uRYd8wB2+7gRTWoEm18ubDoGAwu29FcaOvGZlqCNcjRSOVFT+h/EZL0pEDhCsk5rekxRB8bDvWt50edyw7E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785913176; c=relaxed/simple; bh=TgALdl+iEj9JSliTz8VrDMLm1WU+EhCs6+N4E75pEjQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ab3zfxZOifcPjXRaIDQZLAeqV1GMaoMWEGGL389QRwtiz+ulHSu8s/18aVs6f3Rk6WHRwS0KUMVJqqM1aiEcGYeBly1AuGVoIYvQmidkIp1EbItEniWdigD+koQ4Gb6XrFstGPIF7kHJucdcfdvoHOhmbBZAbz/YbCHuVCV1Yv8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NxWw8qEY; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=JeazDuot; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NxWw8qEY"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="JeazDuot" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1785913174; 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=lEhxxpwyE/rpJMtoGJj64x34mE0/II12LvK1GhW6WUk=; b=NxWw8qEY1lf5Nbb1/UsoWr2PpehXEUCuVUo6uB+zIAZjbiWenAJPv2ORwHNv2iuK5vn3V8 /mCivdrh9Tr3okgu7zG09kDzp91kVjsOW33KKpdwG2kx76awoR7kShECBfMbd2OF/2b1XR n4lfR3hYiYVIlO9OUk70dAX9iKd8KIk= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-250-BcIuXN4OPAOCwyRg-vOVtA-1; Wed, 05 Aug 2026 02:59:32 -0400 X-MC-Unique: BcIuXN4OPAOCwyRg-vOVtA-1 X-Mimecast-MFC-AGG-ID: BcIuXN4OPAOCwyRg-vOVtA_1785913171 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-47f8398ed9fso491464f8f.0 for ; Tue, 04 Aug 2026 23:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1785913171; x=1786517971; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=lEhxxpwyE/rpJMtoGJj64x34mE0/II12LvK1GhW6WUk=; b=JeazDuotjyYx0NtfCm7GFKC/gOPshkzK7D6G/QY61xjPVdHICFA6dLuzIo6c87oBHI /Y3NVlmG6sReBENXXorPvkFWhWjx2lOt0j2lI/MUU9uTPy7Zi2emCnMHfmWQxNlI4xLi HOZXVlTXlywWUmCfGxq56mCY1gj5+2Q3XDN0ZGtV43pPoyopXoYtqJaTc/8cH8OVL7A5 UI+Me1gsAT5lKMX7XGKHT9BGAn0sPHT14MFNDN42DRp8G2EsEbZTYkce2hUUf+sHCg9b 9Skf/Ti2C0W9Hwi5+wOCZ9r/TWtDqpNWAuMvOcLqPEtY34Yjw54wCZDCDywbYYWmV10i n9mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785913171; x=1786517971; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=lEhxxpwyE/rpJMtoGJj64x34mE0/II12LvK1GhW6WUk=; b=IRdXOXpr1yL30IyX6WdLMEPEhzx/yk3fcS371h5m/ZarcGI3/gRI8xRlov1sbGLQkX ovRBbeU74TCTglVOVV2h/KCyxB7FjVZ1WRqR/O2xCLa2Q/QnAFxgJxPmGDvAde3UUfif MFV4PWb033DJ4Zh+N/CGwx9SJOx+U8aiCCCEe6ystdU4TufyFSNSN1P4KlcsHQnCiQe3 +ktPx/sR0YEcLeh0hY9BBG14ZAt8ht0Z+Am5z8HjXu3J1ENypn+cYs9zTudc9nwDAPyI AVIc3kr7yREQSWPG4Js1gV9Eh3rxPNVout82gAF3kx8fdY3s8yTta/+Zwh1dDQ15mkhF lxWg== X-Forwarded-Encrypted: i=1; AHgh+RpTqI9ma29atwDwV12wNoJ0KFHWCnf3Y2AnrLuKl5Nj1B5/AJ4hAM8nXBaQQMVJHdZXhugT53Q9Icigu2I=@vger.kernel.org X-Gm-Message-State: AOJu0Yw+PH2MHPbwlRawzeVtNmM4BVH9guv0mdQsaDjdREdzsyRe3OcK oY9nhDhXPW8MEEMRKWkzkGXo3vw6Y3nOeQ1/HhigwwTM11sCrt+URU1IY9JhZ/kVvghd4pdFpsC 5vE9FYZ9UK+8EUlTp/ldoOtM6XWZ0qYmaKnaV0rNnxIbsL4mTcBZPOIcsHyp33fP9xg== X-Gm-Gg: AR+sD10pIR6V/DDI4F0FIyD2fdw8HFGu03+N9MtjnOg/pxjFlIX4FNLNLniLsjdbze9 wycgx+rzyM5NEo+dl7Wbi60tIi9GCWdHDPF2ZxaDNRwVCWTiFivxKn2yV/HDqxJR4nocc3LNdwf SpX/WIUeLsizQIFDfye0CTgiFYxmDjqd3rhixXV2rtz0stwV2eSvj01mrNCZV2ePsS+2lWWFDVE aFSP1WhLBUgzjKvYdvWql2HMcDGJwnlpAXDyIClb2efimxPdFFEsa3Ly9S9WuqxE2uckgisIeLg j73gJaS0Rjutg7XNL/k2ySghGI+F6o3HsxPR0rDO9sr7VxxuQivBXyi1b6CbFIQoKTZZwt8e4g7 pQDf35WDkusBvjy23xDvVNQ== X-Received: by 2002:a05:6000:4211:b0:47f:96e3:5309 with SMTP id ffacd0b85a97d-47fec50d87amr7251155f8f.9.1785913171420; Tue, 04 Aug 2026 23:59:31 -0700 (PDT) X-Received: by 2002:a05:6000:4211:b0:47f:96e3:5309 with SMTP id ffacd0b85a97d-47fec50d87amr7251098f8f.9.1785913171014; Tue, 04 Aug 2026 23:59:31 -0700 (PDT) Received: from redhat.com (IGLD-80-230-28-14.inter.net.il. [80.230.28.14]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47febfe5d7csm6573640f8f.15.2026.08.04.23.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Aug 2026 23:59:30 -0700 (PDT) Date: Wed, 5 Aug 2026 02:59:27 -0400 From: "Michael S. Tsirkin" To: Xiong Weimin Cc: virtualization@lists.linux.dev, linux-kernel@vger.kernel.org, Jason Wang , Jason Wang , Xuan Zhuo , Eugenio =?iso-8859-1?Q?P=E9rez?= , stable@vger.kernel.org Subject: Re: [PATCH] virtio_pci: do not mutate caller irq_affinity.pre_vectors Message-ID: <20260805025834-mutt-send-email-mst@kernel.org> References: <20260805032934.1606700-1-xiongweimin@kylinos.cn> <20260805013203-mutt-send-email-mst@kernel.org> <178591242683.1657366.2004019380773321385@kylinos.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <178591242683.1657366.2004019380773321385@kylinos.cn> On Wed, Aug 05, 2026 at 02:47:06PM +0800, Xiong Weimin wrote: > On Wed, Aug 05, 2026 at 01:37:01AM -0400, Michael S. Tsirkin wrote: > > "tmp" in what sense? if we can come up with a sensible name, just > > "affinity" will do. > > > > We do not need a comment arguing with previous version of the code. > > > > just assign to desc, instead? > > Thanks, will do. I will post a fresh [PATCH v2] as a new standalone > mail (not threaded under this one) with: > - a local "affinity" copy > - that comment dropped > - desc = &affinity, and keep passing desc > > On the virtio_input thread you also asked whether this is real or > theoretical for stable. For this virtio_pci patch: real when the caller > passes irq_affinity and MSI-X policy falls back. > > vp_find_vqs() retries EACH -> SHARED_SLOW -> SHARED. A failed > vp_request_msix_vectors() currently does desc->pre_vectors++ in place, > so a later successful attempt sees a polluted pre_vectors and gets the > wrong affinity layout. That fallback path is unconditional in the > driver. > > I have not collected a userspace failure log yet. Please let me know if > you still want Cc: stable on the v2. > > Thanks, > Xiong do not cc stable on theoretical issue. there is a bit of a language issue. if the issue is real describe it: "this was observed: ... " if theoretical say so -- MST