cpu-topology.c (ebdf417220f5264475e0423b8016c1444f2cf406) | cpu-topology.c (32cfefb904cae766d56adf7a802bc1ce2ddf2440) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * CPU Topology 4 * 5 * Copyright IBM Corp. 2022, 2023 6 * Author(s): Pierre Morel <pmorel@linux.ibm.com> 7 * 8 * S390 topology handling can be divided in two parts: --- 91 unchanged lines hidden (view full) --- 100 * Function codes 0 (horizontal) and 1 (vertical) define the CPU 101 * polarization requested by the guest. 102 * 103 * Function code 2 is handling topology changes and is interpreted 104 * by the SIE. 105 */ 106void s390_handle_ptf(S390CPU *cpu, uint8_t r1, uintptr_t ra) 107{ | 1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * CPU Topology 4 * 5 * Copyright IBM Corp. 2022, 2023 6 * Author(s): Pierre Morel <pmorel@linux.ibm.com> 7 * 8 * S390 topology handling can be divided in two parts: --- 91 unchanged lines hidden (view full) --- 100 * Function codes 0 (horizontal) and 1 (vertical) define the CPU 101 * polarization requested by the guest. 102 * 103 * Function code 2 is handling topology changes and is interpreted 104 * by the SIE. 105 */ 106void s390_handle_ptf(S390CPU *cpu, uint8_t r1, uintptr_t ra) 107{ |
108 CpuS390Polarization polarization; | 108 S390CpuPolarization polarization; |
109 CPUS390XState *env = &cpu->env; 110 uint64_t reg = env->regs[r1]; 111 int fc = reg & S390_TOPO_FC_MASK; 112 113 if (!s390_has_feat(S390_FEAT_CONFIGURATION_TOPOLOGY)) { 114 s390_program_interrupt(env, PGM_OPERATION, ra); 115 return; 116 } --- 235 unchanged lines hidden (view full) --- 352 s390_update_cpu_props(ms, cpu); 353} 354 355static void s390_change_topology(uint16_t core_id, 356 bool has_socket_id, uint16_t socket_id, 357 bool has_book_id, uint16_t book_id, 358 bool has_drawer_id, uint16_t drawer_id, 359 bool has_entitlement, | 109 CPUS390XState *env = &cpu->env; 110 uint64_t reg = env->regs[r1]; 111 int fc = reg & S390_TOPO_FC_MASK; 112 113 if (!s390_has_feat(S390_FEAT_CONFIGURATION_TOPOLOGY)) { 114 s390_program_interrupt(env, PGM_OPERATION, ra); 115 return; 116 } --- 235 unchanged lines hidden (view full) --- 352 s390_update_cpu_props(ms, cpu); 353} 354 355static void s390_change_topology(uint16_t core_id, 356 bool has_socket_id, uint16_t socket_id, 357 bool has_book_id, uint16_t book_id, 358 bool has_drawer_id, uint16_t drawer_id, 359 bool has_entitlement, |
360 CpuS390Entitlement entitlement, | 360 S390CpuEntitlement entitlement, |
361 bool has_dedicated, bool dedicated, 362 Error **errp) 363{ 364 MachineState *ms = current_machine; 365 int old_socket_entry; 366 int new_socket_entry; 367 bool report_needed; 368 S390CPU *cpu; --- 72 unchanged lines hidden (view full) --- 441 s390_cpu_topology_set_changed(true); 442 } 443} 444 445void qmp_set_cpu_topology(uint16_t core, 446 bool has_socket, uint16_t socket, 447 bool has_book, uint16_t book, 448 bool has_drawer, uint16_t drawer, | 361 bool has_dedicated, bool dedicated, 362 Error **errp) 363{ 364 MachineState *ms = current_machine; 365 int old_socket_entry; 366 int new_socket_entry; 367 bool report_needed; 368 S390CPU *cpu; --- 72 unchanged lines hidden (view full) --- 441 s390_cpu_topology_set_changed(true); 442 } 443} 444 445void qmp_set_cpu_topology(uint16_t core, 446 bool has_socket, uint16_t socket, 447 bool has_book, uint16_t book, 448 bool has_drawer, uint16_t drawer, |
449 bool has_entitlement, CpuS390Entitlement entitlement, | 449 bool has_entitlement, S390CpuEntitlement entitlement, |
450 bool has_dedicated, bool dedicated, 451 Error **errp) 452{ 453 if (!s390_has_topology()) { 454 error_setg(errp, "This machine doesn't support topology"); 455 return; 456 } 457 --- 12 unchanged lines hidden --- | 450 bool has_dedicated, bool dedicated, 451 Error **errp) 452{ 453 if (!s390_has_topology()) { 454 error_setg(errp, "This machine doesn't support topology"); 455 return; 456 } 457 --- 12 unchanged lines hidden --- |