History

Merge tag 'kvm-s390-next-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-next-5.6

Paolo Bonzini committed 6 years ago

Commit f3633c22 parents ff2bd9f 23a60f87 files · +23 −11Browse files

Unified · Split

7 files
  1. arch/s390/include/asm/diag.h +2 −4
  2. arch/s390/include/asm/kvm_host.h +3 −1
  3. arch/s390/include/uapi/asm/kvm.h +5 −2
  4. arch/s390/kernel/setup.c +1 −2
  5. arch/s390/kvm/kvm-s390.c +10 −1
  6. arch/s390/kvm/vsie.c +1 −0
  7. include/uapi/linux/kvm.h +1 −1
arch/s390/include/asm/diag.h+2−4
@@ -298,10 +298,8 @@ struct diag26c_mac_resp { · 297 unmodified lines
298union diag318_info {298union diag318_info {
299 unsigned long val;299 unsigned long val;
300 struct {300 struct {
301 unsigned int cpnc : 8;301 unsigned long cpnc : 8;
302 unsigned int cpvc_linux : 24;302 unsigned long cpvc : 56;
303 unsigned char cpvc_distro[3];
304 unsigned char zero;
305 };303 };
306};304};
307 305
arch/s390/include/asm/kvm_host.h+3−1
@@ -260,7 +260,8 @@ struct kvm_s390_sie_block { · 259 unmodified lines
260 __u32 scaol; /* 0x0064 */260 __u32 scaol; /* 0x0064 */
261 __u8 sdf; /* 0x0068 */261 __u8 sdf; /* 0x0068 */
262 __u8 epdx; /* 0x0069 */262 __u8 epdx; /* 0x0069 */
263 __u8 reserved6a[2]; /* 0x006a */263 __u8 cpnc; /* 0x006a */
264 __u8 reserved6b; /* 0x006b */
264 __u32 todpr; /* 0x006c */265 __u32 todpr; /* 0x006c */
265#define GISA_FORMAT1 0x00000001266#define GISA_FORMAT1 0x00000001
266 __u32 gd; /* 0x0070 */267 __u32 gd; /* 0x0070 */
@@ -745,6 +746,7 @@ struct kvm_vcpu_arch { · 478 unmodified lines
745 bool gs_enabled;746 bool gs_enabled;
746 bool skey_enabled;747 bool skey_enabled;
747 struct kvm_s390_pv_vcpu pv;748 struct kvm_s390_pv_vcpu pv;
749 union diag318_info diag318_info;
748};750};
749 751
750struct kvm_vm_stat {752struct kvm_vm_stat {
arch/s390/include/uapi/asm/kvm.h+5−2
@@ -231,11 +231,13 @@ struct kvm_guest_debug_arch { · 230 unmodified lines
231#define KVM_SYNC_GSCB (1UL << 9)231#define KVM_SYNC_GSCB (1UL << 9)
232#define KVM_SYNC_BPBC (1UL << 10)232#define KVM_SYNC_BPBC (1UL << 10)
233#define KVM_SYNC_ETOKEN (1UL << 11)233#define KVM_SYNC_ETOKEN (1UL << 11)
234#define KVM_SYNC_DIAG318 (1UL << 12)
234 235
235#define KVM_SYNC_S390_VALID_FIELDS \236#define KVM_SYNC_S390_VALID_FIELDS \
236 (KVM_SYNC_PREFIX | KVM_SYNC_GPRS | KVM_SYNC_ACRS | KVM_SYNC_CRS | \237 (KVM_SYNC_PREFIX | KVM_SYNC_GPRS | KVM_SYNC_ACRS | KVM_SYNC_CRS | \
237 KVM_SYNC_ARCH0 | KVM_SYNC_PFAULT | KVM_SYNC_VRS | KVM_SYNC_RICCB | \238 KVM_SYNC_ARCH0 | KVM_SYNC_PFAULT | KVM_SYNC_VRS | KVM_SYNC_RICCB | \
238 KVM_SYNC_FPRS | KVM_SYNC_GSCB | KVM_SYNC_BPBC | KVM_SYNC_ETOKEN)239 KVM_SYNC_FPRS | KVM_SYNC_GSCB | KVM_SYNC_BPBC | KVM_SYNC_ETOKEN | \
240 KVM_SYNC_DIAG318)
239 241
240/* length and alignment of the sdnx as a power of two */242/* length and alignment of the sdnx as a power of two */
241#define SDNXC 8243#define SDNXC 8
@@ -264,7 +266,8 @@ struct kvm_sync_regs { · 22 unmodified lines
264 __u8 reserved2 : 7;266 __u8 reserved2 : 7;
265 __u8 padding1[51]; /* riccb needs to be 64byte aligned */267 __u8 padding1[51]; /* riccb needs to be 64byte aligned */
266 __u8 riccb[64]; /* runtime instrumentation controls block */268 __u8 riccb[64]; /* runtime instrumentation controls block */
267 __u8 padding2[192]; /* sdnx needs to be 256byte aligned */269 __u64 diag318; /* diagnose 0x318 info */
270 __u8 padding2[184]; /* sdnx needs to be 256byte aligned */
268 union {271 union {
269 __u8 sdnx[SDNXL]; /* state description annex */272 __u8 sdnx[SDNXL]; /* state description annex */
270 struct {273 struct {
arch/s390/kernel/setup.c+1−2
@@ -1021,8 +1021,7 @@ static void __init setup_control_program_code(void) · 1020 unmodified lines
1021{1021{
1022 union diag318_info diag318_info = {1022 union diag318_info diag318_info = {
1023 .cpnc = CPNC_LINUX,1023 .cpnc = CPNC_LINUX,
1024 .cpvc_linux = 0,1024 .cpvc = 0,
1025 .cpvc_distro = {0},
1026 };1025 };
1027 1026
1028 if (!sclp.has_diag318)1027 if (!sclp.has_diag318)
arch/s390/kvm/kvm-s390.c+10−1
@@ -545,6 +545,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) · 544 unmodified lines
545 case KVM_CAP_S390_AIS_MIGRATION:545 case KVM_CAP_S390_AIS_MIGRATION:
546 case KVM_CAP_S390_VCPU_RESETS:546 case KVM_CAP_S390_VCPU_RESETS:
547 case KVM_CAP_SET_GUEST_DEBUG:547 case KVM_CAP_SET_GUEST_DEBUG:
548 case KVM_CAP_S390_DIAG318:
548 r = 1;549 r = 1;
549 break;550 break;
550 case KVM_CAP_S390_HPAGE_1M:551 case KVM_CAP_S390_HPAGE_1M:
@@ -3267,7 +3268,8 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu) · 2716 unmodified lines
3267 KVM_SYNC_ACRS |3268 KVM_SYNC_ACRS |
3268 KVM_SYNC_CRS |3269 KVM_SYNC_CRS |
3269 KVM_SYNC_ARCH0 |3270 KVM_SYNC_ARCH0 |
3270 KVM_SYNC_PFAULT;3271 KVM_SYNC_PFAULT |
3272 KVM_SYNC_DIAG318;
3271 kvm_s390_set_prefix(vcpu, 0);3273 kvm_s390_set_prefix(vcpu, 0);
3272 if (test_kvm_facility(vcpu->kvm, 64))3274 if (test_kvm_facility(vcpu->kvm, 64))
3273 vcpu->run->kvm_valid_regs |= KVM_SYNC_RICCB;3275 vcpu->run->kvm_valid_regs |= KVM_SYNC_RICCB;
@@ -3562,6 +3564,7 @@ static void kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu) · 288 unmodified lines
3562 vcpu->arch.sie_block->pp = 0;3564 vcpu->arch.sie_block->pp = 0;
3563 vcpu->arch.sie_block->fpf &= ~FPF_BPBC;3565 vcpu->arch.sie_block->fpf &= ~FPF_BPBC;
3564 vcpu->arch.sie_block->todpr = 0;3566 vcpu->arch.sie_block->todpr = 0;
3567 vcpu->arch.sie_block->cpnc = 0;
3565 }3568 }
3566}3569}
3567 3570
@@ -3579,6 +3582,7 @@ static void kvm_arch_vcpu_ioctl_clear_reset(struct kvm_vcpu *vcpu) · 11 unmodified lines
3579 3582
3580 regs->etoken = 0;3583 regs->etoken = 0;
3581 regs->etoken_extension = 0;3584 regs->etoken_extension = 0;
3585 regs->diag318 = 0;
3582}3586}
3583 3587
3584int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)3588int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
@@ -4195,6 +4199,10 @@ static void sync_regs_fmt2(struct kvm_vcpu *vcpu) · 610 unmodified lines
4195 if (vcpu->arch.pfault_token == KVM_S390_PFAULT_TOKEN_INVALID)4199 if (vcpu->arch.pfault_token == KVM_S390_PFAULT_TOKEN_INVALID)
4196 kvm_clear_async_pf_completion_queue(vcpu);4200 kvm_clear_async_pf_completion_queue(vcpu);
4197 }4201 }
4202 if (kvm_run->kvm_dirty_regs & KVM_SYNC_DIAG318) {
4203 vcpu->arch.diag318_info.val = kvm_run->s.regs.diag318;
4204 vcpu->arch.sie_block->cpnc = vcpu->arch.diag318_info.cpnc;
4205 }
4198 /*4206 /*
4199 * If userspace sets the riccb (e.g. after migration) to a valid state,4207 * If userspace sets the riccb (e.g. after migration) to a valid state,
4200 * we should enable RI here instead of doing the lazy enablement.4208 * we should enable RI here instead of doing the lazy enablement.
@@ -4300,6 +4308,7 @@ static void store_regs_fmt2(struct kvm_vcpu *vcpu) · 99 unmodified lines
4300 kvm_run->s.regs.pp = vcpu->arch.sie_block->pp;4308 kvm_run->s.regs.pp = vcpu->arch.sie_block->pp;
4301 kvm_run->s.regs.gbea = vcpu->arch.sie_block->gbea;4309 kvm_run->s.regs.gbea = vcpu->arch.sie_block->gbea;
4302 kvm_run->s.regs.bpbc = (vcpu->arch.sie_block->fpf & FPF_BPBC) == FPF_BPBC;4310 kvm_run->s.regs.bpbc = (vcpu->arch.sie_block->fpf & FPF_BPBC) == FPF_BPBC;
4311 kvm_run->s.regs.diag318 = vcpu->arch.diag318_info.val;
4303 if (MACHINE_HAS_GS) {4312 if (MACHINE_HAS_GS) {
4304 __ctl_set_bit(2, 4);4313 __ctl_set_bit(2, 4);
4305 if (vcpu->arch.gs_enabled)4314 if (vcpu->arch.gs_enabled)
arch/s390/kvm/vsie.c+1−0
@@ -548,6 +548,7 @@ static int shadow_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page) · 547 unmodified lines
548 scb_s->ecd |= scb_o->ecd & ECD_ETOKENF;548 scb_s->ecd |= scb_o->ecd & ECD_ETOKENF;
549 549
550 scb_s->hpid = HPID_VSIE;550 scb_s->hpid = HPID_VSIE;
551 scb_s->cpnc = scb_o->cpnc;
551 552
552 prepare_ibc(vcpu, vsie_page);553 prepare_ibc(vcpu, vsie_page);
553 rc = shadow_crycb(vcpu, vsie_page);554 rc = shadow_crycb(vcpu, vsie_page);
include/uapi/linux/kvm.h+1−1
@@ -1034,7 +1034,7 @@ struct kvm_ppc_resize_hpt { · 1033 unmodified lines
1034#define KVM_CAP_ASYNC_PF_INT 1831034#define KVM_CAP_ASYNC_PF_INT 183
1035#define KVM_CAP_LAST_CPU 1841035#define KVM_CAP_LAST_CPU 184
1036#define KVM_CAP_SMALLER_MAXPHYADDR 1851036#define KVM_CAP_SMALLER_MAXPHYADDR 185
1037 1037#define KVM_CAP_S390_DIAG318 186
1038 1038
1039#ifdef KVM_CAP_IRQ_ROUTING1039#ifdef KVM_CAP_IRQ_ROUTING
1040 1040

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t