From: Akio Takebe <takebe_akio@jp.fujitsu.com>
To: "Zhang,
Xiantao" <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: "Luck, Tony" <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
linux-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Subject: Re: [kvm-devel] [1-5/17] Patch 1-10 of kvm/ia64 V2
Date: Fri, 21 Dec 2007 07:07:06 +0000 [thread overview]
Message-ID: <8FC843A018A012takebe_akio@jp.fujitsu.com> (raw)
In-Reply-To: <42DFA526FC41B1429CE7279EF83C6BDCB139D3-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
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
WARNING: multiple messages have this Message-ID (diff)
From: Akio Takebe <takebe_akio-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
To: "Zhang,
Xiantao" <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: "Luck, Tony" <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
linux-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Subject: Re: [1-5/17] Patch 1-10 of kvm/ia64 V2
Date: Fri, 21 Dec 2007 16:07:06 +0900 [thread overview]
Message-ID: <8FC843A018A012takebe_akio@jp.fujitsu.com> (raw)
In-Reply-To: <42DFA526FC41B1429CE7279EF83C6BDCB139D3-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
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/
next prev parent reply other threads:[~2007-12-21 7:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-20 5:46 [1-5/17] Patch 1-10 of kvm/ia64 V2 Zhang, Xiantao
[not found] ` <42DFA526FC41B1429CE7279EF83C6BDCB139D3-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-12-21 7:07 ` Akio Takebe [this message]
2007-12-21 7:07 ` Akio Takebe
2007-12-21 7:44 ` [kvm-devel] " Zhang, Xiantao
2007-12-21 7:44 ` Zhang, Xiantao
2007-12-21 7:44 ` Akio Takebe
2007-12-21 7:44 ` Akio Takebe
2007-12-21 8:14 ` [kvm-devel] " Zhang, Xiantao
2007-12-21 8:14 ` Zhang, Xiantao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8FC843A018A012takebe_akio@jp.fujitsu.com \
--to=takebe_akio@jp.fujitsu.com \
--cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=linux-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.