hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/arch/x86/include/asm/x86_init.h
....@@ -4,29 +4,22 @@
44
55 #include <asm/bootparam.h>
66
7
+struct ghcb;
78 struct mpc_bus;
89 struct mpc_cpu;
10
+struct pt_regs;
911 struct mpc_table;
1012 struct cpuinfo_x86;
13
+struct irq_domain;
1114
1215 /**
1316 * struct x86_init_mpparse - platform specific mpparse ops
14
- * @mpc_record: platform specific mpc record accounting
1517 * @setup_ioapic_ids: platform specific ioapic id override
16
- * @mpc_apic_id: platform specific mpc apic id assignment
17
- * @smp_read_mpc_oem: platform specific oem mpc table setup
18
- * @mpc_oem_pci_bus: platform specific pci bus setup (default NULL)
19
- * @mpc_oem_bus_info: platform specific mpc bus info
2018 * @find_smp_config: find the smp configuration
2119 * @get_smp_config: get the smp configuration
2220 */
2321 struct x86_init_mpparse {
24
- void (*mpc_record)(unsigned int mode);
2522 void (*setup_ioapic_ids)(void);
26
- int (*mpc_apic_id)(struct mpc_cpu *m);
27
- void (*smp_read_mpc_oem)(struct mpc_table *mpc);
28
- void (*mpc_oem_pci_bus)(struct mpc_bus *m);
29
- void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name);
3023 void (*find_smp_config)(void);
3124 void (*get_smp_config)(unsigned int early);
3225 };
....@@ -50,14 +43,16 @@
5043 * @pre_vector_init: init code to run before interrupt vectors
5144 * are set up.
5245 * @intr_init: interrupt init code
53
- * @trap_init: platform specific trap setup
46
+ * @intr_mode_select: interrupt delivery mode selection
5447 * @intr_mode_init: interrupt delivery mode setup
48
+ * @create_pci_msi_domain: Create the PCI/MSI interrupt domain
5549 */
5650 struct x86_init_irqs {
5751 void (*pre_vector_init)(void);
5852 void (*intr_init)(void);
59
- void (*trap_init)(void);
53
+ void (*intr_mode_select)(void);
6054 void (*intr_mode_init)(void);
55
+ struct irq_domain *(*create_pci_msi_domain)(void);
6156 };
6257
6358 /**
....@@ -134,10 +129,12 @@
134129
135130 /**
136131 * struct x86_init_acpi - x86 ACPI init functions
132
+ * @set_root_poitner: set RSDP address
137133 * @get_root_pointer: get RSDP address
138134 * @reduced_hw_early_init: hardware reduced platform early init
139135 */
140136 struct x86_init_acpi {
137
+ void (*set_root_pointer)(u64 addr);
141138 u64 (*get_root_pointer)(void);
142139 void (*reduced_hw_early_init)(void);
143140 };
....@@ -234,10 +231,22 @@
234231 /**
235232 * struct x86_hyper_runtime - x86 hypervisor specific runtime callbacks
236233 *
237
- * @pin_vcpu: pin current vcpu to specified physical cpu (run rarely)
234
+ * @pin_vcpu: pin current vcpu to specified physical
235
+ * cpu (run rarely)
236
+ * @sev_es_hcall_prepare: Load additional hypervisor-specific
237
+ * state into the GHCB when doing a VMMCALL under
238
+ * SEV-ES. Called from the #VC exception handler.
239
+ * @sev_es_hcall_finish: Copies state from the GHCB back into the
240
+ * processor (or pt_regs). Also runs checks on the
241
+ * state returned from the hypervisor after a
242
+ * VMMCALL under SEV-ES. Needs to return 'false'
243
+ * if the checks fail. Called from the #VC
244
+ * exception handler.
238245 */
239246 struct x86_hyper_runtime {
240247 void (*pin_vcpu)(int cpu);
248
+ void (*sev_es_hcall_prepare)(struct ghcb *ghcb, struct pt_regs *regs);
249
+ bool (*sev_es_hcall_finish)(struct ghcb *ghcb, struct pt_regs *regs);
241250 };
242251
243252 /**
....@@ -281,9 +290,6 @@
281290 struct pci_dev;
282291
283292 struct x86_msi_ops {
284
- int (*setup_msi_irqs)(struct pci_dev *dev, int nvec, int type);
285
- void (*teardown_msi_irq)(unsigned int irq);
286
- void (*teardown_msi_irqs)(struct pci_dev *dev);
287293 void (*restore_msi_irqs)(struct pci_dev *dev);
288294 };
289295
....@@ -301,6 +307,8 @@
301307 extern void x86_early_init_platform_quirks(void);
302308 extern void x86_init_noop(void);
303309 extern void x86_init_uint_noop(unsigned int unused);
310
+extern bool bool_x86_init_noop(void);
311
+extern void x86_op_int_noop(int cpu);
304312 extern bool x86_pnpbios_disabled(void);
305313
306314 #endif