88#include "uv.h"
99
1010/* will be used in arch/s390/kernel/uv.c */
11- #ifdef CONFIG_PROTECTED_VIRTUALIZATION_GUEST
1211int __bootdata_preserved (prot_virt_guest );
13- #endif
14- #if IS_ENABLED (CONFIG_KVM )
1512int __bootdata_preserved (prot_virt_host );
16- #endif
1713struct uv_info __bootdata_preserved (uv_info );
1814
1915void uv_query_info (void )
@@ -26,8 +22,8 @@ void uv_query_info(void)
2622 if (!test_facility (158 ))
2723 return ;
2824
29- /* rc==0x100 means that there is additional data we do not process */
30- if (uv_call (0 , (uint64_t )& uvcb ) && uvcb .header .rc != 0x100 )
25+ /* Ignore that there might be more data we do not process */
26+ if (uv_call (0 , (uint64_t )& uvcb ) && uvcb .header .rc != UVC_RC_MORE_DATA )
3127 return ;
3228
3329 if (IS_ENABLED (CONFIG_KVM )) {
@@ -50,17 +46,15 @@ void uv_query_info(void)
5046 uv_info .supp_add_secret_req_ver = uvcb .supp_add_secret_req_ver ;
5147 uv_info .supp_add_secret_pcf = uvcb .supp_add_secret_pcf ;
5248 uv_info .supp_secret_types = uvcb .supp_secret_types ;
53- uv_info .max_secrets = uvcb .max_secrets ;
49+ uv_info .max_assoc_secrets = uvcb .max_assoc_secrets ;
50+ uv_info .max_retr_secrets = uvcb .max_retr_secrets ;
5451 }
5552
56- #ifdef CONFIG_PROTECTED_VIRTUALIZATION_GUEST
5753 if (test_bit_inv (BIT_UVC_CMD_SET_SHARED_ACCESS , (unsigned long * )uvcb .inst_calls_list ) &&
5854 test_bit_inv (BIT_UVC_CMD_REMOVE_SHARED_ACCESS , (unsigned long * )uvcb .inst_calls_list ))
5955 prot_virt_guest = 1 ;
60- #endif
6156}
6257
63- #if IS_ENABLED (CONFIG_KVM )
6458unsigned long adjust_to_uv_max (unsigned long limit )
6559{
6660 if (is_prot_virt_host () && uv_info .max_sec_stor_addr )
@@ -92,4 +86,3 @@ void sanitize_prot_virt_host(void)
9286{
9387 prot_virt_host = is_prot_virt_host_capable ();
9488}
95- #endif
0 commit comments