From patchwork Fri Feb 9 19:01:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 771329 Delivered-To: patch@linaro.org Received: by 2002:adf:9dca:0:b0:33b:4db1:f5b3 with SMTP id q10csp1016624wre; Fri, 9 Feb 2024 11:01:52 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUaIGG2jc5YvRkh+R6GQ7gwe/0/1PDWAHGM5ugaY8xuUhPltWbY5G8bG+t6Ul9LM0CdsKJqRG66M7DxzQ1drNU3 X-Google-Smtp-Source: AGHT+IFWViaK1R+G2cpFE9uIH1tdSDjWdRiox/KRqwanuWaIMW7lWzo88JVhYaXI8wICSXviMhv+ X-Received: by 2002:a67:e40a:0:b0:46d:5ecf:bc2c with SMTP id d10-20020a67e40a000000b0046d5ecfbc2cmr337816vsf.3.1707505312191; Fri, 09 Feb 2024 11:01:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707505312; cv=none; d=google.com; s=arc-20160816; b=KA8d4Rrazr+lPw1iRAE3YpBBA9NYIO4PNTter9UslowWS1JAeT6eppSrvWZqHmz+7M jsDlyFSxSxeE/KLL6gNx7jV0GWuxtDEqyCA3fdIvY+Cv28Fn3h9SfcppI35AUtbNN8Fd g9xJKYh7hdRA+bbfRxuuJeyvu5st9mSFVsDX/aO/Vm/hfHR3yr7nrslZubR6J7h2Jb1Q YTQMAlzZDa3V+oORXbPKAZARrTyyQoa22pRGqG1y5dqllbycAw4oo5WntbRrOHx8IsYQ M6hJCLnanLy6dUVlFBLEvnvVhkS/NC8ECB3hz4euO4nELyfV9S2ZxckdzfcUjkNQV90/ 9LTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=gHzvEeOz77T7oAbrgDJ/PTgWR9TkPSHHAdSLszapdfk=; fh=+6DxUUWiM0fje7o3yUls+bBkDlb8SXFaJ/su+Av/8yk=; b=jYx05u449GQcGCiA0FgTNIdYXaD/z8bM1h1W+Ba93slX2iY6lD0k9WdzB5ILJnDjCN ot0SzqTsCiWnSbN+Bzbof7EYrKOvpzH250o79tQla0TS7YiW+sRc1bEOjwBUfa7NoCWi /m8WEARNs7HP5O5Ixh7iqgfwcZ3PFyRnENO7qyXx1zaNPTXPqhre4zlsQm+H+aYepjh0 lejnVfN8sft6Zthnzzvz0UndhCxoIWF6hEOEmzZahuvrewYBsqecfwExm4cjk/k4+8ie 7EdNvOyEfT9rCb98aGKyfnJ6Luquwgrqili/u2dJQEQcoOJ/rkIFrUOobXJ3kMab56bl wMnw==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rk01EMPb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCUXdl9CKi+hxc85yuyzuOURCsSkpeEuAsMk9TUcUUrvoAi3dwxPLhBr076z43mGyxMrN7ZYofXZ1tYN5+FEbd40 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ij3-20020a0561025e8300b0046d54715bc3si5107vsb.313.2024.02.09.11.01.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Feb 2024 11:01:52 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rk01EMPb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rYW7h-0003TP-KT; Fri, 09 Feb 2024 14:01:17 -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 1rYW7g-0003Ss-I3 for qemu-devel@nongnu.org; Fri, 09 Feb 2024 14:01:16 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rYW7e-0003CY-Uo for qemu-devel@nongnu.org; Fri, 09 Feb 2024 14:01:16 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-41047386d18so10927175e9.0 for ; Fri, 09 Feb 2024 11:01:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707505273; x=1708110073; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=gHzvEeOz77T7oAbrgDJ/PTgWR9TkPSHHAdSLszapdfk=; b=Rk01EMPbNO8ZaA8Xb6pMknjqOBcf5vp838fcHVmxFlATT0c9xRVpH7V/l+xPEbvODS YMz6/qK00/MfvUGSDfVVusPx97FOc3BzMdYC2M0gG2dkjjqFx7YK6KjSaHZkHvfF5jGs nPaTPWaFjfzB8auiysDwt3fQ6xN/MvBYGBObf+PjvcGfnDiMSPJ0L9OFiisTheOisWw8 tqe7FBUr7mAjYOrS9jlxAOa0K6A+DJEwjpDw7hpUwak2d+zwFeg5J+YHD4KeNfM4z8Kb UgMo/eQEEnbOh1HOU1KcJinEe00jSgNPXjIj6MpNpyR8XLww6bKynM19SpLyk9ptUtsj wTJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707505273; x=1708110073; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gHzvEeOz77T7oAbrgDJ/PTgWR9TkPSHHAdSLszapdfk=; b=E8oG0/+GvZG2hrpCVOOjJNjeVywfdu+ukxl6Si2JHmFmwyFBFhoXyI49aysRuhkluf sMyXE5sUl6wZdFQNnaGrSiCkC1qa37kBFBrsl9MaYg3s3A66ywxE0g1b4XIj1xATCoa4 2Fq2Ta6EyPAj74xEWpD1gdn919im/PEiD3pt7o8ND5pTwRHjS8giQdt59myzRjTyb8r/ T7b9H7f+myRWpnqPFGSlB9mH2EcdBco+obU9lkKb/KIj68AMVMRHlflArgK1th8UHBGc NBPDhziZJDoMd2B/TTMEk9nOTUyR9xlzs757gO6k5EiOieFjKeTAyaWrrqgDcMmT2nXj TJuQ== X-Gm-Message-State: AOJu0Yw5Ea8NdxTmcfp8iwUiNaP6G2QSgmRS8ntNHg6W82O2IWnWfy8S WUg8mo48PMyZxNMLzKluHagOCk4ibtVuCZrBSgHpXX80XbbbUsuw1oPf2WOb/NZPO1EJnib03mi z X-Received: by 2002:a05:600c:5123:b0:410:27e7:4c5 with SMTP id o35-20020a05600c512300b0041027e704c5mr185869wms.29.1707505272988; Fri, 09 Feb 2024 11:01:12 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXm25cy0TzcFOxFbgUXNyIgj196W3OVUSiNWYooHT9UeUSYsh0TGJiKkA/D8U8toVhKnjjMDp5lfgE9Un8ANsVMauxEHJrLYYE92cdI/toQ9htb1udQy5k+Gw2QssQ/BQdKzAYQTUu4Mp9eo6yS7DPuD18y6wlzp/zlM+5kv9slrEVyoe2auNzf0UpV9BgBfpvetUafz/Zxmhv3MI1WZWCyHCZVTI5WN+g8ZxPCd/Th1WaUJhk2eDfRHQ9Ec+5B Received: from m1x-phil.lan ([176.176.147.207]) by smtp.gmail.com with ESMTPSA id n33-20020a05600c502100b004101bdae3a0sm1485711wmr.38.2024.02.09.11.01.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 09 Feb 2024 11:01:12 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Marcel Apfelbaum , Richard Henderson , Eduardo Habkost , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH] hw/i386/kvm/ioapic: Replace magic '24' value by proper definition Date: Fri, 9 Feb 2024 20:01:09 +0100 Message-ID: <20240209190110.27413-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Replace '24' -> KVM_IOAPIC_NUM_PINS. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/kvm/ioapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c index 409d0c8c76..b96fe84eed 100644 --- a/hw/i386/kvm/ioapic.c +++ b/hw/i386/kvm/ioapic.c @@ -35,7 +35,7 @@ void kvm_pc_setup_irq_routing(bool pci_enabled) kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_PIC_SLAVE, i - 8); } if (pci_enabled) { - for (i = 0; i < 24; ++i) { + for (i = 0; i < KVM_IOAPIC_NUM_PINS; ++i) { if (i == 0) { kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_IOAPIC, 2); } else if (i != 2) {