rebase patches on top of Ubuntu-5.19.0-24.25
(generated with debian/scripts/import-upstream-tag) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
		
							parent
							
								
									044258547b
								
							
						
					
					
						commit
						a61c6773b5
					
				| @ -55,10 +55,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> | |||||||
|  2 files changed, 111 insertions(+) |  2 files changed, 111 insertions(+) | ||||||
| 
 | 
 | ||||||
| diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
 | diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
 | ||||||
| index d4666e7c1843..47e8508a296e 100644
 | index 18417e6e26d2..20b6f2687d67 100644
 | ||||||
| --- a/Documentation/admin-guide/kernel-parameters.txt
 | --- a/Documentation/admin-guide/kernel-parameters.txt
 | ||||||
| +++ b/Documentation/admin-guide/kernel-parameters.txt
 | +++ b/Documentation/admin-guide/kernel-parameters.txt
 | ||||||
| @@ -4094,6 +4094,15 @@
 | @@ -4098,6 +4098,15 @@
 | ||||||
|  				Also, it enforces the PCI Local Bus spec |  				Also, it enforces the PCI Local Bus spec | ||||||
|  				rule that those bits should be 0 in system reset |  				rule that those bits should be 0 in system reset | ||||||
|  				events (useful for kexec/kdump cases). |  				events (useful for kexec/kdump cases). | ||||||
|  | |||||||
| @ -14,10 +14,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> | |||||||
|  1 file changed, 1 insertion(+), 1 deletion(-) |  1 file changed, 1 insertion(+), 1 deletion(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
 | diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
 | ||||||
| index 2e24db4bff19..7766a24d0f19 100644
 | index 8c31c98f0bfc..470b78cd0134 100644
 | ||||||
| --- a/lib/Kconfig.debug
 | --- a/lib/Kconfig.debug
 | ||||||
| +++ b/lib/Kconfig.debug
 | +++ b/lib/Kconfig.debug
 | ||||||
| @@ -357,7 +357,7 @@ config PAHOLE_HAS_BTF_TAG
 | @@ -365,7 +365,7 @@ config PAHOLE_HAS_BTF_TAG
 | ||||||
|  	  these attributes, so make the config depend on CC_IS_CLANG. |  	  these attributes, so make the config depend on CC_IS_CLANG. | ||||||
|   |   | ||||||
|  config DEBUG_INFO_BTF_MODULES |  config DEBUG_INFO_BTF_MODULES | ||||||
|  | |||||||
| @ -18,7 +18,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> | |||||||
|  1 file changed, 1 insertion(+) |  1 file changed, 1 insertion(+) | ||||||
| 
 | 
 | ||||||
| diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | ||||||
| index 09fa8a94807b..d888223ef820 100644
 | index 695a5d159de8..4aacaa379274 100644
 | ||||||
| --- a/arch/x86/kvm/emulate.c
 | --- a/arch/x86/kvm/emulate.c
 | ||||||
| +++ b/arch/x86/kvm/emulate.c
 | +++ b/arch/x86/kvm/emulate.c
 | ||||||
| @@ -2876,6 +2876,7 @@ static int em_sysexit(struct x86_emulate_ctxt *ctxt)
 | @@ -2876,6 +2876,7 @@ static int em_sysexit(struct x86_emulate_ctxt *ctxt)
 | ||||||
|  | |||||||
| @ -21,7 +21,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> | |||||||
|  1 file changed, 57 insertions(+), 28 deletions(-) |  1 file changed, 57 insertions(+), 28 deletions(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | ||||||
| index d888223ef820..529b9e052564 100644
 | index 4aacaa379274..9d0268879590 100644
 | ||||||
| --- a/arch/x86/kvm/emulate.c
 | --- a/arch/x86/kvm/emulate.c
 | ||||||
| +++ b/arch/x86/kvm/emulate.c
 | +++ b/arch/x86/kvm/emulate.c
 | ||||||
| @@ -794,8 +794,7 @@ static int linearize(struct x86_emulate_ctxt *ctxt,
 | @@ -794,8 +794,7 @@ static int linearize(struct x86_emulate_ctxt *ctxt,
 | ||||||
|  | |||||||
| @ -17,7 +17,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> | |||||||
|  1 file changed, 5 insertions(+) |  1 file changed, 5 insertions(+) | ||||||
| 
 | 
 | ||||||
| diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | ||||||
| index 529b9e052564..f5451283abef 100644
 | index 9d0268879590..2e064461c236 100644
 | ||||||
| --- a/arch/x86/kvm/emulate.c
 | --- a/arch/x86/kvm/emulate.c
 | ||||||
| +++ b/arch/x86/kvm/emulate.c
 | +++ b/arch/x86/kvm/emulate.c
 | ||||||
| @@ -2654,6 +2654,11 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
 | @@ -2654,6 +2654,11 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
 | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> | |||||||
|  1 file changed, 13 insertions(+), 1 deletion(-) |  1 file changed, 13 insertions(+), 1 deletion(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | ||||||
| index f5451283abef..854bd04d9320 100644
 | index 2e064461c236..9106a4d4b9f0 100644
 | ||||||
| --- a/arch/x86/kvm/emulate.c
 | --- a/arch/x86/kvm/emulate.c
 | ||||||
| +++ b/arch/x86/kvm/emulate.c
 | +++ b/arch/x86/kvm/emulate.c
 | ||||||
| @@ -3646,11 +3646,23 @@ static int em_movbe(struct x86_emulate_ctxt *ctxt)
 | @@ -3646,11 +3646,23 @@ static int em_movbe(struct x86_emulate_ctxt *ctxt)
 | ||||||
|  | |||||||
| @ -17,10 +17,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> | |||||||
|  3 files changed, 225 insertions(+) |  3 files changed, 225 insertions(+) | ||||||
| 
 | 
 | ||||||
| diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | ||||||
| index 854bd04d9320..cb8a1e540110 100644
 | index 9106a4d4b9f0..497cf9e08cc7 100644
 | ||||||
| --- a/arch/x86/kvm/emulate.c
 | --- a/arch/x86/kvm/emulate.c
 | ||||||
| +++ b/arch/x86/kvm/emulate.c
 | +++ b/arch/x86/kvm/emulate.c
 | ||||||
| @@ -5851,3 +5851,9 @@ bool emulator_can_use_gpa(struct x86_emulate_ctxt *ctxt)
 | @@ -5854,3 +5854,9 @@ bool emulator_can_use_gpa(struct x86_emulate_ctxt *ctxt)
 | ||||||
|   |   | ||||||
|  	return true; |  	return true; | ||||||
|  } |  } | ||||||
| @ -267,10 +267,10 @@ index 8dff25d267b7..0eb13204bbc2 100644 | |||||||
|  #if defined(CONFIG_X86_32) |  #if defined(CONFIG_X86_32) | ||||||
|  #define X86EMUL_MODE_HOST X86EMUL_MODE_PROT32 |  #define X86EMUL_MODE_HOST X86EMUL_MODE_PROT32 | ||||||
| diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
 | diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
 | ||||||
| index 380d187e735d..51f1cd3f1db6 100644
 | index a8575f37ced4..6a22f8933b23 100644
 | ||||||
| --- a/arch/x86/kvm/x86.c
 | --- a/arch/x86/kvm/x86.c
 | ||||||
| +++ b/arch/x86/kvm/x86.c
 | +++ b/arch/x86/kvm/x86.c
 | ||||||
| @@ -13130,6 +13130,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_vmgexit_msr_protocol_exit);
 | @@ -13187,6 +13187,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_vmgexit_msr_protocol_exit);
 | ||||||
|  static int __init kvm_x86_init(void) |  static int __init kvm_x86_init(void) | ||||||
|  { |  { | ||||||
|  	kvm_mmu_x86_module_init(); |  	kvm_mmu_x86_module_init(); | ||||||
|  | |||||||
| @ -17,7 +17,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> | |||||||
|  6 files changed, 28 insertions(+), 20 deletions(-) |  6 files changed, 28 insertions(+), 20 deletions(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
 | diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
 | ||||||
| index 4c0e812f2f04..528df4b330ea 100644
 | index 19c04412f6e1..cff765545738 100644
 | ||||||
| --- a/arch/x86/include/asm/kvm_host.h
 | --- a/arch/x86/include/asm/kvm_host.h
 | ||||||
| +++ b/arch/x86/include/asm/kvm_host.h
 | +++ b/arch/x86/include/asm/kvm_host.h
 | ||||||
| @@ -202,6 +202,7 @@ typedef enum exit_fastpath_completion fastpath_t;
 | @@ -202,6 +202,7 @@ typedef enum exit_fastpath_completion fastpath_t;
 | ||||||
| @ -28,7 +28,7 @@ index 4c0e812f2f04..528df4b330ea 100644 | |||||||
|  enum x86_intercept; |  enum x86_intercept; | ||||||
|  enum x86_intercept_stage; |  enum x86_intercept_stage; | ||||||
|   |   | ||||||
| @@ -1551,8 +1552,8 @@ struct kvm_x86_ops {
 | @@ -1552,8 +1553,8 @@ struct kvm_x86_ops {
 | ||||||
|  	void (*setup_mce)(struct kvm_vcpu *vcpu); |  	void (*setup_mce)(struct kvm_vcpu *vcpu); | ||||||
|   |   | ||||||
|  	int (*smi_allowed)(struct kvm_vcpu *vcpu, bool for_injection); |  	int (*smi_allowed)(struct kvm_vcpu *vcpu, bool for_injection); | ||||||
| @ -40,7 +40,7 @@ index 4c0e812f2f04..528df4b330ea 100644 | |||||||
|   |   | ||||||
|  	int (*mem_enc_ioctl)(struct kvm *kvm, void __user *argp); |  	int (*mem_enc_ioctl)(struct kvm *kvm, void __user *argp); | ||||||
| diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | ||||||
| index cb8a1e540110..e29ae05e395b 100644
 | index 497cf9e08cc7..d0a70517e042 100644
 | ||||||
| --- a/arch/x86/kvm/emulate.c
 | --- a/arch/x86/kvm/emulate.c
 | ||||||
| +++ b/arch/x86/kvm/emulate.c
 | +++ b/arch/x86/kvm/emulate.c
 | ||||||
| @@ -2582,16 +2582,18 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt,
 | @@ -2582,16 +2582,18 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt,
 | ||||||
| @ -143,10 +143,10 @@ index 92b30b4937fc..f7f58c4cf341 100644 | |||||||
|  		return 0; |  		return 0; | ||||||
|   |   | ||||||
| diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
 | diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
 | ||||||
| index 0aaea87a1459..1a4db7147f44 100644
 | index 98526e708f32..f3a0b4f0b9d5 100644
 | ||||||
| --- a/arch/x86/kvm/vmx/vmx.c
 | --- a/arch/x86/kvm/vmx/vmx.c
 | ||||||
| +++ b/arch/x86/kvm/vmx/vmx.c
 | +++ b/arch/x86/kvm/vmx/vmx.c
 | ||||||
| @@ -7725,7 +7725,7 @@ static int vmx_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection)
 | @@ -7734,7 +7734,7 @@ static int vmx_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection)
 | ||||||
|  	return !is_smm(vcpu); |  	return !is_smm(vcpu); | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @ -155,7 +155,7 @@ index 0aaea87a1459..1a4db7147f44 100644 | |||||||
|  { |  { | ||||||
|  	struct vcpu_vmx *vmx = to_vmx(vcpu); |  	struct vcpu_vmx *vmx = to_vmx(vcpu); | ||||||
|   |   | ||||||
| @@ -7739,7 +7739,7 @@ static int vmx_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
 | @@ -7748,7 +7748,7 @@ static int vmx_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
 | ||||||
|  	return 0; |  	return 0; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @ -165,10 +165,10 @@ index 0aaea87a1459..1a4db7147f44 100644 | |||||||
|  	struct vcpu_vmx *vmx = to_vmx(vcpu); |  	struct vcpu_vmx *vmx = to_vmx(vcpu); | ||||||
|  	int ret; |  	int ret; | ||||||
| diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
 | diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
 | ||||||
| index 51f1cd3f1db6..5cd86c42c72c 100644
 | index 6a22f8933b23..e4cffaeddc2c 100644
 | ||||||
| --- a/arch/x86/kvm/x86.c
 | --- a/arch/x86/kvm/x86.c
 | ||||||
| +++ b/arch/x86/kvm/x86.c
 | +++ b/arch/x86/kvm/x86.c
 | ||||||
| @@ -7864,9 +7864,9 @@ static void emulator_exiting_smm(struct x86_emulate_ctxt *ctxt)
 | @@ -7877,9 +7877,9 @@ static void emulator_exiting_smm(struct x86_emulate_ctxt *ctxt)
 | ||||||
|  } |  } | ||||||
|   |   | ||||||
|  static int emulator_leave_smm(struct x86_emulate_ctxt *ctxt, |  static int emulator_leave_smm(struct x86_emulate_ctxt *ctxt, | ||||||
| @ -180,7 +180,7 @@ index 51f1cd3f1db6..5cd86c42c72c 100644 | |||||||
|  } |  } | ||||||
|   |   | ||||||
|  static void emulator_triple_fault(struct x86_emulate_ctxt *ctxt) |  static void emulator_triple_fault(struct x86_emulate_ctxt *ctxt) | ||||||
| @@ -9775,25 +9775,25 @@ static void enter_smm(struct kvm_vcpu *vcpu)
 | @@ -9788,25 +9788,25 @@ static void enter_smm(struct kvm_vcpu *vcpu)
 | ||||||
|  	struct kvm_segment cs, ds; |  	struct kvm_segment cs, ds; | ||||||
|  	struct desc_ptr dt; |  	struct desc_ptr dt; | ||||||
|  	unsigned long cr0; |  	unsigned long cr0; | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> | |||||||
|  2 files changed, 60 insertions(+), 96 deletions(-) |  2 files changed, 60 insertions(+), 96 deletions(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | ||||||
| index e29ae05e395b..70815bf6b4d2 100644
 | index d0a70517e042..9aef34e5053b 100644
 | ||||||
| --- a/arch/x86/kvm/emulate.c
 | --- a/arch/x86/kvm/emulate.c
 | ||||||
| +++ b/arch/x86/kvm/emulate.c
 | +++ b/arch/x86/kvm/emulate.c
 | ||||||
| @@ -2359,25 +2359,17 @@ static void rsm_set_desc_flags(struct desc_struct *desc, u32 flags)
 | @@ -2359,25 +2359,17 @@ static void rsm_set_desc_flags(struct desc_struct *desc, u32 flags)
 | ||||||
| @ -145,10 +145,10 @@ index e29ae05e395b..70815bf6b4d2 100644 | |||||||
|  	if (ret != X86EMUL_CONTINUE) |  	if (ret != X86EMUL_CONTINUE) | ||||||
|  		goto emulate_shutdown; |  		goto emulate_shutdown; | ||||||
| diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
 | diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
 | ||||||
| index 5cd86c42c72c..61bd788c1d65 100644
 | index e4cffaeddc2c..0169f80e880e 100644
 | ||||||
| --- a/arch/x86/kvm/x86.c
 | --- a/arch/x86/kvm/x86.c
 | ||||||
| +++ b/arch/x86/kvm/x86.c
 | +++ b/arch/x86/kvm/x86.c
 | ||||||
| @@ -9629,22 +9629,18 @@ static u32 enter_smm_get_segment_flags(struct kvm_segment *seg)
 | @@ -9642,22 +9642,18 @@ static u32 enter_smm_get_segment_flags(struct kvm_segment *seg)
 | ||||||
|  	return flags; |  	return flags; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @ -179,7 +179,7 @@ index 5cd86c42c72c..61bd788c1d65 100644 | |||||||
|  } |  } | ||||||
|   |   | ||||||
|  #ifdef CONFIG_X86_64 |  #ifdef CONFIG_X86_64 | ||||||
| @@ -9665,54 +9661,47 @@ static void enter_smm_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
 | @@ -9678,54 +9674,47 @@ static void enter_smm_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
 | ||||||
|  } |  } | ||||||
|  #endif |  #endif | ||||||
|   |   | ||||||
| @ -257,7 +257,7 @@ index 5cd86c42c72c..61bd788c1d65 100644 | |||||||
|  } |  } | ||||||
|   |   | ||||||
|  #ifdef CONFIG_X86_64 |  #ifdef CONFIG_X86_64 | ||||||
| @@ -9783,7 +9772,7 @@ static void enter_smm(struct kvm_vcpu *vcpu)
 | @@ -9796,7 +9785,7 @@ static void enter_smm(struct kvm_vcpu *vcpu)
 | ||||||
