The way of mapping BIOS into the guest's address space

2012-02-14 Thread Yang Bai
Hi all, Since on X86, bios is always at the end of the address space, so I have some thought about how to implement the seabios support for kvm tool. 1. using kvm__register_mem to map the end of address space to the guest then copy the code of seabios to this mem region. Just emulating the bios

Q: Does linux kvm native tool support loading BIOS as the default loader now?

2012-02-13 Thread Yang Bai
Hi all, As I know, native tool does not support loading BIOS so it does not support Windows. Is this supporting now? If not, I may try to implement it. Thanks, Yang -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

[PATCH] kvm tool: ignore guest/init_stage2

2012-02-13 Thread Yang Bai
Signed-off-by: Yang Bai hamo...@gmail.com --- tools/kvm/.gitignore |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tools/kvm/.gitignore b/tools/kvm/.gitignore index be6c6f2..60dd6db 100644 --- a/tools/kvm/.gitignore +++ b/tools/kvm/.gitignore @@ -8,4 +8,5 @@ include

[PATCH 1/4] kvm tool: Stop init if check_extensions failed

2012-02-10 Thread Yang Bai
If kvm__check_extensions found that some of the required KVM extention is not supported by OS, we should stop the init and free all allocated resources. Signed-off-by: Yang Bai hamo...@gmail.com --- tools/kvm/kvm.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tools

[PATCH 2/4] kvm tool: unite the error handle in kvm__init

2012-02-10 Thread Yang Bai
When error occurs, just set the ret to the reason, then jump to the error handle labels. This makes the code more readable. Signed-off-by: Yang Bai hamo...@gmail.com --- tools/kvm/kvm.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/kvm/kvm.c b/tools/kvm

[PATCH 3/4] kvm tool: if kvm_ipc__start failed, return negative

2012-02-10 Thread Yang Bai
If kvm_ipc__start failed, it returns a negative and by checking this return value, we can ensure that it succeeds. Signed-off-by: Yang Bai hamo...@gmail.com --- tools/kvm/kvm-ipc.c | 38 -- tools/kvm/kvm.c |7 ++- 2 files changed, 38 insertions

[PATCH 4/4] kvm tool: ensure kvm_ipc__register_handler success

2012-02-10 Thread Yang Bai
By checking the return value from kvm_ipc__register_handler, we can ensure that it succeeds. Signed-off-by: Yang Bai hamo...@gmail.com --- tools/kvm/kvm.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index f02d5df..99bcef4

Re: [PATCH] kvm tool: rewrite kvm__init

2012-02-09 Thread Yang Bai
On Thu, Feb 9, 2012 at 9:07 PM, Cyrill Gorcunov gorcu...@openvz.org wrote: On Thu, Feb 09, 2012 at 03:01:26PM +0200, Pekka Enberg wrote: On Thu, Feb 9, 2012 at 7:40 AM, Yang Bai hamo...@gmail.com wrote: Since the different issues have been handled in the internal of kvm__init, it can only

Re: [PATCH] kvm tool: rewrite kvm__init

2012-02-09 Thread Yang Bai
On Fri, Feb 10, 2012 at 12:53 PM, Sasha Levin levinsasha...@gmail.com wrote: On Fri, 2012-02-10 at 10:34 +0800, Yang Bai wrote: On Thu, Feb 9, 2012 at 9:07 PM, Cyrill Gorcunov gorcu...@openvz.org wrote: On Thu, Feb 09, 2012 at 03:01:26PM +0200, Pekka Enberg wrote: On Thu, Feb 9, 2012 at 7:40

Re: [PATCH] kvm tool: rewrite kvm__init

2012-02-09 Thread Yang Bai
On Fri, Feb 10, 2012 at 12:17 PM, Sasha Levin levinsasha...@gmail.com wrote: On Fri, 2012-02-10 at 11:03 +0800, Yang Bai wrote: On Fri, Feb 10, 2012 at 12:53 PM, Sasha Levin levinsasha...@gmail.com wrote: On Fri, 2012-02-10 at 10:34 +0800, Yang Bai wrote: On Thu, Feb 9, 2012 at 9:07 PM

[PATCH] kvm tool: rewrite kvm__init

2012-02-08 Thread Yang Bai
Since the different issues have been handled in the internal of kvm__init, it can only return NULL if error happened. Signed-off-by: Yang Bai hamo...@gmail.com --- tools/kvm/builtin-run.c |4 ++-- tools/kvm/kvm.c | 20 +++- 2 files changed, 9 insertions(+), 15

Re: [PATCH] KVM: fix undeclared MAY_{READ,WRITE,ACCESS}

2011-12-23 Thread Yang Bai
On Sat, Dec 24, 2011 at 1:22 PM, Yang Bai hamo...@gmail.com wrote: commit 08a95a511af91a2a6c42f2a8f13b99402a39e84b checksdevice assignment permission but forgot to include thedefinition of MAY_{READ,WRITE,ACCESS} in linux/fs.hInclude it and this fix the build error here:http://buildbot.b1

[PATCH][RESEND] KVM: fix undeclared MAY_{READ,WRITE,ACCESS}

2011-12-23 Thread Yang Bai
commit 08a95a511af91a2a6c42f2a8f13b99402a39e84b checksdevice assignment permission but forgot to include thedefinition of MAY_{READ,WRITE,ACCESS} in linux/fs.hInclude it and this fix the build error here:http://buildbot.b1-systems.de/kvm/builders/i386/builds/401 Signed-off-by: Yang Bai hamo

Re: buildbot failure in kvm on i386

2011-12-23 Thread Yang Bai
On Sat, Dec 24, 2011 at 12:16 PM, k...@buildbot.b1-systems.de wrote: The Buildbot has detected a new failure on builder i386 while building kvm. Full details are available at:  http://buildbot.b1-systems.de/kvm/builders/i386/builds/401 Buildbot URL: http://buildbot.b1-systems.de/kvm/