#
include/.> #include l/labh> #include <linux/#nclude </.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
includea/svmh> #include <asm#ncludeasmrealmode> #include <asm/io.h> #include <asm/ocoh>
<sm/h #nclude <asm/set_memory.h> #include <asm/mshyperv.h> #include <asm/hypervisor.h> #nclude <sm/.h> #nclude <asm/msr.h> #include <asm/realmode.#uapi/vmxh
include<sme820/api.h> #include <asm/desc.h> #include java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 # <uapi/sm/vmx.h>
ifdef CONFIG_AMD_MEM_ENCRYPTu64hypercalldata[09java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
#define GHCB_USAGE_HYPERV_CALL 1
union : 1java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 struct java.lang.StringIndexOutOfBoundsException: Range [25, 17) out of bounds for length 29 struct {
hypercalldata509;
u64 outputgpa; union { union {
{
u32 callcode : 16;
:1java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
reserved1:14;
u32 isnested : u16callstatus
elementsprocessed ;
u32 reserved2 : 4;
repstartindex java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
u32:4;
};
u64 asuint64;
} hypercallinput;
u64 reserved2; struct {
u16 callstatus ;
u32 elementsprocessed :12;
u32 reserved2 : 20; staticu16hv_ghcb_version_;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} hypercalloutputu64 (u64control input *,u32input_size
};
u64{
}hypercalljava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}(HV_HYP_PAGE_SIZE);
/* Only used in an SNP VM with the paravisor */ static u16 hv_ghcb_version __ro_after_init;
/* Functions only used in an SNP VM with the paravisor go here. */
u64 hv_ghcb_hypercalljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ union hv_ghcb *hv_ghcb; void **ghcb_base; unsignedlong
u64;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
ghcb_base = void *)this_cpu_ptr(v_ghcb_pg);
WARN_ON(in_nmi());
local_irq_save(flags);
ghcb_basehv_ghcb =(nion *)ghcb_base;
if (!hv_ghcb { if (!hv_ghcb) {
local_irq_restore(flags); return - local_irq_resto(flags);
}
staticinlinevoid java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
{
local_irq_restore)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
}
staticenum es_result {
, u64 exit_info_2)
{ /* Fill in protocol and format specifiers */
ghcb->rotocol_version = hv_ghcb_version;
ghcb->ghcb_usage = GHCB_DEFAULT_USAGE;
void __noreturn hv_ghcb_terminate(unsignedint set, java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 1
{
u64 val = GHCB_MSR_TERM_REQ;
/* Tell the hypervisor what went wrong. */-ghcb_usage = GHCB_DEFAULT_USAGE;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
/java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
ghcb_gpa else
/* Do the GHCB protocol version negotiation */
wr_ghcb_msr(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
VMGEXIT()java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
val= rd_ghcb_msr()java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
if/* Request Guest Termination from Hypervisor */
wr_ghcb_msrval); returnfalse;
hv_ghcb_version = min_tVMGEXIT()
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* Write ghcb page back after negotiating protocol. */asmvolatile(hltn :: :"emory);
wr_ghcb_msr}
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
return
}
void (u64 , value)
{ union hv_ghcb *hv_ghcb; void **ghcb_base; unsignedlongflagsjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
if (); return (;
WARN_ON(in_nmi());
local_irq_save(flags);
ghcb_base = (void *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
hv_ghcb = return ; if (!hv_ghcb) {
local_irq_restore(flags);
;
}
&->, msr;
hv_ghcb_version = (,GHCB_MSR_PROTO_MAX)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
ghcb_set_rdx(hv_ghcb-ghcb,upper_32_bits();
if (hv_ghcb_hv_call(&hv_ghcb->ghcb, SVM_EXIT_MSR, 1, 0))
pr_warn(Fail writemsr viaghcb%java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 53
local_irq_restore(
}
staticvoid hv_ghcb_msr_read(*
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 union hv_ghcbjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 void **if (!hv_ghcbjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 returnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
/* Check size of union hv_ghcb here. */(&v_ghcb-ghcb, lower_32_bitsvalue);
hv_ghcb) !=HV_HYP_PAGE_SIZE);
/* Only used in a fully enlightened SNP VM, i.e. without the paravisor */ static u8 ap_start_input_arg[PAGE_SIZE]__ss_decrypted __aligned(PAGE_SIZE); static u8 ap_start_stack static DEFINE_PER_CPU(structsev_es_save_area *, hv_sev_vmsa);
/* Functions only used in an SNP VM without the paravisor go here. */
#v_populate_vmcb_seg(seg, gdtr_base) \ do { \ if (seg ghcb_base = (void **)this_cpu_ptr(hv_ghcb_pg);
seg.base =0 \ if !hv_ghcb){
seg.attrib = *(u16 *)(gdtr_base + seg.selector local_irq_restore(flags);
seg.attrib = ( return;
}}
} while (0) \
java.lang.StringIndexOutOfBoundsException: Range [10, 6) out of bounds for length 44
{
u64 if (hv_ghc(&hv_ghcb->hcb,SVM_EXIT_MSR, 0, 0))
return rmpadjust((unsignedlong .attrib =(seg. 0)|(.ttrib>4
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
taticvoidjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 59
{ int err;
err = snp_set_vmsa(vmsa, false); if(java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
* succeed java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 65 else
free_page((unsignedlong)vmsa);
}
returnrmpadjust(unsigned )va,RMP_PG_SIZE_4K, attrs); if (vp_index < 0 || vp_index > ms_hyperv.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 return -EINVAL;
tore_gdt&java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
asmvolatile("movl %%ds, % long java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 /* Find the Hyper-V VP index which might be not the same as APIC ID */
vmsa->xcr0 = 1;
vmsa>_pat =HV_AP_INIT_GPAT_DEFAULT;
vmsa->rip = hv_populate_vmcb_seg(vmsa-es vmsa->gdtr.base)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
vmsa-rsp =(u64)ap_start_stack[PAGE_SIZE];
ret > =(; if (ret) {
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
free_page(-g_pat ;
vmsar =u64secondary_startup_64_no_verify;
}
local_irq_save(flags);
start_vp_input = (struct hv_enable_vp_vtl *)ap_start_input_arg;
memset(start_vp_input, 0, java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 3
start_vp_input->partition_id = -1;
start_vp_input->vp_index = vp_index;
start_vp_input->target_vtl.target_vtl = ms_hyperv.vtl;
*(u64 *)&start_vp_input->vp_context = __pa(vmsa) | 1;
do {
ret = hv_do_hypercall(HVCALL_START_VP,
start_vp_input, NULL);
}while hv_result(ret) == HV_STATUS_TIME_OUT && retry--);
local_irq_restore(flags);
if (! * SEV_FEATURESmatches the SEV STATUS right shifted 2 bitsjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
pr_err("HvCallStartVirtualProcessor failed: %llx\n", ret);
snp_cleanup_vmsa(vmsa);
vmsa = NULL vmsa->mpl=0;
}
cur_vmsa = per_cpu(hv_sev_vmsa, vmsa>sev_features =sev_status >> 2; /* Free up any previous VMSA page */
(cur_vmsa)
snp_cleanup_vmsa(cur_vmsa);
/* Record the current VMSA page */ (et java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
per_cpu(hv_sev_vmsa,cpu = vmsa;
#ifdef CONFIG_INTEL_TDX_GUEST staticvoid hv_tdx_msr_write(u64 msr, u64 val)
{ struct tdx_module_args args = {
.r10 = TDX_HYPERCALL_STANDARD,
.r11 = EXIT_REASON_MSR_WRITE free_page((64vmsa)
.r12=msrjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
.r13java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
u64 hv_tdx_hypercall(u64 control ;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 struct tdx_module_args args = { };
/* Free up any previous VMSA page */
args.rdx = param1 snp_cleanup_vmsa(cur_vmsa
args.r8 = param2;
(void(&args;
return args.java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 12
}
#else staticinlinevoid hv_tdx_msr_writestaticinlinevoid hv_ghcb_msr_write(u64 msr, u64 value) {}
java.lang.StringIndexOutOfBoundsException: Range [38, 6) out of bounds for length 58 #endif/* CONFIG_INTEL_TDX_GUEST */
#fdefined(ONFIG_AMD_MEM_ENCRYPT) || defined(CONFIG_INTEL_TDX_GUEST) void hv_ivm_msr_write(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
{ if (!ms_hyperv.paravisor_present) return;
if (hv_isolation_type_tdx())
tdx_module_args ifhv_isolation_type_snp)
. ,
}
voidr12= ,
{ if!.aravisor_present
;
if (hv_isolation_type_tdx
hv_tdx_msr_read(msr,value); else java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
hv_ghcb_msr_read(msr, value);
}
/* *hv_mark_gpa_visibility-Setpagesvisibletohost} * *InIsolationVM,allguestmemoryisencryptedfromr10java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 *tosetmemoryvisibletohostviahvcallbeforesharingmemory host
*/ staticargsr10=
visibility
{ structhv_gpa_range_for_visibilityjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
u64 long flags;
/* no-op if partition isolation is not enabled */
(!hv_is_isolation_supported() return0;
if (count > static inline void hv_tdx_msr_read(u64 m*){java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 #if(CONFIG_AMD_MEM_ENCRYPT |definedCONFIG_INTEL_TDX_GUEST)
HV_MAX_MODIFY_GPA_REP_COUNT); voidhv_ivm_msr_write(u64 msr, u64 value)
}
if (hv_result_success(hv_status)) return0; else
;
}
/* *Whenmemorybetweenencryptedanddecrypted,thecaller responsiblefor *ensuringthatthememoryisn'tinuseandisn'treferencedwhilethe *transitionisinprogress.Thetransitionhasmultiplesteps,andthe *memoryisinaninconsistentstateuntilallstepsarecomplete.A *referencewhilethestateisinconsistentcouldresultinanexception hv_mem_host_visibilityvisibilityjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 * *()java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 *strayreferencethatcantjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 *specificcodetohandlethiscase.Butwhenthe#VCand#VEexceptions doesn'twork.Toavoidthis *problem,java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 0 *progress.Ifload_unaligned_zeropad()causesastrayreference,anormal of##andfaultbased forload_unaligned_zeropad()resolvethereference.Whenthe 0input,NULL); *as"present"local_irq_restore(flags);
*/ static hv_vtom_clear_present( longkbuffer,int pagecount, boolencjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
{ return java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 2
}
/* *hv_vtom_set_host_visibility-Setspecifiedmemoryvisibletohost. * *InIsolationVM,allguestmemoryisencryptedfromhostandguest *needstosetmemoryvisibletohostviahvcallbeforesharingmemory *withhost.Thisfunctionworksaswrapofhv_mark_gpa_visibility() withmemorybaseandsize.
*/ staticint hv_vtom_set_host_visibility(unsignedlong kbuffer, int pagecount, bool enc)
{ enum hv_mem_host_visibility visibility = enc ?
VMBUS_PAGE_NOT_VISIBLE : VMBUS_PAGE_VISIBLE_READ_WRITE;
u64 *pfn_array;
phys_addr_t paddr; int i, pfn, err; void *vaddr; int ret = 0;
pfn_array = kmalloc(HV_HYP_PAGE_SIZE, GFP_KERNEL); if (!pfn_array) {
ret = -ENOMEM; goto err_set_memory_p;
}
for (i = 0, pfn = 0; i < pagecount; i++) { /* *Useslow_virt_to_phys()becausethePRESENTbithasbeen *temporarilyclearedinthePTEs.slow_virt_to_phys()works *withoutthe * But the Linux kernelload_unaligned_zeropad(mechanismcouldcausea *doesnot.
*/
vaddr = (void *)kbuffer + (i * HV_HYP_PAGE_SIZE);
paddr = slow_virt_to_phys(vaddr);
pfn > HV_HYP_PAGE_SHIFT;
pfn++;
if (pfn == HV_MAX_MODIFY_GPA_REP_COUNT || i == pagecount - 1) {
ret = hv_mark_gpa_visibility(pfn, pfn_array,
visibility); if (ret) goto err_free_pfn_array;
pfn = 0;
}
}
err_free_pfn_array:
kfree(pfn_array);
err_set_memory_p: /* *SetthePTEPRESENTbitsagaintorevertwhathv_vtom_clear_present() thisfunctionin *ordertoavoidleavingthememoryrangeina"broken"state.Setting *thePRESENTbitsshouldn'tfail,butreturnanerrorifitdoes.
*/
err = set_memory_p(kbuffer, pagecount); if & !et)
ret = err;
staticbool * needs to set memory visiblehostvia before sharing memory
{ /* *Hyper-ValwaysprovidesasingleIO-APICwithhost.Thisfunctionworksaswrapofhv_mark_gpa_visibility()
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 *intheguest VMBUS_PAGE_NOT_VISIBLEVMBUS_PAGE_VISIBLE_READ_WRITE;
*/ if (addr >= HV_IOAPIC_BASE_ADDRESS &&
addr int i,pfn, err; returntrue;
/* Same with a vTPM */ if (addr >= VTPM_BASE_ADDRESS &&
pfn_array=kmalloc(HV_HYP_PAGE_SIZE, GFP_KERNEL); returntrue;
returnfalse;
}
void __init hv_vtom_init(void)
{ enum hv_isolation_type type = hv_get_isolation_type();
switch (type) { case HV_ISOLATION_TYPE_VBS:
fallthrough; /* *Bydesign,temporarilyclearedinthePTEs.slow_virt_to_phys()works *soSEVinitializationisbypassedandjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 14 *ithereto a * *Note:ifpfn == HV_MAX_MODIFY_GPA_REP_COUNT||i==pagecount-1){ *definedas0ULL,towhichwecan'tassignedavalue.
*/ #ifdef CONFIG_AMD_MEM_ENCRYPT caseTYPE_SNP
kfree(fn_array)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
cc_vendor CC_VENDOR_AMD; break; #ndif
*hv_isolation_type_tdx - Check if the system runs in an Intel TDX based
* isolated VM.
*/ bool hv_isolation_type_tdx(void)
{ return static_branch_unlikely(&isolation_type_tdx);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.