Skip to content

Commit

Permalink
target/s390x: move kvm files into kvm/
Browse files Browse the repository at this point in the history
move kvm files into kvm/
After the reshuffling, update MAINTAINERS accordingly.
Make use of the new directory:

target/s390x/kvm/

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Cho, Yu-Chen <acho@suse.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210707105324.23400-14-acho@suse.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
  • Loading branch information
alcho authored and cohuck committed Jul 7, 2021
1 parent 777ef68 commit 6704360
Show file tree
Hide file tree
Showing 20 changed files with 39 additions and 34 deletions.
3 changes: 1 addition & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,7 @@ M: Halil Pasic <pasic@linux.ibm.com>
M: Cornelia Huck <cohuck@redhat.com>
M: Christian Borntraeger <borntraeger@de.ibm.com>
S: Supported
F: target/s390x/kvm.c
F: target/s390x/kvm_s390x.h
F: target/s390x/kvm/
F: target/s390x/ioinst.[ch]
F: target/s390x/machine.c
F: target/s390x/sigp.c
Expand Down
2 changes: 1 addition & 1 deletion hw/intc/s390_flic_kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

#include "qemu/osdep.h"
#include "kvm_s390x.h"
#include "kvm/kvm_s390x.h"
#include <sys/ioctl.h>
#include "qemu/error-report.h"
#include "qemu/module.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/s390x/s390-stattrib-kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "qemu/error-report.h"
#include "sysemu/kvm.h"
#include "exec/ram_addr.h"
#include "kvm_s390x.h"
#include "kvm/kvm_s390x.h"

