s390/z14: extended TOD-clock support
v2 cover s390/z14: extended TOD-clock support
The last last remaining z14 item on my queue.
v1->v2:
- split patches
- fix white spaces (also fixup kvm_s390_set_clock)
- single phrase error message
- use strerror
Collin L. Walling (2):
s390/kvm: Support for get/set of extended TOD-Clock for guest s390/kvm: make TOD setting failures fatal for migration
hw/s390x/s390-virtio-ccw.c | 7 ++----- target/s390x/cpu.c | 26 +++++++++++++++++++------- target/s390x/kvm-stub.c | 10 ++++++++++ target/s390x/kvm.c | 35 ++++++++++++++++++++++++++++++++++- target/s390x/kvm_s390x.h | 2 ++ 5 files changed, 67 insertions(+), 13 deletions(-)
Signature · 1 line
2.9.4
PATCH v2 2/2 s390/kvm: make TOD setting failures fatal for migration
From: "Collin L. Walling" <[email protected]>
If we fail to set a proper TOD clock on the target system, this can already result in some problematic cases. We print several warn messages on source and target in that case.
If kvm fails to set a nonzero epoch index, then we must ultimately fail the migration as this will result in a giant time leap backwards. This patch lets the migration fail if we can not set the guest time on the target.
On failure the guest will resume normally on the original host machine.
--- hw/s390x/s390-virtio-ccw.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
hw/s390x/s390-virtio-ccw.c +2 -5
@@ -213,13 +213,10 @@ static int gtod_load(QEMUFile *f, void *opaque, int version_id) r =s390_set_clock (&tod_high, &tod_low);if (r) { -warn_report ("Unable to set guest clock for migration: %s" , -strerror (-r)); -error_printf ("Guest clock will not be restored " -"which could cause the guest to hang." ); +error_report ("Unable to set KVM guest TOD clock: %s" ,strerror (-r)); } -return 0 ; +return r; }static SaveVMHandlers savevm_gtod = {
Signature · 1 line
2.9.4
PATCH v2 1/2 s390/kvm: Support for get/set of extended TOD-Clock for guest
In reply to Christian BorntraegerFrom: "Collin L. Walling" <[email protected]>
Provides an interface for getting and setting the guest's extended TOD-Clock via a single ioctl to kvm. If the ioctl fails because it is not support by kvm, then we fall back to the old style of retrieving the clock via two ioctls.
--- target/s390x/cpu.c | 26 +++++++++++++++++++------- target/s390x/kvm-stub.c | 10 ++++++++++ target/s390x/kvm.c | 35 ++++++++++++++++++++++++++++++++++- target/s390x/kvm_s390x.h | 2 ++ 4 files changed, 65 insertions(+), 8 deletions(-)
target/s390x/cpu.c +19 -7
@@ -357,22 +357,34 @@ unsigned int s390_cpu_set_state(uint8_t cpu_state, S390CPU *cpu)int s390_get_clock (uint8_t *tod_high,uint64_t *tod_low) { +int r =0 ; +if (kvm_enabled ()) { -return kvm_s390_get_clock (tod_high, tod_low); + r =kvm_s390_get_clock_ext (tod_high, tod_low); +if (r == -ENXIO ) { +return kvm_s390_get_clock (tod_high, tod_low); + } + }else { +/* Fixme TCG */ + *tod_high =0 ; + *tod_low =0 ; } -/* Fixme TCG */ - *tod_high =0 ; - *tod_low =0 ; -return 0 ; + +return r; }int s390_set_clock (uint8_t *tod_high,uint64_t *tod_low) { +int r =0 ; +if (kvm_enabled ()) { -return kvm_s390_set_clock (tod_high, tod_low); + r =kvm_s390_set_clock_ext (tod_high, tod_low); +if (r == -ENXIO ) { +return kvm_s390_set_clock (tod_high, tod_low); + } }/* Fixme TCG */ -return 0 ; +return r; }int s390_set_memory_limit (uint64_t new_limit,uint64_t *hw_limit)
target/s390x/kvm-stub.c +10 -0
@@ -68,11 +68,21 @@ int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low)return -ENOSYS ; } +int kvm_s390_get_clock_ext (uint8_t *tod_high,uint64_t *tod_low) +{ +return -ENOSYS ; +} +int kvm_s390_set_clock (uint8_t *tod_high,uint64_t *tod_low) {return -ENOSYS ; } +int kvm_s390_set_clock_ext (uint8_t *tod_high,uint64_t *tod_low) +{ +return -ENOSYS ; +} +void kvm_s390_enable_css_support (S390CPU *cpu) { }
target/s390x/kvm.c +34 -1
@@ -643,10 +643,27 @@ int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low)return kvm_vm_ioctl (kvm_state,KVM_GET_DEVICE_ATTR , &attr); } +int kvm_s390_get_clock_ext (uint8_t *tod_high,uint64_t *tod_low) +{ +int r; +struct kvm_s390_vm_tod_clock gtod; + +struct kvm_device_attr attr = { + .group =KVM_S390_VM_TOD , + .attr =KVM_S390_VM_TOD_EXT , + .addr = (uint64_t )(>od), + }; + + r =kvm_vm_ioctl (kvm_state,KVM_GET_DEVICE_ATTR , &attr); + *tod_high = gtod.epoch_idx; + *tod_low = gtod.tod; + +return r; +} +int kvm_s390_set_clock (uint8_t *tod_high,uint64_t *tod_low) {int r; -struct kvm_device_attr attr = { .group =KVM_S390_VM_TOD , .attr =KVM_S390_VM_TOD_LOW ,
@@ -663,6 +680,22 @@ int kvm_s390_set_clock(uint8_t *tod_high, uint64_t *tod_low)return kvm_vm_ioctl (kvm_state,KVM_SET_DEVICE_ATTR , &attr); } +int kvm_s390_set_clock_ext (uint8_t *tod_high,uint64_t *tod_low) +{ +struct kvm_s390_vm_tod_clock gtod = { + .epoch_idx = *tod_high, + .tod = *tod_low, + }; + +struct kvm_device_attr attr = { + .group =KVM_S390_VM_TOD , + .attr =KVM_S390_VM_TOD_EXT , + .addr = (uint64_t )(>od), + }; + +return kvm_vm_ioctl (kvm_state,KVM_SET_DEVICE_ATTR , &attr); +} +/** * kvm_s390_mem_op: * @addr: the logical start address in guest memory
target/s390x/kvm_s390x.h +2 -0
@@ -29,7 +29,9 @@ int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu);int kvm_s390_get_ri (void );int kvm_s390_get_gs (void );int kvm_s390_get_clock (uint8_t *tod_high,uint64_t *tod_clock); +int kvm_s390_get_clock_ext (uint8_t *tod_high,uint64_t *tod_clock);int kvm_s390_set_clock (uint8_t *tod_high,uint64_t *tod_clock); +int kvm_s390_set_clock_ext (uint8_t *tod_high,uint64_t *tod_clock);void kvm_s390_enable_css_support (S390CPU *cpu);int kvm_s390_assign_subch_ioeventfd (EventNotifier *notifier,uint32_t sch,int vq,bool assign);
Signature · 1 line
2.9.4
Re: [Qemu-devel] [PATCH v2 1/2] s390/kvm: Support for get/set of extended TOD-Clock for guest
Quoted 96 lines · Christian Borntraeger
From: "Collin L. Walling" <[email protected]>
Provides an interface for getting and setting the guest's extended TOD-Clock via a single ioctl to kvm. If the ioctl fails because it is not support by kvm, then we fall back to the old style of retrieving the clock via two ioctls.
Signed-off-by Collin L. Walling <[email protected]>Reviewed-by Eric Farman <[email protected]>Reviewed-by Claudio Imbrenda <[email protected]>Signed-off-by Christian Borntraeger <[email protected]>[split failure change from epoch index change]--- target/s390x/cpu.c | 26 +++++++++++++++++++------- target/s390x/kvm-stub.c | 10 ++++++++++ target/s390x/kvm.c | 35 ++++++++++++++++++++++++++++++++++- target/s390x/kvm_s390x.h | 2 ++ 4 files changed, 65 insertions(+), 8 deletions(-)target/s390x/cpu.c +19
-7@@ -357,22 +357,34 @@ unsigned int s390_cpu_set_state(uint8_t cpu_state, S390CPU *cpu)int s390_get_clock (uint8_t *tod_high,uint64_t *tod_low) { +int r =0 ; +if (kvm_enabled ()) { -return kvm_s390_get_clock (tod_high, tod_low); + r =kvm_s390_get_clock_ext (tod_high, tod_low); +if (r == -ENXIO ) { +return kvm_s390_get_clock (tod_high, tod_low); + } + }else { +/* Fixme TCG */ + *tod_high =0 ; + *tod_low =0 ; } -/* Fixme TCG */ - *tod_high =0 ; - *tod_low =0 ; -return 0 ; + +return r; }int s390_set_clock (uint8_t *tod_high,uint64_t *tod_low) { +int r =0 ; +if (kvm_enabled ()) { -return kvm_s390_set_clock (tod_high, tod_low); + r =kvm_s390_set_clock_ext (tod_high, tod_low); +if (r == -ENXIO ) { +return kvm_s390_set_clock (tod_high, tod_low); + } }/* Fixme TCG */ -return 0 ; +return r; }int s390_set_memory_limit (uint64_t new_limit,uint64_t *hw_limit)target/s390x/kvm-stub.c +10
-0@@ -68,11 +68,21 @@ int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low)return -ENOSYS ; } +int kvm_s390_get_clock_ext (uint8_t *tod_high,uint64_t *tod_low) +{ +return -ENOSYS ; +} +int kvm_s390_set_clock (uint8_t *tod_high,uint64_t *tod_low) {return -ENOSYS ; } +int kvm_s390_set_clock_ext (uint8_t *tod_high,uint64_t *tod_low) +{ +return -ENOSYS ; +} +void kvm_s390_enable_css_support (S390CPU *cpu) { }target/s390x/kvm.c +0
-0
target/s390x/kvm.c int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low) · line 650
Quoted 8 lines
target/s390x/kvm.c +5
-0@@ -643,10 +643,27 @@ int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low)return kvm_vm_ioctl (kvm_state,KVM_GET_DEVICE_ATTR , &attr); } +int kvm_s390_get_clock_ext (uint8_t *tod_high,uint64_t *tod_low) +{ +int r; +struct kvm_s390_vm_tod_clock gtod; +
So you've got a blank line here...
Quoted 7 lines
target/s390x/kvm.c +7
-0+struct kvm_device_attr attr = { + .group =KVM_S390_VM_TOD , + .attr =KVM_S390_VM_TOD_EXT , + .addr = (uint64_t )(>od), + }; + + r =kvm_vm_ioctl (kvm_state,KVM_GET_DEVICE_ATTR , &attr);
target/s390x/kvm.c int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low) · line 649
Quoted 10 lines
target/s390x/kvm.c +6
-1+ *tod_high = gtod.epoch_idx; + *tod_low = gtod.tod; + +return r; +} +int kvm_s390_set_clock (uint8_t *tod_high,uint64_t *tod_low) {int r; -
... but removed the blank line here ... it would be more consequent to do it the same way everywhere?
Quoted 8 lines
target/s390x/kvm.c +1
-0struct kvm_device_attr attr = { .group =KVM_S390_VM_TOD , .attr =KVM_S390_VM_TOD_LOW ,@@ -663,6 +680,22 @@ int kvm_s390_set_clock(uint8_t *tod_high, uint64_t *tod_low)return kvm_vm_ioctl (kvm_state,KVM_SET_DEVICE_ATTR , &attr); } +int kvm_s390_set_clock_ext (uint8_t *tod_high,uint64_t *tod_low)
target/s390x/kvm.c int kvm_s390_set_clock(uint8_t *tod_high, uint64_t *tod_low) · line 693
Quoted 10 lines
target/s390x/kvm.c +10
-0+{ +struct kvm_s390_vm_tod_clock gtod = { + .epoch_idx = *tod_high, + .tod = *tod_low, + }; + +struct kvm_device_attr attr = { + .group =KVM_S390_VM_TOD , + .attr =KVM_S390_VM_TOD_EXT , + .addr = (uint64_t )(>od),
You could remove the parentheses around ">od" (same in the get_clock_ext function).
Quoted 14 lines
target/s390x/kvm.c +5
-0+ }; + +return kvm_vm_ioctl (kvm_state,KVM_SET_DEVICE_ATTR , &attr); +} +/** * kvm_s390_mem_op: * @addr: the logical start address in guest memory target/s390x/kvm_s390x.h +0
-0
target/s390x/kvm_s390x.h int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu); · line 37
Quoted 9 lines
target/s390x/kvm_s390x.h +2
-0@@ -29,7 +29,9 @@ int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu);int kvm_s390_get_ri (void );int kvm_s390_get_gs (void );int kvm_s390_get_clock (uint8_t *tod_high,uint64_t *tod_clock); +int kvm_s390_get_clock_ext (uint8_t *tod_high,uint64_t *tod_clock);int kvm_s390_set_clock (uint8_t *tod_high,uint64_t *tod_clock); +int kvm_s390_set_clock_ext (uint8_t *tod_high,uint64_t *tod_clock);void kvm_s390_enable_css_support (S390CPU *cpu);int kvm_s390_assign_subch_ioeventfd (EventNotifier *notifier,uint32_t sch,int vq,bool assign);
Just cosmetic nits... patch looks fine otherwise, so:
Re: [Qemu-devel] [PATCH v2 1/2] s390/kvm: Support for get/set of extended TOD-Clock for guest
Quoted 100 lines · Thomas Huth
Quoted 99 lines · Christian Borntraeger
From: "Collin L. Walling" <[email protected]>
Provides an interface for getting and setting the guest's extended TOD-Clock via a single ioctl to kvm. If the ioctl fails because it is not support by kvm, then we fall back to the old style of retrieving the clock via two ioctls.
Signed-off-by Collin L. Walling <[email protected]>Reviewed-by Eric Farman <[email protected]>Reviewed-by Claudio Imbrenda <[email protected]>Signed-off-by Christian Borntraeger <[email protected]>[split failure change from epoch index change]--- target/s390x/cpu.c | 26 +++++++++++++++++++------- target/s390x/kvm-stub.c | 10 ++++++++++ target/s390x/kvm.c | 35 ++++++++++++++++++++++++++++++++++- target/s390x/kvm_s390x.h | 2 ++ 4 files changed, 65 insertions(+), 8 deletions(-)target/s390x/cpu.c +19
-7@@ -357,22 +357,34 @@ unsigned int s390_cpu_set_state(uint8_t cpu_state, S390CPU *cpu)int s390_get_clock (uint8_t *tod_high,uint64_t *tod_low) { +int r =0 ; +if (kvm_enabled ()) { -return kvm_s390_get_clock (tod_high, tod_low); + r =kvm_s390_get_clock_ext (tod_high, tod_low); +if (r == -ENXIO ) { +return kvm_s390_get_clock (tod_high, tod_low); + } + }else { +/* Fixme TCG */ + *tod_high =0 ; + *tod_low =0 ; } -/* Fixme TCG */ - *tod_high =0 ; - *tod_low =0 ; -return 0 ; + +return r; }int s390_set_clock (uint8_t *tod_high,uint64_t *tod_low) { +int r =0 ; +if (kvm_enabled ()) { -return kvm_s390_set_clock (tod_high, tod_low); + r =kvm_s390_set_clock_ext (tod_high, tod_low); +if (r == -ENXIO ) { +return kvm_s390_set_clock (tod_high, tod_low); + } }/* Fixme TCG */ -return 0 ; +return r; }int s390_set_memory_limit (uint64_t new_limit,uint64_t *hw_limit)target/s390x/kvm-stub.c +10
-0@@ -68,11 +68,21 @@ int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low)return -ENOSYS ; } +int kvm_s390_get_clock_ext (uint8_t *tod_high,uint64_t *tod_low) +{ +return -ENOSYS ; +} +int kvm_s390_set_clock (uint8_t *tod_high,uint64_t *tod_low) {return -ENOSYS ; } +int kvm_s390_set_clock_ext (uint8_t *tod_high,uint64_t *tod_low) +{ +return -ENOSYS ; +} +void kvm_s390_enable_css_support (S390CPU *cpu) { }target/s390x/kvm.c +0
-0@@ -643,10 +643,27 @@ int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low)return kvm_vm_ioctl (kvm_state,KVM_GET_DEVICE_ATTR , &attr); }
Quoted 7 lines
target/s390x/kvm.c int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low) · line 650
Quoted 5 lines
target/s390x/kvm.c +5
-0+int kvm_s390_get_clock_ext (uint8_t *tod_high,uint64_t *tod_low) +{ +int r; +struct kvm_s390_vm_tod_clock gtod; +So you've got a blank line here...
Yes, seems that I have forgotten this one.
I will let Conny decide if I should resend or if she can fixup.
Quoted 29 lines
Quoted 8 lines
target/s390x/kvm.c +7
-0+struct kvm_device_attr attr = { + .group =KVM_S390_VM_TOD , + .attr =KVM_S390_VM_TOD_EXT , + .addr = (uint64_t )(>od), + }; + + r =kvm_vm_ioctl (kvm_state,KVM_GET_DEVICE_ATTR , &attr);target/s390x/kvm.c int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low) · line 649
Quoted 10 lines
target/s390x/kvm.c +6
-1+ *tod_high = gtod.epoch_idx; + *tod_low = gtod.tod; + +return r; +} +int kvm_s390_set_clock (uint8_t *tod_high,uint64_t *tod_low) {int r; -... but removed the blank line here ... it would be more consequent to do it the same way everywhere?
Quoted 7 lines
target/s390x/kvm.c +0
-0struct kvm_device_attr attr = { .group =KVM_S390_VM_TOD , .attr =KVM_S390_VM_TOD_LOW ,@@ -663,6 +680,22 @@ int kvm_s390_set_clock(uint8_t *tod_high, uint64_t *tod_low)return kvm_vm_ioctl (kvm_state,KVM_SET_DEVICE_ATTR , &attr); }
Quoted 14 lines
target/s390x/kvm.c int kvm_s390_set_clock(uint8_t *tod_high, uint64_t *tod_low) · line 693
Quoted 11 lines
target/s390x/kvm.c +11
-0+int kvm_s390_set_clock_ext (uint8_t *tod_high,uint64_t *tod_low) +{ +struct kvm_s390_vm_tod_clock gtod = { + .epoch_idx = *tod_high, + .tod = *tod_low, + }; + +struct kvm_device_attr attr = { + .group =KVM_S390_VM_TOD , + .attr =KVM_S390_VM_TOD_EXT , + .addr = (uint64_t )(>od),You could remove the parentheses around ">od" (same in the
get_clock_extfunction).
dito.
Quoted 29 lines
Quoted 15 lines
target/s390x/kvm.c +5
-0+ }; + +return kvm_vm_ioctl (kvm_state,KVM_SET_DEVICE_ATTR , &attr); +} +/** * kvm_s390_mem_op: * @addr: the logical start address in guest memory target/s390x/kvm_s390x.h +0
-0target/s390x/kvm_s390x.h int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu); · line 37
Quoted 9 lines
target/s390x/kvm_s390x.h +2
-0@@ -29,7 +29,9 @@ int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu);int kvm_s390_get_ri (void );int kvm_s390_get_gs (void );int kvm_s390_get_clock (uint8_t *tod_high,uint64_t *tod_clock); +int kvm_s390_get_clock_ext (uint8_t *tod_high,uint64_t *tod_clock);int kvm_s390_set_clock (uint8_t *tod_high,uint64_t *tod_clock); +int kvm_s390_set_clock_ext (uint8_t *tod_high,uint64_t *tod_clock);void kvm_s390_enable_css_support (S390CPU *cpu);int kvm_s390_assign_subch_ioeventfd (EventNotifier *notifier,uint32_t sch,int vq,bool assign);Just cosmetic nits... patch looks fine otherwise, so:
Reviewed-by Thomas Huth <[email protected]>
Re: [Qemu-devel] [PATCH v2 2/2] s390/kvm: make TOD setting failures fatal for migration
In reply to Christian BorntraegerQuoted 30 lines · Christian Borntraeger
From: "Collin L. Walling" <[email protected]>
If we fail to set a proper TOD clock on the target system, this can already result in some problematic cases. We print several warn messages on source and target in that case.
If kvm fails to set a nonzero epoch index, then we must ultimately fail the migration as this will result in a giant time leap backwards. This patch lets the migration fail if we can not set the guest time on the target.
On failure the guest will resume normally on the original host machine.
Signed-off-by Collin L. Walling <[email protected]>Reviewed-by Eric Farman <[email protected]>Reviewed-by Claudio Imbrenda <[email protected]>Signed-off-by Christian Borntraeger <[email protected]>[split failure change from epoch index change, minor fixups]--- hw/s390x/s390-virtio-ccw.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)hw/s390x/s390-virtio-ccw.c +0
-0@@ -213,13 +213,10 @@ static int gtod_load(QEMUFile *f, void *opaque, int version_id) r =s390_set_clock (&tod_high, &tod_low);if (r) {
hw/s390x/s390-virtio-ccw.c static int gtod_load(QEMUFile *f, void *opaque, int version_id) · line 220
Quoted 10 lines
hw/s390x/s390-virtio-ccw.c +2
-5-warn_report ("Unable to set guest clock for migration: %s" , -strerror (-r)); -error_printf ("Guest clock will not be restored " -"which could cause the guest to hang." ); +error_report ("Unable to set KVM guest TOD clock: %s" ,strerror (-r)); } -return 0 ; +return r; }
(and I wonder whether we should fail the S390_TOD_CLOCK_VALUE_MISSING case with returning an error instead of 0, too?)
Re: [Qemu-devel] [PATCH v2 2/2] s390/kvm: make TOD setting failures fatal for migration
Quoted 38 lines · Thomas Huth
Quoted 37 lines · Christian Borntraeger
From: "Collin L. Walling" <[email protected]>
If we fail to set a proper TOD clock on the target system, this can already result in some problematic cases. We print several warn messages on source and target in that case.
If kvm fails to set a nonzero epoch index, then we must ultimately fail the migration as this will result in a giant time leap backwards. This patch lets the migration fail if we can not set the guest time on the target.
On failure the guest will resume normally on the original host machine.
Signed-off-by Collin L. Walling <[email protected]>Reviewed-by Eric Farman <[email protected]>Reviewed-by Claudio Imbrenda <[email protected]>Signed-off-by Christian Borntraeger <[email protected]>[split failure change from epoch index change, minor fixups]--- hw/s390x/s390-virtio-ccw.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)hw/s390x/s390-virtio-ccw.c +1
-4@@ -213,13 +213,10 @@ static int gtod_load(QEMUFile *f, void *opaque, int version_id) r =s390_set_clock (&tod_high, &tod_low);if (r) { -warn_report ("Unable to set guest clock for migration: %s" , -strerror (-r)); -error_printf ("Guest clock will not be restored " -"which could cause the guest to hang." ); +error_report ("Unable to set KVM guest TOD clock: %s" ,strerror (-r)); }
Quoted 8 lines
hw/s390x/s390-virtio-ccw.c static int gtod_load(QEMUFile *f, void *opaque, int version_id) · line 220
Quoted 3 lines
hw/s390x/s390-virtio-ccw.c +1
-1-return 0 ; +return r; }Reviewed-by Thomas Huth <[email protected]>(and I wonder whether we should fail the
S390_TOD_CLOCK_VALUE_MISSINGcase with returning an error instead of 0, too?)
Yes. This patch does the minimal thing in "making things fail on error" now that we have a case where things are guaranteed to be out of sync. One can argue that we actually should fail migration on the source instead of sending S390_TOD_CLOCK_VALUE_MISSING.
If you want to send a patch that make migration fail for more cases I am inclined to ack such a thing.
Re: [Qemu-devel] [PATCH v2 1/2] s390/kvm: Support for get/set of extended TOD-Clock for guest
In reply to Christian BorntraegerQuoted 37 lines · On Wed, 4 Oct 2017 13:44:31 +0200 Christian Borntraeger…
Quoted 28 lines · Thomas Huth
Quoted 27 lines · Christian Borntraeger
From: "Collin L. Walling" <[email protected]>
Provides an interface for getting and setting the guest's extended TOD-Clock via a single ioctl to kvm. If the ioctl fails because it is not support by kvm, then we fall back to the old style of retrieving the clock via two ioctls.
Signed-off-by Collin L. Walling <[email protected]>Reviewed-by Eric Farman <[email protected]>Reviewed-by Claudio Imbrenda <[email protected]>Signed-off-by Christian Borntraeger <[email protected]>[split failure change from epoch index change]--- target/s390x/cpu.c | 26 +++++++++++++++++++------- target/s390x/kvm-stub.c | 10 ++++++++++ target/s390x/kvm.c | 35 ++++++++++++++++++++++++++++++++++- target/s390x/kvm_s390x.h | 2 ++ 4 files changed, 65 insertions(+), 8 deletions(-)target/s390x/kvm.c +0
-0@@ -643,10 +643,27 @@ int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low)return kvm_vm_ioctl (kvm_state,KVM_GET_DEVICE_ATTR , &attr); }Quoted 7 lines
target/s390x/kvm.c int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low) · line 650
Quoted 5 lines
target/s390x/kvm.c +5
-0+int kvm_s390_get_clock_ext (uint8_t *tod_high,uint64_t *tod_low) +{ +int r; +struct kvm_s390_vm_tod_clock gtod; +So you've got a blank line here...
Quoted 2 lines
Yes, seems that I have forgotten this one.
I will let Conny decide if I should resend or if she can fixup.
No worries, I can make this consistent on applying.
Cornelia Huck
AppliedQuoted 1 line · On Wed, 4 Oct 2017 12:57:49 +0200 Christian Borntraeger…
The last last remaining z14 item on my queue.
So the really last one? :)
Quoted 11 lines
v1->v2:
- split patches
- fix white spaces (also fixupkvm_s390_set_clock)
- single phrase error message
- use strerrorCollin L. Walling (2):
s390/kvm: Support for get/set of extended TOD-Clock for guest s390/kvm: make TOD setting failures fatal for migration
Quoted 7 lines
hw/s390x/s390-virtio-ccw.c | 7 ++----- target/s390x/cpu.c | 26 +++++++++++++++++++------- target/s390x/kvm-stub.c | 10 ++++++++++ target/s390x/kvm.c | 35 ++++++++++++++++++++++++++++++++++- target/s390x/kvm_s390x.h | 2 ++ 5 files changed, 67 insertions(+), 13 deletions(-)
Thanks, applied.
Quoted 6 lines · Cornelia Huck
Quoted 1 line · On Wed, 4 Oct 2017 12:57:49 +0200 Christian Borntraeger…
The last last remaining z14 item on my queue.
So the really last one? :)
Have a look at the full model of z14 in target/s390x/gen-features.c
There are some things that we could do, for example the test pending external interruption or the insert reference multiple. Both instructions do not make much sense for Linux.
Then there is hpma2, which is a host memory management thing and only becomes relevant if we ever implement it for vsie.
But nothing of that is high priority right now.
Quoted 22 lines
Quoted 12 lines
v1->v2:
- split patches
- fix white spaces (also fixupkvm_s390_set_clock)
- single phrase error message
- use strerrorCollin L. Walling (2):
s390/kvm: Support for get/set of extended TOD-Clock for guest s390/kvm: make TOD setting failures fatal for migrationQuoted 7 lines
hw/s390x/s390-virtio-ccw.c | 7 ++----- target/s390x/cpu.c | 26 +++++++++++++++++++------- target/s390x/kvm-stub.c | 10 ++++++++++ target/s390x/kvm.c | 35 ++++++++++++++++++++++++++++++++++- target/s390x/kvm_s390x.h | 2 ++ 5 files changed, 67 insertions(+), 13 deletions(-)Thanks, applied.