[OpenBIOS] [PATCH, RFT] ppc: Suppress /hypervisor outside KVM
Andreas Färber
andreas.faerber at web.de
Mon Oct 11 16:06:31 CEST 2010
My New World PowerMac G3 does not have a /hypervisor node.
Move all Forth code to kvm_of_init() to make it match the comment:
Don't expose /hypervisor when not in KVM.
Cc: Alexander Graf <agraf at suse.de>
Signed-off-by: Andreas Färber <andreas.faerber at web.de>
---
Hello Alex,
Could you please test this on the KVM side of things? Thanks!
Andreas
arch/ppc/qemu/init.c | 12 +++++++++++-
arch/ppc/qemu/tree.fs | 5 -----
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c
index 3979f5d..6601b7c 100644
--- a/arch/ppc/qemu/init.c
+++ b/arch/ppc/qemu/init.c
@@ -526,9 +526,17 @@ static void kvm_of_init(void)
if (!fw_cfg_read_i32(FW_CFG_PPC_IS_KVM))
return;
- push_str("/hypervisor");
+ push_str("/");
fword("find-device");
+ fword("new-device");
+
+ push_str("hypervisor");
+ fword("device-name");
+
+ push_str("hypervisor");
+ fword("device-type");
+
/* compatible */
push_str("linux,kvm");
@@ -567,6 +575,8 @@ static void kvm_of_init(void)
fword("encode-string");
push_str("guest-name");
fword("property");
+
+ fword("finish-device");
}
void
diff --git a/arch/ppc/qemu/tree.fs b/arch/ppc/qemu/tree.fs
index b7bb706..4d107a9 100644
--- a/arch/ppc/qemu/tree.fs
+++ b/arch/ppc/qemu/tree.fs
@@ -39,11 +39,6 @@ new-device
: close ;
finish-device
-new-device
- " hypervisor" device-name
- " hypervisor" device-type
-finish-device
-
\ -------------------------------------------------------------
\ /packages
\ -------------------------------------------------------------
--
1.7.3
More information about the OpenBIOS
mailing list