|  		enter_smm_save_state_64(vcpu, (char *)&smram); |  		enter_smm_save_state_64(vcpu, (char *)&smram); | ||||||
|  	else |  	else | ||||||
|  #endif |  #endif | ||||||
|  | |||||||
| @ -16,7 +16,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> | |||||||
|  2 files changed, 62 insertions(+), 101 deletions(-) |  2 files changed, 62 insertions(+), 101 deletions(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | ||||||
| index 70815bf6b4d2..38f25ab83590 100644
 | index 9aef34e5053b..a31af03e050e 100644
 | ||||||
| --- a/arch/x86/kvm/emulate.c
 | --- a/arch/x86/kvm/emulate.c
 | ||||||
| +++ b/arch/x86/kvm/emulate.c
 | +++ b/arch/x86/kvm/emulate.c
 | ||||||
| @@ -2373,24 +2373,16 @@ static void rsm_load_seg_32(struct x86_emulate_ctxt *ctxt,
 | @@ -2373,24 +2373,16 @@ static void rsm_load_seg_32(struct x86_emulate_ctxt *ctxt,
 | ||||||
| @ -154,10 +154,10 @@ index 70815bf6b4d2..38f25ab83590 100644 | |||||||
|  #endif |  #endif | ||||||
|  		ret = rsm_load_state_32(ctxt, &smram.smram32); |  		ret = rsm_load_state_32(ctxt, &smram.smram32); | ||||||
| diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
 | diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
 | ||||||
| index 61bd788c1d65..45d8dad82ba2 100644
 | index 0169f80e880e..2fd19d44ec55 100644
 | ||||||
| --- a/arch/x86/kvm/x86.c
 | --- a/arch/x86/kvm/x86.c
 | ||||||
| +++ b/arch/x86/kvm/x86.c
 | +++ b/arch/x86/kvm/x86.c
 | ||||||
| @@ -9644,20 +9644,17 @@ static void enter_smm_save_seg_32(struct kvm_vcpu *vcpu,
 | @@ -9657,20 +9657,17 @@ static void enter_smm_save_seg_32(struct kvm_vcpu *vcpu,
 | ||||||
|  } |  } | ||||||
|   |   | ||||||
|  #ifdef CONFIG_X86_64 |  #ifdef CONFIG_X86_64 | ||||||
| @ -185,7 +185,7 @@ index 61bd788c1d65..45d8dad82ba2 100644 | |||||||
|  } |  } | ||||||
|  #endif |  #endif | ||||||
|   |   | ||||||
| @@ -9705,57 +9702,51 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat
 | @@ -9718,57 +9715,51 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat
 | ||||||
|  } |  } | ||||||
|   |   | ||||||
|  #ifdef CONFIG_X86_64 |  #ifdef CONFIG_X86_64 | ||||||
| @ -268,7 +268,7 @@ index 61bd788c1d65..45d8dad82ba2 100644 | |||||||
|  } |  } | ||||||
|  #endif |  #endif | ||||||
|   |   | ||||||
| @@ -9769,7 +9760,7 @@ static void enter_smm(struct kvm_vcpu *vcpu)
 | @@ -9782,7 +9773,7 @@ static void enter_smm(struct kvm_vcpu *vcpu)
 | ||||||
