First batch of s390x patches for 2.12
The following changes since commit 0ef0583d5adceb9138bdb47494dabd1549ac5b6d:
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20171214' into staging (2017-12-14 15:32:32 +0000)
are available in the git repository at:
git://github.com/cohuck/qemu tags/s390x-20171215-v2
for you to fetch changes up to bb223055b9b327ec66e1f6d2fbaebaee0b8f3dbe:
s390-ccw-virtio: allow for systems larger that 7.999TB (2017-12-15 11:54:52 +0100)
----------------------------------------------------------------
s390x changes for 2.12:
- Lots of tcg improvements: ccw hotplug is now working and we can run a Linux kernel built for z12 under tcg
- zPCI improvements to get virtio-pci working
- get rid of the cssid restrictions for virtual and non-virtual channel devices
- we now support 8TB+ systems
- 2.12 compat machine
- fixes and cleanups
----------------------------------------------------------------
Christian Borntraeger (3):
s390x/migration: use zero flag parameter pc-bios/s390-ccw: zero out bss section
s390-ccw-virtio: allow for systems larger that 7.999TB
Cornelia Huck (4):
pc-bios/s390-ccw.img: update image
s390x: introduce 2.12 compat machine
target/s390x: nuke DPRINTF in helper.c
s390x/css: attach css bridge
David Hildenbrand (30):
s390x/tcg: introduce and use s390_program_interrupt() s390x/tcg: get rid of runtime_exception()
s390x/tcg: rip out dead tpi code
s390x/ioinst: pass the retaddr to all IO instructions s390x/pci: pass the retaddr to all PCI instructions s390x/diag: pass the retaddr into handle_diag_308()
s390x: handle exceptions during s390_cpu_virt_mem_rw() correctly (TCG) s390x/tcg: don't exit the cpu loop in s390_cpu_virt_mem_rw() s390x/tcg: io instructions don't need potential_page_fault() s390x/tcg: use s390_program_interrupt() in SCLP Service Call s390x/tcg: use s390_program_interrupt() in DIAG
s390x/tcg: use s390_program_interrupt() in per_check_exception() s390x/tcg: use s390_program_interrupt() in SACF
s390x/tcg: use s390_program_interrupt() in STSI
s390x/tcg: drop program_interrupt()
s390x/tcg: drop potential_page_fault()
s390x/kvm: factor out build_channel_report_mcic() into cpu.h s390x/tcg: fix and cleanup mcck injection
s390x/tcg: implement SET CLOCK PROGRAMMABLE FIELD s390x/tcg: indicate value of TODPR in STCKE
s390x/tcg: wire up STORE CHANNEL REPORT WORD
s390x/tcg: ASI/ASGI/ALSI/ALSGI are atomic with Interlocked-acccess
facility 1
s390x/tcg: implement Interlocked-Access Facility 2 s390x/tcg: wire up SET ADDRESS LIMIT
s390x/tcg: wire up SET CHANNEL MONITOR
s390x/tcg: Implement STORE CHANNEL PATH STATUS
s390x/tcg: Implement SIGNAL ADAPTER instruction
s390x/tcg: implement extract-CPU-time facility
s390x/tcg: we already implement the Set-Program-Parameter facility
s390x: change the QEMU cpu model to a stripped down z12
Halil Pasic (2):
s390x/css: unrestrict cssids
s390x: deprecate s390-squash-mcss machine prop
Pierre Morel (7):
s390x/pci: factor out endianess conversion s390x/pci: rework PCI STORE
s390x/pci: rework PCI LOAD
s390x/pci: rework PCI STORE BLOCK s390x/pci: move the memory region read from pcilg s390x/pci: move the memory region write from pcistg s390x/pci: search for subregion inside the BARs
hw/s390x/3270-ccw.c | 2 +- hw/s390x/css-bridge.c | 13 ++ hw/s390x/css.c | 34 +---- hw/s390x/s390-ccw.c | 2 +- hw/s390x/s390-pci-bus.h | 1 + hw/s390x/s390-pci-inst.c | 337 +++++++++++++++++++++++++------------------ hw/s390x/s390-pci-inst.h | 22 ++- hw/s390x/s390-virtio-ccw.c | 59 +++++++- hw/s390x/virtio-ccw.c | 2 +- include/hw/compat.h | 3 + include/hw/s390x/css.h | 13 +- pc-bios/s390-ccw.img | Bin 26416 -> 26416 bytes pc-bios/s390-ccw/start.S | 30 +++- qemu-doc.texi | 8 + qemu-options.hx | 8 +- target/s390x/cc_helper.c | 2 +- target/s390x/cpu.h | 31 +++- target/s390x/cpu_models.c | 103 ++++++------- target/s390x/cpu_models.h | 1 + target/s390x/crypto_helper.c | 7 +- target/s390x/diag.c | 14 +- target/s390x/excp_helper.c | 17 +-- target/s390x/fpu_helper.c | 2 +- target/s390x/gen-features.c | 88 +++++++++++ target/s390x/helper.c | 18 --- target/s390x/helper.h | 6 +- target/s390x/insn-data.def | 29 ++-- target/s390x/int_helper.c | 14 +- target/s390x/internal.h | 41 +++--- target/s390x/interrupt.c | 9 +- target/s390x/ioinst.c | 113 +++++++-------- target/s390x/kvm.c | 84 ++++------- target/s390x/mem_helper.c | 35 ++--- target/s390x/misc_helper.c | 111 ++++++++------ target/s390x/mmu_helper.c | 23 ++- target/s390x/translate.c | 191 ++++++++++++++++++++---- 36 files changed, 928 insertions(+), 545 deletions(-)
Signature · 1 line
2.13.6
[Qemu-devel] [PULL v2 46/46] s390-ccw-virtio: allow for systems larger that 7.999TB
From: Christian Borntraeger <[email protected]>
KVM does not allow memory regions > KVM_MEM_MAX_NR_PAGES, basically limiting the memory per slot to 8TB-4k. As memory slots on s390/kvm must be a multiple of 1MB we need start a new memory region if we cross 8TB-1M.
With that (and optimistic overcommitment in the kernel) I was able to start a 24TB guest on a 1TB system.
Message-Id: <[email protected]>
--- hw/s390x/s390-virtio-ccw.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-)
hw/s390x/s390-virtio-ccw.c +27 -3
@@ -152,14 +152,38 @@ static void virtio_ccw_register_hcalls(void) virtio_ccw_hcall_early_printk); } +/* +* KVM does only support memory slots up to KVM_MEM_MAX_NR_PAGES pages +* as the dirty bitmap must be managed by bitops that take an int as +* position indicator. If we have a guest beyond that we will split off +* new subregions. The split must happen on a segment boundary (1MB). +*/ +#define KVM_MEM_MAX_NR_PAGES ((1ULL << 31) - 1) +#define SEG_MSK (~0xfffffULL) +#define KVM_SLOT_MAX_BYTES ((KVM_MEM_MAX_NR_PAGES * TARGET_PAGE_SIZE) & SEG_MSK)static void s390_memory_init (ram_addr_t mem_size) {MemoryRegion *sysmem =get_system_memory (); -MemoryRegion *ram =g_new (MemoryRegion,1 ); +ram_addr_t chunk, offset =0 ; +unsigned int number =0 ; +gchar *name;/* allocate RAM for core */ -memory_region_allocate_system_memory (ram,NULL ,"s390.ram" , mem_size); -memory_region_add_subregion (sysmem,0 , ram); + name =g_strdup_printf ("s390.ram" ); +while (mem_size) { +MemoryRegion *ram =g_new (MemoryRegion,1 ); +uint64_t size = mem_size; + +/* KVM does not allow memslots >= 8 TB */ + chunk =MIN (size,KVM_SLOT_MAX_BYTES ); +memory_region_allocate_system_memory (ram,NULL , name, chunk); +memory_region_add_subregion (sysmem, offset, ram); + mem_size -= chunk; + offset += chunk; +g_free (name); + name =g_strdup_printf ("s390.ram.%u" , ++number); + } +g_free (name);/* Initialize storage key device */ s390_skeys_init ();
Signature · 1 line
2.13.6
Peter Maydell
AppliedQuoted 12 lines · Cornelia Huck
The following changes since commit
0ef0583d5adceb9138bdb47494dabd1549ac5b6d:Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20171214' into staging (2017-12-14 15:32:32 +0000)
are available in the git repository at:
git://github.com/cohuck/qemutags/s390x-20171215-v2for you to fetch changes up to
bb223055b9b327ec66e1f6d2fbaebaee0b8f3dbe:s390-ccw-virtio: allow for systems larger that 7.999TB (2017-12-15 11:54:52 +0100)
Quoted 10 lines
----------------------------------------------------------------
s390x changes for 2.12:
- Lots of tcg improvements: ccw hotplug is now working and we can run a Linux kernel built for z12 under tcg
- zPCI improvements to get virtio-pci working
- get rid of the cssid restrictions for virtual and non-virtual channel devices
- we now support 8TB+ systems
- 2.12 compat machine
- fixes and cleanups
Applied, thanks.
-- PMM