qemu/hw/i386
Yanan Wang 5d8b5a5055 machine: Minor refactor/fix for the smp parsers
To pave the way for the functional improvement in later patches,
make some refactor/cleanup for the smp parsers, including using
local maxcpus instead of ms->smp.max_cpus in the calculation,
defaulting dies to 0 initially like other members, cleanup the
sanity check for dies.

We actually also fix a hidden defect by avoiding directly using
the provided *zero value* in the calculation, which could cause
a segment fault (e.g. using dies=0 in the calculation).

Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20210929025816.21076-4-wangyanan55@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-10-01 15:27:56 +02:00
..
kvm i386/kvm: Replace abs64() with uabs64() from host-utils 2021-09-29 19:37:38 +10:00
xen memory: Name all the memory listeners 2021-09-30 15:30:24 +02:00
acpi-build.c i386: acpi: Add SGX EPC entry to ACPI tables 2021-09-30 15:30:24 +02:00
acpi-build.h hw/acpi/ich9: Enable ACPI PCI hot-plug 2021-07-16 04:33:35 -04:00
acpi-common.c acpi: Permit OEM ID and OEM table ID fields to be changed 2021-02-05 08:52:59 -05:00
acpi-common.h misc: Correct relative include path 2021-06-05 21:10:42 +02:00
acpi-microvm.c Do not include hw/boards.h if it's not really necessary 2021-05-02 17:24:51 +02:00
acpi-microvm.h microvm/acpi: add minimal acpi support 2020-09-17 14:16:19 +02:00
amd_iommu.c amd_iommu: fix wrong MMIO operations 2021-05-14 10:26:18 -04:00
amd_iommu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
e820_memory_layout.c hw/i386/pc: Extract e820 memory layout code 2019-09-16 17:13:07 +02:00
e820_memory_layout.h hw/i386/pc: Extract e820 memory layout code 2019-09-16 17:13:07 +02:00
fw_cfg.c hw/i386/fw_cfg: Set SGX bits in feature control fw_cfg accordingly 2021-09-30 15:30:24 +02:00
fw_cfg.h acpi: factor out fw_cfg_add_acpi_dsdt() 2020-06-24 17:18:28 -04:00
generic_event_device_x86.c acpi: ged: add x86 device variant. 2020-09-17 14:16:19 +02:00
intel_iommu_internal.h intel_iommu: Use correct shift for 256 bits qi descriptor 2020-07-22 07:57:07 -04:00
intel_iommu.c intel_iommu: Fix typo in comments 2021-09-16 11:55:02 +02:00
Kconfig Kconfig: Add CONFIG_SGX support 2021-09-30 14:50:19 +02:00
kvmvapic.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
meson.build i386: Update SGX CPUID info according to hardware/KVM/user input 2021-09-30 14:50:20 +02:00
microvm.c microvm: Drop dead error handling in microvm_machine_state_init() 2021-08-26 17:15:28 +02:00
multiboot.c hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
multiboot.h
pc_piix.c i440fx: Add support for SGX EPC 2021-09-30 15:30:24 +02:00
pc_q35.c q35: Add support for SGX EPC 2021-09-30 15:30:24 +02:00
pc_sysfw_ovmf-stubs.c hw/i386: Introduce X86_FW_OVMF Kconfig symbol 2021-07-14 22:28:58 +02:00
pc_sysfw_ovmf.c hw/i386: Introduce X86_FW_OVMF Kconfig symbol 2021-07-14 22:28:58 +02:00
pc_sysfw.c hw/i386: Introduce X86_FW_OVMF Kconfig symbol 2021-07-14 22:28:58 +02:00
pc.c machine: Minor refactor/fix for the smp parsers 2021-10-01 15:27:56 +02:00
port92.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
sgx-epc.c sgx-epc: Add the fill_device_info() callback support 2021-09-30 15:30:24 +02:00
sgx-stub.c target/i386: Add the query-sgx-capabilities QMP command 2021-09-30 15:30:24 +02:00
sgx.c target/i386: Add the query-sgx-capabilities QMP command 2021-09-30 15:30:24 +02:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vmmouse.c vmmouse: put it into the 'input' category 2021-02-20 12:36:19 +01:00
vmport.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
x86-iommu-stub.c hw/i386/x86-iommu: Add missing stubs 2020-01-09 11:41:25 +00:00
x86-iommu.c Do not include hw/boards.h if it's not really necessary 2021-05-02 17:24:51 +02:00
x86.c vl: Add sgx compound properties to expose SGX EPC sections to guest 2021-09-30 14:50:20 +02:00