From patchwork Tue Apr 16 18:59:19 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: 789251 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp438662wrb; Tue, 16 Apr 2024 12:02:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU2/nJCBizQVuX0QhZqPxUe9hQsizsaa9Y2ee5zt6nSpMEfs/GLZpEjfjIQxm4ywxvG/GZjHHJtuQ1UzyoV1GwA X-Google-Smtp-Source: AGHT+IFNzfmCIYRXkRthZ4Lc17ZHjnzAKe2eMOpv64uTFbw6a76pNbEEroQ+i2EP3IOYqzPAcJqT X-Received: by 2002:a05:6358:688b:b0:186:2b1e:667c with SMTP id z11-20020a056358688b00b001862b1e667cmr16451530rwh.4.1713294149558; Tue, 16 Apr 2024 12:02:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294149; cv=none; d=google.com; s=arc-20160816; b=b3ktfwngXtXZFmYZgA84H69bQ7g86zTWak2WbkjPIbbjQ8B5rEhSQeO9v0EhsMRQ8o XKpKG+E9YDx+SmwuiH1TBYMNPIbVq8JMMiIA3/tCHarv3R92FWuAAMcRQwldhObXAqIk 3XXd4aPsUjkg84SDxNpYyyWNKU+XXZTT7qHqR/x+Wm770f1vmRpoo/Y8uHxE/swu84FQ lBr0ccWEZILrESTrYeePCHelIaUkz7TYNi1KUkCLDkrYeKWFQlsa2GmJhosRkOWE11M9 pqMdp9PiLLHrxfBgAp4UfYQXP8KXB4yw0twgMP/5JtnnicvrZw+/0Mqh2ejzVb/xjsDG aJnQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=r/B5UTN+VVzZIBHg8vuvzaIXLhoLwQMP7eYF+iW6nSk=; fh=gp8x4TEL4EbNKdvIDh9aTIk1mdHjxl7jHmyUT73tLuI=; b=fRgC5siHqzzidrJ03v3N3luhNgI7m/WJZTO1UvlG/6QqS/iZcKur3EkvzmRVTOji/S k89zyHVqSA5OCAzKrer9g+DBXWMj7E1xEBGwcDNfLJK3tMwSWTbT/nciGKq2NXtKVESA GkfBjIStLY466/mEVD4hVU7nWlbWpiynY0HRpgzDbm4WxIcpTxKLPcq3CrEjcbS0XwV5 xpxITdHK46n3Mk69pdWQO68xTOUjYodpma8HepsFmid0RnxrJpVAkiYxDpFmxTU7LMGD D3Ve+GA9Lt30JF/ErrYupGNyIogMjyflkXf4npWSurB7LOECtShgaJDmUzbHy6syU5Y3 tINQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Jze8/bBA"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bl9-20020a056102508900b00479ee68c8cesi2260452vsb.210.2024.04.16.12.02.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:02:29 -0700 (PDT) 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="Jze8/bBA"; 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 1rwo3L-0001PT-JO; Tue, 16 Apr 2024 15:01:11 -0400 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 1rwo2K-0000sH-Tq for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:00:09 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo2H-0005Ng-Lf for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:00:08 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a450bedffdfso607564966b.3 for ; Tue, 16 Apr 2024 12:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294003; x=1713898803; darn=nongnu.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; bh=r/B5UTN+VVzZIBHg8vuvzaIXLhoLwQMP7eYF+iW6nSk=; b=Jze8/bBAz2nKIkvy50C8jGwBrYzQ9Wd2QPeZdCZutEzvLy8JT2N3p1FbjqsvJR7PIr wzVqS70L2dvbBOMi1ZvzcO0wMObfh5t/f1QPZZkVxL/gadbEfwyK7ljoNmWinOrRc99n 2KIRfe9tT0FTDL2dqfXS8iApq/0m+IOziWW1FKgqgdUw7tGgDoMWT5YJE4pBTKIWZRbn wTv1G88mR89e7rwwiL+lKM1KCSW6TnMXV/KC48L+ILX+z93nU3uAMFUpTQWA4smlYvq8 1WeEJrAWduwZIJQEhNH6Td1IinBDpHS7Tol+JHeYLMwNnwBOG+wBqm0tnuHP63vkiJ3e SZwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294003; x=1713898803; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r/B5UTN+VVzZIBHg8vuvzaIXLhoLwQMP7eYF+iW6nSk=; b=YPou23S67jGhIIzAnjcPxXU8hYekJ6uqBqajtNke7Zb2AtNqwKQ3pAUF8tyQLJMHBG 9oFr4R7E0zl8m1umlELNuRtOf1actcFoJjS84gVe+4ktzEsmYiXNN0f6409TdP/ktHP/ 6MWMR4Lx8nEAL5MJyeSIcaP/iC/VXqd7/4E1FwsWthx5UTm26qlJtHig/7PUqtUiHYAA AIsqAvAeJEvF0RU7U90cxW+aogeLEq8LA2jMvIUZYK3JF4Y9MEIDumvVxcxGshFfW3ok IvzoCvukrIew3A0cg3su6zsiJhyLhCEYavqCZ8zEG2XLtHj5a7hqW6H1jl8uW0Kng5EJ jAUg== X-Gm-Message-State: AOJu0YyyTMYvGecWRa63k/qnBKzpQn7XDzQoLC4J0sqx101LZTBDWkMb wrHNbljmD/IPBQ5kqAkM+2T03UBIWdck/Qq3p6pWRA8W6nfTTGdEZNTFOr2He06awEEKg+N0atu 6 X-Received: by 2002:a17:906:bb17:b0:a51:98df:f664 with SMTP id jz23-20020a170906bb1700b00a5198dff664mr8257297ejb.76.1713294003357; Tue, 16 Apr 2024 12:00:03 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id ne33-20020a1709077ba100b00a51b26ba6c5sm7137906ejc.219.2024.04.16.12.00.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:00:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Gerd Hoffmann Subject: [PATCH v4 03/22] hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag Date: Tue, 16 Apr 2024 20:59:19 +0200 Message-ID: <20240416185939.37984-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=philmd@linaro.org; helo=mail-ej1-x634.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 autolearn=unavailable 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 XHCI_FLAG_FORCE_PCIE_ENDCAP was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify usb_xhci_pci_realize(). Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/usb/hcd-xhci.h | 1 - hw/usb/hcd-xhci-nec.c | 2 -- hw/usb/hcd-xhci-pci.c | 3 +-- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 98f598382a..1efa4858fb 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -37,7 +37,6 @@ typedef struct XHCIEPContext XHCIEPContext; enum xhci_flags { XHCI_FLAG_SS_FIRST = 1, - XHCI_FLAG_FORCE_PCIE_ENDCAP, XHCI_FLAG_ENABLE_STREAMS, }; diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index 328e5bfe7c..5d5b069cf9 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -43,8 +43,6 @@ static Property nec_xhci_properties[] = { DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO), DEFINE_PROP_BIT("superspeed-ports-first", XHCINecState, flags, XHCI_FLAG_SS_FIRST, true), - DEFINE_PROP_BIT("force-pcie-endcap", XHCINecState, flags, - XHCI_FLAG_FORCE_PCIE_ENDCAP, false), DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS), DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c index 4423983308..cbad96f393 100644 --- a/hw/usb/hcd-xhci-pci.c +++ b/hw/usb/hcd-xhci-pci.c @@ -148,8 +148,7 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp) PCI_BASE_ADDRESS_MEM_TYPE_64, &s->xhci.mem); - if (pci_bus_is_express(pci_get_bus(dev)) || - xhci_get_flag(&s->xhci, XHCI_FLAG_FORCE_PCIE_ENDCAP)) { + if (pci_bus_is_express(pci_get_bus(dev))) { ret = pcie_endpoint_cap_init(dev, 0xa0); assert(ret > 0); } From patchwork Tue Apr 16 18:59:20 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: 789244 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp438170wrb; Tue, 16 Apr 2024 12:01:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXoET2hpqTPsdCErKOCYrdu4QBlX86e4EOEe8gQAVshu08ts60uPJtgU5eDI/OzjLTXiLDrxJRS2WdI0rEmgoVf X-Google-Smtp-Source: AGHT+IElu0u2yW5bjI2TGKiJultYVphuGWx7HaIux63brJjuTPjEFV+72Q4oH4eO6lWP4dAQ6RBw X-Received: by 2002:a05:6102:dc6:b0:47b:9c8e:ca4f with SMTP id e6-20020a0561020dc600b0047b9c8eca4fmr2010134vst.8.1713294094336; Tue, 16 Apr 2024 12:01:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294094; cv=none; d=google.com; s=arc-20160816; b=A1+4JydJQ2ZEfGi7bnmbw6GDELEF0lnXkIn8w0Dep94ZvVu+8YefVY4AtedSvpW98S Z5gq6MbFrwNMxkS+gu7ATFS+sav2HeFANRpfFf/uni7zjPuZ8zpwYLikqlwarGhM74Sb 65FP2YGknJMm2JPc0wROdt6vmCVhqRNE7oc87/ybHyir3N2U//8OTJNuzAsDwoBHvX99 KpqV2yam5mmLP32rJeMshdl1wyc7Rfo0O+5bOS5q+Ax0f2/oLexHllAJhwZie4oB9JHO RhA4R3138hTyMS9+5utrLAASVxubrJzIDA8xhCmXLFecx00mzgpDKqo2/1g9qOkQ+Ha+ dXgw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=r03IbH4Q5jukHMDYRNDrIPnxYvDkdnR4utG+Rvdo7L0=; fh=gp8x4TEL4EbNKdvIDh9aTIk1mdHjxl7jHmyUT73tLuI=; b=rE9B1m+pIRX7RpEV6Y+8VBNEoCQYC4IcCaDVKhLZNknyYgW2Nrw3nbn7u3E0j0bA9O bYswYGktIjMn0XM/ykgEmvOOGudS+fHsoo2vQd438x1QMd2+32PkxTbnGUOQZ7Rs1Zx3 LWU+np8LPVy3I76Kzinvg2M6dJ7YKpWPK2LuxQYChNxzDxgw8iLtJUpyRZRA7McFKwHO 4zcqiG1hMuHKiM2RB4HYcV1AQmhss6ajDDblC2SkXqIo1kF599ZrzvmX3Xc5NYjXq7Kr TDlsBCZ+P23h65+3AaKcfc37/vYG2G0EbAPogRlCIdDGOnoHWFvNQhr7lWUJQTg7Pl+8 Zpbw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hLqgxtpE; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id cd6-20020a056102418600b0047a332013c9si2383214vsb.276.2024.04.16.12.01.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:01:34 -0700 (PDT) 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=hLqgxtpE; 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 1rwo39-0001CI-WA; Tue, 16 Apr 2024 15:01:01 -0400 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 1rwo2R-0000to-6B for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:00:15 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo2O-0005Zs-Dy for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:00:14 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5171a529224so6094340e87.0 for ; Tue, 16 Apr 2024 12:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294010; x=1713898810; darn=nongnu.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; bh=r03IbH4Q5jukHMDYRNDrIPnxYvDkdnR4utG+Rvdo7L0=; b=hLqgxtpEB5H4QcbmOK6mXxPG3N0D5AabwrCTq8kBJaeDVVzcw1VaVQmOW31GV3PXOt LtM8t2umMYJ1Ld6mNPxA6qSFpLbf08ZJtiSYmcReQIANih0P5loxPyGoiijrl5JUqung 32McCauMNVBLSKLS+ylf5jVpbavxCL6C1hWbXTcWlHa9VvvUdCOt2aSQuoywGzCrIiVj ygGco1zN89jWwnyDAURbjq8jEOTJlY9qJYxNpOtcc1IZTqwCXH7cW/6l5De9Nrwxo1Wq RcCJz9tYmTpkvvh2ETmN3+UNAsInhenC/nPeLDaylUaFnNj/8iqMveMIkmR3TWqsa43w DD+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294010; x=1713898810; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r03IbH4Q5jukHMDYRNDrIPnxYvDkdnR4utG+Rvdo7L0=; b=TM7x80OzTmfsf77QLETnajuKI3H5sCW7FWRDDR9RAbagv7/3AtrmrzT9y61jlLMrTH +yLEGZdmbp1Zcon0KhIeI79+Aj5FNZSnv1BrR/JGA+keMhVz55HCDC0j2MTchujOl+MR n+tcIlbtXP20KzTg4K6b7KHnZeVmXeix2l9h8R/+WhK8X6iKXoCnIIcMv+QX9lUj33kt DAopxj0PCro2emotRhOHGgqEtGctCXD583ih+4+BW6fH1eiAViDVBsiMyusorTNVESnc 9Satv+lNu+2RYoYPPBTJwLACDc62ADuBlnIBYZQuemOXMXAaHzTOkvV7W1Y99Zpa9+DH GmVw== X-Gm-Message-State: AOJu0YyBt5SQ2rF0eWeZMdEjJkhsaG1BbuCx9ySIf37UXzxbrMznUTx/ Ta5NXUUsEWxT2hK0pnBzmqrG2Lr6EOlAV6/63xF/qakBzaUqRuJBRzf0IxZYGAo4QeAp+hjyzDk W X-Received: by 2002:ac2:5544:0:b0:515:bee6:5e8c with SMTP id l4-20020ac25544000000b00515bee65e8cmr7857295lfk.40.1713294009690; Tue, 16 Apr 2024 12:00:09 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id ae12-20020a17090725cc00b00a529aeb4eccsm2558072ejc.140.2024.04.16.12.00.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:00:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Gerd Hoffmann Subject: [PATCH v4 04/22] hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag Date: Tue, 16 Apr 2024 20:59:20 +0200 Message-ID: <20240416185939.37984-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=philmd@linaro.org; helo=mail-lf1-x131.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 autolearn=unavailable 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 XHCI_FLAG_SS_FIRST was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify various functions in hcd-xhci.c. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/usb/hcd-xhci.h | 3 +-- hw/usb/hcd-xhci-nec.c | 2 -- hw/usb/hcd-xhci-pci.c | 1 - hw/usb/hcd-xhci.c | 42 ++++++++---------------------------------- 4 files changed, 9 insertions(+), 39 deletions(-) diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 1efa4858fb..fe16d7ad05 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -36,8 +36,7 @@ typedef struct XHCIStreamContext XHCIStreamContext; typedef struct XHCIEPContext XHCIEPContext; enum xhci_flags { - XHCI_FLAG_SS_FIRST = 1, - XHCI_FLAG_ENABLE_STREAMS, + XHCI_FLAG_ENABLE_STREAMS = 1, }; typedef enum TRBType { diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index 5d5b069cf9..0c063b3697 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -41,8 +41,6 @@ struct XHCINecState { static Property nec_xhci_properties[] = { DEFINE_PROP_ON_OFF_AUTO("msi", XHCIPciState, msi, ON_OFF_AUTO_AUTO), DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO), - DEFINE_PROP_BIT("superspeed-ports-first", XHCINecState, flags, - XHCI_FLAG_SS_FIRST, true), DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS), DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c index cbad96f393..264d7ebb77 100644 --- a/hw/usb/hcd-xhci-pci.c +++ b/hw/usb/hcd-xhci-pci.c @@ -242,7 +242,6 @@ static void qemu_xhci_instance_init(Object *obj) s->msix = ON_OFF_AUTO_AUTO; xhci->numintrs = XHCI_MAXINTRS; xhci->numslots = XHCI_MAXSLOTS; - xhci_set_flag(xhci, XHCI_FLAG_SS_FIRST); } static const TypeInfo qemu_xhci_info = { diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index ad40232eb6..b6411f0bda 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -541,18 +541,10 @@ static XHCIPort *xhci_lookup_port(XHCIState *xhci, struct USBPort *uport) case USB_SPEED_LOW: case USB_SPEED_FULL: case USB_SPEED_HIGH: - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - index = uport->index + xhci->numports_3; - } else { - index = uport->index; - } + index = uport->index + xhci->numports_3; break; case USB_SPEED_SUPER: - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - index = uport->index; - } else { - index = uport->index + xhci->numports_2; - } + index = uport->index; break; default: return NULL; @@ -2779,11 +2771,7 @@ static uint64_t xhci_cap_read(void *ptr, hwaddr reg, unsigned size) ret = 0x20425355; /* "USB " */ break; case 0x28: /* Supported Protocol:08 */ - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - ret = (xhci->numports_2<<8) | (xhci->numports_3+1); - } else { - ret = (xhci->numports_2<<8) | 1; - } + ret = (xhci->numports_2 << 8) | (xhci->numports_3 + 1); break; case 0x2c: /* Supported Protocol:0c */ ret = 0x00000000; /* reserved */ @@ -2795,11 +2783,7 @@ static uint64_t xhci_cap_read(void *ptr, hwaddr reg, unsigned size) ret = 0x20425355; /* "USB " */ break; case 0x38: /* Supported Protocol:08 */ - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - ret = (xhci->numports_3<<8) | 1; - } else { - ret = (xhci->numports_3<<8) | (xhci->numports_2+1); - } + ret = (xhci->numports_3 << 8) | 1; break; case 0x3c: /* Supported Protocol:0c */ ret = 0x00000000; /* reserved */ @@ -3349,13 +3333,8 @@ static void usb_xhci_init(XHCIState *xhci) for (i = 0; i < usbports; i++) { speedmask = 0; if (i < xhci->numports_2) { - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - port = &xhci->ports[i + xhci->numports_3]; - port->portnr = i + 1 + xhci->numports_3; - } else { - port = &xhci->ports[i]; - port->portnr = i + 1; - } + port = &xhci->ports[i + xhci->numports_3]; + port->portnr = i + 1 + xhci->numports_3; port->uport = &xhci->uports[i]; port->speedmask = USB_SPEED_MASK_LOW | @@ -3366,13 +3345,8 @@ static void usb_xhci_init(XHCIState *xhci) speedmask |= port->speedmask; } if (i < xhci->numports_3) { - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - port = &xhci->ports[i]; - port->portnr = i + 1; - } else { - port = &xhci->ports[i + xhci->numports_2]; - port->portnr = i + 1 + xhci->numports_2; - } + port = &xhci->ports[i]; + port->portnr = i + 1; port->uport = &xhci->uports[i]; port->speedmask = USB_SPEED_MASK_SUPER; assert(i < XHCI_MAXPORTS); From patchwork Tue Apr 16 18:59:21 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: 789253 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp438796wrb; Tue, 16 Apr 2024 12:02:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCViKmWiv7rBIdNbfY7qnOXxSrIQtl+817Xa5X1bdb8EA6KYP2DzHQ0AL6+SKiI3UnsqSHILF+UQOZfBPQVmWnoX X-Google-Smtp-Source: AGHT+IGNCum1pOKnMdutk0jSRZ9YaxSxHRQLla/BhUUzxClrBrQcQknDx/McQ1eWHrr0B7algi1V X-Received: by 2002:ac8:7f81:0:b0:436:da73:2000 with SMTP id z1-20020ac87f81000000b00436da732000mr11424614qtj.15.1713294163698; Tue, 16 Apr 2024 12:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294163; cv=none; d=google.com; s=arc-20160816; b=BuTquQBoK99qTMHUnTtP7lqvzhk1Z6LSvCraI0DefzorS7pt1h0hqrRGecepGyufCs 5KWmVn2uRsHVBRGZ0pkV2N2wI6T46tNyrnWZZ11kWSn1brjBA8rKySmsumBe3ZXIX7qr eOBICi3D57QjrQVyoMKUilvSvBdLHGkb+Q38n/0A2opOv12EyWxDNGoREjnQ1/6a0K0a OzKQK2M4GWB6+RwxoxO0+If6A2m0oNCVTGUGimImByoKob5zalEfAQ3BYeZ1TDAlLsSB DNqcpP5dyopMXuTR3n3Yy4VimqL6j7Vpe0P0skMcOqCcC9aWUKtwdyD3f9JT/3gdRi4U hFDg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GbDbMJ6uZWpUFLveYfiSh5ZQucMurGHlFI0AhTW7f68=; fh=Lu0jXLxyFlTARbcPDePzrtKRnEqG4EpbZSrftixFLk4=; b=dtQ0P3z2GfZ+5e74OZFF/VAxUNRh0GDtC/Iwe+FJjkEw0HZfm8UviII5JThb9VZQ4m K26WGdeAYfZE8CzxQCtTyuf3NAhWS1ocP9LWmNyha1Qi0NGae6GOwlyksbYAVOJS+HX/ EGsQg1M6uS1YovT8T+QoPqg0Gpl1R1AamBKcgDhogjTXqs7cbJk2YI9ABNgMIUKvSDTD CoGXY9mRYVIUQPtzo8pB2GSDFIVBA1jms+gO+J6Wn4+1gomcxOwi+g9VyKiqaTLl99cn +qD+7Gt0HVlEm/4/21j1KTOrDhnqierMG1OlfaHNUBMVYwDO5VkcISy88YeyN7t1JZmf 5+PA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GLPJVLYc; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y12-20020ac85f4c000000b0043766447272si113801qta.541.2024.04.16.12.02.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:02:43 -0700 (PDT) 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=GLPJVLYc; 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 1rwo3M-0001SN-3g; Tue, 16 Apr 2024 15:01:12 -0400 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 1rwo2a-0000y2-CP for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:00:31 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo2W-0005cF-DA for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:00:23 -0400 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-518a56cdbcfso5569511e87.2 for ; Tue, 16 Apr 2024 12:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294016; x=1713898816; darn=nongnu.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; bh=GbDbMJ6uZWpUFLveYfiSh5ZQucMurGHlFI0AhTW7f68=; b=GLPJVLYc3grGvO7F4ZiW+6kXtaX3d6i+mxVgMxBBp4u6dlUGj2xJEzt40tXXLHSqix O4qw4qWoUMkSN4hwgMn92A/asmle31wH8bQExDeNHz0eLbHovBOzcniwVL9JXxHaHnvP /GpxSfNBlmLT1WQqVFcFErOyJ8ICMN4npj/hSJdG5alnhIEVZMhxlGnGtvkvvcNrw646 qnUz7E4Wt4tzjYaJFuQKgpskgbfaQ0msz2tvgrd+FZ6hlwqr82Kfxc8Wmv4iIV3icTAk bRw0ZsBE+6o7V0rcWiWgbhQ7NhYAT041YUWS94gZKU2F1zslFsBlf0BjzMUVnNcn9bRQ Mjvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294016; x=1713898816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GbDbMJ6uZWpUFLveYfiSh5ZQucMurGHlFI0AhTW7f68=; b=Sh+y6ZQ7vyyppJlBZvJOLURR740cNYQ5hsYyo7hAVop0oKKNowoGKboXMpJ6YzT39N fDElS5UNjsfYt9VqHTnoFgt7YgZMCv0CeABs6X1Q2a/UXANJ0t11JVjSC2woYgf/rI8X 4wm7Nb7LoMUx0EHsUPcYqo9hkG00W8FxyZS2lupIc0B5eqXLiHCIHZu2P830ahKuW6UO K84j5GKL1LCW4fZYSQ8+d5L3smrsSvdkcKer5b0VSk6rJIfCK/d4ZigL5trgb4n1Z51R yRfg7msyPORLj/MnVN5oplkp6XwTUXgMsv3+q+ceHSKIuj9ecAX3Fnn576ze8DP2O9gV wFKQ== X-Gm-Message-State: AOJu0Yzh8oW3ROKGOTy3vdeYCS+3jR2aV9HIq3vO+AgWXaRtRv2qMDDo zqk0Z/9NT0vZFHiFRwTSr47ZkAph4GRtfuF0rFR8pIsm1Wdese//PQB18/AJSaTNnhmd/oc1MkB I X-Received: by 2002:a05:651c:1255:b0:2d4:5c03:5ccb with SMTP id h21-20020a05651c125500b002d45c035ccbmr11347972ljh.10.1713294016250; Tue, 16 Apr 2024 12:00:16 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id v13-20020a17090606cd00b00a526562de1fsm3470219ejb.73.2024.04.16.12.00.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:00:15 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Ani Sinha , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH v4 05/22] hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size Date: Tue, 16 Apr 2024 20:59:21 +0200 Message-ID: <20240416185939.37984-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=philmd@linaro.org; helo=mail-lf1-x12f.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 autolearn=unavailable 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 PCMachineClass::legacy_acpi_table_size was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify acpi_build(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 1 - hw/i386/acpi-build.c | 62 +++++++++----------------------------------- 2 files changed, 12 insertions(+), 51 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 67856f54c3..4ad724601a 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -103,7 +103,6 @@ struct PCMachineClass { /* ACPI compat: */ bool has_acpi_build; bool rsdp_in_ram; - int legacy_acpi_table_size; unsigned acpi_data_size; int pci_root_uid; diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 53f804ac16..a6f8203460 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2499,13 +2499,12 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) X86MachineState *x86ms = X86_MACHINE(machine); DeviceState *iommu = pcms->iommu; GArray *table_offsets; - unsigned facs, dsdt, rsdt, fadt; + unsigned facs, dsdt, rsdt; AcpiPmInfo pm; AcpiMiscInfo misc; AcpiMcfgInfo mcfg; Range pci_hole = {}, pci_hole64 = {}; uint8_t *u; - size_t aml_len = 0; GArray *tables_blob = tables->table_data; AcpiSlicOem slic_oem = { .id = NULL, .table_id = NULL }; Object *vmgenid_dev; @@ -2551,19 +2550,12 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) build_dsdt(tables_blob, tables->linker, &pm, &misc, &pci_hole, &pci_hole64, machine); - /* Count the size of the DSDT and SSDT, we will need it for legacy - * sizing of ACPI tables. - */ - aml_len += tables_blob->len - dsdt; - /* ACPI tables pointed to by RSDT */ - fadt = tables_blob->len; acpi_add_table(table_offsets, tables_blob); pm.fadt.facs_tbl_offset = &facs; pm.fadt.dsdt_tbl_offset = &dsdt; pm.fadt.xdsdt_tbl_offset = &dsdt; build_fadt(tables_blob, tables->linker, &pm.fadt, oem_id, oem_table_id); - aml_len += tables_blob->len - fadt; acpi_add_table(table_offsets, tables_blob); acpi_build_madt(tables_blob, tables->linker, x86ms, @@ -2694,49 +2686,19 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) * too simple to be enough. 4k turned out to be too small an * alignment very soon, and in fact it is almost impossible to * keep the table size stable for all (max_cpus, max_memory_slots) - * combinations. So the table size is always 64k for pc-i440fx-2.1 - * and we give an error if the table grows beyond that limit. - * - * We still have the problem of migrating from "-M pc-i440fx-2.0". For - * that, we exploit the fact that QEMU 2.1 generates _smaller_ tables - * than 2.0 and we can always pad the smaller tables with zeros. We can - * then use the exact size of the 2.0 tables. - * - * All this is for PIIX4, since QEMU 2.0 didn't support Q35 migration. + * combinations. */ - if (pcmc->legacy_acpi_table_size) { - /* Subtracting aml_len gives the size of fixed tables. Then add the - * size of the PIIX4 DSDT/SSDT in QEMU 2.0. - */ - int legacy_aml_len = - pcmc->legacy_acpi_table_size + - ACPI_BUILD_LEGACY_CPU_AML_SIZE * x86ms->apic_id_limit; - int legacy_table_size = - ROUND_UP(tables_blob->len - aml_len + legacy_aml_len, - ACPI_BUILD_ALIGN_SIZE); - if ((tables_blob->len > legacy_table_size) && - !pcmc->resizable_acpi_blob) { - /* Should happen only with PCI bridges and -M pc-i440fx-2.0. */ - warn_report("ACPI table size %u exceeds %d bytes," - " migration may not work", - tables_blob->len, legacy_table_size); - error_printf("Try removing CPUs, NUMA nodes, memory slots" - " or PCI bridges.\n"); - } - g_array_set_size(tables_blob, legacy_table_size); - } else { - /* Make sure we have a buffer in case we need to resize the tables. */ - if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) && - !pcmc->resizable_acpi_blob) { - /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ - warn_report("ACPI table size %u exceeds %d bytes," - " migration may not work", - tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); - error_printf("Try removing CPUs, NUMA nodes, memory slots" - " or PCI bridges.\n"); - } - acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); + /* Make sure we have a buffer in case we need to resize the tables. */ + if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) && + !pcmc->resizable_acpi_blob) { + /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ + warn_report("ACPI table size %u exceeds %d bytes," + " migration may not work", + tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); + error_printf("Try removing CPUs, NUMA nodes, memory slots" + " or PCI bridges.\n"); } + acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); acpi_align_size(tables->linker->cmd_blob, ACPI_BUILD_ALIGN_SIZE); From patchwork Tue Apr 16 18:59:22 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: 789250 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp438643wrb; Tue, 16 Apr 2024 12:02:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXIORy72tM1IQ7Wk8PYsUXwsxoG3/yfbCPK6llkn6iOVubQsYQRlhzfKeVcQ+MVB3jDuWuSf0UClqt+CeZCwV0g X-Google-Smtp-Source: AGHT+IHJJNzYRkELka6ozysZOhZnLn2fFnLitn8D8fSbwDzJQVtgchPIo82hyUm0wIZil1S9Om77 X-Received: by 2002:a05:6102:b0e:b0:47b:9d4e:e0c with SMTP id b14-20020a0561020b0e00b0047b9d4e0e0cmr2214036vst.12.1713294148600; Tue, 16 Apr 2024 12:02:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294148; cv=none; d=google.com; s=arc-20160816; b=GG5n44yonuPnSwortFS53REbVbb/BczmD+7N/6TUfPOUPNAjnvStGv3ygoEHmjaDPj uo8Rpub5kIkrC890H6aT6f8QBoaMRpLIBXR4/O8iDWt7t+8LMar1BkU2ikP8CYov31U9 BqtfCQRCA0eW9mQZ0c9Vib57QV8d3acPMqReGKXPSLOd4HM4kDlM2g4mYduO6ZDG7fZh jRr3HrMkndyBqDebTCU5gKjS9rArNDSEI6aqhQogIY+mIqhKO02E2X2nBIWM6IB9wYmT AZK75LXAF0fXpkFWTStdSodSPsZXyCQ2d3/OfkLEhEuR0zSOXUOlkODMXmXIIQNDtE/Z VO5Q== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cesSegXMr71Lpaal5FJBOqynS/3X0jmvbPzoIKbt5l0=; fh=LNVPEEsTDnbvEwXK95LQoj5/9SExySGt37Ma5WZFAOA=; b=XLsMd+fkfE0L26OivZMiusu5+AS6MrGfZdlQBLSPi1TAJXiRhEMZ07/ROmWlPPRckB l6HudtqKRntEGxLOM6bOkTsuy/u1t6hXloffODUa5lZwgy6esfRJS2/TfeTHpiv8p8h7 FqzqNvhqWEeA1qlDq4LfGWfUcV7CkEhm9DyR2CHB3c9WjzP+0XZSlzO8zY7xc3qi35NO aZGyl1BXzDqS/oHXs66amVWRZBlXjHtsCLQjLHGMP+XRGKkRniv59oe8vN7lzf0q3kOQ quhsEML2WY87p/sMV5UoBF4V/T+n683dVaxvijpeGpMmRmgTwtJ04Jmj+v4YxgaO39M0 mSsA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DqLoAIsm; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id if7-20020a0561022c8700b0047b875f02d0si1012318vsb.248.2024.04.16.12.02.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:02:28 -0700 (PDT) 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=DqLoAIsm; 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 1rwo3N-0001VP-0o; Tue, 16 Apr 2024 15:01:13 -0400 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 1rwo2e-0000yo-7G for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:00:32 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo2a-0005dG-BJ for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:00:26 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a5224dfa9adso14291366b.0 for ; Tue, 16 Apr 2024 12:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294022; x=1713898822; darn=nongnu.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; bh=cesSegXMr71Lpaal5FJBOqynS/3X0jmvbPzoIKbt5l0=; b=DqLoAIsma2JFVv5BRASUhNqanaclwMJ6WPOEf+f2GuKRJOnfJQUbPI6TLm84MSUg0K +eBgLa2FDDzeCoR3ne2rN7gmKxKzQDQn2UpHfxCspzJCO1RhpOxrZm3WIaJdGGO+Ir7w SJrH4gx6dNmDyn45pRcaWp8K3D5ydvwqbT5E3P6zHQ45/6IKJ3HKi+PaNzPGd0UQ25Mn aiTXaiErQ6pXCy/16szjHw9eWOUSmUnjk/TmfDbi5Uvol6CAmENUL0t3QAMB0hz/iEfb mxj6OdCuFCMKOTxJVJV+hwaqSqCaOzNq3J2/f3nDtT+lnhtRiwXVOcDKq355D2I9OYNo IDSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294022; x=1713898822; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cesSegXMr71Lpaal5FJBOqynS/3X0jmvbPzoIKbt5l0=; b=a2K/eScw+i14HTcgPveG8pNEM9C/X8jAZn5P0iukClU0DI0ZL2HrsZlEvsJ2LrXs1D pfgqYTf5VnhRL4NBZNO4Zo+1DFvdgOm19JBErzX6Coq2eXHp3xOvyIsQUIWUL8CTcGKs u/FQp3GwIjX+Qmp0l2O0xDFegLfnOvY/A7b5x7OqfFCZwGDolC38zmhrGuPgHfAnfj72 xRBpkUJ87JOtHs6ORvF1giEOqPBk2TP5KLeoAi6G86/oaj2kcYn41zDbh6WySvQOgfeR 4kDaqlbD5xZ6RKEY08WDj9DLQgmEC6HG86aZZm3M7XyoRfMPkMzilWMmeEME2K8H8jsm l3ng== X-Gm-Message-State: AOJu0YwF2DD2nkptUKWRdtC/0v0ExfmdPjmptIHOpMBP2oIQUslYFW5v CQerQFx/BKNaL9yS0vLmpUrbZrXV2VwZtPGe4phtSl/gzPYF8pjPh8zTf8Kr/ISmCyIN1F1pVNM P X-Received: by 2002:a17:906:cec8:b0:a51:ee80:bae9 with SMTP id si8-20020a170906cec800b00a51ee80bae9mr3007893ejb.17.1713294022679; Tue, 16 Apr 2024 12:00:22 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id d3-20020a170906640300b00a4e379ac57fsm7099907ejm.30.2024.04.16.12.00.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:00:22 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Marcel Apfelbaum , Ani Sinha Subject: [PATCH v4 06/22] hw/acpi/ich9: Remove 'memory-hotplug-support' property Date: Tue, 16 Apr 2024 20:59:22 +0200 Message-ID: <20240416185939.37984-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.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 autolearn=unavailable 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 No external code sets the 'memory-hotplug-support' property, remove it. Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/acpi/ich9.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 573d032e8e..9b605af21a 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -351,21 +351,6 @@ static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name, visit_type_uint32(v, name, &value, errp); } -static bool ich9_pm_get_memory_hotplug_support(Object *obj, Error **errp) -{ - ICH9LPCState *s = ICH9_LPC_DEVICE(obj); - - return s->pm.acpi_memory_hotplug.is_enabled; -} - -static void ich9_pm_set_memory_hotplug_support(Object *obj, bool value, - Error **errp) -{ - ICH9LPCState *s = ICH9_LPC_DEVICE(obj); - - s->pm.acpi_memory_hotplug.is_enabled = value; -} - static bool ich9_pm_get_cpu_hotplug_legacy(Object *obj, Error **errp) { ICH9LPCState *s = ICH9_LPC_DEVICE(obj); @@ -445,9 +430,6 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm) NULL, NULL, pm); object_property_add_uint32_ptr(obj, ACPI_PM_PROP_GPE0_BLK_LEN, &gpe0_len, OBJ_PROP_FLAG_READ); - object_property_add_bool(obj, "memory-hotplug-support", - ich9_pm_get_memory_hotplug_support, - ich9_pm_set_memory_hotplug_support); object_property_add_bool(obj, "cpu-hotplug-legacy", ich9_pm_get_cpu_hotplug_legacy, ich9_pm_set_cpu_hotplug_legacy); From patchwork Tue Apr 16 18:59:23 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: 789260 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp440086wrb; Tue, 16 Apr 2024 12:04:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUxZG3cXQJngTPheRtaaIG0IJWob0AwYzyXOrGjxQUB3c2xMxgccKzQ3uGrB9UVuE4cSLnBtYrQEf6nGjTpV3tG X-Google-Smtp-Source: AGHT+IErLKRIM4oN95hXgNvaDGa/mTN3DFrM+K2hfTcbjqWPuYBTx68KX18Ni+Q2dGsY/MLCp399 X-Received: by 2002:ac8:7f0c:0:b0:434:c1da:5c17 with SMTP id f12-20020ac87f0c000000b00434c1da5c17mr16149523qtk.8.1713294294219; Tue, 16 Apr 2024 12:04:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294294; cv=none; d=google.com; s=arc-20160816; b=Z3G4uhsgeKKC7Ruq7fUvIccP0lXxMeEncYIXmeyB0J91hiYFPMbkuHd233nnG1h2kj 7gJO5YMpo/IcmIMPnjGOf16R7uPHRMHqSlyOxzR3SFWr2pV/L1JgA2JllMRJXhDWaIgk LSWTzNwcvSUh5hBfGLnZzZVmmDD3hdxwTAz/ZjMyNvZ4wW6GNdYp3E0m7s3adrcZH3zi mTe8f4FFDh+AOywrhmp+l/36cyWp42e0QdjX+1IMDqbQYpAow0sQA4/CZBDNKC2zOyTo /lMC3as44p/u7AiR9k6xmO3ZJvtvNAmQkYt3NDlLvKhvTarGKrenupTbnWUs+uy5bsi0 SUdw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aDu2aZ9r50YKxf+dNaxDqKUjAn6DYpDYAzbmilk8iWY=; fh=LNVPEEsTDnbvEwXK95LQoj5/9SExySGt37Ma5WZFAOA=; b=ruKCEucUNma4RfY8LYoGZpnCznB7Vxy4bFiG6FKw6Pukx7G4+ZRei5c/3ekffSVnLm KQfEMapKKTrK0Oz8t11KCXK/tumOJPaYF/ISCZXm2gDojcwXwj2hFbd3VlnBJtTPMmyw /jH68t0DihLbbz65v7E8fFkjElMjLJ/OnSO6laee9Trbk5KuGC2wpSct9dD6jNa/Dkwf ilgiA5c/+2X9oJUWDJqT5zdOmxJTUaJ7QFfsi5U7KG4hYXkNpPVRUOu0WEi1bTqyUT0k EoadsfeOIac/mf9NBNCnNH8EgYmYRKBkl+M+lJB5Ze6UnuHLKl8hBzVwepsdBDD4QBv8 ryng==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m5i35H+m; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n8-20020a05622a040800b00434ea5fa3b7si12757681qtx.149.2024.04.16.12.04.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:04:54 -0700 (PDT) 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=m5i35H+m; 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 1rwo3N-0001Wq-In; Tue, 16 Apr 2024 15:01:13 -0400 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 1rwo32-00019D-2C for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:00:54 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo2h-0005eg-NI for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:00:48 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a450bedffdfso607604466b.3 for ; Tue, 16 Apr 2024 12:00:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294029; x=1713898829; darn=nongnu.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; bh=aDu2aZ9r50YKxf+dNaxDqKUjAn6DYpDYAzbmilk8iWY=; b=m5i35H+mtunEze2FUlynMSiXOwtwgt1mn7mHer+VSwXqBikJHdoDa6P3SngIb8pHJD EAKHGlqhYfinaCTT4wxgHGCOUhiedu/NmTasBFwnDm7Mr7CCIvdxKziWChbPX0uSHJqZ AhDUK3L6268Mr2AUDpwJuLSa9XaZjKlJNvPgAMpQ+7jqoJipTXL2bzNVaWImzkSwylKQ 7Tud2/+2FT3lVVRnkPGeUawX8CbKHHVpL6CtMDW2adGUJXd4UT0SBJD+COeIFVVJSU26 M6x6qBlh38p27F6KI1NNFfarqVlzDnm8pCH7dNOh38Ggs6kDbU7Z2d3HIJk88nmXw83P AjJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294029; x=1713898829; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aDu2aZ9r50YKxf+dNaxDqKUjAn6DYpDYAzbmilk8iWY=; b=p779rd2YUbm4EBIASOosi8Fr9Npzmec4Khnzd92x1fNLABv6LSGjYdTNVkq4sDLsGu QWUNAI7A62Oi7kWD0oMvD72nwqp5gVI/VNcjCE+TUzlefXQG+u5yTo1qOa4mc3jBbxS7 P85e/kdC+f8/HMAgY5oGUWAxDR6OCguAB8aRerLEZKxPeDTBwRkgWTqxuA7PhucoWmfU M0cu4ph4SHkQxO894+AJQELzKse4fiz6lCVzE7JfzbKCPuw5lqXgj5s2O/DZVPXHIDmI 9efFSpCwNGN+fXvXU34ro3qyY4ZXggF5pkSLQuVCpQ5hxgGS/vzjEUFlU5C2jqsOSN51 QvFg== X-Gm-Message-State: AOJu0Yxha+yNIyg3T0jlBs1tE12ekFoMGZ0JC4fHYqU3bqaxoGptvhWV D043vTPlVIkwoMxirhhM6Rx+Lyhio0Y2/ttPMry8sJxQpsiZZlXY8oeeOJP6bxvRShT8xwug6N9 L X-Received: by 2002:a17:907:1b1d:b0:a52:2b39:879b with SMTP id mp29-20020a1709071b1d00b00a522b39879bmr10404824ejc.46.1713294029119; Tue, 16 Apr 2024 12:00:29 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id em3-20020a170907288300b00a5180d5b31asm7161409ejc.32.2024.04.16.12.00.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:00:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Marcel Apfelbaum , Ani Sinha Subject: [PATCH v4 07/22] hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug' Date: Tue, 16 Apr 2024 20:59:23 +0200 Message-ID: <20240416185939.37984-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=philmd@linaro.org; helo=mail-ej1-x636.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 autolearn=unavailable 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 acpi_memory_hotplug::is_enabled is set to %true once via ich9_lpc_initfn() -> ich9_pm_add_properties(). No need to check it, so remove now dead code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/acpi/ich9.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 9b605af21a..02d8546bd3 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -153,17 +153,10 @@ static int ich9_pm_post_load(void *opaque, int version_id) .offset = vmstate_offset_pointer(_state, _field, uint8_t), \ } -static bool vmstate_test_use_memhp(void *opaque) -{ - ICH9LPCPMRegs *s = opaque; - return s->acpi_memory_hotplug.is_enabled; -} - static const VMStateDescription vmstate_memhp_state = { .name = "ich9_pm/memhp", .version_id = 1, .minimum_version_id = 1, - .needed = vmstate_test_use_memhp, .fields = (const VMStateField[]) { VMSTATE_MEMORY_HOTPLUG(acpi_memory_hotplug, ICH9LPCPMRegs), VMSTATE_END_OF_LIST() @@ -335,11 +328,9 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, qemu_irq sci_irq) legacy_acpi_cpu_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci), &pm->gpe_cpu, ICH9_CPU_HOTPLUG_IO_BASE); - if (pm->acpi_memory_hotplug.is_enabled) { - acpi_memory_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci), - &pm->acpi_memory_hotplug, - ACPI_MEMORY_HOTPLUG_BASE); - } + acpi_memory_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci), + &pm->acpi_memory_hotplug, + ACPI_MEMORY_HOTPLUG_BASE); } static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name, @@ -460,12 +451,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM) && - !lpc->pm.acpi_memory_hotplug.is_enabled) { - error_setg(errp, - "memory hotplug is not enabled: %s.memory-hotplug-support " - "is not set", object_get_typename(OBJECT(lpc))); - } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) { + if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) { uint64_t negotiated = lpc->smi_negotiated_features; if (negotiated & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT) && @@ -509,8 +495,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev, { ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev); - if (lpc->pm.acpi_memory_hotplug.is_enabled && - object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { + if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { acpi_memory_unplug_request_cb(hotplug_dev, &lpc->pm.acpi_memory_hotplug, dev, errp); @@ -545,8 +530,7 @@ void ich9_pm_device_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, { ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev); - if (lpc->pm.acpi_memory_hotplug.is_enabled && - object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { + if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { acpi_memory_unplug_cb(&lpc->pm.acpi_memory_hotplug, dev, errp); } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU) && !lpc->pm.cpu_hotplug_legacy) { From patchwork Tue Apr 16 18:59:25 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: 789261 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp440382wrb; Tue, 16 Apr 2024 12:05:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUm7OpvaRFeHfAsaZG+39irfDn85Oi4jFC3IGN2JWPHD1rkfAWbcy6NG8kxxj2Nac0BTfgFPhMQIZasADq/It/e X-Google-Smtp-Source: AGHT+IH6EF3fLMo5WuTi+xsGaTiwLNfEb8XPkxKWo1IeS/ev1TbuPoxdiiHD6LNk+knjpiL+tr58 X-Received: by 2002:a05:6359:2193:b0:186:18a7:6b01 with SMTP id lr19-20020a056359219300b0018618a76b01mr15762956rwb.23.1713294328857; Tue, 16 Apr 2024 12:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294328; cv=none; d=google.com; s=arc-20160816; b=AZGnjHeV+W+vwAXat82uWRxYrO0tCMrhDwGx4Zrxd2ToCqoy+AprgRErTaok48sleo CGUaxtmdQ+TbXEpT9oXWVsthoEPx4oKfL3DAR9JA04fGd3HdWe06Hq67DDtwgDEtwu3C 3RzLJRR7gSc+mdtTbkEBQM6XaxqamupNuZDUhazkU9gRJaITcCETbOEIqh26633er98I Tv/tXLaXnQjYEyWNDm/SWmyvO1Hpye0Fm+dB4lND8JjfexReEKfGFHC8ztq5llrEMO2b Yjj2Z9extcZd80A+SD4fgbLD1pLckhNczU9vroWd82KHDDvbyRr386eRuS/mamteUjll vUxQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XQMVapEs3CYgmDweUYusfpnz/y/x604jp5xhdw8yVc4=; fh=cQusuDe0NwnVa0lqDP4K3TS7P79nva3vadgtcy3608E=; b=TaT0A2Ujr72hkt8YfaQrGoBrqzmnDz38mliF0RwGS5coLGsEBW6p97Wme9SNNczDwA 3q+Wdq+Xg11Drc5zfRFs+xu9ZgYzhWWgLgfgyH7QQjoH3GGH6VKNaNkQo8e4Twdd+mvl EEDUCTHvM2tRcX7ft9tWrIE4yk3WektWWe47L0kv+cGIhJcoioYyXp63oPjgAsyiu7H/ 95MQ6BZ2bBiAxyngYsMT3OJxOP42YAa4y19VmvLscFVNYgR2Ujrm8IEF2vQeO5SBFWR6 B+usg30peTpuK7AhmyPXCtCeNlQ2/FhgvCsbIuhsNy67tIjJGzxxkoNinmANPZoDn8BK AtAA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="acK2nH/i"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a3-20020ab05683000000b007e31a34c857si1970797uab.65.2024.04.16.12.05.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:05:28 -0700 (PDT) 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="acK2nH/i"; 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 1rwo3Q-0001eh-3a; Tue, 16 Apr 2024 15:01:16 -0400 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 1rwo3A-0001EL-Am for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:01 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo35-0005fO-2o for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:00 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-346b09d474dso4528654f8f.2 for ; Tue, 16 Apr 2024 12:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294042; x=1713898842; darn=nongnu.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; bh=XQMVapEs3CYgmDweUYusfpnz/y/x604jp5xhdw8yVc4=; b=acK2nH/iOAcLpljIsEsiOJUMdpm61hJPryla2KMCSgsXLML1h3/OqFn383FOjvuN9B kb84VAIS6HukP4bLC75U7moyVGmR9k4Y5OApDsD6iMHBPlWJMjobbSI4Jyb9T7SifMLt 5xA329nfZvrmQ7GYGbDgodBIBZXtJJGa0yQJLmnZm49aWk6TDf1p9QAmcu9RflzPlWp8 A4MNT1NIW0L8ugPCkWWgr7JVkr3wdIj4TaohP4OnpU3qMmUCfpYDF5C5xdjpP0lU3SR5 gayCS4DgOAuwohkys6j8jEqAoaM0YKQNDy1ZWbyH6lN5RcHH083R84qiOtMZjYN+1J7w ucfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294042; x=1713898842; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XQMVapEs3CYgmDweUYusfpnz/y/x604jp5xhdw8yVc4=; b=E9b7VdeaWvZNJZWysjhezykLwh2hgslnHKqxH3zOxPQGous6LyLzLBsDNRmrJbJCsP x2xP64usadmaJ72LJfX8S4Wf/kW6BFsVHpm4Zs6hT+HwA+TOeS1DzLnmjdnH21vsOYI/ /YV9so4kue9PtjzS5Ndik0Ivhw7nW43fdqfXHeHsCOpjQaCFDurepwZy+F/V5SQ6fEZo QkcjFK63dj4soZUIUHcHO75TWvuOrYMooDzR61LpEjPT4bu5Rq6PjaoH063Bv5Vc+gSw wVR9zCIj2eRFRx017Og9MjrDPx0wWk5xPO4SUzOtfL1gAqhlwdjf2rhO1a02yOJhooyY H89g== X-Gm-Message-State: AOJu0YyYAbUhLsxZBbptmXJLXdLsT4Tg3hvC5a0wKhfDnCSjmVW7et0q 8s9Rp/zCSait7cxWRJvjcJ04zHdCJoXZnahdQVm7ejxS+2PkkW/LA6ORWX+DR2GivpnyiGg+euB 4 X-Received: by 2002:a5d:6703:0:b0:347:82b7:abc2 with SMTP id o3-20020a5d6703000000b0034782b7abc2mr6710909wru.15.1713294042538; Tue, 16 Apr 2024 12:00:42 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id sa30-20020a1709076d1e00b00a522e95a580sm6417803ejc.217.2024.04.16.12.00.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:00:42 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Marcelo Tosatti Subject: [PATCH v4 09/22] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h' Date: Tue, 16 Apr 2024 20:59:25 +0200 Message-ID: <20240416185939.37984-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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 autolearn=unavailable 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 x86_cpu_change_kvm_default() was only used out of kvm-cpu.c by the pc-i440fx-2.1 machine, which got removed. Make it static, and remove its declaration. "kvm-cpu.h" is now empty, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu --- target/i386/kvm/kvm-cpu.h | 41 --------------------------------------- target/i386/kvm/kvm-cpu.c | 3 +-- 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 target/i386/kvm/kvm-cpu.h diff --git a/target/i386/kvm/kvm-cpu.h b/target/i386/kvm/kvm-cpu.h deleted file mode 100644 index e858ca21e5..0000000000 --- a/target/i386/kvm/kvm-cpu.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * i386 KVM CPU type and functions - * - * Copyright (c) 2003 Fabrice Bellard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, see . - */ - -#ifndef KVM_CPU_H -#define KVM_CPU_H - -#ifdef CONFIG_KVM -/* - * Change the value of a KVM-specific default - * - * If value is NULL, no default will be set and the original - * value from the CPU model table will be kept. - * - * It is valid to call this function only for properties that - * are already present in the kvm_default_props table. - */ -void x86_cpu_change_kvm_default(const char *prop, const char *value); - -#else /* !CONFIG_KVM */ - -#define x86_cpu_change_kvm_default(a, b) - -#endif /* CONFIG_KVM */ - -#endif /* KVM_CPU_H */ diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c index 9c791b7b05..cb8c73d20c 100644 --- a/target/i386/kvm/kvm-cpu.c +++ b/target/i386/kvm/kvm-cpu.c @@ -10,7 +10,6 @@ #include "qemu/osdep.h" #include "cpu.h" #include "host-cpu.h" -#include "kvm-cpu.h" #include "qapi/error.h" #include "sysemu/sysemu.h" #include "hw/boards.h" @@ -144,7 +143,7 @@ static PropValue kvm_default_props[] = { /* * Only for builtin_x86_defs models initialized with x86_register_cpudef_types. */ -void x86_cpu_change_kvm_default(const char *prop, const char *value) +static void x86_cpu_change_kvm_default(const char *prop, const char *value) { PropValue *pv; for (pv = kvm_default_props; pv->prop; pv++) { From patchwork Tue Apr 16 18:59:26 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: 789255 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp439289wrb; Tue, 16 Apr 2024 12:03:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWIBKLWtIOgx1yxDmPlu54350oai2gvf2ZjKMVea2guQTxtrRHm3swSl5WarDaenn+z+Kq+FMm1s6+bSsPY/3HK X-Google-Smtp-Source: AGHT+IHY45FFDbPwG/aY51H1Ax9z+9gL3j/rF/srq91AZkFb7tP1vzruYHKEhy12j8S+cLkJPIxg X-Received: by 2002:a05:6214:5613:b0:699:45f8:dbf1 with SMTP id mg19-20020a056214561300b0069945f8dbf1mr14333726qvb.22.1713294214707; Tue, 16 Apr 2024 12:03:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294214; cv=none; d=google.com; s=arc-20160816; b=0wfisEBMFK3m/BGVbjUrUdp6YUpNzBeuP0Z3P87BnQkSbMtqg1bslYOut38TnqLXeS 6N2BwxbCWJGz0GRmRNo9B+w1TDwPckQUt9BVq6Erfka/tDFOcvK+VV1/DjPVDhv2U50o oBr3RU86UR29LeNNeoCy18Wd3ordZbzL7SUT8x6M2XZRYU8tCC7+h9uufvUBWP+Qa/Yi UkpHCilamxRs4XX+HmGihKBdEjF5+fJj0zWfIEHjzqI6suFFgbJned4UsspMZ1wbflua OxJeqZKCRAHZZJ0K5BlEu8KgXsots9f2YL50haCLgUHCWPTDlluJzcBfy5Z25b4FpASE 4y+w== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0cSOUYBAUJgDyQn/Z100iE3+Sgt5Cj+78hNwZltzxNs=; fh=ewOkqhT/NBrAvVhty6sES6jJq7QIg2CCEj7awL35mPY=; b=lBCfWNrMonbTsfv0E3XCwfkkBlIJJ1DAiwR59307AGTRigXZEzYgozSE7f47wkp4Oj 38a9ZT2LSpgyS08khv3YQZ399dvQJVaspIvx9Scag2b0yLEViRqNpD7a8wQI8eD+fS4p J3OPpV8+VBKU+ndKdSKjXdCEz6uJ9K1fp6wni5fb9bUbmOTTzd2bFyh7HfOGXUC5+Ghr w1dnp5Ct2cC+42xpTo5XsAoj54f6GxiBkciUWL5qudDrCDEhzot5iH2EruiT8JZkVv52 OliSVks71OSYFwfuzWvHZF7OPDzPZ5fFOn0Z3ls9owoNGq6S/RfQ/6s8TBSuc2EwykJ2 dRKw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WWc+gDkX; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u17-20020a0cea51000000b006993bbcb63dsi12814420qvp.549.2024.04.16.12.03.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:03:34 -0700 (PDT) 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=WWc+gDkX; 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 1rwo3O-0001Zl-MJ; Tue, 16 Apr 2024 15:01:14 -0400 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 1rwo37-0001Cw-DN for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:00:59 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo31-0005fx-Qn for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:00:56 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-516cbf3fd3dso5982707e87.2 for ; Tue, 16 Apr 2024 12:00:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294049; x=1713898849; darn=nongnu.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; bh=0cSOUYBAUJgDyQn/Z100iE3+Sgt5Cj+78hNwZltzxNs=; b=WWc+gDkXmB/FHCwWPSOUAQP2rx4wMRhKrR+82tLpnhncn5GGnheWvS5Sssb+PbvF7i lUaaKTW9l/qSu+S//u4d4hQXZRVamzTdabW9e2D11p9bR2upz7RAe+s7In+B2F8eyI6K Ca2kqlBPpFRsPRmPE3RZKEkCzvdDNnXK+l8QjJH0Fp12koXAHtViY+kaQGMSVk4AWvWs e51l1hqx4apYZnGhEGZTsBCfSYZezI1rf5UgE273Mq0FWCm/imH928mU5iNN3wggz2fz oMGcVgyjWKXvuvYu62teqWhEDgFqxXMB8mg/ZEuVJOL4t7oLEITpEsiB7T+U8YlP06CO ybPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294049; x=1713898849; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0cSOUYBAUJgDyQn/Z100iE3+Sgt5Cj+78hNwZltzxNs=; b=oiCdjJ5PMlENXCbSZkF9q8toCQ95xG8DZF1MTA6hju/v1z5xr+0vTwn/YKrJMxD1kX zdtb5ZHUfZbnIlhSBP8XbZdCJewba57QfIvNqYHwihTLMwxlCz7bWyot8b6Q7cy+8Om2 f59m9IPxkBS/uPsDyLoNh3a7ctqcroLARj9hMzqh+3LGAB+oz1unNnOlxVR7c3KyoLL9 6dS3jOpDbxjhuexio/aeOoNjIAmhmhpLAuUyF2mD0pLZfd9i8x97+RB0hvfiOq4ST7Ev LVlzdd4FDNwKfAr3TgOUic+nlHV9ZxEtYLvdJbfyaxKvhhkOpamytwdZX6KotE8tXn0B pf4Q== X-Gm-Message-State: AOJu0Yzmm0VoCRAMU9aNO8+BmteKRPMsywj/3ADPnzE8OcyOMDcU12RP Se+6F9r84LXOxarCBJreYyN6aQZtYah2ugns9UIAOL8fLQ+T9EiBD472YkgH9scL/n1i0ChAlxc u X-Received: by 2002:a05:6512:3c9e:b0:517:866a:117e with SMTP id h30-20020a0565123c9e00b00517866a117emr12821425lfv.7.1713294049051; Tue, 16 Apr 2024 12:00:49 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id du2-20020a17090772c200b00a52299d8eecsm6710577ejc.135.2024.04.16.12.00.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:00:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH v4 10/22] hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded Date: Tue, 16 Apr 2024 20:59:26 +0200 Message-ID: <20240416185939.37984-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=philmd@linaro.org; helo=mail-lf1-x129.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 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 PCMachineClass::smbios_uuid_encoded was only used by the pc-i440fx-2.1 machine, which got removed. It is now always true, remove it. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 1 - hw/i386/fw_cfg.c | 3 +-- hw/i386/pc.c | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index b528f17904..c2d9af36b2 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -109,7 +109,6 @@ struct PCMachineClass { /* SMBIOS compat: */ bool smbios_defaults; bool smbios_legacy_mode; - bool smbios_uuid_encoded; SmbiosEntryPointType default_smbios_ep_type; /* RAM / address space compat: */ diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index d802d2787f..f7c2501161 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -63,8 +63,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg, if (pcmc->smbios_defaults) { /* These values are guest ABI, do not change */ - smbios_set_defaults("QEMU", mc->desc, mc->name, - pcmc->smbios_uuid_encoded); + smbios_set_defaults("QEMU", mc->desc, mc->name, true); } /* tell smbios about cpuid version and features */ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index cd6335d6b4..2bf1bfd5b2 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1778,7 +1778,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->has_acpi_build = true; pcmc->rsdp_in_ram = true; pcmc->smbios_defaults = true; - pcmc->smbios_uuid_encoded = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; pcmc->enforce_aligned_dimm = true; From patchwork Tue Apr 16 18:59:27 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: 789262 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp440461wrb; Tue, 16 Apr 2024 12:05:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVBevPLgAokzSjJBgssPm2rnVsE225xZVmG4BzvECBsTs8BV02EhN+6b56T6fWZ+cypoV5F9+VSphnggEXIOUH7 X-Google-Smtp-Source: AGHT+IEtRnvagycvRM1OJQYxN7JKehVd44I5X7fieGGGdxCLRINN4EvuReoBP6N/HvUBDBv8RX1e X-Received: by 2002:a05:6102:3f49:b0:47b:9854:ce8e with SMTP id l9-20020a0561023f4900b0047b9854ce8emr2655779vsv.31.1713294337024; Tue, 16 Apr 2024 12:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294337; cv=none; d=google.com; s=arc-20160816; b=JPlNSvMYABQKYzLIWjC+cgITJbrSyg8hUxzo+3FVePQt258n5lfKEyZgzqaTipMXYv VWkesWeM6Wki5dZwjSlhavzJTzvhYL2x9oyzZ5CE6gMi1G1XPJVibwnh8dXdLOkW8/wA pu4pmwlG2dOQDh1mUxFQx1F+Gi6aB4/Hk5ILIjHRCiAFVhq7CmKxzS2GZLgs3x0BZtWM 4mehYYFKfS8QFUCEZC6BgP2dldEa7h/odLX4kLV3CVQzJSMUV9ijjnGJiF+HmLxy11Jd tvelKmeylTuVudzajuogPa2yivFVzuwogmlLKbBhek5mGLx9mGCtcHfenbZrnwIFBjAV OtJg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UuGQRWMqmr6ruVhTw3v1+AueGwovFmnNusAak3fPiJU=; fh=m06YJTXWY3YNrV6Ha5103g33U3xQqwvDxTxEyWcxDGI=; b=qaPOKXqrKqYVQExkMAf42A9Bf16FKbA+rnDwehoTwPN0aGZL5odOpgtHfnSHXV0K8E ICuazEmHtbwWqxpdsWsE/BU+PkHvo+/R3cKPOcshl3w0Y/5ZM7XcOIViSNjWqPZhMXdc /ieXG0VZhj7RQDlUnV3axR+yQuICHKpWGufqu1fl6GCNzEKzHOE8OlXBJHjuHocoNy0t 3ekdzq/Ecx0qhxQBtgHJfPxTLAku8jLJNa7ii4p25gf4FOq1gZg08bJGhpm/3NelP+vF qjl1YrBI0+PAkcvz4ZC8/hDQTefSawaHwa5pp6KmoWUc/3/gUB2v9VKMYLPQVMKZqwgp dj1g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=po+ugPiH; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o4-20020a05610232c400b0047b9680ed4asi500994vss.456.2024.04.16.12.05.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:05:37 -0700 (PDT) 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=po+ugPiH; 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 1rwo3Q-0001ey-58; Tue, 16 Apr 2024 15:01:16 -0400 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 1rwo3C-0001HA-Dy for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:03 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo39-0005hM-2R for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:02 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5176f217b7bso8397459e87.0 for ; Tue, 16 Apr 2024 12:00:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294056; x=1713898856; darn=nongnu.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; bh=UuGQRWMqmr6ruVhTw3v1+AueGwovFmnNusAak3fPiJU=; b=po+ugPiH/hwIDI+jUzrJjYMNf5ieN7DI1Tc+vjUzMvx0oa9WORx5arvHpKLmypjSpj vMNpu/XNQ1ds10WOqkHn8iPAtlqLapoYlCB8lmL4l+gSupJcG2apa4e6uk8sPeSREebR HqvSYev/kwoy4SeEHHAJa5CP48uHpQmYPoJd2Sqbk4OQZK1IefB44XJxK0yPqLgpX2yz qSzEDxhs13mPrd+yxuUwrHvvo+JC4nE7RR6478gPNqJEigYzSTIEKT9Z4s/y8Uo6qL0A eRS76yPVYg2kreEpNpE7QguLCIqKKE2TPHUY0wLHcjix7RZCqJ+tq286XoEpvTV51/n4 9VPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294056; x=1713898856; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UuGQRWMqmr6ruVhTw3v1+AueGwovFmnNusAak3fPiJU=; b=hfTjrAS81tec1fcMmYx+1qIlqvAAShLuq2UESASwwEhWUN4Qx89Skb8f4NQwwqjOLO 4gJ7Q5gS/PgAlD30Pp03WQEjhFnz6kWfVv0WKZWBbfCEN878NqI5zQnEQOOw7YK9R1dY Um0Ib8/IghJfloj1CqV91zTkkqrQDLQLEmqWFkMI3TFAVv4mFNBO4BU94hSSdTPYuqyk qOVSmOuS+kX6zmXYr0/Njm1vK82oEmi9f84/dDCby0/Dz3JAPde4oruKCn/z8OQnlhpM LgmiWkA3U8NSdNfllzvmAspOoEZ19m51VrsjaOCn35EHiBP486rb1dtfQaWLMHXjWalr gJow== X-Gm-Message-State: AOJu0Ywkc0REo5Qent+YmLGmVffRlSM7GHkp71+NB5JhT1KSartV6xmi TAhDW/mRmthDxLwxHw+WnU9NK5freyolDy1pp4QISx9/PN0S/3XC5qrgGHWYoy1CDoZWefeiNxb K X-Received: by 2002:a05:6512:158d:b0:518:c59b:4fa9 with SMTP id bp13-20020a056512158d00b00518c59b4fa9mr8481593lfb.50.1713294056253; Tue, 16 Apr 2024 12:00:56 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id g17-20020a170906349100b00a4e2dc1283asm7167171ejb.50.2024.04.16.12.00.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:00:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Peter Maydell , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost , Song Gao , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , Ani Sinha Subject: [PATCH v4 11/22] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults() Date: Tue, 16 Apr 2024 20:59:27 +0200 Message-ID: <20240416185939.37984-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=philmd@linaro.org; helo=mail-lf1-x132.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 autolearn=unavailable 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 'uuid_encoded' is always true, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- include/hw/firmware/smbios.h | 3 +-- hw/arm/virt.c | 3 +-- hw/i386/fw_cfg.c | 2 +- hw/loongarch/virt.c | 2 +- hw/riscv/virt.c | 2 +- hw/smbios/smbios.c | 6 ++---- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h index 8d3fb2fb3b..f066ab7262 100644 --- a/include/hw/firmware/smbios.h +++ b/include/hw/firmware/smbios.h @@ -331,8 +331,7 @@ void smbios_add_usr_blob_size(size_t size); void smbios_entry_add(QemuOpts *opts, Error **errp); void smbios_set_cpuid(uint32_t version, uint32_t features); void smbios_set_defaults(const char *manufacturer, const char *product, - const char *version, - bool uuid_encoded); + const char *version); void smbios_set_default_processor_family(uint16_t processor_family); uint8_t *smbios_get_table_legacy(size_t *length, Error **errp); void smbios_get_tables(MachineState *ms, diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a9a913aead..a55ef916cb 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1650,8 +1650,7 @@ static void virt_build_smbios(VirtMachineState *vms) } smbios_set_defaults("QEMU", product, - vmc->smbios_old_sys_ver ? "1.0" : mc->name, - true); + vmc->smbios_old_sys_ver ? "1.0" : mc->name); /* build the array of physical mem area from base_memmap */ mem_array.address = vms->memmap[VIRT_MEM].base; diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index f7c2501161..ecc4047a4b 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -63,7 +63,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg, if (pcmc->smbios_defaults) { /* These values are guest ABI, do not change */ - smbios_set_defaults("QEMU", mc->desc, mc->name, true); + smbios_set_defaults("QEMU", mc->desc, mc->name); } /* tell smbios about cpuid version and features */ diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 441d764843..00d3005e54 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -355,7 +355,7 @@ static void virt_build_smbios(LoongArchMachineState *lams) return; } - smbios_set_defaults("QEMU", product, mc->name, true); + smbios_set_defaults("QEMU", product, mc->name); smbios_get_tables(ms, SMBIOS_ENTRY_POINT_TYPE_64, NULL, 0, diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index d171e74f7b..1ed9b0552e 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1277,7 +1277,7 @@ static void virt_build_smbios(RISCVVirtState *s) product = "KVM Virtual Machine"; } - smbios_set_defaults("QEMU", product, mc->name, true); + smbios_set_defaults("QEMU", product, mc->name); if (riscv_is_32bit(&s->soc[0])) { smbios_set_default_processor_family(0x200); diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index eed5787b15..8261eb716f 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -30,7 +30,7 @@ #include "hw/pci/pci_device.h" #include "smbios_build.h" -static bool smbios_uuid_encoded = true; +static const bool smbios_uuid_encoded = true; /* * SMBIOS tables provided by user with '-smbios file=' option */ @@ -1017,11 +1017,9 @@ void smbios_set_default_processor_family(uint16_t processor_family) } void smbios_set_defaults(const char *manufacturer, const char *product, - const char *version, - bool uuid_encoded) + const char *version) { smbios_have_defaults = true; - smbios_uuid_encoded = uuid_encoded; SMBIOS_SET_DEFAULT(smbios_type1.manufacturer, manufacturer); SMBIOS_SET_DEFAULT(smbios_type1.product, product); From patchwork Tue Apr 16 18:59:28 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: 789246 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp438392wrb; Tue, 16 Apr 2024 12:02:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV5W0Ue3/THiF6DG3UaOBi/r3E2guh3qAaGZsbQgLOJ67k28B9NWho5b5xuJmmYQ09pifgSUOzkYZBOu+YCkYgW X-Google-Smtp-Source: AGHT+IHQRgFU9X4dl5O7ekU9xZkzUVY9w5xO7eZnSFgmbdkg2+4bxMANwKlOGkS1/u/rpauj+ec3 X-Received: by 2002:a05:6214:2b0f:b0:69b:693d:e3cb with SMTP id jx15-20020a0562142b0f00b0069b693de3cbmr11587436qvb.11.1713294119800; Tue, 16 Apr 2024 12:01:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294119; cv=none; d=google.com; s=arc-20160816; b=VzOeiRM8jed+l5Nqkf3eR4CA/yqXb1DWxRktLjq3r1w29plUmcl2XzhCegsTr7pncM 822ZPuTkzFBvFqMw0V1/+inuJT/udMfGRpsnTJrEWbVfFwsLOY8ZoV0o33kOweCJiufd owci+NZdB/sL3e02lb4go0WkGJBRKpCwtv0e5/wcIWbh0U4sJvCTKm8O0Q4WV+vxzD8f M7krZsbEopqCu3CLXesLMpNEO82mfkWEyycLklqlSpGJ2AC6qbn+8EHvm4/aUfU1ydFQ gtl4OkYFseh6PAxB/xFPFNMgmH4uqyu1pEBKfcRnR1PASk/IH5A6PmEgDaXjhrCFvgj0 7ILg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xnRVHCDouTA+5HlMl31thguywp3whz3Nvn7kAUajqzI=; fh=EymzOWzLPmdhv4Mp8n8orepgDdCe6T0jvi2gJ8b8jSs=; b=KZ1MuS1zE6JJJpcTlHlFBIZBWIVWPyBPldER651LZvXAdID4tS9ZtGzerKmAhEAxay ef7lHlefTIQvzIuo/mJYBUG5ysUtVi6ZkM8J3/d3ug7S/J3DXZVq+naQg8xoTZ4N6y58 Ogpppieywrr9kpKVU9CU5plyfBZL5CF2ww9tIRj2KF9/j9kXpK/A88vRSkGuZ+jQ6HjA MQ79PVc5n/X7yoGakd6+D+xwacjowegZhMZoWdGac91pXykTogLWXxYnZOrwNd7LedmH kM4saSCKmsOkIZUMeesMZcpNckZpvBY0lqAa8Q2PSzKJ92k1YkDxCrITcxcXJ1+qs4PK VGDQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZKa2ejw4; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i16-20020a0cab50000000b0069b4fc08786si12211561qvb.556.2024.04.16.12.01.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:01:59 -0700 (PDT) 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=ZKa2ejw4; 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 1rwo3R-0001jo-Qp; Tue, 16 Apr 2024 15:01:17 -0400 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 1rwo3O-0001Za-Fr for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:14 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo3L-0005jP-Dw for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:14 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a450bedffdfso607663766b.3 for ; Tue, 16 Apr 2024 12:01:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294062; x=1713898862; darn=nongnu.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; bh=xnRVHCDouTA+5HlMl31thguywp3whz3Nvn7kAUajqzI=; b=ZKa2ejw4GRIws2XhZpLlQWHneFq630p8RHMLZoklrSafv0XV/6bEJ14LJ7iqi8uY5V hmAd2AEvHjTKFqXtA6suHwkKtYKIyyF8+op1eQ59KvHqINceKbIBXp4HPDXZNjTLPrpe 09J+4Qs+dIS3gC4R4wvFE0hhyDIMs+fbqk/FBV/HsGv9igx8+oyWi3OxQWVaOeilHBZ0 CGe9NrBZcDmh7OUCMN1G/BOsyCIx4Rd/CGiq5YLR2366KpqZy9iDKiLPtP3+vE7TY74s rpddoVobeTDeUaAbp5RcubTtmF53d/EG1nrsg6+2GHxxqIsNYcUyUd+opVT3DGwSObhi GK7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294062; x=1713898862; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xnRVHCDouTA+5HlMl31thguywp3whz3Nvn7kAUajqzI=; b=UOecHAmnUTmd68JWubTnZCRl8EI2zythq0y+R/LWCblkTON+wJHTnnxlZb2bqzQxVX 3Un7Txq4/8Xw/TyWS5+EoYiyTbEEYdVHSet2nUG2K71qBDjj15nVu78Pb5uyKick9+I7 Xu0GZFGCBqOoJGNYYK8iKhCHveS6ldc6jestYbXFQ9IuKhh7lN2XgQJrjLNGbm99NyXz DIzZfOV9xA+xNaEdoveUmJnSHIi9rWB24x/4fZWECuiB35MR9/+cmkFumnopr4F7U/ZL /tXq4EcaA7aoIewCJYGuRGZY6HHD0+IKEsQaJunBZ5WsQEdSLBA4TK41K8jJfxeO9yf8 CveQ== X-Gm-Message-State: AOJu0YylsXxlTFnvez5CZmVinSG8II3HV90rUzDeSXQw2S1A5C3dih1c 320tlnlNwEqAq6XkxkWjMRajy/PhvDLFBI13ieDdotp0ZBi165NYAZhwFvGhOwms98v8HIE7z3g l X-Received: by 2002:a17:906:594f:b0:a55:428d:5de9 with SMTP id g15-20020a170906594f00b00a55428d5de9mr1810772ejr.28.1713294062573; Tue, 16 Apr 2024 12:01:02 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id q23-20020a170906a09700b00a519ec0a965sm7143556ejy.49.2024.04.16.12.01.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:01:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Ani Sinha Subject: [PATCH v4 12/22] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid() Date: Tue, 16 Apr 2024 20:59:28 +0200 Message-ID: <20240416185939.37984-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=philmd@linaro.org; helo=mail-ej1-x62b.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 autolearn=unavailable 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 'smbios_encode_uuid' is always true, remove it, simplifying smbios_encode_uuid(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/smbios/smbios.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 8261eb716f..3b7703489d 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -30,7 +30,6 @@ #include "hw/pci/pci_device.h" #include "smbios_build.h" -static const bool smbios_uuid_encoded = true; /* * SMBIOS tables provided by user with '-smbios file=' option */ @@ -600,11 +599,9 @@ static void smbios_build_type_0_table(void) static void smbios_encode_uuid(struct smbios_uuid *uuid, QemuUUID *in) { memcpy(uuid, in, 16); - if (smbios_uuid_encoded) { - uuid->time_low = bswap32(uuid->time_low); - uuid->time_mid = bswap16(uuid->time_mid); - uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version); - } + uuid->time_low = bswap32(uuid->time_low); + uuid->time_mid = bswap16(uuid->time_mid); + uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version); } static void smbios_build_type_1_table(void) From patchwork Tue Apr 16 18:59:29 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: 789247 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp438395wrb; Tue, 16 Apr 2024 12:02:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXu/4JRdoa31uPWI88HUZERYDe7zC1jo+GOUYF4KdZWaq1g1SmUUBwr3stvFA6/tughlsjtMkwOWRFrlfPTLTey X-Google-Smtp-Source: AGHT+IEz9Jznni49pRfEzHNGKoz1UW58aGjwvoGch9QSL6lowOhBrFloOS74WsVsK2C49fvEI84g X-Received: by 2002:a05:6214:888:b0:690:d000:c819 with SMTP id cz8-20020a056214088800b00690d000c819mr14720717qvb.60.1713294120171; Tue, 16 Apr 2024 12:02:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294120; cv=none; d=google.com; s=arc-20160816; b=ZNZdXOaAI0okAsinCNhepBtvr/O8c5JqTo0+jWBA+gDTCPafOPcHoNbSMCAbpWk4jQ e4l8BCOrmQeOOwhdvsu9J+JEhfQH8FY9MYF0o54AQqkJ7du3m/A4xvkjr5eW47btdQ1K skZi5IhYJjKj/ra+Ec9HO0pxQ8bC/Z9F4lroUZzHH9IGIOj7nq4IzI8RRxeajhfW0VcT sLHCzeU8WeyRg8ZHsE3ux9ICxlAOms7Hfs5bu+c6BxD2ymdEv90MEGQN958+w6UV6P8F +P45evSigksBJEc6gqNUlTpVXBJVcSy7AHqu0crLJ05ZhrTdmLRPsDyKIeG/0ix1/5G+ Hfdg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oke/YPM4C6ufallz55sQ7YyPAmP6LUvQ2Lhm6MsGGjM=; fh=oq+tVZR/ixEHv+0FPC1bVEH81YrSS9Vz+5ks/I6y3GE=; b=hZ7WK1OW0nL8vC2lNx0HvDcMhy4WyY7k51wvpePGTT9IaRTHNycj8CggCQs/xGKI/w TneFIAbGAG2P+tN7+TMyHAaQgQ5HeMQaxO417OP4/1RA8xb2qDsqWXlOyOF0F7G7ZzY1 Wh2qDxb9oh3+MmccfqGYjzYgNZ3sDrf7d7ZfDZGyixyLad6bJcSjC1ImAXdno8LLBLAw NuVrunKKafYb5ZaGiet+SLjYc7DLnqM8FHW0Si/UsKDQnzkzhluRlBwmW1Q9odAvf+FD eKrnamc447IvCeYTNg8nw1RSKa6keUHyUllkTuGEa4bXa14RZkYKn4+4aGTM2W9qx7Tn Oobg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oZjhGlXG; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z4-20020a0ce984000000b0069b32626e59si12563318qvn.54.2024.04.16.12.01.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:02:00 -0700 (PDT) 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=oZjhGlXG; 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 1rwo3S-0001lJ-L2; Tue, 16 Apr 2024 15:01:18 -0400 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 1rwo3O-0001Zt-LY for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:14 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo3L-0005js-FZ for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:14 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-56e1bbdb362so5257380a12.1 for ; Tue, 16 Apr 2024 12:01:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294069; x=1713898869; darn=nongnu.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; bh=oke/YPM4C6ufallz55sQ7YyPAmP6LUvQ2Lhm6MsGGjM=; b=oZjhGlXG14ViE1tEmhme88dNqZQUqkTSwbFsWKryVvfrh0aSYMKWgFDMOym9FSmI3g VsRsBBGopH/lE0mIW5ITAKmOlTV3ju01IKjdkLYwK2W3XYWa1IxQX6hWlgXZgMtLaWPK qbZ/dkjdFOJMMTCEJSdsDP4hQkAeWmei68FuLfKF1pUHf1CYc0wvqzHx0Gn7rdv9TpI9 HkBj2GHxeRk6k+7kKq5JSolI6ETHY0bKTX5nv7aj3PgOoA+quwM9w4or7dXFX9CK5Mc8 S1obqnYBWqtbqBK9AtZoczABzaN7JlcHpcLDAP6eXKK1LEDsM2O0Phw4WOKJ8XlbQ+sJ f6Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294069; x=1713898869; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oke/YPM4C6ufallz55sQ7YyPAmP6LUvQ2Lhm6MsGGjM=; b=Ut1URaF2m2jEnCN6DP7SqsRNtR6baXnb7UUNgRHE1Wm/cGnsqhHdso/0Nc2c96ii00 w8S27b+yMjTF5Zwc2ciLFnkeBU4ztpNcfzYju7yLoTV+YgmcfJxRQjZouRQ+LOZ4nR3l F5z5j39Ftm7+275q3VhcUNV8x+ahYwb7K2C/RMYLfVL0COr1/KgiHvW4geUNb0xd5B+C 86PPuTBgzl8lC1aCuprl+X+KUzN9A39lu/+wfe7SQ5AfiVaLbcEBwsri58PWkh2ac3HD SoDjgQVwyAXSaLCNnFQa4lRpsRDYUgFlHki+g0jH4fwkKwjA/UCzLT+Ce0Vm4gE/jixN fDuw== X-Gm-Message-State: AOJu0YzBUT+vU1YyUb0J58avLg3cwUYD80CPVv9D0kU2lfDrYRMBv8Wh D3ztAQ4+mkL1v79JiAB5KMFbnyY4Sd92Vgb/wlM6MQI3oH4KNIMCY5bxTvmlk5ekXfuFroEev/Y V X-Received: by 2002:a17:906:ae8c:b0:a52:6fca:eb57 with SMTP id md12-20020a170906ae8c00b00a526fcaeb57mr4613401ejb.45.1713294069046; Tue, 16 Apr 2024 12:01:09 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id jz1-20020a17090775e100b00a526457fc84sm3564186ejc.57.2024.04.16.12.01.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:01:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost , Cleber Rosa , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v4 13/22] hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm Date: Tue, 16 Apr 2024 20:59:29 +0200 Message-ID: <20240416185939.37984-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=philmd@linaro.org; helo=mail-ed1-x52e.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 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 PCMachineClass::enforce_aligned_dimm was only used by the pc-i440fx-2.1 machine, which got removed. It is now always true. Remove it, simplifying pc_get_device_memory_range(). Update the comment in Avocado test_phybits_low_pse36(). Reviewed-by: Zhao Liu Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 14 +++----------- tests/avocado/mem-addr-space-check.py | 9 ++++----- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index c2d9af36b2..231aae92ed 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -74,8 +74,6 @@ typedef struct PCMachineState { * * Compat fields: * - * @enforce_aligned_dimm: check that DIMM's address/size is aligned by - * backend's alignment value if provided * @acpi_data_size: Size of the chunk of memory at the top of RAM * for the BIOS ACPI tables and other BIOS * datastructures. @@ -114,7 +112,6 @@ struct PCMachineClass { /* RAM / address space compat: */ bool gigabyte_align; bool has_reserved_memory; - bool enforce_aligned_dimm; bool broken_reserved_end; bool enforce_amd_1tb_hole; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2bf1bfd5b2..c7bfdfc1e1 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -716,7 +716,6 @@ static void pc_get_device_memory_range(PCMachineState *pcms, hwaddr *base, ram_addr_t *device_mem_size) { - PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); MachineState *machine = MACHINE(pcms); ram_addr_t size; hwaddr addr; @@ -724,10 +723,8 @@ static void pc_get_device_memory_range(PCMachineState *pcms, size = machine->maxram_size - machine->ram_size; addr = ROUND_UP(pc_above_4g_end(pcms), 1 * GiB); - if (pcmc->enforce_aligned_dimm) { - /* size device region assuming 1G page max alignment per slot */ - size += (1 * GiB) * machine->ram_slots; - } + /* size device region assuming 1G page max alignment per slot */ + size += (1 * GiB) * machine->ram_slots; *base = addr; *device_mem_size = size; @@ -1285,12 +1282,9 @@ void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs) static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { - const PCMachineState *pcms = PC_MACHINE(hotplug_dev); const X86MachineState *x86ms = X86_MACHINE(hotplug_dev); - const PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); const MachineState *ms = MACHINE(hotplug_dev); const bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM); - const uint64_t legacy_align = TARGET_PAGE_SIZE; Error *local_err = NULL; /* @@ -1315,8 +1309,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), - pcmc->enforce_aligned_dimm ? NULL : &legacy_align, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); } static void pc_memory_plug(HotplugHandler *hotplug_dev, @@ -1780,7 +1773,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->smbios_defaults = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; - pcmc->enforce_aligned_dimm = true; pcmc->enforce_amd_1tb_hole = true; /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported * to be used at the moment, 32K should be enough for a while. */ diff --git a/tests/avocado/mem-addr-space-check.py b/tests/avocado/mem-addr-space-check.py index af019969c0..85541ea051 100644 --- a/tests/avocado/mem-addr-space-check.py +++ b/tests/avocado/mem-addr-space-check.py @@ -31,11 +31,10 @@ def test_phybits_low_pse36(self): at 4 GiB boundary when "above_4g_mem_size" is 0 (this would be true when we have 0.5 GiB of VM memory, see pc_q35_init()). This means total hotpluggable memory size is 60 GiB. Per slot, we reserve 1 GiB of memory - for dimm alignment for all newer machines (see enforce_aligned_dimm - property for pc machines and pc_get_device_memory_range()). That leaves - total hotpluggable actual memory size of 59 GiB. If the VM is started - with 0.5 GiB of memory, maxmem should be set to a maximum value of - 59.5 GiB to ensure that the processor can address all memory directly. + for dimm alignment for all machines. That leaves total hotpluggable + actual memory size of 59 GiB. If the VM is started with 0.5 GiB of + memory, maxmem should be set to a maximum value of 59.5 GiB to ensure + that the processor can address all memory directly. Note that 64-bit pci hole size is 0 in this case. If maxmem is set to 59.6G, QEMU should fail to start with a message "phy-bits are too low". If maxmem is set to 59.5G with all other QEMU parameters identical, QEMU From patchwork Tue Apr 16 18:59:30 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: 789245 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp438385wrb; Tue, 16 Apr 2024 12:01:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX2m6LNdna4RPZbvuTu85BtUcT2GmYK8iBSDFN9GvGewH/wAneRCDlkqPVJFgAO8+0nRZFAZ3P/JqDbPkDUbmuw X-Google-Smtp-Source: AGHT+IE0IkAD4gRmFlIxbrmhBJ4SIyiyTqW3UDbFb1FPJNNoooZjZwRIwqF1AyPE3EARzDGQvtiA X-Received: by 2002:a05:6358:218d:b0:184:fdc:2590 with SMTP id v13-20020a056358218d00b001840fdc2590mr15879491rwb.20.1713294119284; Tue, 16 Apr 2024 12:01:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294119; cv=none; d=google.com; s=arc-20160816; b=ycpsY698oQseaLhEh1N36U8f0XAlLtQpuQ1S/Y98ifie39e/nkZfyY4k8up9lZL/5N Hk3To+QVJgvRofZUc0xAXAPnZfIqI+FIliKXfB6ikObcZmx/mjELFLCo3aPur/vOT83h 6zcB8d8wHanJqJoFomUgkI5Fzh3qG6UmxU2rOo74+Np2+R1tGnE7Y5oB6NrUQwWW5wMr JyAZ22hlJMj5xOtKzcS5SuJtq+KjwLaeBBMSLMhW2d39jWNaUxpjBoETc5/7UJgQRGvV lvF7Wx7iW9o6jYwIq4JTp6BcjihIbA1Ur3r7XjVr88bngpTPgB+oFMGFpl4o3yD/n6bq c4AQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3tX6emDsZqVY2muZJRjyArm9SgC2+2SHZUCWPsCYUO0=; fh=yqjCuOC88Ly89iy+ioL10gWEGw7VA4hP3Vi0D27SiOQ=; b=eq4/F7EfXzMYBv5OubnJqMN/D525/zfQdwzQuR6tyEa+yZip8WnHxS3EqMpp5UgIZr b6x7ina0RQ55ibiw7DmXpxZT0xvbWUjaiPGKQ937yTDQRdu4aHBfAFl7LMnlsd6SEiZu yBXd3UhY1K12mYSoVg43yuOG1kTfTH6ZFvxAahc7Hc5E0E9p5PgdNyfV2hgBrT0fy9Sb /FCE++UMF84KUllXJim/hC0IQooDHZL/oEIDOPcIOhBe37cipFR+G/RNrF4WWSfLzuhY SgMZBX8H83u+jqpN7AtvmxMrehGBWUe/yGWAwR4aFmamSnDOSscGBLdqx7F6/yKgrW9a Kuww==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XXkoo01w; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t2-20020ab05742000000b007eb453ce70fsi615032uac.55.2024.04.16.12.01.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:01:59 -0700 (PDT) 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=XXkoo01w; 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 1rwo3W-0001uD-HW; Tue, 16 Apr 2024 15:01:22 -0400 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 1rwo3U-0001nr-82 for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:20 -0400 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo3R-0005mi-Vf for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:19 -0400 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-518d98b9620so3460459e87.3 for ; Tue, 16 Apr 2024 12:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294076; x=1713898876; darn=nongnu.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; bh=3tX6emDsZqVY2muZJRjyArm9SgC2+2SHZUCWPsCYUO0=; b=XXkoo01wgJLcqx5MY3t7zg2on2TS+GzJ4CNGIwNhj6FTy44qflnA8ViNLoi0aI9xPJ i/UplER4f38P4niTFDIk1jFf8O+pgS00KIKxl/QhPLTcXEo1zOf53GzSjOJcMUvMsY3B 0PsG18DhOjGWi2W3OX6l6ErPTZa6Dy5fhAgJjZ6BuG4qpPh9NyKh73t9Pbza7tOS80e8 kG2JzOHKySJ+fHEn+2CuCHNN6g35p1K4DinwzU6BQoHW/ksL7uoY++0QCCu/qJdW9yBB a5f24vFk1NkPQZVbW/Iy3Hr73xVlkEft+fSgoNZOZh+q4h+isQG+sHR9FcV8ExkHQJKd fmmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294076; x=1713898876; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3tX6emDsZqVY2muZJRjyArm9SgC2+2SHZUCWPsCYUO0=; b=JuhMUiPD+DhdiwnZEp90yhnIVRboC3TVtOJWxK+thmaxoSXsAwQM8frxd4LRyq/zlV OirYLa3J3Stly7xRf1/+KsfSZ0f8d5OP4KHEualaE92SQw29g3blgtUO0EcMI+kA9FO/ yIGYKqvmiHVwC7TDe5ZXmbLC8WMF65TJWYt44EoXHm4di6gHk2YACdM82kje6dnFrR50 2JOk41LJVXH/zDgptkYcox/8Ok2gBEyY1MRSLE9MutN3bny3nAeF5f9Zl8QGbZFppoGb ZOUVpWVFpEA5I1TOw2OQL8qn/2c8NswfeRlP931abDfJzR4SlxuLUmhJjc/u90981MuH Fx3A== X-Gm-Message-State: AOJu0Yzu0pGkk5VRn63ukvd40z0zG8CjyHsQnwDUMiu2NM31RbZH04Mi V56fIBOvzuYEDcKwbEhvVEf3nZwdO0t8RXKg3lV84gVEmrYa850RlYW4ipTREag2bR6g3C7H85e g X-Received: by 2002:ac2:4c25:0:b0:515:c102:c825 with SMTP id u5-20020ac24c25000000b00515c102c825mr7947381lfq.19.1713294075893; Tue, 16 Apr 2024 12:01:15 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id gs39-20020a1709072d2700b00a46f95f5849sm7167635ejc.106.2024.04.16.12.01.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:01:15 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Peter Maydell , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum , Song Gao , Xiao Guangrong , Nicholas Piggin , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora Subject: [PATCH v4 14/22] hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug() Date: Tue, 16 Apr 2024 20:59:30 +0200 Message-ID: <20240416185939.37984-15-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12a; envelope-from=philmd@linaro.org; helo=mail-lf1-x12a.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 autolearn=unavailable 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 'legacy_align' is always NULL, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand Reviewed-by: Zhao Liu --- include/hw/mem/pc-dimm.h | 3 +-- hw/arm/virt.c | 2 +- hw/i386/pc.c | 2 +- hw/loongarch/virt.c | 2 +- hw/mem/pc-dimm.c | 6 ++---- hw/ppc/spapr.c | 2 +- 6 files changed, 7 insertions(+), 10 deletions(-) diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index 322bebe555..fe0f3ea963 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -66,8 +66,7 @@ struct PCDIMMDeviceClass { void (*unrealize)(PCDIMMDevice *dimm); }; -void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, - const uint64_t *legacy_align, Error **errp); +void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp); void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine); void pc_dimm_unplug(PCDIMMDevice *dimm, MachineState *machine); #endif diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a55ef916cb..7af05a6a2d 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2736,7 +2736,7 @@ static void virt_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp); } static void virt_memory_plug(HotplugHandler *hotplug_dev, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c7bfdfc1e1..9ba21b9967 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1309,7 +1309,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp); } static void pc_memory_plug(HotplugHandler *hotplug_dev, diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 00d3005e54..af71bd2a99 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -1025,7 +1025,7 @@ static bool memhp_type_supported(DeviceState *dev) static void virt_mem_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp); } static void virt_machine_device_pre_plug(HotplugHandler *hotplug_dev, diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 37f1f4ccfd..836384a90f 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -44,8 +44,7 @@ static MemoryRegion *pc_dimm_get_memory_region(PCDIMMDevice *dimm, Error **errp) return host_memory_backend_get_memory(dimm->hostmem); } -void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, - const uint64_t *legacy_align, Error **errp) +void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp) { Error *local_err = NULL; int slot; @@ -70,8 +69,7 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, &error_abort); trace_mhp_pc_dimm_assigned_slot(slot); - memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, legacy_align, - errp); + memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, NULL, errp); } void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e9bc97fee0..f147876dc9 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3668,7 +3668,7 @@ static void spapr_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(dimm, MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(dimm, MACHINE(hotplug_dev), errp); } struct SpaprDimmState { From patchwork Tue Apr 16 18:59:31 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: 789248 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp438603wrb; Tue, 16 Apr 2024 12:02:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVCQPmK4/NDinaMMqEA5oiUqysrdfrR14yIFfozINHIqp3HF2pc6l04py1CmAsT4g1p+vMxfqBq47VljObX0SG7 X-Google-Smtp-Source: AGHT+IGryydYJxRUwzv+60Nq9BnvLeBR3sx3dsz8m7dd7r0mhBdTO8tg/7+C5+6MD2xG6vO9MR07 X-Received: by 2002:a05:6359:5145:b0:186:1152:d73b with SMTP id oc5-20020a056359514500b001861152d73bmr9773555rwb.16.1713294144767; Tue, 16 Apr 2024 12:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294144; cv=none; d=google.com; s=arc-20160816; b=D/iraRfb0YNb+RfmhqYPBExHZQZNzTTJoiSf13eigMJEH8k/CwGnxJEMeKDNekuzA6 6lDEmZFk9mc6Pp8LyUiNwG/dWnWyj49gJ7Egew6FJT0GW3JddUuyACGc+DuHXNZJUiWF as8mQ8zqCPDh1fICG7WYKCilEZHl9FCibAT/cP3A8O7Mgukhns8x6BtM6O50X9+T/xhZ hg5TSFs4jfVhi9SJJGhyY7LbLzZwwJaKJJJmd/1+I6LkXwFu6RYcGlTLE+mfCUCi/hdh LuC2LmscYzLNFcSWGXUJMs2QdG4bvGwpsBIAXmGVXLjJqnptXyJf2voGjmaJwLdxb0QB q1jw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+xewXMqFZRdg+aIzvHesVxZBjNGsZ5q/Yk0k6GByalI=; fh=M7oxphDajY5IlPm69+YRQwQSpVRK7oC+ufw6wCuPI60=; b=gM3J3smrNPwYD3K4K832riu1Ucaf1OIanrd397yL0nKbqba8eK8Apr6SnL/GChx2Sg jS+TKscCqXzipvMF3J+oFsW/5EyM4swTXjPdT8T9/DthXqjy2TZRnXLJ14/WIDVOGK5y xLzpZvSy6EecheqTFQzg7hW7NllykLCrxYgiqeXWVBKap+qSpJIN9bqztR8pJfez+LnB xbzQO8f7OuwjZekUX5CsWyr5ufWtNyAFhbAzHO/4OjKVDewljltZ0o74LNmxut8b/gIP 1qlxi/zngAZVdaN2V9eoDCx8TvVpXzD/TyCW/R/h0W1MJTeNDipREdH2nXr1nb5jFzhe 1fPw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E3PmjKOv; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o11-20020a0561020e0b00b0047a62c38ad0si1750483vst.657.2024.04.16.12.02.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:02:24 -0700 (PDT) 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=E3PmjKOv; 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 1rwo44-0002VH-7C; Tue, 16 Apr 2024 15:01:57 -0400 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 1rwo3b-0001z7-A4 for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:27 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo3Y-0005oU-Ae for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:27 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a44f2d894b7so538603666b.1 for ; Tue, 16 Apr 2024 12:01:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294082; x=1713898882; darn=nongnu.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; bh=+xewXMqFZRdg+aIzvHesVxZBjNGsZ5q/Yk0k6GByalI=; b=E3PmjKOvt0FTl7di5qriohG73+MrjR/p8VJUl2SoI5EWKT5dlh6YThKgMWc2ym4GCq u/XPEswhBqsNt+ZmkhIKxRjpEBTA6OvAT7S5CbYpEXu92oNIsVuRi+LVNavFUjBBNx33 U0Hh51M6ziXL4upFrhZ5Yy0jVtL9kRC+Q01ZXro9XqAo/KV3LayIgemw0ys3Hl+SXPgp 4qPFFGzgVkkxfHFLsM0v14ss6Qdlfs0hSy5xbOqhCmVmNuhGsOMjB48va6QWsE5XEVL7 fCZqkoc/CFfqEFKjogWjCagGg1apc4WldPQYKQXrLnjQVIiAsn2+WL5+4rL+l9Q3PIGZ 1Z1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294082; x=1713898882; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+xewXMqFZRdg+aIzvHesVxZBjNGsZ5q/Yk0k6GByalI=; b=DuBpMVSg1rgAJY8+aE8nfoWBJ82IGUsb0iLp0ZjNxPD+K1ZxhoU5mWJiC1hMvaczbR qoyMCJS5Pw+JOCq94umnOLWRqT4YfVkZ34s8WFhYodAuxA9qaLSoIOpS5H/jr8/42aiX cBHA5gktDREf7WQH2NST20mdO7DjnYKOL00NzkCHDoRZPFICo3DAZgAMOz7iassp+B7/ q9nINQ41oXJ48j9t0TAar73pqMbmJnRbSZIVm6kuP8cM0nU5K8ylyouMnQW8V8rSMhov iAEbpvTuNWG6n8EPSCHyeMuGttUb65jtmrIV02nNxkEAXRsiLIf258IuAVx354mR3WmH 082A== X-Gm-Message-State: AOJu0Yxy1oiXz9qUZ0OxPewBglaC1t54NmPtqwpZZxqqTuA6pyQaxHrz qxw6wA7RAzEEklAsgU+EQYW9y2cg1o1EWSZH45F69JojZEq8A0Wr3rTA0+hS+AERC6R0EzZU+zB o X-Received: by 2002:a17:907:724b:b0:a52:5795:226a with SMTP id ds11-20020a170907724b00b00a525795226amr7057705ejc.5.1713294082413; Tue, 16 Apr 2024 12:01:22 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id q5-20020a170906360500b00a51da296f66sm7135044ejb.41.2024.04.16.12.01.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:01:22 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum , Xiao Guangrong Subject: [PATCH v4 15/22] hw/mem/memory-device: Remove legacy_align from memory_device_pre_plug() Date: Tue, 16 Apr 2024 20:59:31 +0200 Message-ID: <20240416185939.37984-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=philmd@linaro.org; helo=mail-ej1-x62d.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 autolearn=unavailable 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 'legacy_align' is always NULL, remove it, simplifying memory_device_pre_plug(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand Reviewed-by: Zhao Liu --- include/hw/mem/memory-device.h | 2 +- hw/i386/pc.c | 3 +-- hw/mem/memory-device.c | 12 ++++-------- hw/mem/pc-dimm.c | 2 +- hw/virtio/virtio-md-pci.c | 2 +- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/include/hw/mem/memory-device.h b/include/hw/mem/memory-device.h index e0571c8a31..c0a58087cc 100644 --- a/include/hw/mem/memory-device.h +++ b/include/hw/mem/memory-device.h @@ -169,7 +169,7 @@ uint64_t get_plugged_memory_size(void); unsigned int memory_devices_get_reserved_memslots(void); bool memory_devices_memslot_auto_decision_active(void); void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms, - const uint64_t *legacy_align, Error **errp); + Error **errp); void memory_device_plug(MemoryDeviceState *md, MachineState *ms); void memory_device_unplug(MemoryDeviceState *md, MachineState *ms); uint64_t memory_device_get_region_size(const MemoryDeviceState *md, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 9ba21b9967..633724f177 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1377,8 +1377,7 @@ static void pc_hv_balloon_pre_plug(HotplugHandler *hotplug_dev, { /* The vmbus handler has no hotplug handler; we should never end up here. */ g_assert(!dev->hotplugged); - memory_device_pre_plug(MEMORY_DEVICE(dev), MACHINE(hotplug_dev), NULL, - errp); + memory_device_pre_plug(MEMORY_DEVICE(dev), MACHINE(hotplug_dev), errp); } static void pc_hv_balloon_plug(HotplugHandler *hotplug_dev, diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c index e098585cda..a5f279adcc 100644 --- a/hw/mem/memory-device.c +++ b/hw/mem/memory-device.c @@ -345,7 +345,7 @@ uint64_t get_plugged_memory_size(void) } void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms, - const uint64_t *legacy_align, Error **errp) + Error **errp) { const MemoryDeviceClass *mdc = MEMORY_DEVICE_GET_CLASS(md); Error *local_err = NULL; @@ -388,14 +388,10 @@ void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms, return; } - if (legacy_align) { - align = *legacy_align; - } else { - if (mdc->get_min_alignment) { - align = mdc->get_min_alignment(md); - } - align = MAX(align, memory_region_get_alignment(mr)); + if (mdc->get_min_alignment) { + align = mdc->get_min_alignment(md); } + align = MAX(align, memory_region_get_alignment(mr)); addr = mdc->get_addr(md); addr = memory_device_get_free_addr(ms, !addr ? NULL : &addr, align, memory_region_size(mr), &local_err); diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 836384a90f..27919ca45d 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -69,7 +69,7 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp) &error_abort); trace_mhp_pc_dimm_assigned_slot(slot); - memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, NULL, errp); + memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, errp); } void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine) diff --git a/hw/virtio/virtio-md-pci.c b/hw/virtio/virtio-md-pci.c index 62bfb7920b..9ec5067662 100644 --- a/hw/virtio/virtio-md-pci.c +++ b/hw/virtio/virtio-md-pci.c @@ -37,7 +37,7 @@ void virtio_md_pci_pre_plug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp) * First, see if we can plug this memory device at all. If that * succeeds, branch of to the actual hotplug handler. */ - memory_device_pre_plug(md, ms, NULL, &local_err); + memory_device_pre_plug(md, ms, &local_err); if (!local_err && bus_handler) { hotplug_handler_pre_plug(bus_handler, dev, &local_err); } From patchwork Tue Apr 16 18:59:32 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: 789252 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp438701wrb; Tue, 16 Apr 2024 12:02:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUhvCvtwHJY5Wn9yeRTPpMMzTpG6wJZII8IdVCsNfdJhdlEmF67VIW0T3QS6YZkGUdAzGxSCUf/8BGWDCWa9Z+M X-Google-Smtp-Source: AGHT+IGwwPoeIsQwCaqyyk8PV7RXlFa5ne4BDrkgm+Gzzy3JZ5GVTcky13s9kXipfkfy/Y5p/XnT X-Received: by 2002:a05:6358:824b:b0:186:24ee:8052 with SMTP id y11-20020a056358824b00b0018624ee8052mr13305121rwk.12.1713294153309; Tue, 16 Apr 2024 12:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294153; cv=none; d=google.com; s=arc-20160816; b=aTdaFKV1rNabV4lXR15zZeaQy/MIBzpqryw+jTEJqkcbsPESjJNR3udp8tuT+l3Lq6 AY1bcTdIVIyt76HFyG8jQ/7K25Xk+3B2nuA0dMB3P2EEwXRRWQcpL+ulwooHxYyrnyXo uTiJqhg4n6y0l/pn4oVyJ4b+UlnPqNTi0AsXtH08riUQ6oAMyieHBe9jUsXMDVi2ywFr CFrNG8R1sdqOxGjhG76CwlTNbIAM87XZ2GS6+u5q6srp+PjnBmon4yvgUpCsr9lkFW72 yKul4kwBiMlOWVKG5w2DEl/yxioBM6xJ9U+LSzw7oOZsW+OtYgB9ysAinUSKkFnbnlas A9ug== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rGmHgX0sXYbEat6EBpXLxmNF9uP2m/qR4kqm1cYWX4M=; fh=Uqt0A2tg8NLuowQtgwGUHH3RLPiRbFRGTgjh4/qBAos=; b=x4se/+NoFE8PppvmPaAcZbQ/7TebiSFf/cm/yncjGiQrHcOEUOd1t1fcOmtITD44br eiYDUHcsz3m5iNO7ieDHxhxsXWiQsbhN5H0W3qyH+wE7JcgAooT5U+sCyyELtVRedHoV VELEnwcdcB9tqBWZNkErOYf21AZoo9O7mRN/Tmgy2J3M2AYAmq1eQ5riN7IC2lTLTnkE xnutz67Xhzp6Moiv/K0RH1MvXRsOrNL6RoQ3h7bhuGTxoODznN/1kcK0GWi7UyTZ9F6F nmk83xwTWKsfAp9j4+oTF5wB5+W0mf6ZApHksjT2aQwqZIiHjo75XQEf/9AuBOkhOXwp AwDA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TCNJQdo5; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k64-20020a1fd343000000b004dceb5dabe7si137590vkg.123.2024.04.16.12.02.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:02:33 -0700 (PDT) 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=TCNJQdo5; 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 1rwo4D-0003M1-BX; Tue, 16 Apr 2024 15:02:05 -0400 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 1rwo3i-0002RD-Ie for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:36 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo3e-0005pV-QP for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:33 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-56e1f3462caso6079141a12.3 for ; Tue, 16 Apr 2024 12:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294089; x=1713898889; darn=nongnu.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; bh=rGmHgX0sXYbEat6EBpXLxmNF9uP2m/qR4kqm1cYWX4M=; b=TCNJQdo5lSZynmA4Esp7ZCml/zSiheREy0jKqGGUhJ08G3ubhrIS6bpbWHziKT9ob8 mUyZ9W3VWRKOyQcUVDK2Lk3+CI/q565SrfQNUmHbrejFbOqC5zFqy53QVJPnJFLT/BIx CWo9Z3IKnxM/MzX8XcmFUd4TErSwk/Pz4TstXeC12s9BFUJDCrGF2yrLHw9Cv8TcdtmI cVMz1wuNCWugitUrN/wvra2gpnt5jnnspo8xlADp3yiRio80QrL8UwmZ2RZ3Damyb71m HHiJYif6O/PJBrxiCwFfA/5XGxZd8CkPP2lcTJ2I1wRxr5GSZDdSeK12MYO9LtcQXwi5 H9Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294089; x=1713898889; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rGmHgX0sXYbEat6EBpXLxmNF9uP2m/qR4kqm1cYWX4M=; b=YPeClEdE7U15Bkznx1JiO5cez+nm3dnbhy/bZTDTjehVM88sOm9y8h6bQob20pWYzj tnq17AQcMHlRdQcqftYrs/Y/0VtJZoc/0SylZHfWuUpR8e6lO0cvKSaeekIrAUFmsC8s kbTO17X4Rf7x5HOdZR+I4IzjbuJRMtfu7Lvn+IxUqNc05yqVKZcpqYE9GaMFQmkMkSuM G/ewxNjqO69/VUwm/wzvjcSKAqvFrdISIKUq1f+2cTg+/R9rvvww1yJ9theN+dCCuItt 1fwayhUULYhGlsu08wX9xy9nhfrFsuo80RLrXIeSMvxCOglIzNz7Gv9Wj+bQU6gHVU1A 6t+A== X-Gm-Message-State: AOJu0YzPkciNQyTBcQer5q5mu3D5+Cb5TaofGvg1tWMRqEeRhIw0XicG EabP3RnX939U/PPj5OvfyhsLcplFTkwx26SVJAY06Os7bSddCNfuEEPiZdDD42VxMcKSz5j69Z8 z X-Received: by 2002:a17:906:2988:b0:a52:2486:299f with SMTP id x8-20020a170906298800b00a522486299fmr8851431eje.71.1713294088766; Tue, 16 Apr 2024 12:01:28 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id e22-20020a170906c01600b00a51cdde5d9bsm7211175ejz.225.2024.04.16.12.01.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:01:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , devel@lists.libvirt.org, Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH v4 16/22] hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine Date: Tue, 16 Apr 2024 20:59:32 +0200 Message-ID: <20240416185939.37984-17-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.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 autolearn=unavailable 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 The pc-i440fx-2.2 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu --- docs/about/deprecated.rst | 2 +- docs/about/removed-features.rst | 2 +- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 23 ----------------------- hw/i386/pc_piix.c | 21 --------------------- 5 files changed, 2 insertions(+), 49 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index a2a1b9d337..75bf0f4886 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -219,7 +219,7 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.2`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) +``pc-i440fx-2.3`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index 01c55103d3..4664974a8b 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -816,7 +816,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-2.1`` (removed in 4.0 up to 9.0) +``pc-0.10`` up to ``pc-i440fx-2.2`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 231aae92ed..df97df6ca7 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -274,9 +274,6 @@ extern const size_t pc_compat_2_4_len; extern GlobalProperty pc_compat_2_3[]; extern const size_t pc_compat_2_3_len; -extern GlobalProperty pc_compat_2_2[]; -extern const size_t pc_compat_2_2_len; - #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 633724f177..18bef7c85e 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -281,29 +281,6 @@ GlobalProperty pc_compat_2_3[] = { }; const size_t pc_compat_2_3_len = G_N_ELEMENTS(pc_compat_2_3); -GlobalProperty pc_compat_2_2[] = { - PC_CPU_MODEL_IDS("2.2.0") - { "kvm64" "-" TYPE_X86_CPU, "vme", "off" }, - { "kvm32" "-" TYPE_X86_CPU, "vme", "off" }, - { "Conroe" "-" TYPE_X86_CPU, "vme", "off" }, - { "Penryn" "-" TYPE_X86_CPU, "vme", "off" }, - { "Nehalem" "-" TYPE_X86_CPU, "vme", "off" }, - { "Westmere" "-" TYPE_X86_CPU, "vme", "off" }, - { "SandyBridge" "-" TYPE_X86_CPU, "vme", "off" }, - { "Haswell" "-" TYPE_X86_CPU, "vme", "off" }, - { "Broadwell" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G1" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G2" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G3" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G4" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G5" "-" TYPE_X86_CPU, "vme", "off" }, - { "Haswell" "-" TYPE_X86_CPU, "f16c", "off" }, - { "Haswell" "-" TYPE_X86_CPU, "rdrand", "off" }, - { "Broadwell" "-" TYPE_X86_CPU, "f16c", "off" }, - { "Broadwell" "-" TYPE_X86_CPU, "rdrand", "off" }, -}; -const size_t pc_compat_2_2_len = G_N_ELEMENTS(pc_compat_2_2); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index dcf50684a4..30bcd86ee6 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -429,11 +429,6 @@ static void pc_compat_2_3_fn(MachineState *machine) } } -static void pc_compat_2_2_fn(MachineState *machine) -{ - pc_compat_2_3_fn(machine); -} - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -828,22 +823,6 @@ static void pc_i440fx_2_3_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3_fn, pc_i440fx_2_3_machine_options); -static void pc_i440fx_2_2_machine_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_2_3_machine_options(m); - m->hw_version = "2.2.0"; - m->default_machine_opts = "firmware=bios-256k.bin,suppress-vmdesc=on"; - compat_props_add(m->compat_props, hw_compat_2_2, hw_compat_2_2_len); - compat_props_add(m->compat_props, pc_compat_2_2, pc_compat_2_2_len); - pcmc->rsdp_in_ram = false; - pcmc->resizable_acpi_blob = false; -} - -DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2_fn, - pc_i440fx_2_2_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Tue Apr 16 18:59:33 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: 789258 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp439436wrb; Tue, 16 Apr 2024 12:03:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUmUFvm/HJmjISaQS4f7bYyAnjG9wHCkE9kFWsS9+ufmhPte/eHsn+/UAYllyT/wm3aNtaoR/KI9PuoolRGLtFx X-Google-Smtp-Source: AGHT+IHvIR8QVmOh5K7X314dv7lxHf3zoRyiUSg0stTve7GvAQsjKMTHMX/ESVlvxGV/ofW5E4uL X-Received: by 2002:ae9:e719:0:b0:78d:6a12:e78c with SMTP id m25-20020ae9e719000000b0078d6a12e78cmr14731561qka.76.1713294228872; Tue, 16 Apr 2024 12:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294228; cv=none; d=google.com; s=arc-20160816; b=ah1VyVmHEKlZ7jcWlYvwPzaE4FGPCUhjtsjOTrtlA2ZGUHicJaYKhAeggiZA/L9MSS zocEQmYg5CD8Zvkg7utFqEnzAgNU4Lf7gFkbMAIVxVp2ns6rubSMud53EQ9A2C2sPew1 OTcRFZaPVYKKxlMaAJGzgFUfcp3/Tpc426QltSabxQzoEACl+khB+7jiBrGqj+PKicrT Oc0BIdRUB/o33A3T9TCsFWvS2Ua26z6wR5EoVgGO/reHdvKCvU14UhGgWppnbMAVNaW+ RckJEmgNA7vQuuCC1Jp5e+dgQ7ZFnw++WxAS1w2gxzcS8var9yTsi582aEEN2XsP0zME CskA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zBppzEDS51MDAVFf+oWkcwnoJzt4m+loPuqdwyia2Jo=; fh=eauqfbkYO4/mrdoPGx7VR890hAibIj7KJfQPTMae5tE=; b=Wf+eWJfrh661r96Zmco7WmdwRYcm6538nUDNgOxPsbGVICYhKvtlBvn1SSg4EM4Yxw dzAXlBJBxIF+wyku9UCLh2PVStsArqbMJlEuhTsv2J+FrU4xxUikyZrC3SsvYMRjEYJa TwFtjVwWEBQz1il0hi4vq6k2XJQ5RP3szWj7VuMgGihN9gSpJDcmiLvRFidj01ZKt3bg K7onJEthjI1UlOBvTYMUiwAtfvP7dliS8+ycoKiKwZskJGbNxtYiUAJHMWP1nBxyp/oE rWBMLvL86dxxHP1Ss9BcrtnahVgmLuQ1IlRMSnW2XJniRIKiwB1EwRf1jGKsZ1gECtAd luQA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZmTXwUHm; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s23-20020a05620a081700b0078ee776093esi5595136qks.34.2024.04.16.12.03.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:03:48 -0700 (PDT) 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=ZmTXwUHm; 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 1rwo4I-0003uI-Sw; Tue, 16 Apr 2024 15:02:11 -0400 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 1rwo3o-0002Rl-2B for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:46 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo3l-0005qI-7s for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:39 -0400 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-518a3e0d2ecso5866108e87.3 for ; Tue, 16 Apr 2024 12:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294095; x=1713898895; darn=nongnu.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; bh=zBppzEDS51MDAVFf+oWkcwnoJzt4m+loPuqdwyia2Jo=; b=ZmTXwUHmj3q8U46KRPzzCOlT5o+Qs5NxLPpWYpiWtZAed6DmykGp3FvwOplHl7+4PG iRaUdN6ls0+7n+L9fChk+25qfm4YmyEABSx4Cwa35Syy/qJUk073kM1S69PW4MrguJ+t h85agyaasw/xS+wCi9dBEPhqJdNWec9Rqpz9aSs8NVxi60U1FHkY12lruJxY5J6btLua L4syHbqkKePjZddhocx7bBpUFin/8UNzHrfVTwRw7wZ4Eqi67iOKDCP7lurDIZaL8b7J tSmbzNMViV9lY44CbzkT2TXYbpHouHNTLw8+oXDZ+W0RNJx6Lv6ppXPOl7xMJd6aKpGa XXYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294095; x=1713898895; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zBppzEDS51MDAVFf+oWkcwnoJzt4m+loPuqdwyia2Jo=; b=m4bMLnl6QHMhCVuspxXEGxLR+OcPQj+r92W8FqX5tH7FHl33CKdFNkrxWi/nn/meVt QYU+HeKgGxfzjDqZz16OKDJIggF7b0lKoQTZOiLIMF2tiMMAlbxmWkakeFWe1rsMC39h m6SWY94PYVFBYLXQbZXU55NjqC22qc2Hzf1Scl7xovcVGFFVTdV762Xb+pTYeFlIlkp4 Lzy4PlB2iFwtjmUTMsYmmuFrwppfl0XbB209+nBc9kGQkKt8hh+dLqhSiCbOFhALn31Q kWtD2SrohrUqt7rxSsCZUo3u4r26C+o4sDUQgEY4aKS5/8ISLPfIInktLBh1gp0kG1JL GGPw== X-Gm-Message-State: AOJu0YxKlYyaqUc+cd1uywCkx7JAVHRDhu3p1vuKqeamJDC5gIMtq2Y3 BwKHi9vEfJW3nFhIMlmdLhkCnlwTf6KthkLY3DyY+Ump1FdFS6mZffaILyoOA0LqgkUQ/jHDEhH N X-Received: by 2002:a05:6512:3091:b0:518:dd52:600a with SMTP id z17-20020a056512309100b00518dd52600amr7046791lfd.68.1713294095267; Tue, 16 Apr 2024 12:01:35 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id en15-20020a17090728cf00b00a522fb5587esm6391223ejc.144.2024.04.16.12.01.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:01:34 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Ani Sinha , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH v4 17/22] hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob Date: Tue, 16 Apr 2024 20:59:33 +0200 Message-ID: <20240416185939.37984-18-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=philmd@linaro.org; helo=mail-lf1-x12f.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 autolearn=unavailable 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 PCMachineClass::resizable_acpi_blob was only used by the pc-i440fx-2.2 machine, which got removed. It is now always true. Remove it, simplifying acpi_build(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 3 --- hw/i386/acpi-build.c | 10 ---------- hw/i386/pc.c | 1 - 3 files changed, 14 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index df97df6ca7..10a8ffa0de 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -124,9 +124,6 @@ struct PCMachineClass { /* create kvmclock device even when KVM PV features are not exposed */ bool kvmclock_create_always; - /* resizable acpi blob compat */ - bool resizable_acpi_blob; - /* * whether the machine type implements broken 32-bit address space bound * check for memory. diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index a6f8203460..ab2d4d8dcb 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2688,16 +2688,6 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) * keep the table size stable for all (max_cpus, max_memory_slots) * combinations. */ - /* Make sure we have a buffer in case we need to resize the tables. */ - if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) && - !pcmc->resizable_acpi_blob) { - /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ - warn_report("ACPI table size %u exceeds %d bytes," - " migration may not work", - tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); - error_printf("Try removing CPUs, NUMA nodes, memory slots" - " or PCI bridges.\n"); - } acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); acpi_align_size(tables->linker->cmd_blob, ACPI_BUILD_ALIGN_SIZE); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 18bef7c85e..c4a7885a3b 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1755,7 +1755,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->acpi_data_size = 0x20000 + 0x8000; pcmc->pvh_enabled = true; pcmc->kvmclock_create_always = true; - pcmc->resizable_acpi_blob = true; x86mc->apic_xrupt_override = true; assert(!mc->get_hotplug_handler); mc->get_hotplug_handler = pc_get_hotplug_handler; From patchwork Tue Apr 16 18:59:34 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: 789249 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp438631wrb; Tue, 16 Apr 2024 12:02:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU0uV3jlbZ4a8kh6eG8ciW61x+owgaOHng+jh7n8vZewZYR4Czt0l4Vohh6Y7rp6yNYQo2p4DEqy6ln7q1BIMTc X-Google-Smtp-Source: AGHT+IHbi6cRDna6u4AuawYqDqYNamowu5W/cTK5NKGNmkjWccdtzTzVJcsuhkQf6rJPGAPQrzGs X-Received: by 2002:a05:620a:1092:b0:78d:77cd:1bd4 with SMTP id g18-20020a05620a109200b0078d77cd1bd4mr15451970qkk.71.1713294147739; Tue, 16 Apr 2024 12:02:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294147; cv=none; d=google.com; s=arc-20160816; b=BP8xA94C1hey6EjoHUSVijXG+VpBTTTuHhLrBGkQRpDTpjv/fMxwQ7/Pgm5L0Vbc3F fBH6AmsWfsnwmRLv0bx+wIjnDSv5yknhubZHCUxZVWh6xw9UWW0JZhBlm1142TcoKTFA 6FLaku89ZGBiVZ/HQoxoPtSGlDuHKDEJEdIOCjpyZYalEx7LRkQpg85t2X5pdM8Izv6S me2U8gEPtq+9o55Kyj+2w1tisb5mLi57s/wD6a9Vt7iuioUKO9ZNq2IY4d2r/D3AsCm0 SWxNErkxgerl0zOkqgL0ugYu4t8kOY6jFEqtVuFDFuzDV24L5lXi5K4GEsbiMwZi0Q/v 4UQw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=M+KMTbrbI+PCZ7l2nXt22iBk719lD5OjaX/6s+DU33I=; fh=eauqfbkYO4/mrdoPGx7VR890hAibIj7KJfQPTMae5tE=; b=a75VUdu8qSFoGXTu2bKsoWicm5SGiMnOpHSDQ2lZ+YgWcZHKiQEJBtS5h5zSv3j3Co JDi70iWqrnb1fHcKM41khbA+zDnnGMTegEgxXSTGEA7qfC1KfQNSP1tDjzqf2n5XSqJ4 ujRu28GyqGNurX+xvSgtTYw6A5qj93KStIy/PqUZXjh6MthJc7Lk2EzfHhK/Vfmd05y0 MgvyluD24S36PItvW8gzD3brqfESwhKLBN0mARzAkaHtMhfUChkJpFptKDzrOQYXaHd+ mprwdWfy+RPM84wRytW1izv8XYXvzZGUnsQEDxWLrelQ94pLYf5g8OcQhttJNQp9K8t0 vy9w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uqo1AA4M; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z17-20020ac87f91000000b00436a015912esi10579014qtj.482.2024.04.16.12.02.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:02:27 -0700 (PDT) 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=uqo1AA4M; 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 1rwo4C-00038w-1r; Tue, 16 Apr 2024 15:02:04 -0400 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 1rwo3u-0002Vv-TB for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:52 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo3r-0005r3-6e for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:45 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-570097653faso3454494a12.0 for ; Tue, 16 Apr 2024 12:01:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294101; x=1713898901; darn=nongnu.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; bh=M+KMTbrbI+PCZ7l2nXt22iBk719lD5OjaX/6s+DU33I=; b=uqo1AA4MdYaITEMhKzBuWX8qibui/rIMAGFD0NpeE2JTo0xa+AHzQkmlTimFPfD4ja VsiWJ/y2gBfD3PSInTWel+VIFUmtMSdoNsTcFCHiAlUNbr+ow3xdTXXtr7+5NZI+CCer /QvxqKIUwuhnZbRknddldKrK+Iwen+LTRJSm8UjwcVLmvAvAdHlkHvTDh+dfnMu1isch bU/Q0TyzQsARe8O8EFWOHz/Y/Qxq3ocnvXaKkdU1l7r0R3J9fDOgNmfv1ttjjOXFVg6i KA8JM8lTzKWZ7s0+bxhIqMbB0Mo9bSYyPvUXnHFtLFfWo//04X/STlertdgH4cDIOOX7 BZ1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294101; x=1713898901; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M+KMTbrbI+PCZ7l2nXt22iBk719lD5OjaX/6s+DU33I=; b=uBYLk/7DzhI5Mi0o98dv0xQg+OO/Qe1lNDREyM2BGJi4RcvTJBqG2/1cmaLY0SXnzq viTlhgAsWMp5+ZR6hhyJxQtutGZg0+RXleMu3Xsdaf7XS80TgJ8wSFRG9mYftFf4pT0k yw+DJ89rvGaLP7bDoMkZMXykXh83udmigMEVFMd3IWIeH6XMOLtk1cpLMgvtK2KLBoZ8 ADrKLVROXmi0AENvZ7konKqoFUvHry9Z35i0/wasok5/qKQ0uRVYBVKC50xwBNLLnjqF jBmpyAVJ2TjW01ecdLuWD0OHOSD8/qTo1McU18JpoP3VvwrITAYr82IN/LM92GvDB6P0 Zgvg== X-Gm-Message-State: AOJu0YzAWr+AADd7UDtcoWGfpMcVLQx6P6++Te8Ax8JVt9rcD516aUTb Ubbz7MrdzPH0r7Mczt/AykHXQzwisyAPxoev6A/sfc3lMJ/CrpETITspPrL4Isrz31d6XlBDjSD 7 X-Received: by 2002:a17:907:72c9:b0:a52:53f3:af3c with SMTP id du9-20020a17090772c900b00a5253f3af3cmr8756708ejc.10.1713294101517; Tue, 16 Apr 2024 12:01:41 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id cw4-20020a170906c78400b00a4e58c74c9fsm7141780ejb.6.2024.04.16.12.01.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:01:41 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Ani Sinha , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH v4 18/22] hw/i386/pc: Remove PCMachineClass::rsdp_in_ram Date: Tue, 16 Apr 2024 20:59:34 +0200 Message-ID: <20240416185939.37984-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=philmd@linaro.org; helo=mail-ed1-x52e.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 autolearn=unavailable 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 PCMachineClass::rsdp_in_ram was only used by the pc-i440fx-2.2 machine, which got removed. It is now always true. Remove it, simplifying acpi_setup(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 1 - hw/i386/acpi-build.c | 35 ++++------------------------------- hw/i386/pc.c | 1 - 3 files changed, 4 insertions(+), 33 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 10a8ffa0de..96ccb4583f 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -100,7 +100,6 @@ struct PCMachineClass { /* ACPI compat: */ bool has_acpi_build; - bool rsdp_in_ram; unsigned acpi_data_size; int pci_root_uid; diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index ab2d4d8dcb..ed0adb0e82 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2495,7 +2495,6 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine) { PCMachineState *pcms = PC_MACHINE(machine); - PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); X86MachineState *x86ms = X86_MACHINE(machine); DeviceState *iommu = pcms->iommu; GArray *table_offsets; @@ -2667,16 +2666,6 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) .rsdt_tbl_offset = &rsdt, }; build_rsdp(tables->rsdp, tables->linker, &rsdp_data); - if (!pcmc->rsdp_in_ram) { - /* We used to allocate some extra space for RSDP revision 2 but - * only used the RSDP revision 0 space. The extra bytes were - * zeroed out and not used. - * Here we continue wasting those extra 16 bytes to make sure we - * don't break migration for machine types 2.2 and older due to - * RSDP blob size mismatch. - */ - build_append_int_noprefix(tables->rsdp, 0, 16); - } } /* We'll expose it all to Guest so we want to reduce @@ -2755,7 +2744,6 @@ static const VMStateDescription vmstate_acpi_build = { void acpi_setup(void) { PCMachineState *pcms = PC_MACHINE(qdev_get_machine()); - PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); X86MachineState *x86ms = X86_MACHINE(pcms); AcpiBuildTables tables; AcpiBuildState *build_state; @@ -2817,25 +2805,10 @@ void acpi_setup(void) tables.vmgenid); } - if (!pcmc->rsdp_in_ram) { - /* - * Keep for compatibility with old machine types. - * Though RSDP is small, its contents isn't immutable, so - * we'll update it along with the rest of tables on guest access. - */ - uint32_t rsdp_size = acpi_data_len(tables.rsdp); - - build_state->rsdp = g_memdup(tables.rsdp->data, rsdp_size); - fw_cfg_add_file_callback(x86ms->fw_cfg, ACPI_BUILD_RSDP_FILE, - acpi_build_update, NULL, build_state, - build_state->rsdp, rsdp_size, true); - build_state->rsdp_mr = NULL; - } else { - build_state->rsdp = NULL; - build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update, - build_state, tables.rsdp, - ACPI_BUILD_RSDP_FILE); - } + build_state->rsdp = NULL; + build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update, + build_state, tables.rsdp, + ACPI_BUILD_RSDP_FILE); qemu_register_reset(acpi_build_reset, build_state); acpi_build_reset(build_state); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c4a7885a3b..a1b0e94523 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1745,7 +1745,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->pci_enabled = true; pcmc->has_acpi_build = true; - pcmc->rsdp_in_ram = true; pcmc->smbios_defaults = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; From patchwork Tue Apr 16 18:59:35 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: 789254 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp439011wrb; Tue, 16 Apr 2024 12:03:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWARO6sY0DXDiULjWS5c17MpYatqB0TFseXygMblxWt2JrejJflCG5BMfZyrlxUTbJ7F5AxC64C4Riu/lgdMobO X-Google-Smtp-Source: AGHT+IE7Qo7oWxdaxU9pZcoi2ouoO/DT0W/iH7PDUwe9cwJyxee8mQal5okpvtOk+bbUvikmvN02 X-Received: by 2002:a05:6102:3752:b0:47b:a381:fbcc with SMTP id u18-20020a056102375200b0047ba381fbccmr705407vst.8.1713294185268; Tue, 16 Apr 2024 12:03:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294185; cv=none; d=google.com; s=arc-20160816; b=PRfcWiMsj/id/pLcWuGTMEcBnlJvzgNNNcEIgZJ50v/kEYhkw0ya39M0eVoiI+AmFa DuLVFkFLSbKsvZADAtQmkc7ggHDbtaHAPXx0fUKDZdcAbkeezzRFHYfxZy/g3PgLnZQ6 dydZp2Jo8U+V9NlYxNsu/tMBXJH5JMSuTuSvfPfqSAx4GeUS7Q5EKysl+GeH3X79Du8M 96os2akCePMqcSWxaxJ11IpEkAy2a3Ir0aujqsz2lEe2F3B+4Jheste6tMrP4H5YwKa/ j47BpAprVWOc7HjOdF6taALK9s3CxcWbOFX/hfU00aN87FUr7hc3r4EUYR0qjZxhkxQ4 4hVg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DC2xHT4tK3V/eBcSroqFKTXibEqMvehvouzWEl1ZI6k=; fh=eauqfbkYO4/mrdoPGx7VR890hAibIj7KJfQPTMae5tE=; b=xsoEWgAThE2N4s2Xh/Fzey1w7EmzXYA+JjUB9NammHdnLCciHm336vSYoP47ednbAY P5IFqAnt2Q6M+5XpjN5hHmT170JwGmCUnsM9ULZ3eZL7WMym1YOjyT/nNIPJ9QvV2iU2 OJt2ZNwkNI93He70asYu5YUYzJfP57Gp+vBSteP3nx+3S9X0PSH+l89DTsd2pWlwMLGp Fjl1FCnB5y7nCLvwjklEHrVm9diImnRdA7Gv16j6AcxWgUoajTASgQrQN4Cs0uscFHdy Rym9CU9AYqy+HUicwBOplLWZ4BCrBtAtqQ+yhXcn3YpT2LW7PaHK4XGwlkVvWyC5CGjp nzbA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Vw0qqSfo; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id is4-20020a0561026a8400b0047841cf7707si1743724vsb.514.2024.04.16.12.03.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:03:05 -0700 (PDT) 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=Vw0qqSfo; 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 1rwo4D-0003Lb-96; Tue, 16 Apr 2024 15:02:05 -0400 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 1rwo42-0002XR-HV for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:56 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo3y-0005ry-BB for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:54 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a51a7d4466bso543572466b.2 for ; Tue, 16 Apr 2024 12:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294108; x=1713898908; darn=nongnu.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; bh=DC2xHT4tK3V/eBcSroqFKTXibEqMvehvouzWEl1ZI6k=; b=Vw0qqSforRQa8b8XeeRigOAuP82+FE3k52mrDXI27fKw2FiHNLOORUQ5EBxz+Qu473 ijU4lQdt2iTYzULIMQU9NsSrXsjWEjfHivjtkCHrQU6GNmY0UekaLGKZ10feQLkIIegb INBQX4Txjh9Suy+sH6Q+GxSmfi2VWiq7fzvrY5mq40vRfsH6MZY+SUr38y4m182BWqRy ztEHWCJoGF56VgM1/1eXqMrRDWVLtDqCxw0dIus287gvgjTwoFdI6FPYXtG2ppMwlT/8 Ib0gHKCKiG8zCwJtdRQSeSXoW4qbva9niIammY2eyYU6xOxPxvKR1REd2pQ8RrlHO4NY 51NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294108; x=1713898908; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DC2xHT4tK3V/eBcSroqFKTXibEqMvehvouzWEl1ZI6k=; b=tiL7rUk7CkS210v46K0jQQW6YOlr9Xi+XodFHqI8nIvjmwPQ8Ykarcyo66dMQSWODU CEjOYq/xwmMqs+x0Uu3YrOGj31a619eFOVRX9Xi+u65yu0jJsLbBRZq2vjt4tHHTN2pz dC0hDPj4/yD6OEOrE+qpze+YKQkcsQcjAsh4mNYlgwD6B+l/caCZHse/RHGP26U9ZdEH anETqV2ECvuVd3qxGrQoo4C6gDxCCXNPn0tcae50+wwuBRM/NobvpojL7/ORXT2UIkSF lxrEM+rBhXci7lDm2L5lKxvibGnpKHbEtf3YZB1xtMqtPHZLr8YSkoqCe1xAnjoeljsV pfDg== X-Gm-Message-State: AOJu0Yxs92bjBPdqCuCUg9cGK6cffwqWpAg390PCUm2PmnsVGzqk2srY iu/Y25VuRKwiPKvuVbUYXrQ1zoePw3Fv/JyOO+mt3KjS00aip3otJS+alpfwadAdsKIUXdocEKl K X-Received: by 2002:a17:907:724c:b0:a54:e183:6249 with SMTP id ds12-20020a170907724c00b00a54e1836249mr4000170ejc.56.1713294107715; Tue, 16 Apr 2024 12:01:47 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id v13-20020a17090606cd00b00a526562de1fsm3471599ejb.73.2024.04.16.12.01.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:01:47 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Ani Sinha , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH v4 19/22] hw/i386/acpi: Remove AcpiBuildState::rsdp field Date: Tue, 16 Apr 2024 20:59:35 +0200 Message-ID: <20240416185939.37984-20-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=philmd@linaro.org; helo=mail-ej1-x62a.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 autolearn=unavailable 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 AcpiBuildState::rsdp is always NULL, remove it, simplifying acpi_build_update(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu --- hw/i386/acpi-build.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index ed0adb0e82..6f9925d176 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2459,7 +2459,6 @@ struct AcpiBuildState { MemoryRegion *table_mr; /* Is table patched? */ uint8_t patched; - void *rsdp; MemoryRegion *rsdp_mr; MemoryRegion *linker_mr; } AcpiBuildState; @@ -2715,11 +2714,7 @@ static void acpi_build_update(void *build_opaque) acpi_ram_update(build_state->table_mr, tables.table_data); - if (build_state->rsdp) { - memcpy(build_state->rsdp, tables.rsdp->data, acpi_data_len(tables.rsdp)); - } else { - acpi_ram_update(build_state->rsdp_mr, tables.rsdp); - } + acpi_ram_update(build_state->rsdp_mr, tables.rsdp); acpi_ram_update(build_state->linker_mr, tables.linker->cmd_blob); acpi_build_tables_cleanup(&tables, true); @@ -2805,7 +2800,6 @@ void acpi_setup(void) tables.vmgenid); } - build_state->rsdp = NULL; build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update, build_state, tables.rsdp, ACPI_BUILD_RSDP_FILE); From patchwork Tue Apr 16 18:59:36 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: 789257 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp439414wrb; Tue, 16 Apr 2024 12:03:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUZ2mLrQQAq9XyKkgZ8YiSZ/uLxv46gygvQ5ooAd2Oe+fguqe/ieYmJwlfqPeg0IXRHUw0mA2VRKfPc0jF219o+ X-Google-Smtp-Source: AGHT+IHhW2uezi2tnYvBiF1MXRY62eFLLOTCeRs0i3iwV0KSgn7YyrL989r8KZzqzZl2DH9xA2fb X-Received: by 2002:ad4:4d46:0:b0:6a0:4134:cefa with SMTP id m6-20020ad44d46000000b006a04134cefamr1145899qvm.14.1713294226869; Tue, 16 Apr 2024 12:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294226; cv=none; d=google.com; s=arc-20160816; b=OhZ1nYx4Pzvc6UkYJKLbjuB7Iyp5mgMbeTpBNFOumnGe2+x/CSir7x+Zm3ZCFxeVrj lIzCInrLfrw9b9hCnSBbM2cWWdz7n2Mw/kZW4ySsRZLD+HVgEqkuUBow1UitYFN0FFgG oAh959Esj+RV1cDvNGTQPOGGm3qRWNrcDbsjEO9dFX44rR9PWhXrSWdERsQaB3vkMSjf RQgBlMftXtiSpMNFw8cEvw4mpNT/B2MrvGRNIjI+jIHdP9UpobATRw7tzYovzUcPVaSu Uz2gunrD4RehJL9p9nFnwazsB6hLzRMjVBP8NCSYoLZ9mf37qBlovoGKenncavrjoDQN 3pMg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yRDJ/6CeDpX+rBaqWai3BvHbA1Ey+M3PEP71cuI1QCM=; fh=j+Z5F8FQk2+CJ8DbWukgIlvgNICVT2p4DyGZpEx0yaw=; b=zv3vRiQLlnBXYFcFcKf3jWe+yN7+G0BymzjBh1qJEsU808C7S3NXyRXqyl2Ebq8FMl 1LLkpVl7MxUG1TZSy6ziBVIef6GEFiS80/2kN9eDwxlh8/95HRf7eVkZKp5TiS1g+sN2 WQVT5ATEMP2D3nCbtOYCA6oSycML09cSVgYbCUwK2jbXgWaPI3bqylF8Vv0B924wedz1 yiVAC6SfkvInyD9sRDkVSOvtrALN0gSpZj4Ww/joZqbDTfFaO8CiToN0j5H5gNc34VMA qq+9PXRnIL8l4E+Bg0soT/mcqnU9tCK1fXqXXYDaPUgQHijGWu4KnWIG3NL+qBXh5FC6 AY+w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m2DHMs2z; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ed3-20020ad44ea3000000b006a042cc3e42si425930qvb.332.2024.04.16.12.03.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:03:46 -0700 (PDT) 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=m2DHMs2z; 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 1rwo4M-0004IR-Le; Tue, 16 Apr 2024 15:02:14 -0400 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 1rwo47-0002v0-Mw for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:02:00 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo44-0005sg-5Q for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:01:59 -0400 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-570423c4f80so1413002a12.0 for ; Tue, 16 Apr 2024 12:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294114; x=1713898914; darn=nongnu.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; bh=yRDJ/6CeDpX+rBaqWai3BvHbA1Ey+M3PEP71cuI1QCM=; b=m2DHMs2zy2GwUfVXQEhJ88Tfb1wPPo3dABZmpNUi+8WiVMDjJsrPhhMtv5bsmW/oja ir4X4tr/E3Xr6LaP/MSqs52r1WXWCsUP/AEkRDP/JwPu0v+vRiDEE7o38Owe+XwvJ7nx FIZwFzJSTTq42djq8XpvIWnE6asWk8KgTf63pEeeR/RbkQYiZmiLHdj/duldgLXcbnsu dXxbQjtBLqxBbXnV2/sjxakA24tYbxjoTC/S3UUTyVG/FSeIhKkWn0fkd9dZ/gi23LW7 BZI485uLuhQKLU+b8TPA4rcvpoR6fWrVpNuQBQ2zhec0dFt57M2Nc7sJ/I8Zdi0XDI+b 4ZEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294114; x=1713898914; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yRDJ/6CeDpX+rBaqWai3BvHbA1Ey+M3PEP71cuI1QCM=; b=bYlMlrwp4CBlxawxmjXeVnHx2fk/pymiLpJxllb9I5k8Aic0/ZOmpLxCslprFOGG27 jZIs3QgKDLKbh1y+QUEFNvIStsrHskhpVoBalE8vMbF+8fIoVTk/AUvcLWA/s0naWR/Q cOmkKkwy/jpNWjWkJz4Espy8x2b/TMTxxH93wdZ52wbFPQa6ifzfAeJwNAl7TlMwONWs 40Hz5sMz05sOaoD8LKhtXvixvsU4nUWe3ioNy0FvR0UW6D4eKsYSk7mBGt8f7T1VpHBr 311GqI78Y3mPox5FDe4BA9hLpgv6J3ZuEscvNqiRdiAi+Ifsh79mIVtrgxvYzLzPMpLu /uoA== X-Gm-Message-State: AOJu0YwErp7toFOriiAdNnzKM4QlMsUuujxbC6cpv4bvfrj3Yde9DqkG BJ+T41AI9F/WQbJgUkqYo2gU0X2a3jFmNIEvg3pbKnmgA0IQuKsF2m93RJW5WvtATgHaLswdzvR W X-Received: by 2002:a50:8e5c:0:b0:56e:2a0a:c133 with SMTP id 28-20020a508e5c000000b0056e2a0ac133mr11019517edx.22.1713294113891; Tue, 16 Apr 2024 12:01:53 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id z3-20020a056402274300b0056e3d80ca71sm6417110edd.35.2024.04.16.12.01.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:01:53 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH v4 20/22] hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine Date: Tue, 16 Apr 2024 20:59:36 +0200 Message-ID: <20240416185939.37984-21-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=philmd@linaro.org; helo=mail-ed1-x52f.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 autolearn=unavailable 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 The pc-i440fx-2.3 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé --- docs/about/deprecated.rst | 4 ++-- docs/about/removed-features.rst | 2 +- hw/i386/pc.c | 25 ------------------------- hw/i386/pc_piix.c | 19 ------------------- 4 files changed, 3 insertions(+), 47 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 75bf0f4886..cb6ca372f2 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -219,8 +219,8 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.3`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) +'''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have various pitfalls with regards to live migration. Use a newer machine type diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index 4664974a8b..0caa6a63e4 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -816,7 +816,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-2.2`` (removed in 4.0 up to 9.0) +``pc-0.10`` up to ``pc-i440fx-2.3`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live diff --git a/hw/i386/pc.c b/hw/i386/pc.c index a1b0e94523..2e2146f42b 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -256,31 +256,6 @@ GlobalProperty pc_compat_2_4[] = { }; const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4); -GlobalProperty pc_compat_2_3[] = { - PC_CPU_MODEL_IDS("2.3.0") - { TYPE_X86_CPU, "arat", "off" }, - { "qemu64" "-" TYPE_X86_CPU, "min-level", "4" }, - { "kvm64" "-" TYPE_X86_CPU, "min-level", "5" }, - { "pentium3" "-" TYPE_X86_CPU, "min-level", "2" }, - { "n270" "-" TYPE_X86_CPU, "min-level", "5" }, - { "Conroe" "-" TYPE_X86_CPU, "min-level", "4" }, - { "Penryn" "-" TYPE_X86_CPU, "min-level", "4" }, - { "Nehalem" "-" TYPE_X86_CPU, "min-level", "4" }, - { "n270" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Penryn" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Conroe" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Nehalem" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Westmere" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "SandyBridge" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "IvyBridge" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Haswell" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Haswell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Broadwell" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Broadwell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { TYPE_X86_CPU, "kvm-no-smi-migration", "on" }, -}; -const size_t pc_compat_2_3_len = G_N_ELEMENTS(pc_compat_2_3); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 30bcd86ee6..370d130a6d 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -421,14 +421,6 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp) * hw_compat_*, pc_compat_*, or * pc_*_machine_options(). */ -static void pc_compat_2_3_fn(MachineState *machine) -{ - X86MachineState *x86ms = X86_MACHINE(machine); - if (kvm_enabled()) { - x86ms->smm = ON_OFF_AUTO_OFF; - } -} - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -812,17 +804,6 @@ static void pc_i440fx_2_4_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL, pc_i440fx_2_4_machine_options) -static void pc_i440fx_2_3_machine_options(MachineClass *m) -{ - pc_i440fx_2_4_machine_options(m); - m->hw_version = "2.3.0"; - compat_props_add(m->compat_props, hw_compat_2_3, hw_compat_2_3_len); - compat_props_add(m->compat_props, pc_compat_2_3, pc_compat_2_3_len); -} - -DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3_fn, - pc_i440fx_2_3_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Tue Apr 16 18:59:37 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: 789256 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp439343wrb; Tue, 16 Apr 2024 12:03:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX7n8kazjFhC/flF7vFSHA7mE3/AE9M46P24CeN26cDgaOzk1zZWq9FQvrEGQlFOEjWIc08fJwVRrpajWexRE4L X-Google-Smtp-Source: AGHT+IFlH4CnudbjXTC/B8QbEzks0OvOZQy0/lAzu2xQ6JUfv4sSScB+we62vh6ku8TPzWRmSA/k X-Received: by 2002:a05:620a:262a:b0:78e:bd7f:4db4 with SMTP id z42-20020a05620a262a00b0078ebd7f4db4mr16788519qko.51.1713294219981; Tue, 16 Apr 2024 12:03:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294219; cv=none; d=google.com; s=arc-20160816; b=OGhwla6hv3FnGi2Fgv0hIutwUAdrGIPbFS0MTIQXGexJtxZPJZgdVMmVq4J4GC+LdN BsqoEx4vAlAObTjwGQeBGDfteoCI34hjZQGNPzxoJco9/DK+9mKuPROPbSK3lWkT5zRt 8FhSrOEnWUglx3LZrz2igFByYUBOTWO8c9L6GuuiFO4ni9VjTtjjOBY1Onjll7p7saXr cKEZ7t2B06BstcMn4XjAg0bQEZgLF7kPvIqf4yMydpqLonieVqtkTsVTY/H1rZklmVR0 F4iuRPlGoUCX6LjQiA8a1yjS4VhZKfXoatLiTMp556aLMDy4SwAsa6m4sSp8VAcMrFd4 L92A== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=h1653K/UfEWnXUTbr/YeJw2UmUosHHOUFfds+vppZrE=; fh=cQusuDe0NwnVa0lqDP4K3TS7P79nva3vadgtcy3608E=; b=HbIOs/DZDavvAHwCOkpr/yaz8RgcuZlbWtDRCdPv0dcCE6bLQr3IzWgkpbPiTrVXgA ClS0n8LnX0dzX6O9/imLdGvuoy2jAuRkSXribEbtwHKCetGf1vR+E6uEXo52ob6pCZru PFVwTrhF6c0HdbAteswnXsceZT0h8nVHAhTiui7XqcDwk9Vt9QjkRNuiLYWhOGD+8NeB bTBEFk3GqpheBSz+NKhRi6fsV+7UzZo7ZXZBu9M88fQOdRHdi1jD5RhYq4kWyaGLntKB LFIoeNRUQQe/AxzFJ8HkUYtn7PLL2GRY9h0qRRuMKXvRoc3ddpqBRC2Ffc3zihBYKgWI ZexA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m1uu1bXd; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s3-20020a05620a29c300b0078ef1cadd38si3735202qkp.685.2024.04.16.12.03.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:03:39 -0700 (PDT) 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=m1uu1bXd; 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 1rwo4V-0005U0-SZ; Tue, 16 Apr 2024 15:02:23 -0400 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 1rwo4F-0003go-Qp for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:02:08 -0400 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo4C-0005tr-Cm for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:02:07 -0400 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-516d727074eso6174608e87.0 for ; Tue, 16 Apr 2024 12:02:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294122; x=1713898922; darn=nongnu.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; bh=h1653K/UfEWnXUTbr/YeJw2UmUosHHOUFfds+vppZrE=; b=m1uu1bXdSeZn95aU1obdUE+N8UpmxJNLlyH3r5X5RSKi06txBlJsLRQMVBh4ZsI6oF 5SYh+aa3YvHPNO7p7hmWL4GoJM6y+1BmZLf0oAN5c+VksvXVuAzi4WDIYOHa55cEmeuo p6kGy1xPcalKykCSlcGZNtkDDG2qDia+dPBWx8cqd6MWi2IuqEIJKXfs6Am7oqYbRWyh sE0DSE8LLy/rO7cGXPJ9ldDrUJUkz75P8fB1knZhlRw4cv8qbpwdRaR6GAwzVwvWlQaV /jPjxRMF7RgywrF0eqmm4sigJdTvVFCWIvenwqELTHiZJg5QDQQiAd3sIf69i3LZsdk6 kSCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294122; x=1713898922; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h1653K/UfEWnXUTbr/YeJw2UmUosHHOUFfds+vppZrE=; b=cRo7V9DtRM702xcrFGDGenQ9NANCw55BAN3iDkzO0ND/dYr21hjOYzmRq0OGoSZ4iT Mn3ZEW2+zVkwG2NcvCz6L2GEXYkKkvwh2QC8lW72XTWd5OyG+/i9oYVW2gYKxgPGY/7Y 45DRWN+6uYXmbhF7eMfn1puY/nO9m77/YWkSPZ3CN9qc8i3BaFME6pu5vQK7Rx8626Pc r59VO3daQW1S9QOw7Xi0vgTaoIr3Z1UGWZ7RXk8ri64Wg7cV6NGm53dtU6Iibdt5nfez oQVCp0vjaBWWuG3f1ipQc4GXx+euCdr0pd1dtXPj6C1ke3Qyi6GO6Pwde2D4uf52tt8a 3o7g== X-Gm-Message-State: AOJu0YwAMy8zR1RlawLx1uNtOef68Q6JADFiGom7IU0p1N0bU5nQlDXd FaIQJXVAzaE3/N7/qHIqSX+ZpVGHoudYKqjBZanULnVH+uHjuwTOTfAJfNe0OGI+zVG99Lak6Cs 1 X-Received: by 2002:ac2:5a0f:0:b0:518:d259:8542 with SMTP id q15-20020ac25a0f000000b00518d2598542mr5101592lfn.2.1713294122153; Tue, 16 Apr 2024 12:02:02 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id y9-20020a170906470900b00a51a74409dcsm7262977ejq.221.2024.04.16.12.01.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:02:01 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Marcelo Tosatti Subject: [PATCH v4 21/22] target/i386: Remove X86CPU::kvm_no_smi_migration field Date: Tue, 16 Apr 2024 20:59:37 +0200 Message-ID: <20240416185939.37984-22-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=philmd@linaro.org; helo=mail-lf1-x136.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 autolearn=unavailable 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 X86CPU::kvm_no_smi_migration was only used by the pc-i440fx-2.3 machine, which got removed. Remove it and simplify kvm_put_vcpu_events(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- target/i386/cpu.h | 3 --- target/i386/cpu.c | 2 -- target/i386/kvm/kvm.c | 7 +------ 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 6b05738079..5b016d6667 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2018,9 +2018,6 @@ struct ArchCPU { /* if set, limit maximum value for phys_bits when host_phys_bits is true */ uint8_t host_phys_bits_limit; - /* Stop SMI delivery for migration compatibility with old machines */ - bool kvm_no_smi_migration; - /* Forcefully disable KVM PV features not exposed in guest CPUIDs */ bool kvm_pv_enforce_cpuid; diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 33760a2ee1..f9991e7398 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -7905,8 +7905,6 @@ static Property x86_cpu_properties[] = { DEFINE_PROP_BOOL("x-vendor-cpuid-only", X86CPU, vendor_cpuid_only, true), DEFINE_PROP_BOOL("lmce", X86CPU, enable_lmce, false), DEFINE_PROP_BOOL("l3-cache", X86CPU, enable_l3_cache, true), - DEFINE_PROP_BOOL("kvm-no-smi-migration", X86CPU, kvm_no_smi_migration, - false), DEFINE_PROP_BOOL("kvm-pv-enforce-cpuid", X86CPU, kvm_pv_enforce_cpuid, false), DEFINE_PROP_BOOL("vmware-cpuid-freq", X86CPU, vmware_cpuid_freq, true), diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index e68cbe9293..88f4a7da33 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -4337,6 +4337,7 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.sipi_vector = env->sipi_vector; if (has_msr_smbase) { + events.flags |= KVM_VCPUEVENT_VALID_SMM; events.smi.smm = !!(env->hflags & HF_SMM_MASK); events.smi.smm_inside_nmi = !!(env->hflags2 & HF2_SMM_INSIDE_NMI_MASK); if (kvm_irqchip_in_kernel()) { @@ -4351,12 +4352,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.smi.pending = 0; events.smi.latched_init = 0; } - /* Stop SMI delivery on old machine types to avoid a reboot - * on an inward migration of an old VM. - */ - if (!cpu->kvm_no_smi_migration) { - events.flags |= KVM_VCPUEVENT_VALID_SMM; - } } if (level >= KVM_PUT_RESET_STATE) { From patchwork Tue Apr 16 18:59:38 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: 789259 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp439619wrb; Tue, 16 Apr 2024 12:04:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU81yko29WvsGvtewVOZF9fukerT61OouOKxeekvX+fVB1wqX6duKjTDNTyRQWuNZGMPPMNbQv4cZaBYyHvprdT X-Google-Smtp-Source: AGHT+IE5PJbx/0sT8WHyhOVIMSIlgbpwlCiWkyQTdadpiVNjQFMOHTZ1+lwnCXZgYw3UJRNk+dRL X-Received: by 2002:a0c:e1c5:0:b0:69b:62db:568b with SMTP id v5-20020a0ce1c5000000b0069b62db568bmr10698525qvl.2.1713294249735; Tue, 16 Apr 2024 12:04:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713294249; cv=none; d=google.com; s=arc-20160816; b=Umlpj6JMQsdiezPR39nuFAvsdrkmDRiPdTrpU6bRG7WofQy27ecTD1Gh3TIqP7orry 5zvctXugzl+/Wes650mAPsNXpOeX+GGdjsmBKjqJQaPofMRKii/i9RdE832GjeqQVBan 3KDXqPiHpqTrSW7yBMF3KwAXf/C0I62Z1BWN2GxzAJm/PdcVhvEodvd8BMaXca2NejiR 5H9OZRsGVaWCbzgq9klGa43ylYbwBNKzC8fmu3evx5IpacobbnFiskP+ftlnU7x/YMf3 Za1wWYKACz7DOmmar9T45eUOqIPsvzIZAx1TEu2XC7aXICswTOiTkMMx82LMaYg77stM akSA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kMNnC0CtBUMfvsWtjsnWY6TflDR4yCy2djdqUVTuvak=; fh=MM0y5ymJX8GnRplfGMnbzh08g1Ep8NICUa0ygkRu95c=; b=hV34B52aU1Cc+UpGIhjOp9teaY8U4s+/OaZ9sAzz+a+XSW9vsuQGMGyn8c8NPEv09Y FHj7eyWnH/xzQPE0S52HKoO36lYzjMfM39o7jtAzRVItpZRHdONQ3qoY9fuwKsKbKJ3c 9llbGZVZctOThunVsHtDslkg8df2BGPpLIiY0meKtlLsGKGE2kay9q9o5/zHniDHN4uH iceXpXPCac0edupuMAXlh2June/tcW8jXjLyb8aIAKLdSMyA8bNP3i67wHcWr5XgieFd PqLnH6GqTgNs6rgCodJnL5Vn6m3vN7Eb/6DRoImK2PruVjuSuV6nxAgrldmHQVF8c5UL LdRQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="t8qs/JL8"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o17-20020a0cecd1000000b0069c185ec102si3644870qvq.364.2024.04.16.12.04.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 12:04:09 -0700 (PDT) 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="t8qs/JL8"; 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 1rwo4P-0004id-Hs; Tue, 16 Apr 2024 15:02:17 -0400 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 1rwo4M-0004N5-KR for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:02:14 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwo4I-0005um-ON for qemu-devel@nongnu.org; Tue, 16 Apr 2024 15:02:14 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-516f2e0edb7so5851778e87.1 for ; Tue, 16 Apr 2024 12:02:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713294129; x=1713898929; darn=nongnu.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; bh=kMNnC0CtBUMfvsWtjsnWY6TflDR4yCy2djdqUVTuvak=; b=t8qs/JL8yAg1ebnAvx1Dg30Vhcqu7XK6aUmJbOqPN3aK2zHtuVx8yJ1wnXj5OKCEv1 ff+HuhQ6I4YoZFL54caz/HOwpwFp8RkK42zn/nhGyO8YbQWY7cDXd77LLXU6UwHVy2zC lmS6fWa59XnTxFEUnOBwiExbsC4eZRx5CuLakiz7xa09hxh+5RO23gHWidxPDrFxlJLk myYdxS4F+L2oAout86NnOcqQHfiqe/jb1L+hQ4m0mNHW9Oft+JHx5MmQE5/u0mwcc8Q1 iO+Xe38b20rqI1rdM7Fl37zblJy2l7aJFxpYgnQiYP5i8NgqKtSR80JM4FJd5Ag7+xZB cVBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713294129; x=1713898929; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kMNnC0CtBUMfvsWtjsnWY6TflDR4yCy2djdqUVTuvak=; b=sNtyvDgAHMOACrkf1IYuP+T31fNPqUk68tYy7Uo122FQlmhQ/maN2u7+T42lQhASTN 2dPLgmAa5CBa6WIhogTGBnGVXjNb3WFz8R+jMs/LtTV4ajR5kMlbtGyNePob1NaX5vD8 SNXFcrdxx83bBW2yv+EP7B2NAWeMvvH4FHW7c5gzjROw0pf8siequuovktA4gSPq39Mb 9LWk1sboMfSX1MuzqIK29tkcXijmkpo6E5JLhnZsQKbKvT5XaVWVMAXxQNTnYI7lmiIm Nm9ekrYcPUxxk0wYWsnG4Ka/bJyg1jCQR+GGDXV+CHyYndPMSRrPYcTBDgDRNoZBkYyB FN7Q== X-Gm-Message-State: AOJu0YxBS7ToSVPgDawXGviu5HV8FimRIN5lS+dgGWKJd1mQ9nNFZW8Q 2A9XEvE1vvOocvqIljzSp/2G1HihLBVB8S/W+NdF+CRY7FkcZEuDpOH8QbB/gYWt4TFZvm4/5+Q Y X-Received: by 2002:a05:6512:33c8:b0:518:b069:3b7d with SMTP id d8-20020a05651233c800b00518b0693b7dmr6333284lfg.6.1713294128761; Tue, 16 Apr 2024 12:02:08 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id d19-20020a170906c21300b00a553846966csm1570949ejz.24.2024.04.16.12.02.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 12:02:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: "Michael S. Tsirkin" , qemu-riscv@nongnu.org, David Hildenbrand , Igor Mammedov , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH v4 22/22] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE Date: Tue, 16 Apr 2024 20:59:38 +0200 Message-ID: <20240416185939.37984-23-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416185939.37984-1-philmd@linaro.org> References: <20240416185939.37984-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=philmd@linaro.org; helo=mail-lf1-x135.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 autolearn=unavailable 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 PCMachineClass::acpi_data_size was only used by the pc-i440fx-2.0 machine, which got removed. Since it is constant, replace the class field by a definition (local to hw/i386/pc.c, since not used elsewhere). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 4 ---- hw/i386/pc.c | 19 ++++++++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 96ccb4583f..0ad971782c 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -74,9 +74,6 @@ typedef struct PCMachineState { * * Compat fields: * - * @acpi_data_size: Size of the chunk of memory at the top of RAM - * for the BIOS ACPI tables and other BIOS - * datastructures. * @gigabyte_align: Make sure that guest addresses aligned at * 1Gbyte boundaries get mapped to host * addresses aligned at 1Gbyte boundaries. This @@ -100,7 +97,6 @@ struct PCMachineClass { /* ACPI compat: */ bool has_acpi_build; - unsigned acpi_data_size; int pci_root_uid; /* SMBIOS compat: */ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2e2146f42b..0be8f08c47 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -256,6 +256,16 @@ GlobalProperty pc_compat_2_4[] = { }; const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4); +/* + * @PC_ACPI_DATA_SIZE: + * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables + * and other BIOS datastructures. + * + * BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K + * reported to be used at the moment, 32K should be enough for a while. + */ +#define PC_ACPI_DATA_SIZE (0x20000 + 0x8000) + GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; @@ -634,8 +644,7 @@ void xen_load_linux(PCMachineState *pcms) fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, x86ms->boot_cpus); rom_set_fw(fw_cfg); - x86_load_linux(x86ms, fw_cfg, pcmc->acpi_data_size, - pcmc->pvh_enabled); + x86_load_linux(x86ms, fw_cfg, PC_ACPI_DATA_SIZE, pcmc->pvh_enabled); for (i = 0; i < nb_option_roms; i++) { assert(!strcmp(option_rom[i].name, "linuxboot.bin") || !strcmp(option_rom[i].name, "linuxboot_dma.bin") || @@ -969,8 +978,7 @@ void pc_memory_init(PCMachineState *pcms, } if (linux_boot) { - x86_load_linux(x86ms, fw_cfg, pcmc->acpi_data_size, - pcmc->pvh_enabled); + x86_load_linux(x86ms, fw_cfg, PC_ACPI_DATA_SIZE, pcmc->pvh_enabled); } for (i = 0; i < nb_option_roms; i++) { @@ -1724,9 +1732,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; pcmc->enforce_amd_1tb_hole = true; - /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported - * to be used at the moment, 32K should be enough for a while. */ - pcmc->acpi_data_size = 0x20000 + 0x8000; pcmc->pvh_enabled = true; pcmc->kvmclock_create_always = true; x86mc->apic_xrupt_override = true;