qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, pbonzini@redhat.com, rth@twiddle.net,
	ehabkost@redhat.com, eblake@redhat.com, marcel@redhat.com
Subject: [Qemu-devel] [PATCH v2 00/10] ACPI CPU hotplug refactoring to support unplug and more than 255 CPUs
Date: Thu, 16 Jun 2016 18:55:33 +0200	[thread overview]
Message-ID: <1466096143-91616-1-git-send-email-imammedo@redhat.com> (raw)

Changelog:                                                                       
 v1->v2:                                                                         
  - dropped consolidate legacy ACPI CPU hotplug as they are in master by now     
  - pc: start with legacy hotplug and let 2.7 machine type and older             
    to switch inot new hotplug mode. That way legacy BIOS will                   
    still work fine as it uses built in ACPI tables and will continue            
    to use legacy CPU hotplug interface.                                         
  - poll for CPU objects with events (insert/remove) instead of                  
    looping over all CPUs to find CPUs with events.                              
  - drop dynamic PXM support as it could be implemented in static way            
    at acpi tabels build time. It will be an additional series on top of this.   
  - resplit patches on basic present CPU support, hot-add and hot-remove parts   
    Patches:                                                                     
        1-7: add new CPU hotplug impl.                                           
          8: makes 2.7 machine type to use new AML code that                     
             will switch piix4/ich9 into new mode +                              
             switching logic with migration glue for piix4/ich9                  
          9: drops the last dependency in ACPI parts on apic_id_limit            
             sized map.                                                          
 RFC->v1:                                                                        
  - drop machine.cpu-hotplug property and leave CPU hotplug                      
    always enabled as it used to be.                                             
    (it also simplifies, series a bit)                                           
  - reshuffle/squash some patches to make series bisectable                      
    wrt 'make check' failures                                                    
  - add doc comment in qapi schema                                               
  - fix 'make check' error for mips target, disableCPU hotplug                   
    code path in piix4_pm for mips                                               
  - drop some intermediate expected ACPI tables updates                          
  - replace _MAT method with named buffer object                                 
                                                                                 
Current ACPI interface for CPU hotplug supports hoti-adding                      
only upto 255 CPUs and lacks means to convey additional                          
information needed _OST methods support.                                         
Also being bitmap based with bit position specifying APIC ID                     
it doesn't scale up well for 32-bit APIC IDs that will come                      
with x2APIC support.                                                             
                                                                                 
So add another QEMU-guest interface using as model memory-hotplug.               
New interface will be used since 2.7 machine types and will                      
support:                                                                         
    - more than 255 CPUs with 32-bit APIC ID value                               
    - a registers set to communicate OST information                             
      (extendable without breaking IO layout)                                    
    - possible to reuse for ARM's 'virt' machine type                            
      with minimal tweaks (add init for MMIO, add                                
      ACPI hooks on CPU hotplug path, MADT generation)                           
                                                                                 
                                                                                 
Tested with following guests: RHEL7, WS2003EEx64, WS2012R2x64                    
 * unplug is tested only with RHEL7 as Windows doesn't support it.               
 * tested that migration works as well.                                          
                                                                                 
git tree for testing:                                                            
    git@github.com:imammedo/qemu.git modern_cpu_hotplug_v2                       
viewing:                                                                         
    https://github.com/imammedo/qemu/commits/modern_cpu_hotplug_v2               