Object *kvm_s390_stattrib_create(void)
{
Expand Down
2 changes: 1 addition & 1 deletion hw/s390x/tod-kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "qemu/module.h"
#include "sysemu/runstate.h"
#include "hw/s390x/tod.h"
#include "kvm_s390x.h"
#include "kvm/kvm_s390x.h"

static void kvm_s390_get_tod_raw(S390TOD *tod, Error **errp)
{
Expand Down
2 changes: 1 addition & 1 deletion hw/vfio/ap.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "qemu/module.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
#include "kvm_s390x.h"
#include "kvm/kvm_s390x.h"
#include "migration/vmstate.h"
#include "hw/qdev-properties.h"
#include "hw/s390x/ap-bridge.h"
Expand Down
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2102,6 +2102,7 @@ if have_system or have_user
'target/ppc',
'target/riscv',
'target/s390x',
'target/s390x/kvm',
'target/sparc',
]
endif
Expand Down
2 changes: 1 addition & 1 deletion target/s390x/cpu-sysemu.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "qapi/error.h"
#include "cpu.h"
#include "s390x-internal.h"
#include "kvm_s390x.h"
#include "kvm/kvm_s390x.h"
#include "sysemu/kvm.h"
#include "sysemu/reset.h"
#include "qemu/timer.h"
Expand Down
2 changes: 1 addition & 1 deletion target/s390x/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "qapi/error.h"
#include "cpu.h"
#include "s390x-internal.h"
#include "kvm_s390x.h"
#include "kvm/kvm_s390x.h"
#include "sysemu/kvm.h"
#include "sysemu/reset.h"
#include "qemu/module.h"
Expand Down
2 changes: 1 addition & 1 deletion target/s390x/cpu_models.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "s390x-internal.h"
#include "kvm_s390x.h"
#include "kvm/kvm_s390x.h"
#include "sysemu/kvm.h"
#include "sysemu/tcg.h"
#include "qapi/error.h"
Expand Down
2 changes: 1 addition & 1 deletion target/s390x/diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "hw/s390x/s390-virtio-ccw.h"
#include "hw/s390x/pv.h"
#include "sysemu/kvm.h"
#include "kvm_s390x.h"
#include "kvm/kvm_s390x.h"

int handle_diag_288(CPUS390XState *env, uint64_t r1, uint64_t r3)
{
Expand Down
2 changes: 1 addition & 1 deletion target/s390x/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "qemu/osdep.h"
#include "cpu.h"
#include "kvm_s390x.h"
#include "kvm/kvm_s390x.h"
#include "s390x-internal.h"
#include "exec/exec-all.h"
#include "sysemu/kvm.h"
Expand Down
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions target/s390x/kvm/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

s390x_ss.add(when: 'CONFIG_KVM', if_true: files(
'kvm.c'
))

# Newer kernels on s390 check for an S390_PGSTE program header and
# enable the pgste page table extensions in that case. This makes
# the vm.allocate_pgste sysctl unnecessary. We enable this program
# header if
# - we build on s390x
# - we build the system emulation for s390x (qemu-system-s390x)
# - KVM is enabled
# - the linker supports --s390-pgste
if host_machine.cpu_family() == 's390x' and cc.has_link_argument('-Wl,--s390-pgste')
s390x_softmmu_ss.add(when: 'CONFIG_KVM',
if_true: declare_dependency(link_args: ['-Wl,--s390-pgste']))
endif
7 changes: 7 additions & 0 deletions target/s390x/kvm/trace-events
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See docs/devel/tracing.txt for syntax documentation.

# kvm.c
kvm_enable_cmma(int rc) "CMMA: enabling with result code %d"
kvm_clear_cmma(int rc) "CMMA: clearing with result code %d"
kvm_failed_cpu_state_set(int cpu_index, uint8_t state, const char *msg) "Warning: Unable to set cpu %d state %" PRIu8 " to KVM: %s"
kvm_assign_subch_ioeventfd(int fd, uint32_t addr, bool assign, int datamatch) "fd: %d sch: @0x%x assign: %d vq: %d"
1 change: 1 addition & 0 deletions target/s390x/kvm/trace.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "trace/trace-target_s390x_kvm.h"
2 changes: 1 addition & 1 deletion target/s390x/machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "s390x-internal.h"
#include "kvm_s390x.h"
#include "kvm/kvm_s390x.h"
#include "migration/vmstate.h"
#include "tcg/tcg_s390x.h"
#include "sysemu/kvm.h"
Expand Down
16 changes: 1 addition & 15 deletions target/s390x/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ s390x_ss.add(files(
'cpu-dump.c',
))

s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'))

gen_features = executable('gen-features', 'gen-features.c', native: true,
build_by_default: false)

Expand All @@ -32,22 +30,10 @@ s390x_softmmu_ss.add(files(
'cpu-sysemu.c',
))

# Newer kernels on s390 check for an S390_PGSTE program header and
# enable the pgste page table extensions in that case. This makes
# the vm.allocate_pgste sysctl unnecessary. We enable this program
# header if
# - we build on s390x
# - we build the system emulation for s390x (qemu-system-s390x)
# - KVM is enabled
# - the linker supports --s390-pgste
if host_machine.cpu_family() == 's390x' and cc.has_link_argument('-Wl,--s390-pgste')
s390x_softmmu_ss.add(when: 'CONFIG_KVM',
if_true: declare_dependency(link_args: ['-Wl,--s390-pgste']))
endif

s390x_user_ss = ss.source_set()

subdir('tcg')
subdir('kvm')

target_arch += {'s390x': s390x_ss}
target_softmmu_arch += {'s390x': s390x_softmmu_ss}
Expand Down
2 changes: 1 addition & 1 deletion target/s390x/mmu_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "exec/address-spaces.h"
#include "cpu.h"
#include "s390x-internal.h"
#include "kvm_s390x.h"
#include "kvm/kvm_s390x.h"
#include "sysemu/kvm.h"
#include "sysemu/tcg.h"
#include "exec/exec-all.h"
Expand Down
6 changes: 0 additions & 6 deletions target/s390x/trace-events
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ ioinst_sch_id(const char *insn, int cssid, int ssid, int schid) "IOINST: %s (%x.
ioinst_chp_id(const char *insn, int cssid, int chpid) "IOINST: %s (%x.%02x)"
ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command 0x%04x, len 0x%04x"

# kvm.c
kvm_enable_cmma(int rc) "CMMA: enabling with result code %d"
kvm_clear_cmma(int rc) "CMMA: clearing with result code %d"
kvm_failed_cpu_state_set(int cpu_index, uint8_t state, const char *msg) "Warning: Unable to set cpu %d state %" PRIu8 " to KVM: %s"
kvm_assign_subch_ioeventfd(int fd, uint32_t addr, bool assign, int datamatch) "fd: %d sch: @0x%x assign: %d vq: %d"

# cpu-sysemu.c
cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8
cpu_halt(int cpu_index) "halting cpu %d"
Expand Down

0 comments on commit 6704360

Please sign in to comment.