From nobody Sun May 19 14:40:10 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1628861907567537.7909663124065; Fri, 13 Aug 2021 06:38:27 -0700 (PDT) Received: from localhost ([::1]:58500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mEXOE-0003F5-7C for importer@patchew.org; Fri, 13 Aug 2021 09:38:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEXNE-0001V0-Cn for qemu-devel@nongnu.org; Fri, 13 Aug 2021 09:37:24 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:42734) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mEXNB-0002eO-N8 for qemu-devel@nongnu.org; Fri, 13 Aug 2021 09:37:24 -0400 Received: by mail-wm1-x32d.google.com with SMTP id w21-20020a7bc1150000b02902e69ba66ce6so6947729wmi.1 for ; Fri, 13 Aug 2021 06:37:20 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id w1sm1413671wmc.19.2021.08.13.06.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Aug 2021 06:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pz8E3tBHBEc3d4oLN+SxPWKL9wotay9tz0md2XGiUlA=; b=BKpJ6+aQmpdkcEsCBxXri+/o5r3nNs6ML2w0mlEQyk1MMvx1OslSdroo1SE9NEM9OJ IKwTyaVf1wSwZ8DKsZXvoopL8l52q4GwNGnQcZeYuOkEvuNWe+TmHov0S4o1lBKfWxSj wvuQ8NAvSU3vcFqMjlbYgTyP8b/kEzXpGkv9PNRol+UE+D9g2TdUaJukQiR2AgjXLHlF sSf9ai3zl7XOMkPByCJpF5XgUZIslJJiD92fa7M777uIttk6KAeFy3uhGVWifZRyydG/ W/VmCmcO0eW5fSyrs2NI4SBU9CdhaDStPbiugEKjwBdLaSaCxu5V8tDOBpo5uJ9CVVWE HWnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=pz8E3tBHBEc3d4oLN+SxPWKL9wotay9tz0md2XGiUlA=; b=muSlY2TNdvqFALZssDKo1xGXut8m+iVWQtpAbpV7AQtMG8IzVMZIdVnwSv89EK/RjW rpPgshyRRkxNgifR9MGHEOZmuliMaJBQOXDHWO2QFZb6yNnOzNUYFXe8MHZyr6ewIWjE QgZRrIvfefzyO3JrXnFI8HWVdd08NWnrSiRoERekxD7q/gG9qgGammpqbBK9BC5XD5E1 LhdJK6mMHQ7KwU8LhSCEYwVqafxn26JSbHvP3nSGyiebtYcaUfbNvs7ICZk5clFIgmEM n238VM1R0cVNe6kDC+E3DgpardAO3V+xTkNihTn9VOWLdVjDaAIXHD/ADnG3pfvDYH/J Kw5A== X-Gm-Message-State: AOAM531OJoql+Ou9zEBFzr41bpo71O65TaURkHABJOGoNZrwFa8Uj683 kbtwOtJHnqygki96ZQgBtx/3v7RdTP+LMA== X-Google-Smtp-Source: ABdhPJx1nkEpggx8EDK1rwJ4vujCFQtIRKpk293KQOEWSSSNGyP1hOCaJrfaU3Ao4hUQ6eecjQs4jg== X-Received: by 2002:a05:600c:4fd3:: with SMTP id o19mr2781550wmq.34.1628861839381; Fri, 13 Aug 2021 06:37:19 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 1/3] target/i386: Fixed size of constant for Windows Date: Fri, 13 Aug 2021 15:37:14 +0200 Message-Id: <20210813133716.289058-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210813133716.289058-1-pbonzini@redhat.com> References: <20210813133716.289058-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::32d; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32d.google.com X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no 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 , =?UTF-8?q?Volker=20R=C3=BCmelin?= , Lara Lazier , =?UTF-8?q?Philippe=20Mathieu-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) X-ZM-MESSAGEID: 1628861909511100001 From: Lara Lazier ~0UL has 64 bits on Linux and 32 bits on Windows. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/512 Reported-by: Volker R=C3=BCmelin Signed-off-by: Lara Lazier Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210812111056.26926-1-laramglazier@gmail.com> Signed-off-by: Paolo Bonzini --- target/i386/tcg/sysemu/misc_helper.c | 2 +- target/i386/tcg/sysemu/svm_helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/tcg/sysemu/misc_helper.c b/target/i386/tcg/sysemu/= misc_helper.c index d347af2a99..e7a2ebde81 100644 --- a/target/i386/tcg/sysemu/misc_helper.c +++ b/target/i386/tcg/sysemu/misc_helper.c @@ -97,7 +97,7 @@ void helper_write_crN(CPUX86State *env, int reg, target_u= long t0) break; case 3: if ((env->efer & MSR_EFER_LMA) && - (t0 & ((~0UL) << env_archcpu(env)->phys_bits))) { + (t0 & ((~0ULL) << env_archcpu(env)->phys_bits))) { cpu_vmexit(env, SVM_EXIT_ERR, 0, GETPC()); } if (!(env->efer & MSR_EFER_LMA)) { diff --git a/target/i386/tcg/sysemu/svm_helper.c b/target/i386/tcg/sysemu/s= vm_helper.c index e151104b4e..0d549b3d6c 100644 --- a/target/i386/tcg/sysemu/svm_helper.c +++ b/target/i386/tcg/sysemu/svm_helper.c @@ -264,7 +264,7 @@ void helper_vmrun(CPUX86State *env, int aflag, int next= _eip_addend) } new_cr3 =3D x86_ldq_phys(cs, env->vm_vmcb + offsetof(struct vmcb, save= .cr3)); if ((env->efer & MSR_EFER_LMA) && - (new_cr3 & ((~0UL) << cpu->phys_bits))) { + (new_cr3 & ((~0ULL) << cpu->phys_bits))) { cpu_vmexit(env, SVM_EXIT_ERR, 0, GETPC()); } new_cr4 =3D x86_ldq_phys(cs, env->vm_vmcb + offsetof(struct vmcb, save= .cr4)); --=20 2.31.1 From nobody Sun May 19 14:40:10 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1628861903062611.3143469974829; Fri, 13 Aug 2021 06:38:23 -0700 (PDT) Received: from localhost ([::1]:58108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mEXO9-0002zU-3P for importer@patchew.org; Fri, 13 Aug 2021 09:38:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEXNE-0001Uy-4U for qemu-devel@nongnu.org; Fri, 13 Aug 2021 09:37:24 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:34421) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mEXNB-0002f1-MO for qemu-devel@nongnu.org; Fri, 13 Aug 2021 09:37:23 -0400 Received: by mail-wr1-x42f.google.com with SMTP id h13so13392816wrp.1 for ; Fri, 13 Aug 2021 06:37:21 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id w1sm1413671wmc.19.2021.08.13.06.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Aug 2021 06:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z7PkZ1Inyx/gcfWknKTwi/BJStm1TEHLI0podxvwLdM=; b=sfnJtVk2NCNEMEVkCAHeMV0bLccWiG9f/oiK3UbTaB9f/WbNCatZeytfMEHd+wg6jh 4eCuSzl873Szm84BvVmkx1TuSi+JGdc93YMOlc5KriF6old5EoZlvFQYZUf7TMWLPvPb 2LZfbZ1zG3FfWFUX6Rtx4BGUsm2CQRtQ3dVPYesch7sHJPWvKEutA9djYvekkmLlWDAL vj3tweFfYIR2Be068gm5zNbaojvD3rRNTMR5kDRzK2oshmmgJp/ytz1PdGfLu/ioesNE L9MnWKy4IghjM6o3hX1CvLbUowKXSnlPllylqtsaW9pW/ucowBzR7QNQT9PIsfs4IJqB W4VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=z7PkZ1Inyx/gcfWknKTwi/BJStm1TEHLI0podxvwLdM=; b=D6qJaG/oQd1y2LoZw+SP6Xpbf40+FwojnxLCRIZ3AGsLJoq2deURiIN/wfieja7Qsh UAgOR5HbpBz7UJjKAoV1mYqG90tHW2TeiCcN5fnfybDI5L1qKOq+xTltYWp4sNGb7WPh 3bYKCe7o09E2FsJ0GYitvOdOCTv0B+rZAlZ6jka8seAzjLSo1PiiO6Ka7iidOqY+txI+ 9QKXpAr4dwDgPEHk8MqLky7YJDn2gfPzk+hXWiv9Fb1ayOiIP/81Vx2Eqh0bAy5lQ4gb EsZcJLvMxCX9ozXj0LikDHj191ipV4HdUvz0qIhBvvLZXFaylPShPoaowaqcVTb9ghHX DXsg== X-Gm-Message-State: AOAM531OYBkG8066eiIS6iWAlPPIHUWx3ORsKwGMV018g1yhG5hgN9Jb Tx8HYwChzScRTG3m/3bAjLZ/I/seV4UFww== X-Google-Smtp-Source: ABdhPJxd1Cw8ElBUKfOQUGKFIEZlHSxp5QVS3ABFi505/noJvWDga+CCSDNuxKFCam6U8SaWDMbZtg== X-Received: by 2002:adf:ef4d:: with SMTP id c13mr3244517wrp.281.1628861840095; Fri, 13 Aug 2021 06:37:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 2/3] hw/core: Add missing return on error Date: Fri, 13 Aug 2021 15:37:15 +0200 Message-Id: <20210813133716.289058-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210813133716.289058-1-pbonzini@redhat.com> References: <20210813133716.289058-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::42f; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no 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: =?UTF-8?q?Philippe=20Mathieu-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) X-ZM-MESSAGEID: 1628861905074100001 From: Philippe Mathieu-Daud=C3=A9 If dies is not supported by this machine's CPU topology, don't keep processing options and return directly. Fixes: 0aebebb561c ("machine: reject -smp dies!=3D1 for non-PC machines") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210813112608.1452541-2-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/core/machine.c b/hw/core/machine.c index 943974d411..abaeda589b 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -752,6 +752,7 @@ static void smp_parse(MachineState *ms, SMPConfiguratio= n *config, Error **errp) =20 if (config->has_dies && config->dies !=3D 0 && config->dies !=3D 1) { error_setg(errp, "dies not supported by this machine's CPU topolog= y"); + return; } =20 /* compute missing values, prefer sockets over cores over threads */ --=20 2.31.1 From nobody Sun May 19 14:40:10 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1628861995051743.0694032423222; Fri, 13 Aug 2021 06:39:55 -0700 (PDT) Received: from localhost ([::1]:34178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mEXPd-0005qz-Pz for importer@patchew.org; Fri, 13 Aug 2021 09:39:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEXNE-0001Uz-Co for qemu-devel@nongnu.org; Fri, 13 Aug 2021 09:37:24 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:46773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mEXNC-0002f4-5m for qemu-devel@nongnu.org; Fri, 13 Aug 2021 09:37:24 -0400 Received: by mail-wr1-x431.google.com with SMTP id f5so13295604wrm.13 for ; Fri, 13 Aug 2021 06:37:21 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id w1sm1413671wmc.19.2021.08.13.06.37.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Aug 2021 06:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b2NyfF/otIRHGJukgp7GESYRZCWhUy3Br4FtVTJRyvo=; b=R4ysGzA/bNAHyTQsP4nq6NR1+jWAjerxdUwDaAKWW1E9Hf2VmD9IrTcswMqmtXVLL/ v9+fm6rT9yWHgpItBEcjsEK99qq6eanS9WGb2SUfMwWUQcP8gsUTna6I8/cccifum6Kx hlTAYRDuKYoLUZZKFHfOE358M0jQtq6yOZTAOWjauqIykMXeVxvFYbmIjSlloDNh36PM 5wYJRPseznkyB0PM8eZWEwsOvcPIDd1yhO3IxXrANsOZzfKxgIllluVbEv2rEJG0zhm9 mPYNksq6zJb4udcN0W+EEZo+bDf45DtamfXaJs2CDJNkicjjHT1vFcTZ2F2ARJSg0OUg WCVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=b2NyfF/otIRHGJukgp7GESYRZCWhUy3Br4FtVTJRyvo=; b=NJfDOWIOGbWXZ1lEM2Gc7zxpMua6XYD8u481aqm0Obl6s8B2KnpBobOKHhvF1BXrGw hZjgkuren9vEJi+OlzSmO+DgsN81lEzD3kTMblqmTxVUbfUaPQMNKwgqErcANJDjsqUA 6bQsco8Pv2colG8iQGjDytV9j+Xn1lW/RFBQyRPtvCxp8suOqjLvcHJfzC45f3HoJ+PS vJK1DrlhONSDDavF3DxNJ5lvnoD3ygZYI+pTxeZQQ2T+lnZeXh0mw+rFiL9UFRvzhpsp wPXEYQafrCLJ9jIGefTiuFu5KWUslDEaFFdPyRY/O1UKwly3Rl8d9MjWC3oclQwZf0oC ziYg== X-Gm-Message-State: AOAM531W5r/qjyQ5nw8T68GxLp4aaroNM9K/Wli6tkOnj3j/W0X1uIa+ jGWEma7GC42W1XuJgiulJIuS4Vl1YBl/6Q== X-Google-Smtp-Source: ABdhPJxNjsAPGxVB5xGDGQhmPTQEGzAG0ULUlKsi7llJu1SAeAfq4FQ4SoqrLqEh+loKbUOCTEBpcg== X-Received: by 2002:adf:a4c4:: with SMTP id h4mr3155029wrb.367.1628861840812; Fri, 13 Aug 2021 06:37:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 3/3] hw/core: fix error checking in smp_parse Date: Fri, 13 Aug 2021 15:37:16 +0200 Message-Id: <20210813133716.289058-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210813133716.289058-1-pbonzini@redhat.com> References: <20210813133716.289058-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::431; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no 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: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1628861995445100001 From: Daniel P. Berrang=C3=A9 machine_set_smp() mistakenly checks 'errp' not '*errp', and so thinks there is an error every single time it runs. This causes it to jump to the end of the method, skipping the max CPUs checks. The caller meanwhile sees no error and so carries on execution. The result of all this is: $ qemu-system-x86_64 -smp -1 qemu-system-x86_64: GLib: ../glib/gmem.c:142: failed to allocate 481036337= 048 bytes instead of $ qemu-system-x86_64 -smp -1 qemu-system-x86_64: Invalid SMP CPUs -1. The max CPUs supported by machine= 'pc-i440fx-6.1' is 255 This is a regression from commit fe68090e8fbd6e831aaf3fc3bb0459c5cccf14cf Author: Paolo Bonzini Date: Thu May 13 09:03:48 2021 -0400 machine: add smp compound property Closes: https://gitlab.com/qemu-project/qemu/-/issues/524 Signed-off-by: Daniel P. Berrang=C3=A9 Message-Id: <20210812175353.4128471-1-berrange@redhat.com> Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index abaeda589b..54e040587d 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -833,7 +833,7 @@ static void machine_set_smp(Object *obj, Visitor *v, co= nst char *name, } =20 mc->smp_parse(ms, config, errp); - if (errp) { + if (*errp) { goto out_free; } =20 --=20 2.31.1