Igor Mammedov (10):
  docs: update ACPI CPU hotplug spec with new protocol
  pc: piix4/ich9: add 'cpu-hotplug-legacy' property
  acpi: cpuhp: add CPU devices AML with _STA method
  pc: acpi: introduce AcpiDeviceIfClass.madt_cpu hook
  acpi: cpuhp: implement hot-add parts of CPU hotplug interface
  acpi: cpuhp: implement hot-remove parts of CPU hotplug interface
  acpi: cpuhp: add cpu._OST handling
  pc: use new CPU hotplug interface since 2.7 machine type
  tests: acpi: add CPU hotplug testcase
  pc: acpi: drop intermediate PCMachineState.node_cpu

 docs/specs/acpi_cpu_hotplug.txt      |  94 +++++-
 hw/acpi/Makefile.objs                |   1 +
 hw/acpi/cpu.c                        | 561 +++++++++++++++++++++++++++++++++++
 hw/acpi/cpu_hotplug.c                |  21 +-
 hw/acpi/ich9.c                       |  69 ++++-
 hw/acpi/piix4.c                      |  71 ++++-
 hw/i386/acpi-build.c                 |  68 +++--
 hw/i386/pc.c                         |  63 +++-
 hw/i386/pc_piix.c                    |   2 +
 hw/i386/pc_q35.c                     |   2 +
 hw/isa/lpc_ich9.c                    |   1 +
 include/hw/acpi/acpi_dev_interface.h |   7 +
 include/hw/acpi/cpu.h                |  67 +++++
 include/hw/acpi/cpu_hotplug.h        |   6 +
 include/hw/acpi/ich9.h               |   3 +
 include/hw/i386/pc.h                 |   8 +-
 qapi-schema.json                     |   3 +-
 stubs/Makefile.objs                  |   1 +
 stubs/pc_madt_cpu_entry.c            |   7 +
 tests/bios-tables-test.c             |  28 ++
 trace-events                         |  14 +
 21 files changed, 1043 insertions(+), 54 deletions(-)
 create mode 100644 hw/acpi/cpu.c
 create mode 100644 include/hw/acpi/cpu.h
 create mode 100644 stubs/pc_madt_cpu_entry.c

-- 
1.8.3.1

             reply	other threads:[~2016-06-16 16:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 16:55 Igor Mammedov [this message]
2016-06-16 16:55 ` [Qemu-devel] [PATCH v2 01/10] docs: update ACPI CPU hotplug spec with new protocol Igor Mammedov
2016-06-16 16:55 ` [Qemu-devel] [PATCH v2 02/10] pc: piix4/ich9: add 'cpu-hotplug-legacy' property Igor Mammedov
2016-06-23 12:38   ` Marcel Apfelbaum
2016-06-16 16:55 ` [Qemu-devel] [PATCH v2 03/10] acpi: cpuhp: add CPU devices AML with _STA method Igor Mammedov
2016-06-16 16:55 ` [Qemu-devel] [PATCH v2 04/10] pc: acpi: introduce AcpiDeviceIfClass.madt_cpu hook Igor Mammedov
2016-06-16 16:55 ` [Qemu-devel] [PATCH v2 05/10] acpi: cpuhp: implement hot-add parts of CPU hotplug interface Igor Mammedov
2016-06-16 16:55 ` [Qemu-devel] [PATCH v2 06/10] acpi: cpuhp: implement hot-remove " Igor Mammedov
2016-06-16 16:55 ` [Qemu-devel] [PATCH v2 07/10] acpi: cpuhp: add cpu._OST handling Igor Mammedov
2016-06-16 16:55 ` [Qemu-devel] [PATCH v2 08/10] pc: use new CPU hotplug interface since 2.7 machine type Igor Mammedov
2016-06-16 16:55 ` [Qemu-devel] [PATCH v2 09/10] tests: acpi: add CPU hotplug testcase Igor Mammedov
2016-06-23 13:08   ` Marcel Apfelbaum
2016-06-23 13:47     ` Igor Mammedov
2016-06-24  5:53       ` Michael S. Tsirkin
2016-06-24  6:00         ` Igor Mammedov
2016-06-24 21:58           ` Michael S. Tsirkin
2016-06-27 12:30             ` Igor Mammedov
2016-06-16 16:55 ` [Qemu-devel] [PATCH v2 10/10] pc: acpi: drop intermediate PCMachineState.node_cpu Igor Mammedov
2016-06-21  7:12 ` [Qemu-devel] [PATCH v2 00/10] ACPI CPU hotplug refactoring to support unplug and more than 255 CPUs Igor Mammedov
2016-06-21 16:50   ` Michael S. Tsirkin
2016-06-21 16:58     ` Igor Mammedov
2016-06-23 11:07     ` Igor Mammedov
2016-06-24  6:18 ` [Qemu-devel] [PATCH v2 11/10] pc: acpi: update expected DSDT blobs with new CPU hotplug AML Igor Mammedov
2016-06-24  6:18   ` [Qemu-devel] [PATCH v2 12/10] pc: acpi: add expected DSDT/MADT blobs for CPU hotplug testscase Igor Mammedov

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=1466096143-91616-1-git-send-email-imammedo@redhat.com \
    --to=imammedo@redhat.com \
    --cc=eblake@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).