KBUILD_CFLAGS += $(call cc-option,-Wa$(comma)-mrelax-relocations=no)
 KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h
 
-# sev.c indirectly inludes inat-table.h which is generated during
+# sev.c indirectly includes inat-table.h which is generated during
 # compilation and stored in $(objtree). Add the directory to the includes so
 # that the compiler finds it even with out-of-tree builds (make O=/some/path).
 CFLAGS_sev.o += -I$(objtree)/arch/x86/lib/
 
 
 /*
  * accept_memory() and process_unaccepted_memory() called from EFI stub which
- * runs before decompresser and its early_tdx_detect().
+ * runs before decompressor and its early_tdx_detect().
  *
  * Enumerate TDX directly from the early users.
  */
 
         * there.
         *
         * Intel-TDX has a secure RDMSR hypercall, but that needs to be
-        * implemented seperately in the low level startup ASM code.
+        * implemented separately in the low level startup ASM code.
         * Until that is in place, disable parallel bringup for TDX.
         */
        x86_cpuinit.parallel_bringup = false;
 
 
 .ifc \operation, dec
        movdqa  %xmm1, %xmm3
-       pxor    %xmm1, %xmm9            # Cyphertext XOR E(K, Yn)
+       pxor    %xmm1, %xmm9            # Ciphertext XOR E(K, Yn)
 
        mov     \PLAIN_CYPH_LEN, %r10
        add     %r13, %r10
 
 
 .if  \ENC_DEC ==  DEC
         vmovdqa        %xmm1, %xmm3
-        pxor   %xmm1, %xmm9            # Cyphertext XOR E(K, Yn)
+        pxor   %xmm1, %xmm9            # Ciphertext XOR E(K, Yn)
 
         mov    \PLAIN_CYPH_LEN, %r10
         add    %r13, %r10
 
        xor     crc1,crc1
        xor     crc2,crc2
 
-       # Fall thruogh into top of crc array (crc_128)
+       # Fall through into top of crc array (crc_128)
 
        ################################################################
        ## 3) CRC Array:
 
 
 # Useful QWORD "arrays" for simpler memory references
 # MSG, DIGEST, K_t, W_t are arrays
-# WK_2(t) points to 1 of 2 qwords at frame.WK depdending on t being odd/even
+# WK_2(t) points to 1 of 2 qwords at frame.WK depending on t being odd/even
 
 # Input message (arg1)
 #define MSG(i)    8*i(msg)
 
 
 # Useful QWORD "arrays" for simpler memory references
 # MSG, DIGEST, K_t, W_t are arrays
-# WK_2(t) points to 1 of 2 qwords at frame.WK depdending on t being odd/even
+# WK_2(t) points to 1 of 2 qwords at frame.WK depending on t being odd/even
 
 # Input message (arg1)
 #define MSG(i)    8*i(msg)
 
         * Where X is the number of taken branches due to interrupt
         * skid. Skid is large.
         *
-        * Where Y is the occurences of the event while BRS is
+        * Where Y is the occurrences of the event while BRS is
         * capturing the lbr_nr entries.
         *
         * By using retired taken branches, we limit the impact on the
 
  * period of each one and given that the BRS saturates, it would not be possible
  * to guarantee correlated content for all events. Therefore, in situations
  * where multiple events want to use BRS, the kernel enforces mutual exclusion.
- * Exclusion is enforced by chosing only one counter for events using BRS.
+ * Exclusion is enforced by choosing only one counter for events using BRS.
  * The event scheduling logic will then automatically multiplex the
  * events and ensure that at most one event is actively using BRS.
  *
 
 
 /*
  * Currently, the only caller of this function is the atomic_switch_perf_msrs().
- * The host perf conext helps to prepare the values of the real hardware for
+ * The host perf context helps to prepare the values of the real hardware for
  * a set of msrs that need to be switched atomically in a vmx transaction.
  *
  * For example, the pseudocode needed to add a new msr should look like:
 
 
                /*
                 * This particular version of the IPI hypercall can
-                * only target upto 64 CPUs.
+                * only target up to 64 CPUs.
                 */
                if (vcpu >= 64)
                        goto do_ex_hypercall;
 
                 * This interrupt is already mapped. Let's unmap first.
                 *
                 * We don't use retarget interrupt hypercalls here because
-                * Microsoft Hypervisor doens't allow root to change the vector
+                * Microsoft Hypervisor doesn't allow root to change the vector
                 * or specify VPs outside of the set that is initially used
                 * during mapping.
                 */
 
        /* Tell the hypervisor what went wrong. */
        val |= GHCB_SEV_TERM_REASON(set, reason);
 
-       /* Request Guest Termination from Hypvervisor */
+       /* Request Guest Termination from Hypervisor */
        wr_ghcb_msr(val);
        VMGEXIT();
 
 
        if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
                return false;
 
-       /* GART present only on Fam15h, upto model 0fh */
+       /* GART present only on Fam15h, up to model 0fh */
        if (boot_cpu_data.x86 == 0xf || boot_cpu_data.x86 == 0x10 ||
            (boot_cpu_data.x86 == 0x15 && boot_cpu_data.x86_model < 0x10))
                return true;
 
 
 /*
  * Our IMM is signed, as such it must live at the top end of the word. Also,
- * since C99 hex constants are of ambigious type, force cast the mask to 'int'
+ * since C99 hex constants are of ambiguous type, force cast the mask to 'int'
  * so that FIELD_GET() will DTRT and sign extend the value when it extracts it.
  */
 #define EX_DATA_TYPE_MASK              ((int)0x000000FF)
 
         *
         * This master permission field is only to be used when
         * task.fpu.fpstate based checks fail to validate whether the task
-        * is allowed to expand it's xfeatures set which requires to
+        * is allowed to expand its xfeatures set which requires to
         * allocate a larger sized fpstate buffer.
         *
         * Do not access this field directly.  Use the provided helper
 
  * This function will block all kernel access to the PMIC I2C bus, so that the
  * P-Unit can safely access the PMIC over the shared I2C bus.
  *
- * Note on these systems the i2c-bus driver will request a sempahore from the
+ * Note on these systems the i2c-bus driver will request a semaphore from the
  * P-Unit for exclusive access to the PMIC bus when i2c drivers are accessing
  * it, but this does not appear to be sufficient, we still need to avoid making
  * certain P-Unit requests during the access window to avoid problems.
 
        /* Whether or not a virtual NMI is pending in hardware. */
        bool (*is_vnmi_pending)(struct kvm_vcpu *vcpu);
        /*
-        * Attempt to pend a virtual NMI in harware.  Returns %true on success
+        * Attempt to pend a virtual NMI in hardware.  Returns %true on success
         * to allow using static_call_ret0 as the fallback.
         */
        bool (*set_vnmi_pending)(struct kvm_vcpu *vcpu);
 
  * but there is still a cushion vs. the RSB depth. The algorithm does not
  * claim to be perfect and it can be speculated around by the CPU, but it
  * is considered that it obfuscates the problem enough to make exploitation
- * extremly difficult.
+ * extremely difficult.
  */
 #define RET_DEPTH_SHIFT                        5
 #define RSB_RET_STUFF_LOOPS            16
 
 /*
  * Abuse ANNOTATE_RETPOLINE_SAFE on a NOP to indicate UNRET_END, should
- * eventually turn into it's own annotation.
+ * eventually turn into its own annotation.
  */
 .macro VALIDATE_UNRET_END
 #if defined(CONFIG_NOINSTR_VALIDATION) && \
 
  * F (2) in swp entry is used to record when a pagetable is
  * writeprotected by userfaultfd WP support.
  *
- * E (3) in swp entry is used to rememeber PG_anon_exclusive.
+ * E (3) in swp entry is used to remember PG_anon_exclusive.
  *
  * Bit 7 in swp entry should be 0 because pmd_present checks not only P,
  * but also L and G.
 
        return uv_socket_to_node(blade);
 }
 
