Re: [Xen-devel] [PATCH 18/34] x86/amd: skip OSVW function calls if !CONFIG_HVM

2018-08-20 Thread Jan Beulich
>>> On 17.08.18 at 17:12,  wrote:
> The two functions are not needed when HVM is not supported in
> hypervisor.
> 
> Note that using hvm_enabled won't work because early_microcode_init
> gets to cpu_request_microcode before hvm_enabled is set in presmp init
> call stage.
> 
> Signed-off-by: Wei Liu 

Acked-by: Jan Beulich 

Also applicable in case you decide to switch to static inline stubs
instead.

Jan



___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH 18/34] x86/amd: skip OSVW function calls if !CONFIG_HVM

2018-08-17 Thread Wei Liu
The two functions are not needed when HVM is not supported in
hypervisor.

Note that using hvm_enabled won't work because early_microcode_init
gets to cpu_request_microcode before hvm_enabled is set in presmp init
call stage.

Signed-off-by: Wei Liu 
---
 xen/arch/x86/microcode_amd.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/x86/microcode_amd.c b/xen/arch/x86/microcode_amd.c
index 53f9f54..fba44cc 100644
--- a/xen/arch/x86/microcode_amd.c
+++ b/xen/arch/x86/microcode_amd.c
@@ -550,7 +550,9 @@ static int cpu_request_microcode(unsigned int cpu, const 
void *buf,
 xfree(mc_old);
 
   out:
+#if CONFIG_HVM
 svm_host_osvw_init();
+#endif
 
 /*
  * In some cases we may return an error even if processor's microcode has
@@ -609,6 +611,7 @@ err1:
 
 static int start_update(void)
 {
+#if CONFIG_HVM
 /*
  * We assume here that svm_host_osvw_init() will be called on each cpu 
(from
  * cpu_request_microcode()).
@@ -619,6 +622,7 @@ static int start_update(void)
  * supporting OSVW so we will not deal with this possibility.
  */
 svm_host_osvw_reset();
+#endif
 
 return 0;
 }
-- 
git-series 0.9.1

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel