Merge branch 'c9' into a9-ppc64le
This commit is contained in:
		
						commit
						9511d56c0f
					
				
							
								
								
									
										75
									
								
								SOURCES/kvm-migration-Read-state-once.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										75
									
								
								SOURCES/kvm-migration-Read-state-once.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,75 @@ | ||||
| From 0a808f2304731f2108b29c3c6777cdd966a03beb Mon Sep 17 00:00:00 2001 | ||||
| From: "Dr. David Alan Gilbert" <dgilbert@redhat.com> | ||||
| Date: Wed, 13 Apr 2022 12:33:29 +0100 | ||||
| Subject: [PATCH] migration: Read state once | ||||
| 
 | ||||
| RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com> | ||||
| RH-MergeRequest: 255: migration: Read state once | ||||
| RH-Bugzilla: 2168221 | ||||
| RH-Acked-by: quintela1 <quintela@redhat.com> | ||||
| RH-Acked-by: Peter Xu <peterx@redhat.com> | ||||
| RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com> | ||||
| RH-Commit: [1/1] 215b2009145df37a2caee525991021ce9325686a | ||||
| 
 | ||||
| The 'status' field for the migration is updated normally using | ||||
| an atomic operation from the migration thread. | ||||
| Most readers of it aren't that careful, and in most cases it doesn't | ||||
| matter. | ||||
| 
 | ||||
| In query_migrate->fill_source_migration_info the 'state' | ||||
| is read twice; the first time to decide which state fields to fill in, | ||||
| and then secondly to copy the state to the status field; that can end up | ||||
| with a status that's inconsistent; e.g. setting up the fields | ||||
| for 'setup' and then having an 'active' status.  In that case | ||||
| libvirt gets upset by the lack of ram info. | ||||
| The symptom is: | ||||
|    libvirt.libvirtError: internal error: migration was active, but no RAM info was set | ||||
| 
 | ||||
| Read the state exactly once in fill_source_migration_info. | ||||
| 
 | ||||
| This is a possible fix for: | ||||
| https://bugzilla.redhat.com/show_bug.cgi?id=2074205 | ||||
| 
 | ||||
| Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> | ||||
| Message-Id: <20220413113329.103696-1-dgilbert@redhat.com> | ||||
| Reviewed-by: Juan Quintela <quintela@redhat.com> | ||||
| Reviewed-by: Peter Xu <peterx@redhat.com> | ||||
| Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> | ||||
| (cherry picked from commit 552de79bfdd5e9e53847eb3c6d6e4cd898a4370e) | ||||
| ---
 | ||||
|  migration/migration.c | 5 +++-- | ||||
|  1 file changed, 3 insertions(+), 2 deletions(-) | ||||
| 
 | ||||
| diff --git a/migration/migration.c b/migration/migration.c
 | ||||
| index 5e78028df4..e417d40c44 100644
 | ||||
| --- a/migration/migration.c
 | ||||
| +++ b/migration/migration.c
 | ||||
| @@ -1076,6 +1076,7 @@ static void populate_disk_info(MigrationInfo *info)
 | ||||
