From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 566E68045D for ; Thu, 29 Oct 2026 09:58:12 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69T9urNh030965; Thu, 29 Oct 2026 12:56:54 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69T9urNh030965 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1793267818; bh=d5ecYKrBEAQoC/1JPP7xOdwuQM3fSizlQI9+iBzFVfw=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=JRw+Ix7CN6xaIHeZQYj20TCjb0GssVivLJ6AG6GpaRXSKXFuj5XyjSz667ze7PgLM ftLLAL9EuoY3pskqGfPw/6rSwQB+OTQEztYeyYc/Jjf3xOdseF3esQLnVXnU6wani1 1SWfxXbt6JT9N8cPRo8QlTDEv37uBq/f4pSY295ehRLOokqp4MMraFTutBcElCIgdW v5PQMEZWHfBPvcgTAVIQlDZ54FQ3VPErtNERuTNhi39qxT3rEIr2t5Sg0H+7fiyvjL WP8/22uQIKr7qJlfeqM6Qq2GHB9xxEz/7sG6zEiMjWXNRu10TbsWPlKu3CUeZo8yo2 j53FJm1pByBjQ== Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69T9uoD7030940 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Thu, 29 Oct 2026 12:56:50 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69T9uoD7030940 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="ewCPw34E" Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-48e0fc747a7so1573480f8f.1 for ; Thu, 29 Oct 2026 02:56:50 -0700 (PDT) X-Gm-Message-State: AFq9FYIrjxWLJrrgeUf8zKhNZbXZDPfUOZP1w8IGEq0UTSTRff9Q5aTW KLQW80oQt8Flza6xvlQ0X5a+n9seDeMEQtWdwTG0vAJSJryQ7/QZ7MasyuOda9n3kB0mYFNSqbK ZiSagnsMHilYw3aD3NYRYhJUd15r/QCuT/xVPqRGRAfJtFmq6Pl8JSA== X-Gm-Gg: AYBFou0nakXlgYIJR4a4Pr2URrtJ5BJWq0WEn4rYOltnpyPcOYfOMw0gihRxcBEqLZ5 /Mxt6hf+iVRIHezU/NsbfRjvNua7PiKY73v9OjIm/Ib9pAu0RmGIT4zCY2Wc5QAe/USdK98X7h7 bcOh3+JayjQ0lhQ85ZN/5/juOcP+H2E7fHRU8r795mVQQcL5uM0KmJjG9TPDGBIR/dbHkEp1W4k O/EzAit2UVlJbCvvnr7aslINI781fiRPnN/WpmZdrMQynpJPanWjGZGOWyIL9FDw82ZUsRsD8bo m4dBJWNW9Q== X-Received: by 2002:adf:fe8b:0:b0:48d:f99d:a0d2 with SMTP id ffacd0b85a97d-48e5d5909b6mr8404352f8f.15.1793267809982; Thu, 29 Oct 2026 02:56:49 -0700 (PDT) X-Received: by 2002:adf:fe8b:0:b0:48d:f99d:a0d2 with SMTP id ffacd0b85a97d-48e5d5909b6mr8404319f8f.15.1793267809522; Thu, 29 Oct 2026 02:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793267809; cv=none; d=google.com; s=arc-20260327; b=p8NF/UJw69x8F6rX1BbT/JmMsCD1xpxQ590OXY1W/F9qlX/P5a+XQc0ao6ykABsvlC z4LJhWEzJlLpNlK0KP8tQ4PIEYIWx5ULZkerxgo6AenCBb2t/dDPXh9uuBYdbyE3tmDw 3cikJ7IIMrH+5fNugDtak2bSryxb7AEqYY7wziIj79ep3dGjJqxaIsYU/20+zWwcJoIm GCzHKsIjb+j0Cf/DVWc4EWLRY0iXhX49eeMhpWVQQ/Et+u5VIjPPa5vYy46124oFXiI7 s5iBaM33gLP6vTj0hyzxOwG7aPF4Ns51RKZaPlPYkCvKnEmAC5wsqCkE/YQtc5rWD0ke ey7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=FjAA5s3FJGNvB+8nwM08FLJU+IsjV4TlC/wjT9TPjGs=; fh=Kr/R+ZQiC/tid3qUs5C3px+AHPSuipOrrdrDcZfSlMY=; b=Fit8LZL/ujatTWDBbSekaogAEXGJ0IEmtKdZ0cAKHmfYhgGMNIFHMW8CQ2BgAzTSn1 A1Iu1k19GN4dFT/14ufCPj/4IzkpdHgaUR/YsNNtFK0iCAmxc2/X1PqeIIbQYWfSATUa 5+4DnFOYr4I3HvyCPkeDX5B+7PKB7/c0uCCgJjhG4tYBvSqf9Osh97B0HG+VLC5bXsZX USm1i4mnCq11SO/595NXV7rvycjRm9GllNwKWfvHxr2x+AS2jV6jmsqy/tcSxSWtLka4 eQtzOBIQyxW7rP8SFF3Q6ca/jiMnrWOVnd7zme2E/qXJNkPfWyTxv3wcTx63BLvLKN8q Fiqg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=ewCPw34E; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-48e3ebce1c4sor3795131f8f.5.2026.10.29.02.56.49 for (Google Transport Security); Thu, 29 Oct 2026 02:56:49 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf as permitted sender) client-ip=2a06:5b06:b600:300:2c3:d099:6fb:56cf; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=ewCPw34E; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1793267809; x=1793872609; darn=openvz.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=FjAA5s3FJGNvB+8nwM08FLJU+IsjV4TlC/wjT9TPjGs=; b=ewCPw34EDS7kRuLbWWZucpC1cw5ke+m1uz632MY7BSbGOzF/tJkhhdlaaGXDtngcBb rXbcXVOfNC7eISFb4khl8LoGbFn6S8kllCmug1fr3FZSABBhErFBLHPWh8l2R/wdHHc3 qwu1dBV9BMH5xlgCoxukwQOCAxsXP0J/LdpPjLNxWqhW0oDdLLkZqSQ2GRS13Ir3v2ZM v8cB/qUoxI1myVCM5QH/26/Pxr/97r5ZGcVpKnS2g1tywAceAHPuwljTr+ltcjG+rBzu 1Vsw4/mdP6ropQZ6luQ7xB5vZmkrEZus5Sdzna4HbV9cBK15U5DM75EeBiJevg0FpdQ6 ourw== X-Received: by 2002:a05:6000:20ca:b0:48e:2448:ea23 with SMTP id ffacd0b85a97d-48e5d5b8773mr7492606f8f.55.1793267809002; Thu, 29 Oct 2026 02:56:49 -0700 (PDT) Received: from athena.sw.ru ([2a06:5b06:b600:300:2c3:d099:6fb:56cf]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3ecd3418sm29958312f8f.41.2026.10.29.02.56.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2026 02:56:48 -0700 (PDT) From: "Denis V. Lunev" To: andrey.zhadchenko@virtuozzo.com Date: Thu, 29 Oct 2026 10:56:40 +0100 Message-ID: <20261029095645.4173762-2-den@openvz.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261029095645.4173762-1-den@openvz.org> References: <20261029095645.4173762-1-den@openvz.org> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.0/hci-8.1 1/6] i386/pc: raise the limit of compat arrays per Virtuozzo machine type to four #VSTOR-152264 X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org From: Denis V. Lunev A row of VZ_Q35_MT or VZ_PC_MT can name at most three compat arrays: COUNT_ARGS counts up to three, VZ_COMPATS_EXPAND has variants for zero to three, and __vz_compat_props has three slots per row. No row needs more yet, which is why the limit never showed. The i440fx vz7.16.0 row uses all three (hw_compat_vz_9_1, hw_compat_vz_7_16, pc_vz_7_16_compat), and the next commit adds pc_vz_9_2_compat to it. With a fourth argument COUNT_ARGS returns that argument instead of a count, and the build fails on an undefined VZ_COMPATS_EXPAND_. Raise the limit to four. Signed-off-by: Denis V. Lunev --- hw/i386/pc_piix.c | 2 +- hw/i386/pc_q35.c | 2 +- include/hw/i386/pc.h | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 9a73dcfad4b..1a50c2a645c 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -1087,7 +1087,7 @@ enum { static struct { GlobalProperty *prop; const size_t *len; -} __vz_compat_props[][3] = { +} __vz_compat_props[][4] = { { VZ_COMPATS_EXPAND(hw_compat_vz, pc_vz_compat) }, VZ_PC_MT(AS_ARRAY) }; diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 9bb0c7e1649..2f4a14b4e01 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -1004,7 +1004,7 @@ enum { static struct { GlobalProperty *prop; const size_t *len; -} __vz_compat_props[][3] = { +} __vz_compat_props[][4] = { { VZ_COMPATS_EXPAND(hw_compat_vz, pc_vz_compat) }, VZ_Q35_MT(AS_ARRAY) }; diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 5140c9c1f23..4d8a01528b8 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -428,8 +428,8 @@ extern const size_t pc_vz_7_4_compat_len; /* * Helper macros for defining VZ machine types, both pc and q35 */ -#define _GET_NTH_ARG(_0, _1, _2, _3, N, ...) N -#define COUNT_ARGS(...) _GET_NTH_ARG(__VA_ARGS__, 3, 2, 1, 0) +#define _GET_NTH_ARG(_0, _1, _2, _3, _4, N, ...) N +#define COUNT_ARGS(...) _GET_NTH_ARG(__VA_ARGS__, 4, 3, 2, 1, 0) #define VZ_COMPATS_EXPAND_0() #define VZ_COMPATS_EXPAND_1(prop1) {prop1, &prop1##_len} @@ -437,6 +437,9 @@ extern const size_t pc_vz_7_4_compat_len; {prop1, &prop1##_len}, {prop2, &prop2##_len} #define VZ_COMPATS_EXPAND_3(prop1, prop2, prop3) \ {prop1, &prop1##_len}, {prop2, &prop2##_len}, {prop3, &prop3##_len} +#define VZ_COMPATS_EXPAND_4(prop1, prop2, prop3, prop4) \ + {prop1, &prop1##_len}, {prop2, &prop2##_len}, {prop3, &prop3##_len}, \ + {prop4, &prop4##_len} #define VZ_COMPATS_EXPAND_N(n, ...) VZ_COMPATS_EXPAND_##n(__VA_ARGS__) #define VZ_COMPATS_EXPAND_(n, ...) VZ_COMPATS_EXPAND_N(n, __VA_ARGS__) -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel