[SeaBIOS] [PATCH v5 0/4] support booting more than 255 CPUs with QEMU

Igor Mammedov imammedo at redhat.com
Thu Oct 13 14:38:24 CEST 2016


Changelog since:
  v4:
    * (Kevin) drop
      [PATCH v4 3/5] error out if present cpus count changed during SMP bringup
      and resolve conflicts caused by this in followup patches
  v3:
    * don't move CPU counting around, leave it as is and
      consolidate apic_id accounting only
    * add and use qemu_*_present_cpus_count() helpers to init/get boot
      cpus count at boot time and only qemu_get_present_cpus_count()
      at resume time
    * fix S3 wakeup stuck in resume vector
    * If cpu were hotplugged during smp_scan, report it to user
      instead of silently hanging if it came online while smp_scan()
      waits for APs
  v2:
    * rebase on top of current master /smp_scan() changes/
  v1:
    * s/count_cpu/apic_id_init/
    * merge handle_x2apic() into apic_id_init()
  RFC:
    * move out max-cpus check out of mptable_setup()
    * factor out CPU counting/apic ID detection in separate function
    * return back accidentially deleted debug message with APIC ID
    * drop unused code in smp_setup()
    
According to SDM, if CPUs have APIC ID more than 254
firmware should pass control to OS in x2APIC mode.
This series adds x2APIC bootstrap initialization.

QEMU side of x2APIC support:
"[PATCH v3 00/13] pc: q35: x2APIC support in kvm_apic mode"
https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg02865.html

Note:
S3 wakeup works as expected if linux guest is running with IRQ remapping enabled.
However it seems that kernel is buggy with IRQ remapping disabled as kernel
disables CPUs with APIC ID > 254 and on resume from S3 hangs somewere after
getting control from Seabios.

Cc: rkrcmar at redhat.com
Cc: mst at redhat.com
Cc: jan.kiszka at web.de
Cc: kraxel at redhat.com
Cc: pbonzini at redhat.com
Cc: lersek at redhat.com
Cc: kraxel at redhat.com

Igor Mammedov (3):
  paravirt: disable legacy bios tables in case of more than 255 CPUs
  add helpers to read etc/boot-cpus at resume time
  support booting with more than 255 CPUs

Kevin O'Connor (1):
  smp: consolidate CPU APIC ID detection and accounting

 src/fw/paravirt.h |  3 +++
 src/x86.h         |  1 +
 src/fw/paravirt.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
 src/fw/smp.c      | 52 +++++++++++++++++++++++++++++++++++++---------------
 4 files changed, 83 insertions(+), 17 deletions(-)

-- 
2.7.4




More information about the SeaBIOS mailing list