|  static void fill_source_migration_info(MigrationInfo *info) | ||||
|  { | ||||
|      MigrationState *s = migrate_get_current(); | ||||
| +    int state = qatomic_read(&s->state);
 | ||||
|      GSList *cur_blocker = migration_blockers; | ||||
|   | ||||
|      info->blocked_reasons = NULL; | ||||
| @@ -1095,7 +1096,7 @@ static void fill_source_migration_info(MigrationInfo *info)
 | ||||
|      } | ||||
|      info->has_blocked_reasons = info->blocked_reasons != NULL; | ||||
|   | ||||
| -    switch (s->state) {
 | ||||
| +    switch (state) {
 | ||||
|      case MIGRATION_STATUS_NONE: | ||||
|          /* no migration has happened ever */ | ||||
|          /* do not overwrite destination migration status */ | ||||
| @@ -1140,7 +1141,7 @@ static void fill_source_migration_info(MigrationInfo *info)
 | ||||
|          info->has_status = true; | ||||
|          break; | ||||
|      } | ||||
| -    info->status = s->state;
 | ||||
| +    info->status = state;
 | ||||
|  } | ||||
|   | ||||
|  typedef enum WriteTrackingSupport { | ||||
| -- 
 | ||||
| 2.31.1 | ||||
| 
 | ||||
| @ -0,0 +1,61 @@ | ||||
| From 0423b2a79991c6ae7aa65123e0d4f52294c006ee Mon Sep 17 00:00:00 2001 | ||||
| From: Jon Maloy <jmaloy@redhat.com> | ||||
| Date: Wed, 18 Jan 2023 11:08:30 -0500 | ||||
| Subject: [PATCH] target/i386/kvm: fix kvmclock_current_nsec: Assertion | ||||
|  `time.tsc_timestamp <= migration_tsc' failed | ||||
| 
 | ||||
| RH-Author: Jon Maloy <jmaloy@redhat.com> | ||||
| RH-MergeRequest: 248: target/i386/kvm: fix kvmclock_current_nsec: Assertion `time.tsc_timestamp <= migration_tsc' failed | ||||
| RH-Bugzilla: 2134896 | ||||
| RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com> | ||||
| RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com> | ||||
| RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com> | ||||
| RH-Commit: [1/1] f7b46dad79581f7751a3f00a52d766207652e048 (redhat/rhel/src/qemu-kvm/jons-qemu-kvm-2) | ||||
| 
 | ||||
| Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2134896 | ||||
| Upstream: Merged | ||||
| 
 | ||||
| commit c4ef867f2949bf2a2ae18a4e27cf1a34bbc8aecb | ||||
| Author: Ray Zhang <zhanglei002@gmail.com> | ||||
| Date:   Thu Sep 22 18:05:23 2022 +0800 | ||||
| 
 | ||||
|     target/i386/kvm: fix kvmclock_current_nsec: Assertion `time.tsc_timestamp <= migration_tsc' failed | ||||
| 
 | ||||
|     New KVM_CLOCK flags were added in the kernel.(c68dc1b577eabd5605c6c7c08f3e07ae18d30d5d) | ||||
|     ``` | ||||
|     + #define KVM_CLOCK_VALID_FLAGS                                         \ | ||||
|     +       (KVM_CLOCK_TSC_STABLE | KVM_CLOCK_REALTIME | KVM_CLOCK_HOST_TSC) | ||||
| 
 | ||||
|             case KVM_CAP_ADJUST_CLOCK: | ||||
|     -               r = KVM_CLOCK_TSC_STABLE; | ||||
|     +               r = KVM_CLOCK_VALID_FLAGS; | ||||
|     ``` | ||||
| 
 | ||||
|     kvm_has_adjust_clock_stable needs to handle additional flags, | ||||
|     so that s->clock_is_reliable can be true and kvmclock_current_nsec doesn't need to be called. | ||||
| 
 | ||||
|     Signed-off-by: Ray Zhang <zhanglei002@gmail.com> | ||||
|     Message-Id: <20220922100523.2362205-1-zhanglei002@gmail.com> | ||||
|     Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | ||||
| 
 | ||||
| Signed-off-by: Jon Maloy <jmaloy@redhat.com> | ||||
| ---
 | ||||
|  target/i386/kvm/kvm.c | 2 +- | ||||
|  1 file changed, 1 insertion(+), 1 deletion(-) | ||||
| 
 | ||||
| diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
 | ||||
| index ef70e2c85f..2c603df792 100644
 | ||||
| --- a/target/i386/kvm/kvm.c
 | ||||
| +++ b/target/i386/kvm/kvm.c
 | ||||
| @@ -153,7 +153,7 @@ bool kvm_has_adjust_clock_stable(void)
 | ||||
|  { | ||||
|      int ret = kvm_check_extension(kvm_state, KVM_CAP_ADJUST_CLOCK); | ||||
|   | ||||
| -    return (ret == KVM_CLOCK_TSC_STABLE);
 | ||||
| +    return (ret & KVM_CLOCK_TSC_STABLE);
 | ||||
|  } | ||||
|   | ||||
|  bool kvm_has_adjust_clock(void) | ||||
| -- 
 | ||||
| 2.31.1 | ||||
| 
 | ||||
| @ -148,7 +148,7 @@ Obsoletes: %{name}-block-ssh <= %{epoch}:%{version}                    \ | ||||
| Summary: QEMU is a machine emulator and virtualizer | ||||
| Name: qemu-kvm | ||||
| Version: 7.0.0 | ||||
| Release: 13%{?rcrel}%{?dist}%{?cc_suffix}.alma | ||||
| Release: 13%{?rcrel}%{?dist}%{?cc_suffix}.2.alma | ||||
| # Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped | ||||
| # Epoch 15 used for RHEL 8 | ||||
| # Epoch 17 used for RHEL 9 (due to release versioning offset in RHEL 8.5) | ||||
| @ -491,6 +491,11 @@ Patch169: kvm-virtio-scsi-fix-race-in-virtio_scsi_dataplane_start.patch | ||||
| Patch170: kvm-i386-reset-KVM-nested-state-upon-CPU-reset.patch | ||||
| # For bz#2117546 - [RHEL9.1] Guests in VMX root operation fail to reboot with QEMU's 'system_reset' command | ||||
| Patch171: kvm-i386-do-kvm_put_msr_feature_control-first-thing-when.patch | ||||
| # For bz#2134896 - Windows guest reboot after migration with wsl2 installed inside [rhel-9.1.0.z] | ||||
| Patch172: kvm-target-i386-kvm-fix-kvmclock_current_nsec-Assertion-.patch | ||||
| # For bz#2168221 - while live-migrating many instances concurrently, libvirt sometimes return internal error: migration was active, but no RAM info was set [rhel-9.1.0.z] | ||||
| Patch173: kvm-migration-Read-state-once.patch | ||||
| 
 | ||||
| # Source-git patches | ||||
| 
 | ||||
| # AlmaLinux patches | ||||
| @ -1528,10 +1533,20 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ | ||||
| %endif | ||||
| 
 | ||||
| %changelog | ||||
| * Fri Dec 16 2022 Eduard Abdullin <eabdullin@almalinux.org> - 7.0.0-13.alma | ||||
| * Tue Mar 28 2023 Eduard Abdullin <eabdullin@almalinux.org> - 7.0.0-13.el9_1.2.alma | ||||
| - Enable build for ppc64le | ||||
| - Apply patch for fix linking | ||||
| 
 | ||||
| * Mon Feb 13 2023 Miroslav Rezanina <mrezanin@redhat.com> - 7.0.0-13.el9_1.2 | ||||
| - kvm-migration-Read-state-once.patch [bz#2168221] | ||||
| - Resolves: bz#2168221 | ||||
|   (while live-migrating many instances concurrently, libvirt sometimes return internal error: migration was active, but no RAM info was set [rhel-9.1.0.z]) | ||||
| 
 | ||||
| * Thu Feb 02 2023 Miroslav Rezanina <mrezanin@redhat.com> - 7.0.0-13.el9_1.1 | ||||
| - kvm-target-i386-kvm-fix-kvmclock_current_nsec-Assertion-.patch [bz#2134896] | ||||
| - Resolves: bz#2134896 | ||||
|   (Windows guest reboot after migration with wsl2 installed inside [rhel-9.1.0.z]) | ||||
| 
 | ||||
| * Tue Sep 13 2022 Miroslav Rezanina <mrezanin@redhat.com> - 7.0.0-13 | ||||
| - kvm-i386-reset-KVM-nested-state-upon-CPU-reset.patch [bz#2117546] | ||||
| - kvm-i386-do-kvm_put_msr_feature_control-first-thing-when.patch [bz#2117546] | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user