Lines Matching +full:0 +full:x30000
76 QEMU_BUILD_BUG_ON(sizeof(PaddedSevHashTable) % 16 != 0);
169 #define DEFAULT_GUEST_POLICY 0x1 /* disable debug */
171 #define DEFAULT_SEV_SNP_POLICY 0x30000
216 #define SNP_CPUID_FUNCTION_UNKNOWN 0xFFFFFFFF
243 memset(&input, 0x0, sizeof(input)); in sev_ioctl()
277 if (code < 0 || code >= SEV_FW_MAX_ERROR) { in fw_error_to_str()
396 return sev_common ? sev_common->cbitpos : 0; in sev_get_cbit_position()
404 return sev_common ? sev_common->reduced_phys_bits : 0; in sev_get_reduced_phys_bits()
495 if (r < 0) { in sev_get_pdh_info()
510 if (r < 0) { in sev_get_pdh_info()
520 return 0; in sev_get_pdh_info()
536 if (r < 0 && err != SEV_RET_INVALID_LEN) { in sev_get_cpu0_id()
546 if (r < 0) { in sev_get_cpu0_id()
554 return 0; in sev_get_cpu0_id()
567 size_t pdh_len = 0, cert_chain_len = 0, cpu0_id_len = 0; in sev_get_capabilities()
577 if (kvm_vm_ioctl(kvm_state, KVM_MEMORY_ENCRYPT_OP, NULL) < 0) { in sev_get_capabilities()
591 if (fd < 0) { in sev_get_capabilities()
613 host_cpuid(0x8000001F, 0, NULL, &ebx, NULL, NULL); in sev_get_capabilities()
614 cap->cbitpos = ebx & 0x3f; in sev_get_capabilities()
658 if (memcmp(metadata->signature, "ASEV", 4) != 0 || in pc_system_parse_sev_metadata()
676 int err = 0, ret; in sev_get_attestation_report()
702 if (ret < 0) { in sev_get_attestation_report()
752 return 0; in sev_read_file_base64()
771 if (rc < 0) { in sev_snp_launch_start()
781 return 0; in sev_snp_launch_start()
797 if (sev_read_file_base64(sev_guest->session_file, &session, &sz) < 0) { in sev_launch_start()
805 if (sev_read_file_base64(sev_guest->dh_cert_file, &dh_cert, &sz) < 0) { in sev_launch_start()
814 if (rc < 0) { in sev_launch_start()
822 ret = 0; in sev_launch_start()
842 for (i = 0; i < old->count; i++) { in sev_snp_cpuid_report_mismatches()
849 error_report("SEV-SNP: CPUID validation failed for function 0x%x, index: 0x%x, " in sev_snp_cpuid_report_mismatches()
850 "provided: eax:0x%08x, ebx: 0x%08x, ecx: 0x%08x, edx: 0x%08x, " in sev_snp_cpuid_report_mismatches()
851 "expected: eax:0x%08x, ebx: 0x%08x, ecx: 0x%08x, edx: 0x%08x", in sev_snp_cpuid_report_mismatches()
878 struct kvm_sev_snp_launch_update update = {0}; in sev_snp_launch_update()
952 if (index == 0 && reg == R_EBX) { in sev_snp_adjust_cpuid_features()
955 if (index == 0 && reg == R_EDX) { in sev_snp_adjust_cpuid_features()
964 case 0x80000008: in sev_snp_adjust_cpuid_features()
1103 ret = sev_ioctl(sev_common->sev_fd, KVM_SEV_LAUNCH_FINISH, 0, in sev_launch_finish()
1132 return 0; in snp_launch_update_data()
1156 memset(snp_cpuid_info, 0, sizeof(*snp_cpuid_info)); in sev_snp_cpuid_info_fill()
1158 for (i = 0; i < kvm_cpuid_info->cpuid.nent; i++) { in sev_snp_cpuid_info_fill()
1175 * Guest kernels will calculate EBX themselves using the 0xD in sev_snp_cpuid_info_fill()
1180 if (snp_cpuid_entry->eax_in == 0xD && in sev_snp_cpuid_info_fill()
1181 (snp_cpuid_entry->ecx_in == 0x0 || snp_cpuid_entry->ecx_in == 0x1)) { in sev_snp_cpuid_info_fill()
1182 snp_cpuid_entry->ebx = 0x240; in sev_snp_cpuid_info_fill()
1184 snp_cpuid_entry->xss_in = 0; in sev_snp_cpuid_info_fill()
1190 return 0; in sev_snp_cpuid_info_fill()
1196 KvmCpuidInfo kvm_cpuid_info = {0}; in snp_launch_update_cpuid()
1200 uint32_t i = 0; in snp_launch_update_cpuid()
1237 memset(hva, 0, len); in snp_launch_update_kernel_hashes()
1267 for (i = 0; i < metadata->num_desc; i++) { in snp_populate_metadata_pages()
1274 error_report("%s: Failed to get HVA for GPA 0x%x sz 0x%x", in snp_populate_metadata_pages()
1289 error_report("%s: Failed to add metadata page gpa 0x%x+%x type %d", in snp_populate_metadata_pages()
1442 host_cpuid(0x8000001F, 0, NULL, &ebx, NULL, NULL); in sev_common_kvm_init()
1443 host_cbitpos = ebx & 0x3f; in sev_common_kvm_init()
1446 * The cbitpos value will be placed in bit positions 5:0 of the EBX in sev_common_kvm_init()
1447 * register of CPUID 0x8000001F. No need to verify the range as the in sev_common_kvm_init()
1458 * the EBX register of CPUID 0x8000001F, so verify the supplied value in sev_common_kvm_init()
1471 if (sev_common->sev_fd < 0) { in sev_common_kvm_init()
1518 struct kvm_sev_init args = { 0 }; in sev_common_kvm_init()
1550 return 0; in sev_common_kvm_init()
1585 return 0; in sev_kvm_init()
1600 return 0; in sev_snp_kvm_init()
1610 return 0; in sev_encrypt_flash()
1619 if (ret < 0) { in sev_encrypt_flash()
1625 return 0; in sev_encrypt_flash()
1636 gsize hdr_sz = 0, data_sz = 0; in sev_inject_launch_secret()
1690 return 0; in sev_inject_launch_secret()
1734 return 0; in sev_es_parse_reset_block()
1750 *addr = 0; in sev_es_find_reset_vector()
1768 data = flash_ptr + flash_size - 0x20; in sev_es_find_reset_vector()
1799 if (cpu->cpu_index == 0) { in sev_es_set_reset_vector()
1806 cpu_x86_load_seg_cache(env, R_CS, 0xf000, sev_common->reset_cs, 0xffff, in sev_es_set_reset_vector()
1821 return 0; in sev_es_save_reset_vector()
1824 addr = 0; in sev_es_save_reset_vector()
1832 sev_common->reset_cs = addr & 0xffff0000; in sev_es_save_reset_vector()
1833 sev_common->reset_ip = addr & 0x0000ffff; in sev_es_save_reset_vector()
1841 return 0; in sev_es_save_reset_vector()
1845 .data = UUID_LE(0x9438d606, 0x4f22, 0x4cc9, 0xb4, 0x79, 0xa7, 0x93,
1846 0xd4, 0x11, 0xfd, 0x21)
1850 .data = UUID_LE(0x4de79437, 0xabd2, 0x427f, 0xb8, 0x35, 0xd5, 0xb1,
1851 0x72, 0xd2, 0x04, 0x5b)
1854 .data = UUID_LE(0x44baf731, 0x3a2f, 0x4bd7, 0x9a, 0xf1, 0x41, 0xe2,
1855 0x91, 0x69, 0x78, 0x1d)
1858 .data = UUID_LE(0x97d02dd8, 0xbd20, 0x4c94, 0xaa, 0x78, 0xe7, 0x71,
1859 0x4d, 0x36, 0xab, 0x2a)
1875 * the user doesn't supply a command-line via -append, the 1-byte "\0" will in build_kernel_loader_hashes()
1880 ctx->cmdline_size, &hashp, &hash_len, errp) < 0) { in build_kernel_loader_hashes()
1887 * -initrd, an empty buffer will be used (ctx->initrd_size == 0). in build_kernel_loader_hashes()
1891 ctx->initrd_size, &hashp, &hash_len, errp) < 0) { in build_kernel_loader_hashes()
1903 &hashp, &hash_len, errp) < 0) { in build_kernel_loader_hashes()
1926 memset(padded_ht->padding, 0, sizeof(padded_ht->padding)); in build_kernel_loader_hashes()
1954 MemTxAttrs attrs = { 0 }; in sev_build_kernel_loader_hashes()
1970 sizeof(*padded_ht), errp) < 0) { in sev_build_kernel_loader_hashes()
2011 "(base=0x%x size=0x%x)", area->base, area->size); in sev_add_kernel_loader_hashes()
2258 finish->id_block_en = 0; in sev_snp_guest_set_id_block()
2297 finish->id_auth_uaddr = 0; in sev_snp_guest_set_id_auth()