|  	memset(smram.bytes, 0, sizeof(smram.bytes)); |  	memset(smram.bytes, 0, sizeof(smram.bytes)); | ||||||
|  #ifdef CONFIG_X86_64 |  #ifdef CONFIG_X86_64 | ||||||
|  	if (guest_cpuid_has(vcpu, X86_FEATURE_LM)) |  	if (guest_cpuid_has(vcpu, X86_FEATURE_LM)) | ||||||
|  | |||||||
| @ -17,10 +17,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> | |||||||
|  2 files changed, 6 insertions(+), 21 deletions(-) |  2 files changed, 6 insertions(+), 21 deletions(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
 | diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
 | ||||||
| index 528df4b330ea..75878f2dbb26 100644
 | index cff765545738..143cd0b5d593 100644
 | ||||||
| --- a/arch/x86/include/asm/kvm_host.h
 | --- a/arch/x86/include/asm/kvm_host.h
 | ||||||
| +++ b/arch/x86/include/asm/kvm_host.h
 | +++ b/arch/x86/include/asm/kvm_host.h
 | ||||||
| @@ -2043,12 +2043,6 @@ static inline int kvm_cpu_get_apicid(int mps_cpu)
 | @@ -2044,12 +2044,6 @@ static inline int kvm_cpu_get_apicid(int mps_cpu)
 | ||||||
|  #endif |  #endif | ||||||
|  } |  } | ||||||
|   |   | ||||||
|  | |||||||
| @ -30,7 +30,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> | |||||||
|  3 files changed, 32 insertions(+), 7 deletions(-) |  3 files changed, 32 insertions(+), 7 deletions(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
 | ||||||
| index 38f25ab83590..97a706032e20 100644
 | index a31af03e050e..51d98622c8fc 100644
 | ||||||
| --- a/arch/x86/kvm/emulate.c
 | --- a/arch/x86/kvm/emulate.c
 | ||||||
| +++ b/arch/x86/kvm/emulate.c
 | +++ b/arch/x86/kvm/emulate.c
 | ||||||
| @@ -2435,7 +2435,7 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt,
 | @@ -2435,7 +2435,7 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt,
 | ||||||
| @ -128,10 +128,10 @@ index 04ac0cef8b57..d5707b3f254c 100644 | |||||||
|  	__CHECK_SMRAM64_OFFSET(auto_hlt_restart,	0xFEC9); |  	__CHECK_SMRAM64_OFFSET(auto_hlt_restart,	0xFEC9); | ||||||
|  	__CHECK_SMRAM64_OFFSET(reserved2,		0xFECA); |  	__CHECK_SMRAM64_OFFSET(reserved2,		0xFECA); | ||||||
| diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
 | diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
 | ||||||
| index 45d8dad82ba2..1d2b9ef40aa3 100644
 | index 2fd19d44ec55..6c61a53c2523 100644
 | ||||||
| --- a/arch/x86/kvm/x86.c
 | --- a/arch/x86/kvm/x86.c
 | ||||||
| +++ b/arch/x86/kvm/x86.c
 | +++ b/arch/x86/kvm/x86.c
 | ||||||
| @@ -7851,6 +7851,11 @@ static void emulator_set_nmi_mask(struct x86_emulate_ctxt *ctxt, bool masked)
 | @@ -7864,6 +7864,11 @@ static void emulator_set_nmi_mask(struct x86_emulate_ctxt *ctxt, bool masked)
 | ||||||
|  	static_call(kvm_x86_set_nmi_mask)(emul_to_vcpu(ctxt), masked); |  	static_call(kvm_x86_set_nmi_mask)(emul_to_vcpu(ctxt), masked); | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @ -143,7 +143,7 @@ index 45d8dad82ba2..1d2b9ef40aa3 100644 | |||||||
|  static unsigned emulator_get_hflags(struct x86_emulate_ctxt *ctxt) |  static unsigned emulator_get_hflags(struct x86_emulate_ctxt *ctxt) | ||||||
|  { |  { | ||||||
|  	return emul_to_vcpu(ctxt)->arch.hflags; |  	return emul_to_vcpu(ctxt)->arch.hflags; | ||||||
| @@ -7922,6 +7927,7 @@ static const struct x86_emulate_ops emulate_ops = {
 | @@ -7935,6 +7940,7 @@ static const struct x86_emulate_ops emulate_ops = {
 | ||||||
|  	.guest_has_fxsr      = emulator_guest_has_fxsr, |  	.guest_has_fxsr      = emulator_guest_has_fxsr, | ||||||
|  	.guest_has_rdpid     = emulator_guest_has_rdpid, |  	.guest_has_rdpid     = emulator_guest_has_rdpid, | ||||||
|  	.set_nmi_mask        = emulator_set_nmi_mask, |  	.set_nmi_mask        = emulator_set_nmi_mask, | ||||||
| @ -151,7 +151,7 @@ index 45d8dad82ba2..1d2b9ef40aa3 100644 | |||||||
|  	.get_hflags          = emulator_get_hflags, |  	.get_hflags          = emulator_get_hflags, | ||||||
|  	.exiting_smm         = emulator_exiting_smm, |  	.exiting_smm         = emulator_exiting_smm, | ||||||
|  	.leave_smm           = emulator_leave_smm, |  	.leave_smm           = emulator_leave_smm, | ||||||
| @@ -9699,6 +9705,8 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat
 | @@ -9712,6 +9718,8 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat
 | ||||||
|  	smram->cr4 = kvm_read_cr4(vcpu); |  	smram->cr4 = kvm_read_cr4(vcpu); | ||||||
|  	smram->smm_revision = 0x00020000; |  	smram->smm_revision = 0x00020000; | ||||||
|  	smram->smbase = vcpu->arch.smbase; |  	smram->smbase = vcpu->arch.smbase; | ||||||
| @ -160,7 +160,7 @@ index 45d8dad82ba2..1d2b9ef40aa3 100644 | |||||||
|  } |  } | ||||||
|   |   | ||||||
|  #ifdef CONFIG_X86_64 |  #ifdef CONFIG_X86_64 | ||||||
| @@ -9747,6 +9755,8 @@ static void enter_smm_save_state_64(struct kvm_vcpu *vcpu, struct kvm_smram_stat
 | @@ -9760,6 +9768,8 @@ static void enter_smm_save_state_64(struct kvm_vcpu *vcpu, struct kvm_smram_stat
 | ||||||
|  	enter_smm_save_seg_64(vcpu, &smram->ds, VCPU_SREG_DS); |  	enter_smm_save_seg_64(vcpu, &smram->ds, VCPU_SREG_DS); | ||||||
|  	enter_smm_save_seg_64(vcpu, &smram->fs, VCPU_SREG_FS); |  	enter_smm_save_seg_64(vcpu, &smram->fs, VCPU_SREG_FS); | ||||||
|  	enter_smm_save_seg_64(vcpu, &smram->gs, VCPU_SREG_GS); |  	enter_smm_save_seg_64(vcpu, &smram->gs, VCPU_SREG_GS); | ||||||
| @ -169,7 +169,7 @@ index 45d8dad82ba2..1d2b9ef40aa3 100644 | |||||||
|  } |  } | ||||||
|  #endif |  #endif | ||||||
|   |   | ||||||
| @@ -9783,6 +9793,8 @@ static void enter_smm(struct kvm_vcpu *vcpu)
 | @@ -9796,6 +9806,8 @@ static void enter_smm(struct kvm_vcpu *vcpu)
 | ||||||
|  	kvm_set_rflags(vcpu, X86_EFLAGS_FIXED); |  	kvm_set_rflags(vcpu, X86_EFLAGS_FIXED); | ||||||
|  	kvm_rip_write(vcpu, 0x8000); |  	kvm_rip_write(vcpu, 0x8000); | ||||||
|   |   | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Thomas Lamprecht
						Thomas Lamprecht