From nobody Wed Nov 27 00:32:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1703582784; cv=none; d=zohomail.com; s=zohoarc; b=V6oc364m30o/5mmEAACT6hDlxuwdHkCAJzmhVAyDOa5zOqYd14bGRPjlCtEDHniNoMH3PO78sI13HX70Z665IPAQp2pdj/HGZPOhDaEy8iU2fYJ4I2TfEQ9IiDEcXcU3ovIbQbNN2OVoYotTvPl82czVCCJ53lwDqZhSU2v3nKI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703582784; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=N39XRBVP9UVXyghkAg87M/jQ4XVZeFGKXGSiwW/zl4g=; b=SzI1sBh6Pisx/kD6u1bpfPAj7iq0NJ/PAk3HBtUo5Xig3wxsFRjm+ZwDTad4vjw8VhUoaLL8msFg+Lp+GP0JYHd9kA7nhgqePt0N5hnJY2MPo50jBfH4BPdgavDSJVRSSA1GQBt3pJIsNk6OlJcH7MPpMDZG0yneqsxN08fTe7k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1703582784940786.1779475618316; Tue, 26 Dec 2023 01:26:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rI3g6-0001tG-5X; Tue, 26 Dec 2023 04:24:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rI3g1-0001e4-DK for qemu-devel@nongnu.org; Tue, 26 Dec 2023 04:24:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rI3fz-0008IG-Dx for qemu-devel@nongnu.org; Tue, 26 Dec 2023 04:24:40 -0500 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-62-EmnAx7ofNDePlMvKK0t_cA-1; Tue, 26 Dec 2023 04:24:36 -0500 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-40d5ae4cdadso2393565e9.0 for ; Tue, 26 Dec 2023 01:24:36 -0800 (PST) Received: from redhat.com ([2.55.177.189]) by smtp.gmail.com with ESMTPSA id c18-20020a5d4152000000b0033609b71825sm12088512wrq.35.2023.12.26.01.24.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 01:24:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703582678; 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=N39XRBVP9UVXyghkAg87M/jQ4XVZeFGKXGSiwW/zl4g=; b=cGM/qUG/HErDFz6Uwl5yRoMXaNvRrbf+3ygO/kfM29qkPbQWzlXn1HsQshH8K+RQbMVT+x IjsOpL5emdpKx+D8yLAiSy/QYyIrQLvR5awR1/nnlZM1fMDOZD/49RsVlqx31mXf+GicSi draqZ+6azle79m/FjeGVxPiI43PdmTI= X-MC-Unique: EmnAx7ofNDePlMvKK0t_cA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703582674; x=1704187474; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=N39XRBVP9UVXyghkAg87M/jQ4XVZeFGKXGSiwW/zl4g=; b=Rkx5gZfccvUe3ETmGYQdDJQVCa6BFbUz7nciaqUiHgFrqjBdLjlAyIWV/kD80FMq89 Ip/N3CX7Xsejkv9HeHMS0uJTzmlI76xYarhs2tIzw8vTmiWomtVAPRQsWzUsiJrSEO4h wkNHQWcd3KaAe5Lpj5ntGVHHuvJ+EHwWutF+2Sb2Lz6zE4DRV/FNBZh00xwAsyMEEctD ZnClC5jTbza2G6EUAd5YtYVVKjENFdQ60z7c3cNHLkQJRfbYxXPyEa653NPBnW/6AxRB lVJkPPYYoPzue5SKWVdVPHBKoooFZJwBTKggzKH5DFrx9jT6Q00TXB14Uuo01bmAWF6e 2TOA== X-Gm-Message-State: AOJu0YwQwk+2usNgr7IEq/dWSCKcdgNLdWF7RXDeDI7/KzvESdeVGIL7 O3SFaRG9cCNo7TQK09gwsDlU1StDi84v428uUdce3ZWoNiCN35TtAhFUaDQ0D/WQ1B6z5J3hGcS DXnFv/idXevLsFhICbU5on5NCaucrMLYlxmOo86wUUNXSUqCZfpTcTFFqL7zKCFJNHiC1Ux/kWy gJ X-Received: by 2002:a05:600c:310d:b0:40d:284a:6b6e with SMTP id g13-20020a05600c310d00b0040d284a6b6emr2951981wmo.153.1703582674283; Tue, 26 Dec 2023 01:24:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFOzbcH/TdJGGAfLy0Kq1ZxG7ykCkkmlt35AtZ5CqzanOTXi21+ZRaKB/EymKIeOC5KrIqOoQ== X-Received: by 2002:a05:600c:310d:b0:40d:284a:6b6e with SMTP id g13-20020a05600c310d00b0040d284a6b6emr2951973wmo.153.1703582673863; Tue, 26 Dec 2023 01:24:33 -0800 (PST) Date: Tue, 26 Dec 2023 04:24:29 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Eugenio =?utf-8?B?UMOpcmV6?= Subject: [PULL 08/21] vdpa: do not set virtio status bits if unneeded Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.977, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1703582785151100001 From: Eugenio P=C3=A9rez Next commits will set DRIVER and ACKNOWLEDGE flags repeatedly in the case of a migration destination. Let's save ioctls with this. Signed-off-by: Eugenio P=C3=A9rez Message-Id: <20231215172830.2540987-2-eperezma@redhat.com> --- hw/virtio/vhost-vdpa.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 819b2d811a..401dfa96fd 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -511,6 +511,10 @@ static int vhost_vdpa_add_status(struct vhost_dev *dev= , uint8_t status) if (ret < 0) { return ret; } + if ((s & status) =3D=3D status) { + /* Don't set bits already set */ + return 0; + } =20 s |=3D status; =20 --=20 MST