Re: [kvm-devel] [Qemu-devel] Re: [RFC] linuxboot Option ROM for Linux kernel booting

2008-04-23 Thread Nguyen Anh Quynh
On 4/22/08, Alexander Graf [EMAIL PROTECTED] wrote: I believe that's the way to go. If you have spare time on your hands, feel free to integrate my multiboot patches as well. OK, that looks straightforward enough. Thanks, Q On Apr 22, 2008, at 11:07 AM, Nguyen Anh Quynh wrote: Hi

Re: [kvm-devel] [RFC] linuxboot Option ROM for Linux kernel booting

2008-04-23 Thread Nguyen Anh Quynh
On 4/22/08, Anthony Liguori [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: Hi, This should be submitted to upstream (but not to kvm-devel list), but this is only the test code that I want to quickly send out for comments. In case it looks OK, I will send it to upstream later

Re: [kvm-devel] [RFC] linuxboot Option ROM for Linux kernel booting

2008-04-23 Thread Nguyen Anh Quynh
On 4/23/08, H. Peter Anvin [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: Hi, I am thinking about comibing this ROM with the extboot. Both two ROM are about booting, so I think that is reasonable. So we will have only 1 ROM that supports both external boot and Linux boot

Re: [kvm-devel] [RFC] linuxboot Option ROM for Linux kernel booting

2008-04-22 Thread Nguyen Anh Quynh
Hi, I am thinking about comibing this ROM with the extboot. Both two ROM are about booting, so I think that is reasonable. So we will have only 1 ROM that supports both external boot and Linux boot. Is that desirable or not? Thanks, Quynh On 4/21/08, Nguyen Anh Quynh [EMAIL PROTECTED] wrote

Re: [kvm-devel] Using -kernel .. with -drive ...

2008-04-21 Thread Nguyen Anh Quynh
On Tue, Apr 22, 2008 at 12:59 AM, Damjan [EMAIL PROTECTED] wrote: If I try $ qemu -kernel minimal-kernel -drive file=jeos-devel.img,if=virtio I get the following error: A disk image must be given for 'hda' when booting a Linux kernel is this neccesseary? Hi, i don't know

[kvm-devel] [RFC] linuxboot Option ROM for Linux kernel booting

2008-04-20 Thread Nguyen Anh Quynh
/linuxboot.c | 39 +++ qemu/hw/pc.c | 22 +++- qemu/hw/pc.h |5 + 13 files changed, 600 insertions(+), 9 deletions(-) commit f4f1178898c8a4bbbc0a432354dbcc56353099c3 Author: Nguyen Anh Quynh [EMAIL PROTECTED] Date: Mon Apr 21 12:27:47 2008 +0900

Re: [kvm-devel] [RFC] linuxboot Option ROM for Linux kernel booting

2008-04-20 Thread Nguyen Anh Quynh
Forget to say that this patch is against kvm-66. Thanks, Q On Mon, Apr 21, 2008 at 12:32 PM, Nguyen Anh Quynh [EMAIL PROTECTED] wrote: Hi, This should be submitted to upstream (but not to kvm-devel list), but this is only the test code that I want to quickly send out for comments

Re: [kvm-devel] [RFC] linuxboot Option ROM for Linux kernel booting

2008-04-20 Thread Nguyen Anh Quynh
/hw/linuxboot.c | 39 +++ qemu/hw/pc.c | 22 +++- qemu/hw/pc.h |5 + 12 files changed, 600 insertions(+), 9 deletions(-) On Mon, Apr 21, 2008 at 12:33 PM, Nguyen Anh Quynh [EMAIL PROTECTED] wrote: Forget to say that this patch is against kvm-66

Re: [kvm-devel] Extboot Option ROM rewritten in C - v3

2008-04-18 Thread Nguyen Anh Quynh
On Thu, Apr 17, 2008 at 2:58 PM, H. Peter Anvin [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: This patch replaces the current assembly code of Extboot option rom with new C code. Patch is against kvm-66. This version returns an error code in case int 13 handler cannot handle

Re: [kvm-devel] Extboot Option ROM rewritten in C - v3

2008-04-18 Thread Nguyen Anh Quynh
On Thu, Apr 17, 2008 at 3:00 PM, H. Peter Anvin [EMAIL PROTECTED] wrote: + .globl linux_boot +linux_boot: + cli + cld + mov $0x9000, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss +

Re: [kvm-devel] Extboot Option ROM rewritten in C - v3

2008-04-18 Thread Nguyen Anh Quynh
On Thu, Apr 17, 2008 at 4:36 PM, Carlo Marcelo Arenas Belon [EMAIL PROTECTED] wrote: On Thu, Apr 17, 2008 at 10:30:27AM +0900, Nguyen Anh Quynh wrote: +++ b/extboot/farvar.h @@ -0,0 +1,113 @@ +// Code to access multiple segments within gcc. +// +// Copyright (C) 2008 Kevin O'Connor

Re: [kvm-devel] Extboot Option ROM rewritten in C - v3

2008-04-18 Thread Nguyen Anh Quynh
On 4/18/08, Anthony Liguori [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: On Thu, Apr 17, 2008 at 3:00 PM, H. Peter Anvin [EMAIL PROTECTED] wrote: + .globl linux_boot +linux_boot: + cli + cld + mov $0x9000, %ax + mov %ax, %ds

Re: [kvm-devel] Extboot Option ROM rewritten in C - v3

2008-04-18 Thread Nguyen Anh Quynh
On 4/18/08, Anthony Liguori [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: The thinking is to eliminate the need to hijack the boot sector when using the -kernel option. I see, but does that offer any advantage over the current approach? You no longer have

[kvm-devel] Extboot Option ROM rewritten in C - v2

2008-04-16 Thread Nguyen Anh Quynh
Hi Anthony, I found a bug in the last code: send_command() failed to copy back the result into extboot_cmd structure. This patch fixes it. I succesfully tested this version with guest Win2K (fully updated, scsi boot) and Linux 2.6.25-rc8 (virtio). Let me know if you can boot Windows with this

Re: [kvm-devel] Extboot Option ROM rewritten in C - v2

2008-04-16 Thread Nguyen Anh Quynh
On Thu, Apr 17, 2008 at 12:02 AM, Anthony Liguori [EMAIL PROTECTED] wrote: A couple general comments. I'd feel a lot more comfortable with the int13 handler returning an int and the asm stub code uses that result to determine how to set CF. You set CF deep within the function stack and

[kvm-devel] Extboot Option ROM rewritten in C - v3

2008-04-16 Thread Nguyen Anh Quynh
This patch replaces the current assembly code of Extboot option rom with new C code. Patch is against kvm-66. This version returns an error code in case int 13 handler cannot handle a requested function. Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] # diffstat extboot3.diff b/extboot

[kvm-devel] [PATCH] wrong pa calculation fix (extboot)

2008-04-14 Thread Nguyen Anh Quynh
This patch fixes a wrong calculation in the physical address of extboot (qemu/hw/extboot.c). Looks like a typo. Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] diff --git a/qemu/hw/extboot.c b/qemu/hw/extboot.c index 056fb59..0dac34c 100644 --- a/qemu/hw/extboot.c +++ b/qemu/hw/extboot.c

Re: [kvm-devel] [PATCH] wrong pa calculation fix (extboot)

2008-04-14 Thread Nguyen Anh Quynh
On 4/14/08, Anthony Liguori [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: This patch fixes a wrong calculation in the physical address of extboot (qemu/hw/extboot.c). Looks like a typo. Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] diff --git a/qemu/hw/extboot.c b/qemu/hw

[kvm-devel] Extboot Option Rom rewritten in C

2008-04-14 Thread Nguyen Anh Quynh
Hi Anthony, I spot a bug and few dead code in the extboot option rom. Perhaps the reason they are there is because less people want to look at assembly code, and it looks indeed scary. So I decided to rewrite it in C, using .code16gcc directive. Some advantages: - C code is easier to understand,

Re: [kvm-devel] Extboot Option Rom rewritten in C

2008-04-14 Thread Nguyen Anh Quynh
On 4/15/08, Anthony Liguori [EMAIL PROTECTED] wrote: Hi Nguyen, Nguyen Anh Quynh wrote: Hi Anthony, I spot a bug and few dead code in the extboot option rom. Perhaps the reason they are there is because less people want to look at assembly code, and it looks indeed scary. So I

Re: [kvm-devel] Extboot Option Rom rewritten in C

2008-04-14 Thread Nguyen Anh Quynh
On 4/15/08, Anthony Liguori [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: On 4/15/08, Anthony Liguori [EMAIL PROTECTED] wrote: Hi Nguyen, Nguyen Anh Quynh wrote: Hi Anthony, I spot a bug and few dead code in the extboot option rom. Perhaps the reason

[kvm-devel] [patch] mmu.c: remove unused functions

2007-07-24 Thread Nguyen Anh Quynh
This patch removes some unused functions in mmu.c Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index a7985b1..13fb6bb 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -156,21 +156,6 @@ static struct kmem_cache *pte_chain_cache

[kvm-devel] [patch] Make sure that we compile before installing

2007-07-23 Thread Nguyen Anh Quynh
This patch makes install compile code, and install-rpm package rpms. Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] diff --git a/Makefile b/Makefile index 37b01d2..dd3f51c 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ initdir = /etc/init.d confdir = /etc/kvm utilsdir = /etc/kvm

Re: [kvm-devel] [patch] Make sure that we compile before installing

2007-07-23 Thread Nguyen Anh Quynh
On 7/23/07, Avi Kivity [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: This patch makes install compile code, and install-rpm package rpms. 'install' and 'install-rpm' are typically run as root, and we don't want to compile as root. Is it because of security reason, or something else? I

[kvm-devel] [PATCH] hardware debug register handling

2007-07-19 Thread Nguyen Anh Quynh
Currently, when handling hardware breakpoints, we always set values for all the 4 hardware debug registers, regardless it is needed or not. This patch fixes the bug. Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 7bdffe6..c6187c8 100644

Re: [kvm-devel] [PATCH] hardware debug register handling

2007-07-19 Thread Nguyen Anh Quynh
On 7/19/07, Avi Kivity [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: Currently, when handling hardware breakpoints, we always set values for all the 4 hardware debug registers, regardless it is needed or not. This patch fixes the bug. Why is this a problem? Only enabled breakpoints

Re: [kvm-devel] [kvm-commits] kvm: external module: rename original kernel's modules when installing

2007-07-12 Thread Nguyen Anh Quynh
this avoids an ambiguity when using the kvm external module in conjuction with 2.6.20 or later, which may also have kvm built. This patch raises a problem if /lib/modules/version/kernel/drivers/kvm/ does not exist. The enclosed patch fixes the bug. Signed-off-by: Nguyen Anh Quynh [EMAIL

[kvm-devel] [PATCH] fix *nopage() in kvm_main.c

2007-07-11 Thread Nguyen Anh Quynh
*nopage() in kvm_main.c should only store the type of mmap() fault if the pointers are not NULL. This patch fixes the problem. Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 83bb284..0520d15 100644 --- a/drivers/kvm

Re: [kvm-devel] [PATCH] fix *nopage() in kvm_main.c

2007-07-11 Thread Nguyen Anh Quynh
On 7/11/07, Avi Kivity [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: *nopage() in kvm_main.c should only store the type of mmap() fault if the pointers are not NULL. This patch fixes the problem. What caller of -nopage() passes a NULL for type? In that case we simply do nothing. I

Re: [kvm-devel] [PATCH] memslot check before deferencing

2007-06-04 Thread Nguyen Anh Quynh
patch is fine for you, or how do you want to take patch from gmail. On 6/4/07, Avi Kivity [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: memslot in makr_page_dirty() should be verified before dereferencing it (kvm_main.c) The patches still don't show up inlined. This makes them hard to review

Re: [kvm-devel] [kvm-commits] kvm: kvmctl: create secondary vcpus

2007-06-04 Thread Nguyen Anh Quynh
Hi Avi, Perhaps I miss something, but I dont see you initialize ncpus anywhere in the patch? Cheers, Quynh On 6/5/07, Avi Kivity [EMAIL PROTECTED] wrote: repository: /home/avi/kvm branch: master commit 9d02d1c4345c77ffbc95136c12011a112a8d1c7e Author: Avi Kivity [EMAIL PROTECTED] Date:

[kvm-devel] [PATCH] use symbols rather than constant vars in kvm_create

2007-06-03 Thread Nguyen Anh Quynh
This patch replaces 2 constant variables dosmem and exmem in kvm_create() with symbols. Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] patch3.patch Description: Binary data - This SF.net email is sponsored by DB2

Re: [kvm-devel] [PATCH] use symbols rather than constant vars in kvm_create

2007-06-03 Thread Nguyen Anh Quynh
On 6/3/07, Avi Kivity [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: This patch replaces 2 constant variables dosmem and exmem in kvm_create() with symbols. What is the benefit of this? Readability is not improved. yes, but what is the reason to use vars instead of symbols here? do

[kvm-devel] [PATCH] make handle_debug() static

2007-06-03 Thread Nguyen Anh Quynh
This patch turnes a local function in kvmctl.c static. Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] patch5.patch Description: Binary data - This SF.net email is sponsored by DB2 Express Download DB2 Express C

[kvm-devel] [PATCH] return NULL instead of 0

2007-06-03 Thread Nguyen Anh Quynh
This patch makes kvm_get_msr_list() returns NULL rather than plain 0 in error cases. Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] patch6.patch Description: Binary data - This SF.net email is sponsored by DB2 Express

Re: [kvm-devel] [PATCH] use symbols rather than constant vars in kvm_create

2007-06-03 Thread Nguyen Anh Quynh
On 6/3/07, Avi Kivity [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: On 6/3/07, Avi Kivity [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: This patch replaces 2 constant variables dosmem and exmem in kvm_create() with symbols. What is the benefit of this? Readability

[kvm-devel] [PATCH] symbol instead of constant in kvm_show_code()

2007-06-03 Thread Nguyen Anh Quynh
This patch uses symbol rather than a constant in kvm_show_code(), so more readable :-) Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] patch7.patch Description: Binary data - This SF.net email is sponsored by DB2 Express

[kvm-devel] [PATCH] Use symbol insted of number

2007-06-01 Thread Nguyen Anh Quynh
This patch makes hypercall.c use symbol instead of number with hypercall-ioport-size. Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] patch2 Description: Binary data - This SF.net email is sponsored by DB2 Express

[kvm-devel] [PATCH] make some functions/vars static

2007-06-01 Thread Nguyen Anh Quynh
This patch turns some local functions and variables in hypercall.c static. Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] patch1 Description: Binary data - This SF.net email is sponsored by DB2 Express Download DB2

[kvm-devel] Clarify old version messages and clean-up

2007-05-07 Thread Nguyen Anh Quynh
This patch clarifies some old version error message, and deletes some unused functions in userspace code. Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] diffstat patch1.patch kvmctl.c | 36 +++- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git

[kvm-devel] [PATCH] install kvm modules into drivers/kvm

2007-05-07 Thread Nguyen Anh Quynh
for sometime because the old modules (which is available in 2.6.20) is not supported by the current libkvm. Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] # diffstat patch2.patch Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/Makefile b/kernel/Makefile index