qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, "Yanan Wang" <wangyanan55@huawei.com>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	qemu-block@nongnu.org, "Fabiano Rosas" <farosas@suse.de>,
	"Fam Zheng" <fam@euphon.net>, "Jason Wang" <jasowang@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Dmitry Fleytman" <dmitry.fleytman@gmail.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Zhao Liu" <zhao1.liu@intel.com>, "John Snow" <jsnow@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>
Subject: Re: [PATCH v4 02/19] hw/i386/pc: Remove PCMachineClass::broken_reserved_end field
Date: Tue, 3 Jun 2025 16:48:22 +0200	[thread overview]
Message-ID: <20250603164822.6dfe1d65@imammedo.users.ipa.redhat.com> (raw)
In-Reply-To: <20250512083948.39294-3-philmd@linaro.org>

On Mon, 12 May 2025 10:39:31 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:

> The PCMachineClass::broken_reserved_end field was only used
> by the pc-q35-2.4 and pc-i440fx-2.4 machines, which got removed.
> Remove it and simplify pc_memory_init().
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>

Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> ---
>  include/hw/i386/pc.h |  1 -
>  hw/i386/pc.c         | 13 +++++--------
>  2 files changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index 9563674e2da..f4a874b17fc 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -107,7 +107,6 @@ struct PCMachineClass {
>      /* RAM / address space compat: */
>      bool gigabyte_align;
>      bool has_reserved_memory;
> -    bool broken_reserved_end;
>      bool enforce_amd_1tb_hole;
>      bool isa_bios_alias;
>  
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 70656157ca0..c8bb4a3ee47 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -999,14 +999,13 @@ void pc_memory_init(PCMachineState *pcms,
>  
>      if (machine->device_memory) {
>          uint64_t *val = g_malloc(sizeof(*val));
> -        uint64_t res_mem_end = machine->device_memory->base;
> -
> -        if (!pcmc->broken_reserved_end) {
> -            res_mem_end += memory_region_size(&machine->device_memory->mr);
> -        }
> +        uint64_t res_mem_end;
>  
>          if (pcms->cxl_devices_state.is_enabled) {
>              res_mem_end = cxl_resv_end;
> +        } else {
> +            res_mem_end = machine->device_memory->base
> +                          + memory_region_size(&machine->device_memory->mr);
>          }
>          *val = cpu_to_le64(ROUND_UP(res_mem_end, 1 * GiB));
>          fw_cfg_add_file(fw_cfg, "etc/reserved-memory-end", val, sizeof(*val));
> @@ -1044,9 +1043,7 @@ uint64_t pc_pci_hole64_start(void)
>          hole64_start = pc_get_cxl_range_end(pcms);
>      } else if (pcmc->has_reserved_memory && (ms->ram_size < ms->maxram_size)) {
>          pc_get_device_memory_range(pcms, &hole64_start, &size);
> -        if (!pcmc->broken_reserved_end) {
> -            hole64_start += size;
> -        }
> +        hole64_start += size;
>      } else {
>          hole64_start = pc_above_4g_end(pcms);
>      }



  parent reply	other threads:[~2025-06-03 14:49 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12  8:39 [PATCH v4 00/19] hw/i386/pc: Remove deprecated 2.4 and 2.5 PC machines Philippe Mathieu-Daudé
2025-05-12  8:39 ` [PATCH v4 01/19] hw/i386/pc: Remove deprecated pc-q35-2.4 and pc-i440fx-2.4 machines Philippe Mathieu-Daudé
2025-05-28  1:58   ` Xiaoyao Li
2025-06-03 14:46   ` Igor Mammedov
2025-05-12  8:39 ` [PATCH v4 02/19] hw/i386/pc: Remove PCMachineClass::broken_reserved_end field Philippe Mathieu-Daudé
2025-05-28  1:58   ` Xiaoyao Li
2025-06-03 14:48   ` Igor Mammedov [this message]
2025-05-12  8:39 ` [PATCH v4 03/19] hw/i386/pc: Remove pc_compat_2_4[] array Philippe Mathieu-Daudé
2025-05-28  1:59   ` Xiaoyao Li
2025-06-03 14:51   ` Igor Mammedov
2025-05-12  8:39 ` [PATCH v4 04/19] target/i386/cpu: Remove X86CPU::check_cpuid field Philippe Mathieu-Daudé
2025-05-28  2:09   ` Xiaoyao Li
2025-05-28  5:23     ` Zhao Liu
2025-06-03 15:02       ` Igor Mammedov
2025-06-03 15:54         ` Xiaoyao Li
2025-06-05  9:09           ` Igor Mammedov
2025-06-05  9:28             ` Daniel P. Berrangé
2025-06-05  9:24         ` Daniel P. Berrangé
2025-06-27 11:31           ` Igor Mammedov
2025-06-03 14:53   ` Igor Mammedov
2025-05-12  8:39 ` [PATCH v4 05/19] hw/core/machine: Remove hw_compat_2_4[] array Philippe Mathieu-Daudé
2025-05-28  2:11   ` Xiaoyao Li
2025-05-12  8:39 ` [PATCH v4 06/19] hw/net/e1000: Remove unused E1000_FLAG_MAC flag Philippe Mathieu-Daudé
2025-05-12  8:39 ` [PATCH v4 07/19] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_MIGRATE_EXTRA definition Philippe Mathieu-Daudé
2025-05-12  8:39 ` [PATCH v4 08/19] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_DISABLE_PCIE definition Philippe Mathieu-Daudé
2025-05-28  2:44   ` Xiaoyao Li
2025-05-12  8:39 ` [PATCH v4 09/19] hw/i386/pc: Remove deprecated pc-q35-2.5 and pc-i440fx-2.5 machines Philippe Mathieu-Daudé
2025-05-28  2:21   ` Xiaoyao Li
2025-05-12  8:39 ` [PATCH v4 10/19] hw/i386/x86: Remove X86MachineClass::save_tsc_khz field Philippe Mathieu-Daudé
2025-05-28  2:21   ` Xiaoyao Li
2025-05-12  8:39 ` [PATCH v4 11/19] hw/nvram/fw_cfg: Remove legacy FW_CFG_ORDER_OVERRIDE Philippe Mathieu-Daudé
2025-05-28  2:46   ` Xiaoyao Li
2025-05-12  8:39 ` [PATCH v4 12/19] hw/core/machine: Remove hw_compat_2_5[] array Philippe Mathieu-Daudé
2025-05-28  2:21   ` Xiaoyao Li
2025-05-12  8:39 ` [PATCH v4 13/19] hw/block/fdc-isa: Remove 'fallback' property Philippe Mathieu-Daudé
2025-05-27 17:20   ` Thomas Huth
2025-05-28  8:30     ` Thomas Huth
2025-05-28  8:37       ` Thomas Huth
2025-05-30 11:45       ` Michael S. Tsirkin
2025-06-02  8:03         ` Philippe Mathieu-Daudé
2025-05-12  8:39 ` [PATCH v4 14/19] hw/scsi/vmw_pvscsi: Remove PVSCSI_COMPAT_OLD_PCI_CONFIGURATION definition Philippe Mathieu-Daudé
2025-05-28  2:47   ` Xiaoyao Li
2025-05-12  8:39 ` [PATCH v4 15/19] hw/scsi/vmw_pvscsi: Remove PVSCSI_COMPAT_DISABLE_PCIE_BIT definition Philippe Mathieu-Daudé
2025-05-28  2:47   ` Xiaoyao Li
2025-05-12  8:39 ` [PATCH v4 16/19] hw/scsi/vmw_pvscsi: Convert DeviceRealize -> InstanceInit Philippe Mathieu-Daudé
2025-05-28  2:47   ` Xiaoyao Li
2025-05-12  8:39 ` [PATCH v4 17/19] hw/net/vmxnet3: Remove VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS definition Philippe Mathieu-Daudé
2025-05-28  2:48   ` Xiaoyao Li
2025-05-12  8:39 ` [PATCH v4 18/19] hw/net/vmxnet3: Remove VMXNET3_COMPAT_FLAG_DISABLE_PCIE definition Philippe Mathieu-Daudé
2025-05-28  2:48   ` Xiaoyao Li
2025-05-12  8:39 ` [PATCH v4 19/19] hw/net/vmxnet3: Merge DeviceRealize in InstanceInit Philippe Mathieu-Daudé
2025-05-28  2:48   ` Xiaoyao Li
2025-05-28  3:01 ` [PATCH v4 00/19] hw/i386/pc: Remove deprecated 2.4 and 2.5 PC machines Xiaoyao Li
2025-05-28  8:11   ` Thomas Huth
2025-05-28  8:40     ` Xiaoyao Li
2025-05-30 11:46 ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250603164822.6dfe1d65@imammedo.users.ipa.redhat.com \
    --to=imammedo@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dmitry.fleytman@gmail.com \
    --cc=eduardo@habkost.net \
    --cc=fam@euphon.net \
    --cc=farosas@suse.de \
    --cc=hreitz@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    --cc=wangyanan55@huawei.com \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).