Hi, Xiantao
I got reading kvm-ia64 started. :)
Which member is p2m table?
> [2/17] Add kvm-ia64.c to support kvm module on Itanium processors.
Some trivial comments.
+int kvm_arch_init(void *opaque)
+{
+ int r;
+ struct kvm_vmm_info *vmm_info = (struct kvm_vmm_info *)opaque;
+
+ if (kvm_vmm_info) {
+ printk(KERN_ERR "kvm: already loaded the other module!\n");
+ r = -EEXIST;
+ goto out;
+ }
+
+ r = -ENOMEM;
extra white space.
+ kvm_vmm_info = kzalloc(sizeof(struct kvm_vmm_info), GFP_KERNEL);
+ if (!kvm_vmm_info)
+ goto out;
+
Can we get the message of shortage of memory by qemu?
+ if (!vti_cpu_has_kvm_support()) {
+ printk(KERN_ERR "kvm: no hardware support\n");
+ r = -EOPNOTSUPP;
+ goto out_free0;
+ }
+
We had better check vti support at the first.
+ kvm_hack_insert_tr();
+
+ if (kvm_alloc_vmm_area())
+ goto out_free0;
+
r = kvm_alloc_vmm_area() is better.
+ r = kvm_relocate_vmm(vmm_info, vmm_info->module);
+ if (r)
+ goto out_free1;
+
+ return 0;
+
+out_free1:
+ kvm_free_vmm_area();
+out_free0:
+ kfree(kvm_vmm_info);
+out:
+ return r;
+}
+
+void kvm_arch_exit(void)
+{
+ kvm_free_vmm_area();
+ kfree(kvm_vmm_info);
+ kvm_vmm_info = 0;
+}
kvm_vmm_info = (void *)0?
Best Regards,
Akio Takebe
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel