Displaying 5 results from an estimated 5 matches for "early_except".
2020 Feb 11
0
[PATCH 30/62] x86/head/64: Move early exception dispatch to C code
...e <asm/kasan.h>
#include <asm/fixmap.h>
+#include <asm/extable.h>
+#include <asm/trap_defs.h>
/*
* Manage page tables very early on.
@@ -377,6 +379,24 @@ int __init early_make_pgtable(unsigned long address)
return __early_make_pgtable(address, pmd);
}
+void __init early_exception(struct pt_regs *regs, int trapnr)
+{
+ unsigned long cr2;
+ int r;
+
+ switch (trapnr) {
+ case X86_TRAP_PF:
+ cr2 = native_read_cr2();
+ r = early_make_pgtable(cr2);
+ break;
+ default:
+ r = 1;
+ }
+
+ if (r)
+ early_fixup_exception(regs, trapnr);
+}
+
/* Don't add a printk in there....
2020 Feb 11
1
[PATCH 30/62] x86/head/64: Move early exception dispatch to C code
...> +#include <asm/extable.h>
> +#include <asm/trap_defs.h>
>
> /*
> * Manage page tables very early on.
> @@ -377,6 +379,24 @@ int __init early_make_pgtable(unsigned long address)
> return __early_make_pgtable(address, pmd);
> }
>
> +void __init early_exception(struct pt_regs *regs, int trapnr)
> +{
> + unsigned long cr2;
> + int r;
How about int (or bool) handled; Or just if (!early_make_pgtable)
return; This would also be nicer if you inverted the return value so
that true means "I handled it".
--Andy
2020 Feb 11
0
[PATCH 35/62] x86/sev-es: Setup per-cpu GHCBs for the runtime handler
...m/trap_defs.h>
@@ -28,6 +31,9 @@ struct ghcb boot_ghcb_page __bss_decrypted __aligned(PAGE_SIZE);
*/
struct ghcb __initdata *boot_ghcb;
+/* Runtime GHCBs */
+static DEFINE_PER_CPU_DECRYPTED(struct ghcb, ghcb_page) __aligned(PAGE_SIZE);
+
/* Needed in early_forward_exception */
extern void early_exception(struct pt_regs *regs, int trapnr);
@@ -133,6 +139,23 @@ static bool __init setup_ghcb(void)
return true;
}
+void encrypted_state_init_ghcbs(void)
+{
+ int cpu;
+
+ if (!sev_es_active())
+ return;
+
+ /* Initialize per-cpu GHCB pages */
+ for_each_possible_cpu(cpu) {
+ struct ghcb *ghcb...
2020 Feb 11
83
[RFC PATCH 00/62] Linux as SEV-ES Guest Support
Hi,
here is the first public post of the patch-set to enable Linux to run
under SEV-ES enabled hypervisors. The code is mostly feature-complete,
but there are still a couple of bugs to fix. Nevertheless, given the
size of the patch-set, I think it is about time to ask for initial
feedback of the changes that come with it. To better understand the code
here is a quick explanation of SEV-ES first.
2020 Feb 11
83
[RFC PATCH 00/62] Linux as SEV-ES Guest Support
Hi,
here is the first public post of the patch-set to enable Linux to run
under SEV-ES enabled hypervisors. The code is mostly feature-complete,
but there are still a couple of bugs to fix. Nevertheless, given the
size of the patch-set, I think it is about time to ask for initial
feedback of the changes that come with it. To better understand the code
here is a quick explanation of SEV-ES first.