From patchwork Fri Aug 3 16:36:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 143419 Delivered-To: patches@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp363141ljj; Fri, 3 Aug 2018 09:36:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdqraUYEYytXtMj+S4+qOaarV2gKMmC/aiAKmhC0CS/9zlx82sDpXOvFUfQ/Hh7hMqHQ53A X-Received: by 2002:a1c:1182:: with SMTP id 124-v6mr5475477wmr.75.1533314211553; Fri, 03 Aug 2018 09:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533314211; cv=none; d=google.com; s=arc-20160816; b=cQADoGbxvlAlhetseZ2Qa1wMAxVjdm9p3i4Mknr30oDkzAghv0EmkSrA9+lYEVUVcW uu3JAAy8GZGMCft4lDcDvm3ruSMgRF0+y/+aqth4Juii6wgvuqGOUdTDdKwidf6tuR19 vFsww7oturgvAM5GybR2IHaNfr7FJly12yeMmTL36T5BBhGT2oLBSWzzVcUmqJBwz/3q CClngbE2p3ruJ3UTkKRAgYp3ML5nd/beN24SExB7bu8XKU5dePHWixs9nIZHiPDlY4YC j1HWaInDdR1QZb8c4jec43SG+kSJCE72R7Kk/f7yzjrvl8KuPI9rxERchIDVFo23xVr/ vP3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=6x5YMUy+lOuSMbGgcSbFtKTMufRMOLv90gY4wV//u2Q=; b=SN7z95/bYbY+rlZSbbhvz6LgN8or8wCZsSglhggubyNUyoONsSw0Q/3wVRlwr1vG+7 7LAAGzZTtH+pSuLLubtNp2Flrum2WNvEGUPkOepdLEpjlYm7LCAZ8ZD2pbSgdmaTKM1I f0tfkbE/I6PNcmAgd2eIUCWD5Lgk9DHEGV405z8XQkM26gTUE83aMfR0j6LbwJevOJSx SRCpyBTljh0L7+5rcmSNPb8baLIY2OXSrKStEWkrkP61E4kZZFZiBKrxVrcW2BhchCJS rexv+5FZybBmkpwrdlbJ6uV1jyihtl5wSCjjg5mmuzFgxsZOmzyIkVGSqgrfmPm0bUP0 npaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id i70-v6si3772675wmf.171.2018.08.03.09.36.51 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Aug 2018 09:36:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fld4M-00075u-Mk; Fri, 03 Aug 2018 17:36:50 +0100 From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: patches@linaro.org, Juan Quintela , "Dr . David Alan Gilbert" Subject: [PATCH 1/3] hw/intc/arm_gicv3_common: Give no-migration-shift-bug subsection a needed function Date: Fri, 3 Aug 2018 17:36:44 +0100 Message-Id: <20180803163646.31068-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180803163646.31068-1-peter.maydell@linaro.org> References: <20180803163646.31068-1-peter.maydell@linaro.org> Currently the migration code incorrectly treats a subsection with no .needed function pointer as if it was the subsection list terminator -- it is ignored and so is everything after it. Work around this by giving vmstate_gicv3_gicd_no_migration_shift_bug a 'needed' function that always returns true. Signed-off-by: Peter Maydell --- This should go into 3.0 to avoid awkward migration compat problems: the no-migration-shift-bug subsection is new in 3.0. --- hw/intc/arm_gicv3_common.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 Reviewed-by: Dr. David Alan Gilbert diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c index ff326b374ad..e58bc8b8105 100644 --- a/hw/intc/arm_gicv3_common.c +++ b/hw/intc/arm_gicv3_common.c @@ -203,10 +203,16 @@ static int gicv3_gicd_no_migration_shift_bug_post_load(void *opaque, return 0; } +static bool needed_always(void *opaque) +{ + return true; +} + const VMStateDescription vmstate_gicv3_gicd_no_migration_shift_bug = { .name = "arm_gicv3/gicd_no_migration_shift_bug", .version_id = 1, .minimum_version_id = 1, + .needed = needed_always, .pre_load = gicv3_gicd_no_migration_shift_bug_pre_load, .post_load = gicv3_gicd_no_migration_shift_bug_post_load, .fields = (VMStateField[]) {