- 20 10月, 2017 9 次提交
-
-
由 Igor Mammedov 提交于
s390-virtio-ccw.c is the sole user of s390x_new_cpu(), so move this helper there. Signed-off-by: NIgor Mammedov <imammedo@redhat.com> Message-Id: <1508253203-119237-1-git-send-email-imammedo@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Implement them like KVM implements/handles them. Both can only be triggered via SIGP instructions. RESET has (almost) the lowest priority if the CPU is running, and the highest if the CPU is STOPPED. This is handled in SIGP code already. On delivery, we only have to care about the "CPU running" scenario. STOP is defined to be delivered after all other interrupts have been delivered. Therefore it has the actual lowest priority. As both can wake up a CPU if sleeping, indicate them correctly to external code (e.g. cpu_has_work()). Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170928203708.9376-25-david@redhat.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Mostly analogous to the kernel/KVM version (so I assume the checks are correct :) ). As a preparation for TCG. Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170928203708.9376-24-david@redhat.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Preparation for TCG, for KVM is this is completely handled in the kernel. Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170928203708.9376-20-david@redhat.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
We want to use the same code base for TCG, so let's cleanly factor it out. The sigp mutex is currently not really needed, as everything is protected by the iothread mutex. But this could change later, so leave it in place and initialize it properly from common code. Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170928203708.9376-17-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
We can now let go of INTERRUPT_EXT. When cr0 changes, we have to revalidate if we now have a pending external interrupt, just like when the PSW (or SYSTEM MASK only) changes. Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170928203708.9376-6-david@redhat.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Preparation for new TCG SIGP code. Especially also prepare for indicating that another external call is already pending. Take care of interrupt priority. Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170928203708.9376-4-david@redhat.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
There are still some leftovers from old virtio interrupts in there. Most importantly, we don't have to queue service interrupts anymore. Just like KVM, we can simply multiplex the SCLP service interrupts and avoid the queue. Also, now only valid parameters/cpu_addr will be stored on service interrupts. Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170928203708.9376-3-david@redhat.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
External interrupts are currently all handled like floating external interrupts, they are queued. Let's prepare for a split of floating and local interrupts by turning INTERRUPT_EXT into a mask. While we can have various floating external interrupts of one kind, there is usually only one (or a fixed number) of the local external interrupts. So turn INTERRUPT_EXT into a mask and properly indicate the kind of external interrupt. Floating interrupts will have to moved out of one CPU instance later once we have SMP support. The only floating external interrupts used right now are SERVICE interrupts, so let's use that name. Following patches will clean up SERVICE interrupt injection. This get's rid of the ugly special handling for cpu timer and clock comparator interrupts. And we really only store the parameters as defined by the PoP. Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170928203708.9376-2-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
- 06 10月, 2017 5 次提交
-
-
由 David Hildenbrand 提交于
Will be handy in the future. Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170928134609.16985-6-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
core_id is not needed by linux-user, as the core_id a.k.a. CPU address is only accessible from kernel space. Therefore, drop next_core_id and make cpu_index get autoassigned again for linux-user. While at it, shield core_id and cpuid completely from linux-user. cpuid can also only be queried from kernel space. Suggested-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170928134609.16985-5-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
This makes it easy to access real addresses (prefix) and in addition checks for valid memory addresses, which is missing when using e.g. stl_phys(). We can later reuse it to implement low address protection checks (then we might even decide to introduce yet another MMU for absolute addresses, just for handling storage keys and low address protection). Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170926183318.12995-3-david@redhat.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 Igor Mammedov 提交于
Define default CPU type in generic way in machine class_init and let common machine code handle cpu_model parsing. Signed-off-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <1505998749-269631-1-git-send-email-imammedo@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Missing and is used inside Linux in the context of CPACF. Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170920153016.3858-2-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
- 20 9月, 2017 6 次提交
-
-
由 David Hildenbrand 提交于
Now that there is only one user of cpu_s390x_create() left, make cpu creation look like on x86. - Perform the model/properties split and checks in s390_init_cpus() - Parse features only once without having to remember if already parsed - Pass only the typename to s390x_new_cpu() - Use the typename of an existing CPU for hotplug via cpu-add Acked-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170913132417.24384-21-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Some time ago we discussed that using "id" as property name is not the right thing to do, as it is a reserved property for other devices and will not work with device_add. Switch to the term "core-id" instead, and use it as an equivalent to "CPU address" mentioned in the PoP. There is no such thing as cpu number, so rename env.cpu_num to env.core_id. We use "core-id" as this is the common term to use for device_add later on (x86 and ppc). We can get rid of cpu->id now. Keep cpu_index and env->core_id in sync. cpu_index was already implicitly used by e.g. cpu_exists(), so keeping both in sync seems to be the right thing to do. cpu_index will now no longer automatically get set via cpu_exec_realizefn(). For now, we were lucky that both implicitly stayed in sync. Our new cpu property "core-id" can be a static property. Range checks can be avoided by using the correct type and the "setting after realized" check is done implicitly. device_add will later need the reserved "id" property. Hotplugging a CPU on s390x will then be: "device_add host-s390-cpu,id=cpu2,core-id=2". Reviewed-by: NMatthew Rosato <mjrosato@linux.vnet.ibm.com> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170913132417.24384-14-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Implemented in sclp.c, so let's move it to the right include file. Also adjust some includes. Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170913132417.24384-9-david@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
This allows us to drop inclusion of cpu_models.h in cpu-qom.h, and prepares for using cpu-qom.h as a s390 specific version of typedefs.h Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170913132417.24384-8-david@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Implemented in s390-virtio-ccw.c, so move it to the right header. We can also drop the extern. Fix up one include. Reviewed-by: NThomas Huth <thuth@redhat.com> Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170913132417.24384-7-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Implemented in hw/s390x/s390-virtio-hcall.c, so let's move it to the right header file. Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170913132417.24384-6-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
- 01 9月, 2017 1 次提交
-
-
由 Igor Mammedov 提交于
cpu_s390x_init() is used only *-user targets indirectly via cpu_init() macro and has a hack to assign ids to created cpus (I'm not sure if 'id' really matters to *-user emulation). So to on safe side, instead of having custom wrapper to do numbering replace it with cpu_generic_init() and use S390CPUClass::next_cpu_id which could serve the same purpose as static variable and move cpu->id initialization to s390_cpu_initfn for CONFIG_USER_ONLY use-case. PS: ifdef is ugly but it allows us to hide s390x detail that isn't set by *-user targets and reuse generic cpu creation utility for btoh machine and user emulation. Signed-off-by: NIgor Mammedov <imammedo@redhat.com> Acked-by: NCornelia Huck <cohuck@redhat.com> Message-Id: <1504185578-80843-1-git-send-email-imammedo@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
-
- 31 8月, 2017 14 次提交
-
-
由 David Hildenbrand 提交于
Let's reshuffle the function prototypes so we get a cleaner outline of the files. Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170818114353.13455-19-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Let's do it just like the other architectures. Introduce kvm-stub.c for stubs and kvm_s390x.h for the declarations. Change license to GPL2+ and keep copyright notice. As we are dropping the sysemu/kvm.h include from cpu.h, fix up includes. Suggested-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170818114353.13455-18-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Let's just introduce an helper. Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170818114353.13455-17-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Prepare to move more stuff (especially KVM related) from cpu.h to internal.h. Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170818114353.13455-16-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
cpu.h should only contain what really has to be accessed outside of target/s390x/. Add internal.h which can only be used inside target/s390x/. Move everything that isn't fast enough to run away and restructure it right away. We'll move all kvm_* stuff later. Minor style fixes to avoid checkpatch warning to: - struct Lowcore: "{" goes into same line as typedef - struct LowCore: add spaces around "-" in array length calculations - time2tod() and tod2time(): move "{" to separate line - get_per_atmid(): add space between ")" and "?". Move cases by one char. - get_per_atmid(): drop extra paremthesis around (1 << 6) Change license of new file to GPL2+ and keep copyright notice. Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170818114353.13455-15-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Only used in that file. Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170818114353.13455-14-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Only used in that file. Also drop the comment, not really needed. Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170818114353.13455-13-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Only used in that file. Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170818114353.13455-12-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Only used in that file. Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170818114353.13455-11-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
While at it, move the translations into the function and properly pass enum cc_op as parameter. We can't move it to cc_helper.c as this would break --disable-tcg. Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170818114353.13455-10-david@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
The functions are not used in target/s390x/ so a header in hw/s390x/ is a better place. Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170818114353.13455-9-david@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Now we can drop inclusion of "sysemu/kvm.h" from "s390-virtio.c". Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170818114353.13455-7-david@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Not needed at that point. Also drop it from kvm_s390_query_mem_limit() we call in kvm_s390_set_mem_limit(). Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170818114353.13455-3-david@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 David Hildenbrand 提交于
Not needed at that point. Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20170818114353.13455-2-david@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
- 25 7月, 2017 2 次提交
-
-
由 Thomas Huth 提交于
These functions can not be compiled with --disable-tcg. But since we need the other functions from helper.c in the non-tcg build, we can also not simply remove helper.c from the non-tcg builds. Thus the problematic functions have to be moved into a separate new file instead that we can later omit in the non-tcg builds. Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NThomas Huth <thuth@redhat.com> Message-Id: <1500886370-14572-5-git-send-email-thuth@redhat.com> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
由 Thomas Huth 提交于
misc_helper.c won't be compiled with --disable-tcg anymore, but we still need the program_interrupt() function in that case. Move it to interrupt.c instead, and refactor it to re-use the code from trigger_pgm_exception() (for TCG) and enter_pgmcheck() (for KVM, which now got renamed to kvm_s390_program_interrupt() for clarity). Signed-off-by: NThomas Huth <thuth@redhat.com> Message-Id: <1500886370-14572-4-git-send-email-thuth@redhat.com> Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NCornelia Huck <cohuck@redhat.com>
-
- 14 7月, 2017 2 次提交
-
-
由 Fan Zhang 提交于
Introduce guarded storage support for KVM guests on s390. We need to enable the capability, extend machine check validity, sigp store-additional-status-at-address, and migration. The feature is fenced for older machine type versions. Signed-off-by: NFan Zhang <zhangfan@linux.vnet.ibm.com> Reviewed-by: NCornelia Huck <cohuck@redhat.com> Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
-
由 Janosch Frank 提交于
Let's keep track of cmma enablement and move the mem_path check into the actual enablement. This now also warns users that do not use cpu-models about disabled cmma when using huge pages. Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Reviewed-by: NCornelia Huck <cohuck@redhat.com> Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
-
- 06 7月, 2017 1 次提交
-
-
由 QingFeng Hao 提交于
This patch is based on a similar patch from Stefan Hajnoczi - commit c324fd0a ("virtio-pci: use ioeventfd even when KVM is disabled") Do not check kvm_eventfds_enabled() when KVM is disabled since it always returns 0. Since commit 8c56c1a5 ("memory: emulate ioeventfd") it has been possible to use ioeventfds in qtest or TCG mode. This patch makes -device virtio-scsi-ccw,iothread=iothread0 work even when KVM is disabled. Currently we don't have an equivalent to "memory: emulate ioeventfd" for ccw yet, but that this doesn't hurt and qemu-iotests 068 can pass with skipping iothread arguments. I have tested that virtio-scsi-ccw works under tcg both with and without iothread. This patch fixes qemu-iotests 068, which was accidentally merged early despite the dependency on ioeventfd. Signed-off-by: NQingFeng Hao <haoqf@linux.vnet.ibm.com> Reviewed-by: NCornelia Huck <cohuck@redhat.com> Message-Id: <20170704132350.11874-2-haoqf@linux.vnet.ibm.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
-