-/* Blade number of current cpu. Numnbered 0 .. <#blades -1> */
+/* Blade number of current cpu. Numbered 0 .. <#blades -1> */
 static inline int uv_numa_blade_id(void)
 {
        return uv_hub_info->numa_blade_id;
 
 u64 vdso_calc_delta(u64 cycles, u64 last, u64 mask, u32 mult)
 {
        /*
-        * Due to the MSB/Sign-bit being used as invald marker (see
+        * Due to the MSB/Sign-bit being used as invalid marker (see
         * arch_vdso_cycles_valid() above), the effective mask is S64_MAX.
         */
        u64 delta = (cycles - last) & S64_MAX;
 
  *   RING1 -> RING3 kernel mode.
  *   RING2 -> RING3 kernel mode.
  *   RING3 -> RING3 user mode.
- * However RING0 indicates that the guest kernel should return to iteself
+ * However RING0 indicates that the guest kernel should return to itself
  * directly with
  *      orb   $3,1*8(%rsp)
  *      iretq
 
        /*
         * HSMP_GET_DIMM_THERMAL, num_args = 1, response_sz = 1
         * input: args[0] = DIMM address[7:0]
-        * output: args[0] = temperature in degree celcius[31:21] + update rate in ms[16:8] +
+        * output: args[0] = temperature in degree celsius[31:21] + update rate in ms[16:8] +
         * DIMM address[7:0]
         */
        {1, 1, HSMP_GET},
 
  * Note that the caller must ensure that if the modified code is part of a
  * module, the module would not be removed during poking. This can be achieved
  * by registering a module notifier, and ordering module removal and patching
- * trough a mutex.
+ * through a mutex.
  */
 void *text_poke(void *addr, const void *opcode, size_t len)
 {
 
                                iommu_size >> PAGE_SHIFT);
        /*
         * Tricky. The GART table remaps the physical memory range,
-        * so the CPU wont notice potential aliases and if the memory
+        * so the CPU won't notice potential aliases and if the memory
         * is remapped to UC later on, we might surprise the PCI devices
         * with a stray writeout of a cacheline. So play it sure and
         * do an explicit, full-scale wbinvd() _after_ having marked all
 
 #
 
 # Leads to non-deterministic coverage that is not a function of syscall inputs.
-# In particualr, smp_apic_timer_interrupt() is called in random places.
+# In particular, smp_apic_timer_interrupt() is called in random places.
 KCOV_INSTRUMENT                := n
 
 obj-$(CONFIG_X86_LOCAL_APIC)   += apic.o apic_common.o apic_noop.o ipi.o vector.o init.o
 
 
        /*
         * If interrupt delivery mode is legacy PIC or virtual wire without
-        * configuration, the local APIC timer wont be set up. Make sure
+        * configuration, the local APIC timer won't be set up. Make sure
         * that the PIT is initialized.
         */
        if (apic_intr_mode == APIC_PIC ||
 
 void lapic_assign_legacy_vector(unsigned int irq, bool replace)
 {
        /*
-        * Use assign system here so it wont get accounted as allocated
-        * and moveable in the cpu hotplug check and it prevents managed
+        * Use assign system here so it won't get accounted as allocated
+        * and movable in the cpu hotplug check and it prevents managed
         * irq reservation from touching it.
         */
        irq_matrix_assign_system(vector_matrix, ISA_IRQ_VECTOR(irq), replace);
 
  *
  * Flush any outstanding enqueued EADD operations and perform EINIT.  The
  * Launch Enclave Public Key Hash MSRs are rewritten as necessary to match
- * the enclave's MRSIGNER, which is caculated from the provided sigstruct.
+ * the enclave's MRSIGNER, which is calculated from the provided sigstruct.
  *
  * Return:
  * - 0:                Success.
 
  * Must be invoked from KVM after a VMEXIT before enabling interrupts when
  * XFD write emulation is disabled. This is required because the guest can
  * freely modify XFD and the state at VMEXIT is not guaranteed to be the
- * same as the state on VMENTER. So software state has to be udpated before
+ * same as the state on VMENTER. So software state has to be updated before
  * any operation which depends on it can take place.
  *
  * Note: It can be invoked unconditionally even when write emulation is
 
         * Switch to new page-table
         *
         * For the boot CPU this switches to early_top_pgt which still has the
-        * indentity mappings present. The secondary CPUs will switch to the
+        * identity mappings present. The secondary CPUs will switch to the
         * init_top_pgt here, away from the trampoline_pgd and unmap the
-        * indentity mapped ranges.
+        * identity mapped ranges.
         */
        movq    %rax, %cr3
 
 
 
        hpet_base.nr_clockevents = 0;
 
-       /* No point if MSI is disabled or CPU has an Always Runing APIC Timer */
+       /* No point if MSI is disabled or CPU has an Always Running APIC Timer */
        if (hpet_msi_disable || boot_cpu_has(X86_FEATURE_ARAT))
                return;
 
  * and per CPU timer interrupts.
  *
  * The probability that this problem is going to be solved in the
- * forseeable future is close to zero, so the kernel has to be cluttered
+ * foreseeable future is close to zero, so the kernel has to be cluttered
  * with heuristics to keep up with the ever growing amount of hardware and
  * firmware trainwrecks. Hopefully some day hardware people will understand
  * that the approach of "This can be fixed in software" is not sustainable.
 
                 * Reset the host's shared pages list related to kernel
                 * specific page encryption status settings before we load a
                 * new kernel by kexec. Reset the page encryption status
-                * during early boot intead of just before kexec to avoid SMP
+                * during early boot instead of just before kexec to avoid SMP
                 * races during kvm_pv_guest_cpu_reboot().
                 * NOTE: We cannot reset the complete shared pages list
                 * here as we need to retain the UEFI/OVMF firmware
 
 }
 early_param("no-kvmclock-vsyscall", parse_no_kvmclock_vsyscall);
 
-/* Aligned to page sizes to match whats mapped via vsyscalls to userspace */
+/* Aligned to page sizes to match what's mapped via vsyscalls to userspace */
 #define HVC_BOOT_ARRAY_SIZE \
        (PAGE_SIZE / sizeof(struct pvclock_vsyscall_time_info))
 
 
  * This handles calls from both 32bit and 64bit mode.
  *
  * Lock order:
- *     contex.ldt_usr_sem
+ *     context.ldt_usr_sem
  *       mmap_lock
  *         context.lock
  */
        /*
         * Any change to mm->context.ldt is followed by an IPI to all
         * CPUs with the mm active.  The LDT will not be freed until
-        * after the IPI is handled by all such CPUs.  This means that,
+        * after the IPI is handled by all such CPUs.  This means that
         * if the ldt_struct changes before we return, the values we see
         * will be safe, and the new values will be loaded before we run
         * any user code.
        }
        /*
         * The SYSCALL_DEFINE() macros give us an 'unsigned long'
-        * return type, but tht ABI for sys_modify_ldt() expects
+        * return type, but the ABI for sys_modify_ldt() expects
         * 'int'.  This cast gives us an int-sized value in %rax
         * for the return code.  The 'unsigned' is necessary so
         * the compiler does not try to sign-extend the negative
 
        /*
         * Make sure that the TSS limit is covering the IO bitmap. It might have
         * been cut down by a VMEXIT to 0x67 which would cause a subsequent I/O
-        * access from user space to trigger a #GP because tbe bitmap is outside
+        * access from user space to trigger a #GP because the bitmap is outside
         * the TSS limit.
         */
        refresh_tss_limit();
 
        /* Tell the hypervisor what went wrong. */
        val |= GHCB_SEV_TERM_REASON(set, reason);
 
-       /* Request Guest Termination from Hypvervisor */
+       /* Request Guest Termination from Hypervisor */
        sev_es_wr_ghcb_msr(val);
        VMGEXIT();
 
 
 
                /*
                 * If the index isn't significant, use the first entry with a
-                * matching function.  It's userspace's responsibilty to not
+                * matching function.  It's userspace's responsibility to not
                 * provide "duplicate" entries in all cases.
                 */
                if (!(e->flags & KVM_CPUID_FLAG_SIGNIFCANT_INDEX) || e->index == index)
 
 
        /*
         * The head descriptor is empty.  If there are no tail descriptors,
-        * nullify the rmap head to mark the list as emtpy, else point the rmap
+        * nullify the rmap head to mark the list as empty, else point the rmap
         * head at the next descriptor, i.e. the new head.
         */
        if (!head_desc->more)
        kvm_tdp_mmu_try_split_huge_pages(kvm, memslot, start, end, target_level, false);
 
        /*
-        * A TLB flush is unnecessary at this point for the same resons as in
+        * A TLB flush is unnecessary at this point for the same reasons as in
         * kvm_mmu_slot_try_split_huge_pages().
         */
 }
 
  * Step to the next SPTE in a pre-order traversal of the paging structure.
  * To get to the next SPTE, the iterator either steps down towards the goal
  * GFN, if at a present, non-last-level SPTE, or over to a SPTE mapping a
- * highter GFN.
+ * higher GFN.
  *
  * The basic algorithm is as follows:
  * 1. If the current SPTE is a non-last-level SPTE, step down into the page
 
         * Emulation is possible for SEV guests if and only if a prefilled
         * buffer containing the bytes of the intercepted instruction is
         * available. SEV guest memory is encrypted with a guest specific key
-        * and cannot be decrypted by KVM, i.e. KVM would read cyphertext and
+        * and cannot be decrypted by KVM, i.e. KVM would read ciphertext and
         * decode garbage.
         *
         * If KVM is NOT trying to simply skip an instruction, inject #UD if
 
                 * code was changed such that flag signals vmcs12 should
                 * be copied into eVMCS in guest memory.
                 *
-                * To preserve backwards compatability, allow user
+                * To preserve backwards compatibility, allow user
                 * to set this flag even when there is no VMXON region.
                 */
                if (kvm_state->flags & ~KVM_STATE_NESTED_EVMCS)
 
                 * do generate error codes with bits 31:16 set, and so KVM's
                 * ABI lets userspace shove in arbitrary 32-bit values.  Drop
                 * the upper bits to avoid VM-Fail, losing information that
-                * does't really exist is preferable to killing the VM.
+                * doesn't really exist is preferable to killing the VM.
                 */
                vmcs_write32(VM_ENTRY_EXCEPTION_ERROR_CODE, (u16)ex->error_code);
                intr_info |= INTR_INFO_DELIVER_CODE_MASK;
 
  *
  * But, if a VM-Exit occurs during instruction execution, and KVM does NOT skip
  * the instruction or inject an exception, then KVM can incorrecty inject a new
- * asynchrounous event if the event became pending after the CPU fetched the
+ * asynchronous event if the event became pending after the CPU fetched the
  * instruction (in the guest).  E.g. if a page fault (#PF, #NPF, EPT violation)
  * occurs and is resolved by KVM, a coincident NMI, SMI, IRQ, etc... can be
  * injected on the restarted instruction instead of being deferred until the
        int r;
 
        /*
-        * Process nested events first, as nested VM-Exit supercedes event
+        * Process nested events first, as nested VM-Exit supersedes event
         * re-injection.  If there's an event queued for re-injection, it will
         * be saved into the appropriate vmc{b,s}12 fields on nested VM-Exit.
         */
                /*
                 * Assert that vCPU vs. VM APICv state is consistent.  An APICv
                 * update must kick and wait for all vCPUs before toggling the
-                * per-VM state, and responsing vCPUs must wait for the update
+                * per-VM state, and responding vCPUs must wait for the update
                 * to complete before servicing KVM_REQ_APICV_UPDATE.
                 */
                WARN_ON_ONCE((kvm_vcpu_apicv_activated(vcpu) != kvm_vcpu_apicv_active(vcpu)) &&
 
 
        delay = min_t(u64, MWAITX_MAX_WAIT_CYCLES, cycles);
        /*
-        * Use cpu_tss_rw as a cacheline-aligned, seldomly accessed per-cpu
+        * Use cpu_tss_rw as a cacheline-aligned, seldom accessed per-cpu
         * variable as the monitor target.
         */
         __monitorx(raw_cpu_ptr(&cpu_tss_rw), 0, 0);
 
                        return;
        }
 
-       /* free a pte talbe */
+       /* free a pte table */
        free_pagetable(pmd_page(*pmd), 0);
        spin_lock(&init_mm.page_table_lock);
        pmd_clear(pmd);
                        return;
        }
 
-       /* free a pmd talbe */
+       /* free a pmd table */
        free_pagetable(pud_page(*pud), 0);
        spin_lock(&init_mm.page_table_lock);
        pud_clear(pud);
                        return;
        }
 
-       /* free a pud talbe */
+       /* free a pud table */
        free_pagetable(p4d_page(*p4d), 0);
        spin_lock(&init_mm.page_table_lock);
        p4d_clear(p4d);
 
  * memory ranges: uncached, write-combining, write-through, write-protected,
  * and the most commonly used and default attribute: write-back caching.
  *
- * PAT support supercedes and augments MTRR support in a compatible fashion: MTRR is
+ * PAT support supersedes and augments MTRR support in a compatible fashion: MTRR is
  * a hardware interface to enumerate a limited number of physical memory ranges
  * and set their caching attributes explicitly, programmed into the CPU via MSRs.
  * Even modern CPUs have MTRRs enabled - but these are typically not touched
 
 
                /*
                 * We need to keep the pfn from the existing PTE,
-                * after all we're only going to change it's attributes
+                * after all we're only going to change its attributes
                 * not the memory it points to
                 */
                new_pte = pfn_pte(pfn, new_prot);
        /*
         * The typical sequence for unmapping is to find a pte through
         * lookup_address_in_pgd() (ideally, it should never return NULL because
-        * the address is already mapped) and change it's protections. As pfn is
+        * the address is already mapped) and change its protections. As pfn is
         * the *target* of a mapping, it's not useful while unmapping.
         */
        struct cpa_data cpa = {
 
  *
  *     https://github.com/IAIK/KAISER
  *
- * The original work was written by and and signed off by for the Linux
+ * The original work was written by and signed off by for the Linux
  * kernel by:
  *
  *   Signed-off-by: Richard Fellner <richard.fellner@student.tugraz.at>
 
 
        /*
         * Validate that it is not running on an SMT sibling as this would
-        * make the excercise pointless because the siblings share L1D. If
+        * make the exercise pointless because the siblings share L1D. If
         * it runs on a SMT sibling, notify it with SIGBUS on return to
         * user/guest
         */
 
                } else {
                        /* Only copy the arguments on-stack to current
                         * 'stack_size' and ignore the regs, used to
-                        * prepare the arguments on-stack for orign call.
+                        * prepare the arguments on-stack for origin call.
                         */
                        if (for_call_origin) {
                                nr_regs += arg_regs;
 
 #define PROLOGUE_SIZE 35
 
 /*
- * Emit prologue code for BPF program and check it's size.
+ * Emit prologue code for BPF program and check its size.
  * bpf_tail_call helper will skip it while jumping into another program.
  */
 static void emit_prologue(u8 **pprog, u32 stack_depth)
 
  * Copyright(c) 2015 Bryan O'Donoghue <pure.logic@nexus-software.ie>
  *
  * IMR self test. The purpose of this module is to run a set of tests on the
- * IMR API to validate it's sanity. We check for overlapping, reserved
+ * IMR API to validate its sanity. We check for overlapping, reserved
  * addresses and setup/teardown sanity.
  *
  */
 
  *             Bit 8 (TF) must be cleared. Other bits are all unspecified.
  *
  * All other processor registers and flag bits are unspecified. The OS is in
- * charge of setting up it's own stack, GDT and IDT.
+ * charge of setting up its own stack, GDT and IDT.
  */
 
 #define PVH_GDT_ENTRY_CS       1
 
        this_cpu_write(uv_cpu_nmi.state, UV_NMI_STATE_DUMP_DONE);
 }
 
-/* Trigger a slave CPU to dump it's state */
+/* Trigger a slave CPU to dump its state */
 static void uv_nmi_trigger_dump(int cpu)
 {
        int retry = uv_nmi_trigger_delay;
 
  * Read the RTC.
  *
  * Starting with HUB rev 2.0, the UV RTC register is replicated across all
- * cachelines of it's own page.  This allows faster simultaneous reads
+ * cachelines of its own page.  This allows faster simultaneous reads
  * from a given socket.
  */
 static u64 uv_read_rtc(struct clocksource *cs)
 
                set_real_mode_mem(mem);
 
        /*
-        * Unconditionally reserve the entire fisrt 1M, see comment in
+        * Unconditionally reserve the entire first 1M, see comment in
         * setup_arch().
         */
        memblock_reserve(0, SZ_1M);
 
  * would need to validate the whole pagetable before going on.
  * Naturally, this is quite slow.  The solution is to "pin" a
  * pagetable, which enforces all the constraints on the pagetable even
- * when it is not actively in use.  This menas that Xen can be assured
+ * when it is not actively in use.  This means that Xen can be assured
  * that it is still valid when you do load it into %cr3, and doesn't
  * need to revalidate it.
  *