From nobody Mon Feb 9 12:10:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591973956; cv=none; d=zohomail.com; s=zohoarc; b=GrMyrUZMTBPeEzWd9m9afpp5Ajh9GdoqiP+16RrPgQZPNUgZPkY9VFLyMzVRi1/IwViz8mCyYx3ol/IuXIC2jW59Sz1mpOJPRZuXkjpaCUzA0aWUDhpvpRoOuW3pmxZzjcgYGcvPXnh3YoQAEnxKJYazE3ksm27VSe5LDbFaOVM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591973956; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IWR60ercXQZVd22zZQp4vrHc0/weVq8wSWjY7Go6ogE=; b=O+BZJYg2AqSlH3EOI/ClqI6W8gtV8Yjk8XDiN4uIg6VboL1KLQKj3sZCUXK6+GD6UYTGhaSZnjCbKCOtTWi633rwzwQjs5dh3iL4D2Ek8py9yyUvsBtBUSrb2NWSLJc/VL1YPT5ngkxlUicU2vHHLWrO+Jgr6dcUdOfI1s1yvbM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591973956377137.76015418525913; Fri, 12 Jun 2020 07:59:16 -0700 (PDT) Received: from localhost ([::1]:36420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjl9H-0002qJ-30 for importer@patchew.org; Fri, 12 Jun 2020 10:59:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjl2J-0006lM-7r for qemu-devel@nongnu.org; Fri, 12 Jun 2020 10:52:03 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:32829 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjl2H-0001SZ-Lo for qemu-devel@nongnu.org; Fri, 12 Jun 2020 10:52:02 -0400 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-253-WGJQsmkFNrWpb-q3VnQyAg-1; Fri, 12 Jun 2020 10:51:57 -0400 Received: by mail-wr1-f70.google.com with SMTP id p9so3999992wrx.10 for ; Fri, 12 Jun 2020 07:51:56 -0700 (PDT) Received: from redhat.com (bzq-79-178-18-124.red.bezeqint.net. [79.178.18.124]) by smtp.gmail.com with ESMTPSA id a16sm10113673wrx.8.2020.06.12.07.51.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 07:51:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591973521; 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=IWR60ercXQZVd22zZQp4vrHc0/weVq8wSWjY7Go6ogE=; b=HFluY8ZARDoMUe0RcVyzi/3zAerUygUtxyv4o5PmHTSZF4dzz2MbXzfI/3Ovl/eA1nBMpE vT4LxuUoHY0m739zy/UPXuX4A9xkUEEovf2yBFu2s7Db5xpow/qOanOIReMt05O5WDTPDo MD5nYPJVESLG3v+DcBTCaGrR0L+NlFY= X-MC-Unique: WGJQsmkFNrWpb-q3VnQyAg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=IWR60ercXQZVd22zZQp4vrHc0/weVq8wSWjY7Go6ogE=; b=akNU12vKYGVRMtoIesqmOrJJGrJ2uZaX0YWp293I2t8opLs5rhecKcmCAo0JMkaGed bhng+Zrp9v8l7amznsKI9yaIUe1J6fPzfXVQ6Ch21jiW7XLLjRuevfjIeGJDP1Oc4m6I EB/R6MxW+R+roF+1bC0YViheER2rh+RDnpmNAvR53VEFKFP28pl8myGxI6sQmd5ITcjM OsnwDRSpgt1Y9BoHSSi+s0ft/+rC3XjyoVkDs1wU80PJgptiWJ81a+X1iEvgrEqWXcWu h2hdswikfL3298VONHZfj3N9dWURoOYCdNO75JUHcHZzBuhMGPeWUTq1WOqxSj9B2lcB RmGw== X-Gm-Message-State: AOAM531cSDEZuamovin3a402ENdWJhPJ7A4tgMzC6cxczBFSX6TEegIx qhJAmgzm1OLkWdfTA2LL37pMFC8NPfl09uinafMoUmY1GrONw4cifP8rYnPWxG/SubYFBRAOcRI WxiqWnjhL43OXPCk= X-Received: by 2002:adf:f507:: with SMTP id q7mr15102989wro.353.1591973515954; Fri, 12 Jun 2020 07:51:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9aYbpLDGlpygvbyw4emBwQrJQ6UUxUvE8vn4WScLdcWYfa1YnBBAE0JoVm8dT86pZTFsegQ== X-Received: by 2002:adf:f507:: with SMTP id q7mr15102966wro.353.1591973515749; Fri, 12 Jun 2020 07:51:55 -0700 (PDT) Date: Fri, 12 Jun 2020 10:51:53 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL v2 23/58] virtio-balloon: fix free page hinting check on unrealize Message-ID: <20200612141917.9446-24-mst@redhat.com> References: <20200612141917.9446-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200612141917.9446-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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=207.211.31.120; envelope-from=mst@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/12 08:07:26 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, 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.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , David Hildenbrand , qemu-stable@nongnu.org, Alexander Duyck , Wei Wang , Alexander Duyck , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: David Hildenbrand Checking against guest features is wrong. We allocated data structures based on host features. We can rely on "free_page_bh" as an indicator whether to un-do stuff instead. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alexander Duyck Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Cc: qemu-stable@nongnu.org Cc: Wei Wang Cc: Michael S. Tsirkin Cc: Philippe Mathieu-Daud=C3=A9 Cc: Alexander Duyck Signed-off-by: David Hildenbrand Message-Id: <20200520100439.19872-3-david@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 7ff6a7aa7c..32e9fe3f64 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -818,7 +818,7 @@ static void virtio_balloon_device_unrealize(DeviceState= *dev) VirtIODevice *vdev =3D VIRTIO_DEVICE(dev); VirtIOBalloon *s =3D VIRTIO_BALLOON(dev); =20 - if (virtio_balloon_free_page_support(s)) { + if (s->free_page_bh) { qemu_bh_delete(s->free_page_bh); virtio_balloon_free_page_stop(s); precopy_remove_notifier(&s->free_page_report_notify); --=20 MST