Skip to contentSkip to conversation

Paravirt_ops drop internal patches.patch

RFC PATCH In review Zachary Amsden 2 participants 3 messages Apr 20, 2007 virtio core

lore
Share & tools
lore
#0 lore raw

RFC PATCH 4/5 Paravirt_ops drop internal patches.patch

Some of these boot hooks do not need to be patched, in fact, it is better not to patch them at all and thus keep them totally private.

include/asm-i386/paravirt.h +3 -3
diff -r dba7b8b8e43d include/asm-i386/paravirt.h
@@ -686,12 +686,12 @@ static inline unsigned long apic_read(un
 
 static inline void setup_boot_clock(void)
 {
-	PVOP_VCALL0(setup_boot_clock);
+	paravirt_ops.setup_boot_clock();
 }
 
 static inline void setup_secondary_clock(void)
 {
-	PVOP_VCALL0(setup_secondary_clock);
+	paravirt_ops.setup_secondary_clock();
 }
 #endif
 
@@ -711,7 +711,7 @@ static inline void startup_ipi_hook(int 
 static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip,
 				    unsigned long start_esp)
 {
-	PVOP_VCALL3(startup_ipi_hook, phys_apicid, start_eip, start_esp);
+	paravirt_ops.startup_ipi_hook(phys_apicid, start_eip, start_esp);
 }
 #endif
#1 lore raw
Quoted 3 lines · Zachary Amsden

Some of these boot hooks do not need to be patched, in fact, it is better not to patch them at all and thus keep them totally private.

I think I generally backed off on patching init functions and the like. Are these really the only ones which need adjustment? I bet things like the descriptor functions could be indirect/private with very little impact.

J

#2 lore raw
Quoted 10 lines · Jeremy Fitzhardinge
Quoted 4 lines · Zachary Amsden

Some of these boot hooks do not need to be patched, in fact, it is better not to patch them at all and thus keep them totally private.

I think I generally backed off on patching init functions and the like. Are these really the only ones which need adjustment? I bet things like the descriptor functions could be indirect/private with very little impact.

Perhaps, but I'd rather not split hairs on it just yet - I actually have no idea exactly which paravirt-ops will be needed, and so far, my conclusions have led me to believe that a fare bit more than the obvious paravirt-ops need to be available to modules. So I would rather just split off pure init functions, which really have no business being exported to modules.

Zach