[kvm-devel] [PATCH] janitorial: remove leftovers from merge conflict
apparently harmless and unique Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/Makefile.target |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/qemu/Makefile.target b/qemu/Makefile.target index cc66651..bb4b9a3 100644 --- a/qemu/Makefile.target +++ b/qemu/Makefile.target @@ -190,7 +190,6 @@ all: $(PROGS) # # cpu emulator library - HEAD:qemu/Makefile.target LIBOBJS=exec.o kqemu.o cpu-exec.o host-utils.o ifeq ($(NO_CPU_EMULATION), 1) -- 1.5.3.7 - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] Extboot Option ROM rewritten in C - v3
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 [EMAIL PROTECTED] +// +// This file may be distributed under the terms of the GNU GPLv3 license. IANAL but wouldn't this make extboot GPLv3 only? how that will interact with the GPLv2 extboot qemu? Carlo - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] qemu: avoid returning uninitialized value in apic_mem_readl
complement 64173d009c1f4d163c425b14aa650df5b982428a to avoid : kvm-65/qemu/hw/apic.c: In function `apic_mem_readl': kvm-65/qemu/hw/apic.c:592: warning: 'val' might be used uninitialized in this function Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/apic.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/hw/apic.c b/qemu/hw/apic.c index 4102493..b69ad75 100644 --- a/qemu/hw/apic.c +++ b/qemu/hw/apic.c @@ -616,6 +616,7 @@ static uint32_t apic_mem_readl(void *opaque, target_phys_addr_t addr) val = apic_get_ppr(s); break; case 0x0b: +val = 0; break; case 0x0d: val = s-log_dest 24; -- 1.5.3.7 - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 5/5] qemu: ARRAY_SIZE redefined
On Fri, Mar 28, 2008 at 10:04:21AM +0300, Avi Kivity wrote: Carlo Marcelo Arenas Belon wrote: qemu/qemu-kvm-x86.c:23:1: warning: ARRAY_SIZE redefined In file included from ../cpu-defs.h:30, from /var/tmp/portage/app-emulation/kvm-64/work/kvm-64/qemu/target-i386/cpu.h:45, from ../qemu-common.h:62, from /var/tmp/portage/app-emulation/kvm-64/work/kvm-64/qemu/hw/hw.h:5, from /var/tmp/portage/app-emulation/kvm-64/work/kvm-64/qemu/qemu-kvm-x86.c:13: ../osdep.h:30:1: warning: this is the location of the previous definition Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/qemu-kvm-x86.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c index 78490c5..ab91ff2 100644 --- a/qemu/qemu-kvm-x86.c +++ b/qemu/qemu-kvm-x86.c @@ -20,7 +20,9 @@ #define MSR_IA32_TSC0x10 +#ifndef ARRAY_SIZE #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) +#endif static struct kvm_msr_list *kvm_msr_list; extern unsigned int kvm_shadow_memory; Why note remove the definition completely, and #include osdep.h instead? that was my first choice as there is not even a need to include osdep.h as it is already included and the source for this conflict. but ARRAY_SIZE is also defined in qemu in a mips file (mips-dis.c) and therefore assumed its current state was transitional and having it redefined as a fallback was safer until consolidated correctly upstream. Carlo - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] qemu: use ARRAY_SIZE macro as provided by osdep.h
included through qemu-kvm.h - cpu.h - cpu-defs.h for all architectures and resulting otherwise in : qemu/qemu-kvm-x86.c:23:1: warning: ARRAY_SIZE redefined In file included from ../cpu-defs.h:30, from qemu/target-i386/cpu.h:45, from ../qemu-common.h:62, from qemu/hw/hw.h:5, from qemu/qemu-kvm-x86.c:13: ../osdep.h:30:1: warning: this is the location of the previous definition Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/qemu-kvm-x86.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c index 78490c5..35fb535 100644 --- a/qemu/qemu-kvm-x86.c +++ b/qemu/qemu-kvm-x86.c @@ -20,8 +20,6 @@ #define MSR_IA32_TSC 0x10 -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) - static struct kvm_msr_list *kvm_msr_list; extern unsigned int kvm_shadow_memory; extern kvm_context_t kvm_context; -- 1.5.3.7 - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] qemu: remove conflicting dependency to linux/pci.h
remove dependency to the pci linux headers added since c10bf6159ff24501852c91a342c3077d5388b184 and that was generating the following conflict : qemu/hw/cirrus_vga.c:193:1: warning: PCI_COMMAND_SERR redefined In file included from /usr/include/linux/pci.h:21, from qemu/hw/pci.h:6, from qemu/hw/cirrus_vga.c:31: /usr/include/linux/pci_regs.h:40:1: warning: this is the location of the previous definition Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/pci.h |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/qemu/hw/pci.h b/qemu/hw/pci.h index 036e914..60e4094 100644 --- a/qemu/hw/pci.h +++ b/qemu/hw/pci.h @@ -3,10 +3,12 @@ /* PCI includes legacy ISA access. */ #include isa.h -#include linux/pci.h -/* PCI bus */ +/* imported from linux/pci.h */ +#define PCI_SLOT(devfn) (((devfn) 3) 0x1f) +#define PCI_FUNC(devfn) ((devfn) 0x07) +/* PCI bus */ extern target_phys_addr_t pci_mem_base; typedef void PCIConfigWriteFunc(PCIDevice *pci_dev, -- 1.5.3.7 - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 0/5] trivial fixes to silence compilation warnings
The following series contains unrelated patches with fixes to compilation warnings added since kvm-63; because of redefined macros, undefined functions or mismatched pointer types. PATCH 1/5 : libkvm: missing declaration for kvm_disable_pit_creation PATCH 2/5 : qemu: cpu_model is a constant string PATCH 3/5 : qemu: model in NICInfo is a constant string PATCH 4/5 : qemu: PCI_COMMAND_SERR redefined PATCH 5/5 : qemu: ARRAY_SIZE redefined Carlo - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 5/5] qemu: ARRAY_SIZE redefined
qemu/qemu-kvm-x86.c:23:1: warning: ARRAY_SIZE redefined In file included from ../cpu-defs.h:30, from /var/tmp/portage/app-emulation/kvm-64/work/kvm-64/qemu/target-i386/cpu.h:45, from ../qemu-common.h:62, from /var/tmp/portage/app-emulation/kvm-64/work/kvm-64/qemu/hw/hw.h:5, from /var/tmp/portage/app-emulation/kvm-64/work/kvm-64/qemu/qemu-kvm-x86.c:13: ../osdep.h:30:1: warning: this is the location of the previous definition Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/qemu-kvm-x86.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c index 78490c5..ab91ff2 100644 --- a/qemu/qemu-kvm-x86.c +++ b/qemu/qemu-kvm-x86.c @@ -20,7 +20,9 @@ #define MSR_IA32_TSC 0x10 +#ifndef ARRAY_SIZE #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) +#endif static struct kvm_msr_list *kvm_msr_list; extern unsigned int kvm_shadow_memory; -- 1.5.3.7 - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] KVM-63 - ncurses
On Thu, Mar 06, 2008 at 12:32:58AM -0800, Alexey Eremenko wrote: I have a big problem with ncurses - once the VM enters Graphics Mode, it cannot be killed with start Linux command: ctrl+C - tried from KDE Konsole. It can be killed only using kill. using xterm over pekwm (which traps alt+2) I can use for that esc+2 qemu quit konsole probably works with the default key bindings for the qemu console under curses which is alt+2. Carlo - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] qemu: keep cpu_model as a constant string
Fixes : qemu/hw/pc.c: In function `pc_init1': qemu/hw/pc.c:1029: warning: passing arg 1 of `qemu_system_hot_add_init' discards qualifiers from pointer target type Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/acpi.c |4 ++-- qemu/sysemu.h |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu/hw/acpi.c b/qemu/hw/acpi.c index e44c8b5..a85efe7 100644 --- a/qemu/hw/acpi.c +++ b/qemu/hw/acpi.c @@ -614,9 +614,9 @@ static void gpe_writeb(void *opaque, uint32_t addr, uint32_t val) #endif } -static char *model; +static const char *model; -void qemu_system_hot_add_init(char *cpu_model) +void qemu_system_hot_add_init(const char *cpu_model) { register_ioport_write(GPE_BASE, 4, 1, gpe_writeb, gpe); register_ioport_read(GPE_BASE, 4, 1, gpe_readb, gpe); diff --git a/qemu/sysemu.h b/qemu/sysemu.h index 73c57ab..9388fe4 100644 --- a/qemu/sysemu.h +++ b/qemu/sysemu.h @@ -154,7 +154,7 @@ extern int drive_get_max_bus(BlockInterfaceType type); /* acpi */ void qemu_system_cpu_hot_add(int cpu, int state); -void qemu_system_hot_add_init(char *cpu_model); +void qemu_system_hot_add_init(const char *cpu_model); /* vmchannel devices */ -- 1.5.3.7 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] qemu: implicit precedence for logical operator in has_work
janitorial fix for : qemu/qemu-kvm.c: In function `has_work': qemu/qemu-kvm.c:140: warning: suggest parentheses around within || Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/qemu-kvm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index ffc59d5..4056453 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -137,7 +137,7 @@ extern int vm_running; static int has_work(CPUState *env) { -if (!vm_running || env vcpu_info[env-cpu_index].stopped) +if (!vm_running || (env vcpu_info[env-cpu_index].stopped)) return 0; if (!(env-hflags HF_HALTED_MASK)) return 1; -- 1.5.3.7 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [ANNOUNCE] kvm-61 release
On Tue, Feb 19, 2008 at 05:23:58PM +0200, Avi Kivity wrote: - e1000 pxe boot rom (Alexey Eremenko) what specific NIC/ROM type and version was added for kvm-61?, if the ROM came from ROM-o-matic version 5.4.3 (while all others are from 5.4.2) could that be spelled as well in qemu/pc-bios/README? Carlo - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH] kvm: testsuite: silence warnings on x86_64
On Thu, Jan 24, 2008 at 06:21:56PM +0200, Avi Kivity wrote: Bernhard Kaindl wrote: I did not test this patch as I did not find documentation on how to run the test cases and I could not find a make target to run them from make. make -C user test_cases user/kvmctl user/test/x86/bootstrap user/test/x86/access.flat (we should rename user - test) are you interested on patches for that? or does something else need to be done first? IMHO will be also a good idea to add a target in the Makefile so that building the tests will not be part of all and will be executed automatically when invoked with make check as it is is done usually. presume that at least to begin, running all *.flat tests could be a good starting point for this target? --- kvm-60/user/test/x86/access.c +++ kvm-60/user/test/x86/access.c 2008/01/24 15:14:16 @@ -1,6 +1,7 @@ #include smp.h #include printf.h +#include string.h #define true 1 #define false 0 @@ -569,7 +570,7 @@ int r; printf(starting test\n\n); -smp_init(ac_test_run); +smp_init((void (*)(void))ac_test_run); r = ac_test_run(); return r ? 0 : 1; } Better to add a wrapper that conforms to the expected signature, and makes sure the return value of ac_test_run() is not lost. this will require redefining smp_init as shown by : --- a/user/test/x86/lib/smp.h +++ b/user/test/x86/lib/smp.h @@ -5,7 +5,7 @@ struct spinlock { int v; }; -void smp_init(void (*smp_main)(void)); +void smp_init(int (*smp_main)(void)); int cpu_count(void); int smp_id(void); and will require also fixing the smp.flat test to build againg and to return a bool when executed (will send patches for doing both later if that is what you want) Haven't run access.flat on smp for a long while; the results should be interesting after the page fault scaling work. if you meant `kvmctl -s2` it doesn't seem to get pass the kvm device initialization inside kvmctl for kvm-60. Carlo - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 0/2] testsuite: fixes for smp compilation issues
The following series fixes the last remaining warning from the testsuite in x86 and together with it the make rules for building the other test case affected by this changes : PATCH 1/2 : make smp_init parameter be a function that returns int PATCH 2/2 : fix building smp.flat Tested in x86_64 without smp Carlo - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 1/2] testsuite: make smp_init parameter be a function that returns int
Fixes : test/x86/access.c:577: warning: passing argument 1 of 'smp_init' from incompatible pointer type Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- user/test/x86/lib/smp.c |4 ++-- user/test/x86/lib/smp.h |2 +- user/test/x86/smptest.c |3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/user/test/x86/lib/smp.c b/user/test/x86/lib/smp.c index a4cbe61..84ab163 100644 --- a/user/test/x86/lib/smp.c +++ b/user/test/x86/lib/smp.c @@ -125,7 +125,7 @@ void on_cpu(int cpu, void (*function)(void *data), void *data) spin_unlock(ipi_lock); } -static void (*smp_main_func)(void); +static int (*smp_main_func)(void); static volatile int smp_main_running; asm (smp_init_entry: \n @@ -133,7 +133,7 @@ asm (smp_init_entry: \n sti \n call *smp_main_func); -void smp_init(void (*smp_main)(void)) +void smp_init(int (*smp_main)(void)) { int i; void smp_init_entry(void); diff --git a/user/test/x86/lib/smp.h b/user/test/x86/lib/smp.h index bcf76a3..1ee0cb0 100644 --- a/user/test/x86/lib/smp.h +++ b/user/test/x86/lib/smp.h @@ -5,7 +5,7 @@ struct spinlock { int v; }; -void smp_init(void (*smp_main)(void)); +void smp_init(int (*smp_main)(void)); int cpu_count(void); int smp_id(void); diff --git a/user/test/x86/smptest.c b/user/test/x86/smptest.c index f6ef3e9..c16afd5 100644 --- a/user/test/x86/smptest.c +++ b/user/test/x86/smptest.c @@ -11,11 +11,12 @@ static void ipi_test(void *data) printf(but wrong cpu %d\n, smp_id()); } -static void smp_main(void) +static int smp_main(void) { printf(smp main %d\n, smp_id()); while (1) asm volatile (hlt : : : memory); +return 0; } int main() -- 1.5.3.7 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] bios: fix for parallel build (make -j2)
prevents reusing tmp.bin for both BIOS-bochs-legacy and BIOS-bochs-latest targets. committed upstream in revision 1.27 of Makefile.in to fix bug 1799877. patch applied as well to generated Makefile. Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- bios/Makefile|4 ++-- bios/Makefile.in |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bios/Makefile b/bios/Makefile index 0abc108..36e6248 100644 --- a/bios/Makefile +++ b/bios/Makefile @@ -75,9 +75,9 @@ BIOS-bochs-legacy: rombios.c apmbios.S biossums rombios.h $(GCC) $(BIOS_BUILD_DATE) -DLEGACY -E -P $ _rombiosl_.c $(BCC) -o rombiosl.s -C-c -D__i86__ -0 -S _rombiosl_.c sed -e 's/^\.text//' -e 's/^\.data//' rombiosl.s _rombiosl_.s - $(AS86) _rombiosl_.s -b tmp.bin -u- -w- -g -0 -j -O -l rombiosl.txt + $(AS86) _rombiosl_.s -b tmpl.bin -u- -w- -g -0 -j -O -l rombiosl.txt -perl ${srcdir}/makesym.perl rombiosl.txt rombiosl.sym - mv tmp.bin $@ + mv tmpl.bin $@ ./biossums $@ rm -f _rombiosl_.s diff --git a/bios/Makefile.in b/bios/Makefile.in index 3e332ae..9b153d3 100644 --- a/bios/Makefile.in +++ b/bios/Makefile.in @@ -74,9 +74,9 @@ BIOS-bochs-legacy: rombios.c apmbios.S biossums rombios.h $(GCC) $(BIOS_BUILD_DATE) -DLEGACY -E -P $ _rombiosl_.c $(BCC) -o rombiosl.s -C-c -D__i86__ -0 -S _rombiosl_.c sed -e 's/^\.text//' -e 's/^\.data//' rombiosl.s _rombiosl_.s - $(AS86) _rombiosl_.s -b tmp.bin -u- -w- -g -0 -j -O -l rombiosl.txt + $(AS86) _rombiosl_.s -b tmpl.bin -u- -w- -g -0 -j -O -l rombiosl.txt -perl ${srcdir}/makesym.perl rombiosl.txt rombiosl.sym - mv tmp.bin $@ + mv tmpl.bin $@ ./biossums $@ @RMCOMMAND@ _rombiosl_.s -- 1.5.3.7 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [RFC][PATCH 0/2]In-kernel PIT model
On Mon, Jan 21, 2008 at 05:18:21PM +0800, Yang, Sheng wrote: The patch works well on IA32e host(passed 2.6.22, 2.6.20, 2.6.18, 2.6.16 with hpet=disable, 2.6.9 with clock=pit), slightly off-topic but how you got around on building KVM and loading it with the undefined symbols from hpet (hrtimer_{cancel,start,init}) and smp (cpu_online_map) with 2.6.18? or you patched and enabled it statically into the kernel? Carlo - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH] qemu: fix some warnings
On Mon, Jan 21, 2008 at 01:46:11PM +0100, Jan Kiszka wrote: Here are 4 more warnings fixes (actually, I should sent 2 of them to qemu...). Nothing critical, just less noise during compilation. probably a good idea having them in independent patches as they are unrelated (other by the fact that they are all warnings in current git). Index: b/qemu/vl.c === --- a/qemu/vl.c +++ b/qemu/vl.c @@ -8862,7 +8862,7 @@ int main(int argc, char **argv) if (ram_size = 0) help(1); if (ram_size PHYS_RAM_MAX_SIZE) { -fprintf(stderr, qemu: at most %d MB RAM can be simulated\n, +fprintf(stderr, qemu: at most %llu MB RAM can be simulated\n, PHYS_RAM_MAX_SIZE / (1024 * 1024)); using TARGET_FMT_lu instead of %llu would seem more appropriate here because this is meant to reflect a physical memory address, but then the fact that kvm is using the x64_64 target also for 32 bit will mean that the definition of PHYS_RAM_MAX_SIZE has to be made somehow also HOST specific. for my take on that (which will need to be updated with your version of the exec.c changes and re-tested) look at : http://tapir.sajinet.com.pe/gentoo/portage/app-emulation/kvm/files/kvm-51-qemu-ramaddr.patch Carlo - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 1/2] Revert kvm: qemu: GET_CONFIGURATION fixes to allow OpenSolaris CD-ROM access
This reverts commit b64c20519d5826875679b6df85afebed27e1a9a8. Conflicts: qemu/hw/ide.c (keep uint64_t total_sectors) Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/ide.c | 27 --- 1 files changed, 8 insertions(+), 19 deletions(-) diff --git a/qemu/hw/ide.c b/qemu/hw/ide.c index 90f2f2b..9a22db9 100644 --- a/qemu/hw/ide.c +++ b/qemu/hw/ide.c @@ -1640,7 +1640,6 @@ static void ide_atapi_cmd(IDEState *s) break; case GPCMD_GET_CONFIGURATION: { -uint32_t len; uint64_t total_sectors; /* only feature 0 is supported */ @@ -1649,27 +1648,17 @@ static void ide_atapi_cmd(IDEState *s) ASC_INV_FIELD_IN_CMD_PACKET); break; } -max_len = ube16_to_cpu(packet + 7); -bdrv_get_geometry(s-bs, total_sectors); memset(buf, 0, 32); -if (total_sectors) { -if (total_sectors 1433600) { -buf[7] = 0x10; /* DVD-ROM */ -} else { -buf[7] = 0x08; /* CD-ROM */ -} -} else { -buf[7] = 0x00; /* no current profile */ -} -buf[10] = 0x02 | 0x01; /* persistent and current */ -buf[11] = 0x08; /* size of profile list = 4 bytes per profile */ +bdrv_get_geometry(s-bs, total_sectors); +buf[3] = 16; +buf[7] = total_sectors = 1433600 ? 0x08 : 0x10; /* current profile */ +buf[10] = 0x10 | 0x1; +buf[11] = 0x08; /* size of profile list */ buf[13] = 0x10; /* DVD-ROM profile */ -buf[14] = buf[13] == buf[7]; /* (in)active */ +buf[14] = buf[7] == 0x10; /* (in)active */ buf[17] = 0x08; /* CD-ROM profile */ -buf[18] = buf[17] == buf[7]; /* (in)active */ -len = 8 + 4 + buf[11]; /* headers + size of profile list */ -cpu_to_ube32(buf, len - 4); /* data length */ -ide_atapi_cmd_reply(s, len, max_len); +buf[18] = buf[7] == 0x08; /* (in)active */ +ide_atapi_cmd_reply(s, 32, 32); break; } default: -- 1.5.3.7 - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 2/2] qemu: Multi-profile DVD-ROM support
This is version 2.2 of the original patch proposed to fix the MMC6 command for GET CONFIGURATION for multi profile CD/DVD support and that was originally committed as b64c20519d5826875679b6df85afebed27e1a9a8 cvs -q diff -up -r1.79 -r1.80 hw/ide.c Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/ide.c | 123 +++-- 1 files changed, 110 insertions(+), 13 deletions(-) diff --git a/qemu/hw/ide.c b/qemu/hw/ide.c index 9a22db9..54496c2 100644 --- a/qemu/hw/ide.c +++ b/qemu/hw/ide.c @@ -1,5 +1,5 @@ /* - * QEMU IDE disk and CD-ROM Emulator + * QEMU IDE disk and CD/DVD-ROM Emulator * * Copyright (c) 2003 Fabrice Bellard * Copyright (c) 2006 Openedhand Ltd. @@ -284,6 +284,58 @@ * of MODE_SENSE_POWER_PAGE */ #define GPMODE_CDROM_PAGE 0x0d +/* + * Based on values from linux/cdrom.h but extending CD_MINS + * to the maximum common size allowed by the Orange's Book ATIP + * + * 90 and 99 min CDs are also available but using them as the + * upper limit reduces the effectiveness of the heuristic to + * detect DVDs burned to less than 25% of their maximum capacity + */ + +/* Some generally useful CD-ROM information */ +#define CD_MINS 80 /* max. minutes per CD */ +#define CD_SECS 60 /* seconds per minute */ +#define CD_FRAMES 75 /* frames per second */ +#define CD_FRAMESIZE2048 /* bytes per frame, cooked mode */ +#define CD_MAX_BYTES (CD_MINS * CD_SECS * CD_FRAMES * CD_FRAMESIZE) +#define CD_MAX_SECTORS (CD_MAX_BYTES / 512) + +/* + * The MMC values are not IDE specific and might need to be moved + * to a common header if they are also needed for the SCSI emulation + */ + +/* Profile list from MMC-6 revision 1 table 91 */ +#define MMC_PROFILE_NONE0x +#define MMC_PROFILE_CD_ROM 0x0008 +#define MMC_PROFILE_CD_R0x0009 +#define MMC_PROFILE_CD_RW 0x000A +#define MMC_PROFILE_DVD_ROM 0x0010 +#define MMC_PROFILE_DVD_R_SR0x0011 +#define MMC_PROFILE_DVD_RAM 0x0012 +#define MMC_PROFILE_DVD_RW_RO 0x0013 +#define MMC_PROFILE_DVD_RW_SR 0x0014 +#define MMC_PROFILE_DVD_R_DL_SR 0x0015 +#define MMC_PROFILE_DVD_R_DL_JR 0x0016 +#define MMC_PROFILE_DVD_RW_DL 0x0017 +#define MMC_PROFILE_DVD_DDR 0x0018 +#define MMC_PROFILE_DVD_PLUS_RW 0x001A +#define MMC_PROFILE_DVD_PLUS_R 0x001B +#define MMC_PROFILE_DVD_PLUS_RW_DL 0x002A +#define MMC_PROFILE_DVD_PLUS_R_DL 0x002B +#define MMC_PROFILE_BD_ROM 0x0040 +#define MMC_PROFILE_BD_R_SRM0x0041 +#define MMC_PROFILE_BD_R_RRM0x0042 +#define MMC_PROFILE_BD_RE 0x0043 +#define MMC_PROFILE_HDDVD_ROM 0x0050 +#define MMC_PROFILE_HDDVD_R 0x0051 +#define MMC_PROFILE_HDDVD_RAM 0x0052 +#define MMC_PROFILE_HDDVD_RW0x0053 +#define MMC_PROFILE_HDDVD_R_DL 0x0058 +#define MMC_PROFILE_HDDVD_RW_DL 0x005A +#define MMC_PROFILE_INVALID 0x + #define ATAPI_INT_REASON_CD 0x01 /* 0 = data transfer */ #define ATAPI_INT_REASON_IO 0x02 /* 1 = transfer to the host */ #define ATAPI_INT_REASON_REL0x04 @@ -1290,6 +1342,22 @@ static void ide_atapi_cmd_read(IDEState *s, int lba, int nb_sectors, } } +static inline uint8_t ide_atapi_set_profile(uint8_t *buf, uint8_t *index, +uint16_t profile) +{ +uint8_t *buf_profile = buf + 12; /* start of profiles */ + +buf_profile += ((*index) * 4); /* start of indexed profile */ +cpu_to_ube16 (buf_profile, profile); +buf_profile[2] = ((buf_profile[0] == buf[6]) (buf_profile[1] == buf[7])); + +/* each profile adds 4 bytes to the response */ +(*index)++; +buf[11] += 4; /* Additional Length */ + +return 4; +} + static void ide_atapi_cmd(IDEState *s) { const uint8_t *packet; @@ -1640,7 +1708,7 @@ static void ide_atapi_cmd(IDEState *s) break; case GPCMD_GET_CONFIGURATION: { -uint64_t total_sectors; +uint32_t len; /* only feature 0 is supported */ if (packet[2] != 0 || packet[3] != 0) { @@ -1648,17 +1716,46 @@ static void ide_atapi_cmd(IDEState *s) ASC_INV_FIELD_IN_CMD_PACKET); break; } -memset(buf, 0, 32); -bdrv_get_geometry(s-bs, total_sectors); -buf[3] = 16; -buf[7] = total_sectors = 1433600 ? 0x08 : 0x10; /* current profile */ -buf[10] = 0x10 | 0x1; -buf[11] = 0x08; /* size of profile list */ -buf[13] = 0x10; /* DVD-ROM profile */ -buf[14] = buf[7] == 0x10; /* (in)active */ -buf[17] = 0x08; /* CD-ROM profile */ -buf[18
Re: [kvm-devel] boot stops after console handover?
On Sat, Jan 12, 2008 at 11:01:28PM +0200, Avi Kivity wrote: Antoine Martin wrote: FYI, just tried building 2.6.24-rc7-git4 and got this warning: (...) LD vmlinux.o MODPOST vmlinux.o WARNING: vmlinux.o(.text+0x2cb657): Section mismatch: reference to .init.text:register_cpu_notifier (between 'kvm_init_x86' and 'kvm_sched_in') WARNING: vmlinux.o(.text.head+0xe4): Section mismatch: reference to .init.data.2:trampoline_level4_pgt (between 'ident_complete' and 'secondary_startup_64') WARNING: vmlinux.o(.text.head+0xeb): Section mismatch: reference to .init.data.2:trampoline_level4_pgt (between 'ident_complete' and 'secondary_startup_64') LD vmlinux Probably harmless, but worth reporting to lkml. couldn't replicate it here, but I'd seen usually those kind of errors when building a kernel that hasn't been mrproper between re-configurations Carlo - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] boot stops after console handover?
On Sun, Jan 13, 2008 at 01:19:13AM +, Antoine Martin wrote: Carlo Marcelo Arenas Belon wrote: On Sat, Jan 12, 2008 at 11:01:28PM +0200, Avi Kivity wrote: Antoine Martin wrote: FYI, just tried building 2.6.24-rc7-git4 and got this warning: (...) Probably harmless, but worth reporting to lkml. couldn't replicate it here, but I'd seen usually those kind of errors when building a kernel that hasn't been mrproper between re-configurations cp .config ../config-2.6.24-rc7-git4 make mrproper cp ../config-2.6.24-rc7-git4 .config make oldconfig # presumed make -j 4 replicated with your configuration, but can't still reproduce it with mine even when forcing as you do CONFIG_KVM=y CONFIG_KVM_INTEL=y available from : http://tapir.sajinet.com.pe/kvm/config-2.6.24-rc7-git4 (...) MODPOST vmlinux.o WARNING: vmlinux.o(.text+0x2cb657): Section mismatch: reference to .init.text:register_cpu_notifier (between 'kvm_init_x86' and 'kvm_sched_in') WARNING: vmlinux.o(.text.head+0xe4): Section mismatch: reference to .init.data.2:trampoline_level4_pgt (between 'ident_complete' and 'secondary_startup_64') WARNING: vmlinux.o(.text.head+0xeb): Section mismatch: reference to .init.data.2:trampoline_level4_pgt (between 'ident_complete' and 'secondary_startup_64') LD vmlinux SYSMAP System.map SYSMAP .tmp_System.map You can grab the .config here: http://194.145.196.85/kvm/config-2.6.24-rc7-git4 is this the configuration for the host kernel? if you want to use the last code for kvm you should have CONFIG_KVM disabled and instead use the external module as instructed in (HINT: you don't have a patched kernel) : http://kvm.qumranet.com/kvmwiki/HOWTO1 not sure which version will be part of 2.6.24 but I suspect it might not be kvm 59. Carlo - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] boot stops after console handover?
On Sat, Jan 12, 2008 at 06:07:19PM +, Antoine Martin wrote: If that doesn't work, maybe you can upload an image for me to debug. http://194.145.196.85/kvm/vmlinuz-2.6.24-rc7.bz2 Any luck? Any other ideas for me to try? see if the problem goes away with -no-kvm-irqchip and using nolapic in the guest kernel if that doesn't fix it, use the last kvm code as an external module Carlo - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] boot stops after console handover?
On Mon, Jan 07, 2008 at 07:30:44PM +, Antoine Martin wrote: Avi Kivity wrote: Antoine Martin wrote: Hi, Trying to boot KVM on a Core2Duo system, kvm-59 + linux-2.6.23.12 Booting with: qemu-system-x86_64 -hda /home/uml/BusyBox-1.5.0-amd64-root_fs -m 384 - -nographic -cpu qemu64 -kernel /boot/vmlinuz-2.6.23.12 -append earlyprintk=serial,ttyS0,115200 Does regular boot (without -kernel) work? Nope, it's just spinning at 100% cpu, tried stock 2.6.23.12 and 2.6.24-rc6, lots of clock_gettime(CLOCK_MONOTONIC,... this is a big guess as I have no way to test it or know the internals well enough to come with an authoritative answer, but I remember having a similar problem once which was fixed by using the kernel option nolapic Do I need to enable/disable some RTC / HPET options? there used to be a bug about it before which was closed by the reported even though I was able to reproduce it after all (haven't looked since) and it was related to the use of CONFIG_HPET_EMULATE_RTC=y in the guest kernel. sorry for not giving you any hard evidence, but I am just going from memory here and though I would mention it just in case it could help. Carlo - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 02/33] KVM: MMU: emulated cmpxchg8b should be atomic on i386
On Sun, Jan 06, 2008 at 04:39:08PM +0200, Avi Kivity wrote: From: Marcelo Tosatti [EMAIL PROTECTED] Emulate cmpxchg8b atomically on i386. This is required to avoid a guest pte walker from seeing a splitted write. [avi: make it compile] Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- This one doesn't look like the one in the current tree, and avoids the reuse of addr by moving the call to get the gpa up instead of renaming the variable as propossed in : http://article.gmane.org/gmane.comp.emulators.kvm.devel/11511 IMHO renaming the parameter variable is probably better in the long run, as it could result otherwise into scope related bugs like the one from kvm-59 diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c index 9db4e32..3b79684 100644 --- a/drivers/kvm/x86.c +++ b/drivers/kvm/x86.c @@ -1674,6 +1675,31 @@ static int emulator_cmpxchg_emulated(unsigned long addr, reported = 1; printk(KERN_WARNING kvm: emulating exchange as write\n); } +#ifndef CONFIG_X86_64 + /* guests cmpxchg8b have to be emulated atomically */ + if (bytes == 8) { + gpa_t gpa = vcpu-mmu.gva_to_gpa(vcpu, addr); + struct page *page; + char *addr; + u64 val; + + if (gpa == UNMAPPED_GVA || +(gpa PAGE_MASK) == APIC_DEFAULT_PHYS_BASE) + goto emul_write; + + if (((gpa + bytes - 1) PAGE_MASK) != (gpa PAGE_MASK)) + goto emul_write; + + val = *(u64 *)new; + page = gfn_to_page(vcpu-kvm, gpa PAGE_SHIFT); + addr = kmap_atomic(page, KM_USER0); + set_64bit((u64 *)(addr + offset_in_page(gpa)), val); + kunmap_atomic(addr, KM_USER0); + kvm_release_page_dirty(page); + } +emul_write: +#endif + return emulator_write_emulated(addr, new, bytes, vcpu); } -- 1.5.3.7 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] vgabios: include string.h in biossums.c for memset declaration
Fixes : biossums.c: In function 'main': biossums.c:62: warning: incompatible implicit declaration of built-in function 'memset Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- vgabios/biossums.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vgabios/biossums.c b/vgabios/biossums.c index 5014efc..b0378fb 100644 --- a/vgabios/biossums.c +++ b/vgabios/biossums.c @@ -17,6 +17,7 @@ */ #include stdlib.h #include stdio.h +#include string.h typedef unsigned char byte; -- 1.5.3.7 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH] kvm/qemu: Fix ia64 build broken.
On Sun, Jan 06, 2008 at 02:06:00AM +0100, Miklos Vajna wrote: On Jan 01, 2007, Zhang, Xiantao wrote: Thank you for reporting this issue. I will fix it later. libqemu.a(kvm-tpr-opt.o): In function `enable_vapic': /house/cmarenas/kvm-58/qemu/kvm-tpr-opt.c:221: undefined reference to `kvm_enable_vapic' i still get this on i686 using kvm-59. (log at http://frugalware.org/~vmiklos/logs/kvm-59-1-i686.log) there has to be something wrong with your build system as from the log it seems you are using -I /include which most likely doesn't exist is this a known issue? only for ia64 Carlo - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] qemu: use statically allocate 512 byte buffer in the stack for sector in bdrv_commit
revert a merge conflict from 075da586c92f09bd9a7401f1e80d72fde27c173 that redefined sector as an array of pointers to char, instead of a statically allocated buffer of chars, that was triggering the following warnings : block.c: In function `bdrv_commit': block.c:480: warning: passing arg 3 of `bdrv_read' from incompatible pointer type block.c:484: warning: passing arg 3 of `bdrv_write' from incompatible pointer type Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/block.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu/block.c b/qemu/block.c index 519be24..492a4d3 100644 --- a/qemu/block.c +++ b/qemu/block.c @@ -460,7 +460,7 @@ int bdrv_commit(BlockDriverState *bs) BlockDriver *drv = bs-drv; int64_t i, total_sectors; int n, j; -unsigned char *sector[512]; +unsigned char sector[512]; if (!drv) return -ENOMEDIUM; -- 1.5.3.7 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] MMU: fix cmpxchg8b emulation on i386 to use the right address
change the function parameter to use vaddr instead of addr to avoid a variable name redefinition from 9a5ee611ca79bec98e9d97e93f11df8083b8af6e that resulted in : kernel/x86.c:1746: warning: passing argument 2 of 'vcpu-arch.mmu.gva_to_gpa' makes integer from pointer without a cast kernel/x86.c:1746: warning: 'addr' is used uninitialized in this function Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- arch/x86/kvm/x86.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index c5b4825..abe08d1 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1722,7 +1722,7 @@ int emulator_write_emulated(unsigned long addr, } EXPORT_SYMBOL_GPL(emulator_write_emulated); -static int emulator_cmpxchg_emulated(unsigned long addr, +static int emulator_cmpxchg_emulated(unsigned long vaddr, const void *old, const void *new, unsigned int bytes, @@ -1743,7 +1743,7 @@ static int emulator_cmpxchg_emulated(unsigned long addr, u64 val; down_read(current-mm-mmap_sem); - gpa = vcpu-arch.mmu.gva_to_gpa(vcpu, addr); + gpa = vcpu-arch.mmu.gva_to_gpa(vcpu, vaddr); if (gpa == UNMAPPED_GVA || (gpa PAGE_MASK) == APIC_DEFAULT_PHYS_BASE) @@ -1763,7 +1763,7 @@ static int emulator_cmpxchg_emulated(unsigned long addr, } #endif - return emulator_write_emulated(addr, new, bytes, vcpu); + return emulator_write_emulated(vaddr, new, bytes, vcpu); } static unsigned long get_segment_base(struct kvm_vcpu *vcpu, int seg) -- 1.5.3.7 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH] MMU: fix cmpxchg8b emulation on i386 to use the right address
On Fri, Jan 04, 2008 at 12:57:49AM -0600, Carlo Marcelo Arenas Belon wrote: change the function parameter to use vaddr instead of addr to avoid a variable name redefinition from 9a5ee611ca79bec98e9d97e93f11df8083b8af6e this implementation has been already patched 6 times (not including this one) since it was originally introduced in Dec 12, including compilation and logic fixes as can be seen by : 24a673eb377069509e8dad5ff7fa146e363df739 eb9270cee7061e5a985eb9eac559270292b1d7ec a5e8e8a4f7ddb211d856eb30e93e70af9d51b735 d5855a0ec163afd591f272e13e1f2c366794306f 9bfdd08f0a65e67d0842ca35516669bec523fbe0 91051a4955255317cab0d09d8849ec12db85f924 it was meant to fix some sort of bug on i386 because it wasn't atomic but with so many changes I am not sure if what it was meant to do has been really preserved, so I think it would be better if anyone with more experience and a better understanding of this patch could sheed some light on this. Carlo - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] vgabios and other guest related firmware
On Wed, Jan 02, 2008 at 04:14:53PM +0800, Zhang, Xiantao wrote: Carlo Marcelo Arenas Belon wrote: I'll let the specifics to all the portability interested parties (I mostly use PC) but would suspect something similar to the work done for the code should be most likely what is needed : firmware -- x86 -- bios | |- vgabios |- ia64 Good idea! this was meant to be for the source files of the firmware that is needed for each guest architecture, just like is being done now for x86 (both i386 and x86_64) with bios and vgabios. for ia64 it will most likely include the opensource EFI firmware imported and plus any needed patches to make it work perfectly with kvm. We also need to upload the ia64 firmware for kvm, and make it available for users use. At least, we need to provide the binary. beware that actually providing the binary without sources might be a problem for some distributions (like debian and derivatives like ubuntu). most likely getting the sources and a makefile which could be used to build the binary and copy it to the qemu/pc-bios/ directory, at release time or when the sources had been changed and it needs to be rebuilt, and for convenience so it can be distributed with the release tar.gz will be preferred. for hints on how to get that look at the Makefiles in the bios or vgabios top level directories and the top level Makefile BTW, current ia64 binary has 2M size, is it OK to upload it to kvm-source tree ? if you are talking about the binary only, EFI BIOS from Intel, then it could be problematic (because of the free software guidelines of some distributions) and of course will need to have also some sort of README file clearly specifying that the license allows for re-distribution and can be used at least together with kvm (like the ELPIN vga bios was licensed for BOCHS) IMHO is probably better to use only the GPL version with sources and distribute that with kvm source packages and let the users or distributions to manage the distribution/installation of BLOBs otherwise as that keeps the lawyers from distracting us from the interesting technical issues. Carlo - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] vgabios and other guest related firmware
On Wed, Jan 02, 2008 at 05:46:04PM +0800, Zhang, Xiantao wrote: Avi Kivity wrote: Carlo Marcelo Arenas Belon wrote: We also need to upload the ia64 firmware for kvm, and make it available for users use. At least, we need to provide the binary. beware that actually providing the binary without sources might be a problem for some distributions (like debian and derivatives like ubuntu). most likely getting the sources and a makefile which could be used to build the binary and copy it to the qemu/pc-bios/ directory, at release time or when the sources had been changed and it needs to be rebuilt, and for convenience so it can be distributed with the release tar.gz will be preferred. for hints on how to get that look at the Makefiles in the bios or vgabios top level directories and the top level Makefile Note that we ship x86 binaries for two reasons: - qemu does it that way, and we inherited it, before the need arose to make modifications - obscure tools are needed to build the binaries (iasl and dev86) Since ia64 doesn't have these issues (is that right?) then we can probably do a source-only release. Ia64 firmware build need edk tools(very big package), and very hard to setup the environment correclty. And it is not friendly to users :( you wouldn't expect users to rebuild the firmware, but distributions or the providers of the binaries and that have the environment needed, because they are also the ones working with the sources. are you referring to this edk? https://edk.tianocore.org/ Maybe binary is also needed. Just because the binary is very difficult to make, shouldn't prevent importing the sources if they are available under a compatible opensource license and they had been modified to work with KVM. of course it should preclude the build to try to generate the binary by default just like it does now for bios and vgabios, so that final users that don't care can just use the already generated binaries for convenience. if the binary hasn't been modified and corresponds to some known release which is publicly available and is licensed for public redistribution in a way that is compatible with kvm's licenses then it could be imported. but even in that case would be probably better to let the distributors or users to handle that for themselves and avoid all the legalese IMHO. Carlo - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 0/5] configure passthrough for qemu
The following patch series implement a configure passthrough for qemu so that all available configure options in qemu can be used through kvm. This includes all suggestions from the 3 first RFC and complements the patches that were needed from qemu's side and that were brought back through the last imports. It reverts (in some cases partially) the patches needed to implement the --enable-alsa, --disable-vnc-tls and --disable-gcc-check flags but reimports them from qemu's configure usage and reimplements them through the generic passthrough. Patch 1/5 : Revert kvm: configure: qemu vnc-tls configure flag Patch 2/5 : Revert kvm: configure: qemu alsa configure option Patch 3/5 : Revert kvm: configure: support --disable-gcc-check Patch 4/5 : configure: use passthrough for all unknown options into qemu Patch 5/5 : configure: use kvm's configure usage for unknown options Carlo - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 1/5] Revert kvm: configure: qemu vnc-tls configure flag
This reverts commit 49f7f1a96dce9d059d2d51d450c9d4bdd529c8fd. --- configure |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/configure b/configure index dadda8e..715e12f 100755 --- a/configure +++ b/configure @@ -7,7 +7,6 @@ qemu_cc= qemu_cflags= qemu_ldflags= enable_alsa= -disable_vnc_tls= disable_gcc_check= cross_prefix= arch=`uname -m` @@ -27,7 +26,6 @@ usage() { --qemu-cflags=CFLAGS CFLAGS to add to qemu configuration --qemu-ldflags=LDFLAGS LDFLAGS to add to qemu configuration --enable-alsa enable alsa support for qemu - --disable-vnc-tls disable vnc tls support for qemu --disable-gcc-checkdon't insist on gcc-3.x CAUTION: this will break running without kvm EOF @@ -63,9 +61,6 @@ while [[ $1 = -* ]]; do --enable-alsa) enable_alsa=1 ;; - --disable-vnc-tls) - disable_vnc_tls=1 - ;; --disable-gcc-check) disable_gcc_check=1 ;; @@ -118,7 +113,6 @@ fi --extra-ldflags=-L $PWD/../libkvm $qemu_ldflags \ --enable-kvm --kernel-path=$libkvm_kerneldir \ ${enable_alsa:+--enable-alsa} \ -${disable_vnc_tls:+--disable-vnc-tls} \ ${disable_gcc_check:+--disable-gcc-check} \ --prefix=$prefix \ ${qemu_cc:+--cc=$qemu_cc} \ -- 1.5.3.7 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 2/5] Revert kvm: configure: qemu alsa configure option
This reverts commit d3bcc58f74b29df8496933c441640d9c739ba674. Conflicts: configure (remove hardcoded alsa flag but keep qemu_opts) Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- configure |9 ++--- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 715e12f..422c47e 100755 --- a/configure +++ b/configure @@ -6,7 +6,7 @@ want_module=1 qemu_cc= qemu_cflags= qemu_ldflags= -enable_alsa= +qemu_opts= disable_gcc_check= cross_prefix= arch=`uname -m` @@ -25,7 +25,6 @@ usage() { --qemu-cc=CC specify compiler for qemu (must be gcc-3.x) --qemu-cflags=CFLAGS CFLAGS to add to qemu configuration --qemu-ldflags=LDFLAGS LDFLAGS to add to qemu configuration - --enable-alsa enable alsa support for qemu --disable-gcc-checkdon't insist on gcc-3.x CAUTION: this will break running without kvm EOF @@ -58,9 +57,6 @@ while [[ $1 = -* ]]; do --qemu-ldflags) qemu_ldflags=$arg ;; - --enable-alsa) - enable_alsa=1 - ;; --disable-gcc-check) disable_gcc_check=1 ;; @@ -112,12 +108,11 @@ fi --extra-cflags=-I $PWD/../libkvm $qemu_cflags \ --extra-ldflags=-L $PWD/../libkvm $qemu_ldflags \ --enable-kvm --kernel-path=$libkvm_kerneldir \ -${enable_alsa:+--enable-alsa} \ ${disable_gcc_check:+--disable-gcc-check} \ --prefix=$prefix \ ${qemu_cc:+--cc=$qemu_cc} \ ${cross_prefix:+--cross-prefix=$cross_prefix} \ -${cross_prefix:+--cpu=$arch} +${cross_prefix:+--cpu=$arch} $qemu_opts ) -- 1.5.3.7 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 3/5] Revert kvm: configure: support --disable-gcc-check
This reverts commit 0d354fe9d8eaee1b3abc9dee7824021edb9f4976. Conflicts: configure (keep --disable-gcc-check usage) Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- configure |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 422c47e..50a0e90 100755 --- a/configure +++ b/configure @@ -7,7 +7,6 @@ qemu_cc= qemu_cflags= qemu_ldflags= qemu_opts= -disable_gcc_check= cross_prefix= arch=`uname -m` target_exec= @@ -57,9 +56,6 @@ while [[ $1 = -* ]]; do --qemu-ldflags) qemu_ldflags=$arg ;; - --disable-gcc-check) - disable_gcc_check=1 - ;; --arch) arch=$arg ;; @@ -108,7 +104,6 @@ fi --extra-cflags=-I $PWD/../libkvm $qemu_cflags \ --extra-ldflags=-L $PWD/../libkvm $qemu_ldflags \ --enable-kvm --kernel-path=$libkvm_kerneldir \ -${disable_gcc_check:+--disable-gcc-check} \ --prefix=$prefix \ ${qemu_cc:+--cc=$qemu_cc} \ ${cross_prefix:+--cross-prefix=$cross_prefix} \ -- 1.5.3.7 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 4/5] configure: use passthrough for all unknown options into qemu
uses qemu to generate a hopefully complete usage in case of error Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- configure | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/configure b/configure index 50a0e90..0464456 100755 --- a/configure +++ b/configure @@ -24,9 +24,17 @@ usage() { --qemu-cc=CC specify compiler for qemu (must be gcc-3.x) --qemu-cflags=CFLAGS CFLAGS to add to qemu configuration --qemu-ldflags=LDFLAGS LDFLAGS to add to qemu configuration + + Any additional option is given to qemu's configure verbatim; including: + --disable-gcc-checkdon't insist on gcc-3.x CAUTION: this will break running without kvm EOF +cd qemu +./configure --help | egrep enable-|disable- \ + | grep -v user | grep -v system | grep -v kqemu | grep -v kvm \ + | sed -e s/^ //g \ + | sed -es/ enable/enable/g | sed -e s/ disable/disable/g exit 1 } @@ -66,7 +74,7 @@ while [[ $1 = -* ]]; do usage ;; *) - usage + qemu_opts=$qemu_opts $opt ;; esac done -- 1.5.3.7 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH] kvm/qemu: Fix ia64 build broken.
On Tue, Jan 01, 2008 at 06:37:23PM +0200, Avi Kivity wrote: Carlo Marcelo Arenas Belon wrote: if nothing is available hp's testdrive have some itanium systems that could be used at least to validate the userspace part builds (as I did) : http://www.testdrive.hp.com/systems/itanium.shtml I signed up for an account, but they don't allow ssh access (only telnet), and no outgoing connections, so it's impossible to use git or rsync with this thing. telnet in, and ftp in a snapshot tar (one that has all the files chown to root to avoid username lookups in their NIS environment) worked for me. Carlo - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH] kvm/qemu: Fix ia64 build broken.
On Fri, Dec 21, 2007 at 10:58:23PM +0800, Zhang, Xiantao wrote: Due to last merge with Qemu upstream, some interfaces are changed, and leads to build fail kvm-58 as released doesn't build in ia64 either because of the tpr/vapic changes that were done at release date as shown by : gcc -Wl,-G0 -Wl,-T,/house/cmarenas/kvm-58/qemu/ia64.ld -L /house/cmarenas/kvm-58/qemu/../libkvm -g -o qemu-system-ia64 vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o migration.o block-raw-posix.o lsi53c895a.o usb-ohci.o eeprom93xx.o eepro100.o ne2000.o pcnet.o rtl8139.o hypercall.o ide.o pckbd.o ps2.o vga.o sb16.o es1370.o dma.o fdc.o mc146818rtc.o serial.o i8259.o ipf.o cirrus_vga.o parallel.o acpi.o piix_pci.o usb-uhci.o /house/cmarenas/kvm-58/qemu/smbus_eeprom.o ../libqemu_common.a libqemu.a /house/cmarenas/kvm-58/qemu/../libkvm/libkvm.a -lm -lz -lkvm -lrt -lpthread -lutil libqemu.a(kvm-tpr-opt.o): In function `kvm_tpr_opt_setup': /house/cmarenas/kvm-58/qemu/kvm-tpr-opt.c:287: undefined reference to `kvm_enable_tpr_access_reporting' libqemu.a(kvm-tpr-opt.o): In function `enable_vapic': /house/cmarenas/kvm-58/qemu/kvm-tpr-opt.c:221: undefined reference to `kvm_enable_vapic' Xiantao, are there any plans to merge into qemu all changes required to get host/guest support for ia64?, if for nothing else that could help with problems due to qemu merges. Avi, how would you like patches to fix build issues in ia64 to be handled?, should be expected that kvm releases build for ia64? is there any system that could be used as part of a compile farm / testing for ia64? if nothing is available hp's testdrive have some itanium systems that could be used at least to validate the userspace part builds (as I did) : http://www.testdrive.hp.com/systems/itanium.shtml Carlo PS. there are more warnings and other issues in that build that the ones shown above. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] libkvm: fix mungled default case for switch in kvm_arch_run
This patch corrects 03f1b5e137e7e4c8dd51dbaea6779be853f4fde0, that modified the logic behind kvm_arch_run because of a mangled endif which accidentally included the default entry for the switch. kvm_arch_run as defined in 4f19bdea03330641fd48514ea84d1ed1bf431507 was affected by returning 0 by default instead of 1 and reporting the following warning at compile time : libkvm-x86.c:201:9: warning: extra tokens at end of #endif directive Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- libkvm/libkvm-x86.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/libkvm/libkvm-x86.c b/libkvm/libkvm-x86.c index e6eb66e..2fa8146 100644 --- a/libkvm/libkvm-x86.c +++ b/libkvm/libkvm-x86.c @@ -198,7 +198,8 @@ int kvm_arch_run(struct kvm_run *run,kvm_context_t kvm, int vcpu) case KVM_EXIT_TPR_ACCESS: r = handle_tpr_access(kvm, run, vcpu); break; -#endif default: +#endif + default: r = 1; break; } -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] libkvm: fix stack underflow in MMIO read write calls
This patch complement 6eabe2ba30a673c4280df75b28520e0e1f4a2171 so that all callbacks used for MMIO read/write use the ABI exported in libkvm.h. This fixes the following warnings was reported at compile time : main.c:392: warning: initialization from incompatible pointer type main.c:393: warning: initialization from incompatible pointer type qemu/qemu-kvm.c:532: warning: initialization from incompatible pointer type qemu/qemu-kvm.c:533: warning: initialization from incompatible pointer type Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/qemu-kvm.c |6 ++ user/main.c |4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index a61b95c..9aee903 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -483,15 +483,13 @@ static int kvm_outl(void *opaque, uint16_t addr, uint32_t data) return 0; } -static int kvm_mmio_read(void *opaque, uint64_t addr, - uint8_t *data, int len, int is_write) +static int kvm_mmio_read(void *opaque, uint64_t addr, uint8_t *data, int len) { cpu_physical_memory_rw(addr, data, len, 0); return 0; } -static int kvm_mmio_write(void *opaque, uint64_t addr, - uint8_t *data, int len, int is_write) +static int kvm_mmio_write(void *opaque, uint64_t addr, uint8_t *data, int len) { cpu_physical_memory_rw(addr, data, len, 1); return 0; diff --git a/user/main.c b/user/main.c index 4d870fa..a2d6b8b 100644 --- a/user/main.c +++ b/user/main.c @@ -366,7 +366,7 @@ static int test_pre_kvm_run(void *opaque, int vcpu) return 0; } -static int test_mem_read(void *opaque, uint64_t addr, void *data, unsigned len) +static int test_mem_read(void *opaque, uint64_t addr, uint8_t *data, int len) { if (addr IORAM_BASE_PHYS || addr + len IORAM_BASE_PHYS + IORAM_LEN) return 1; @@ -374,7 +374,7 @@ static int test_mem_read(void *opaque, uint64_t addr, void *data, unsigned len) return 0; } -static int test_mem_write(void *opaque, uint64_t addr, void *data, unsigned len) +static int test_mem_write(void *opaque, uint64_t addr, uint8_t *data, int len) { if (addr IORAM_BASE_PHYS || addr + len IORAM_BASE_PHYS + IORAM_LEN) return 1; -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] external module: remove define for MAX_IO_APICS
This reverts commit a2c1905ff7c6faf9253d4185952a5b85036114f7. It was made obsolete by 3f5daaafad51a2b75171c2a93a28cc55ce205cae and would redefine MAX_IO_APIC to a smaller value in amd64 that the one used by asm/apicdef.h for non SMP kernels 2.6.21 Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- kernel/external-module-compat.h |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h index 1b9d7bb..63d3fc5 100644 --- a/kernel/external-module-compat.h +++ b/kernel/external-module-compat.h @@ -566,11 +566,6 @@ static inline void blahblah(void) #endif -/* apicdef.h doesn't get included before 2.6.21 if non-smp */ -#ifndef MAX_IO_APICS -#define MAX_IO_APICS 64 -#endif - /* X86_FEATURE_NX is missing in some x86_64 kernels */ #include asm/cpufeature.h -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] external module: remove tmp directory once done with sync
This patch complements 684c6426c5d58f01f45cd45420df96c837d0feb4 by deleting the tmp directory once the merge is completed so that it doesn't get included by mistake in the release package Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- kernel/Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kernel/Makefile b/kernel/Makefile index e5d9fff..acfdd3b 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -50,6 +50,7 @@ sync: $(call hack, irq.h) for i in $$(find tmp -type f -printf '%P '); \ do cmp -s $$i tmp/$$i || cp tmp/$$i $$i; done + rm -rf tmp install: mkdir -p $(DESTDIR)/$(INSTALLDIR) -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 9/9] qemu: re-add missing definitions for qemu_get_launch_info
The following patch re applies the definitions added to qemu/vl.h in 4213cbcf86847c8568d0147bd055d6a13bb1c963 and which were missed in merge f4b21ce8084fc3ffcfc1a2b92bd26466700d3d40, resulting in the following compilation warning : qemu/migration.c:603: warning: implicit declaration of function `qemu_get_launch_info' Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/sysemu.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/qemu/sysemu.h b/qemu/sysemu.h index 8068b8f..d0f4058 100644 --- a/qemu/sysemu.h +++ b/qemu/sysemu.h @@ -44,6 +44,9 @@ void qemu_system_reset(void); void cpu_save(QEMUFile *f, void *opaque); int cpu_load(QEMUFile *f, void *opaque, int version_id); +void qemu_get_launch_info(int *argc, char ***argv, + int *opt_daemonize, const char **opt_incoming); + void do_savevm(const char *name); void do_loadvm(const char *name); void do_delvm(const char *name); -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 6/9] qemu: add missing definition for bdrv_flush_all
The following patch fixes : qemu/migration.c:187: warning: implicit declaration of function `bdrv_flush_all' Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/block.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu/block.h b/qemu/block.h index 839be90..1df6d1c 100644 --- a/qemu/block.h +++ b/qemu/block.h @@ -109,6 +109,8 @@ void bdrv_flush(BlockDriverState *bs); #define BIOS_ATA_TRANSLATION_LARGE 3 #define BIOS_ATA_TRANSLATION_RECHS 4 +void bdrv_flush_all(void); + void bdrv_set_geometry_hint(BlockDriverState *bs, int cyls, int heads, int secs); void bdrv_set_type_hint(BlockDriverState *bs, int type); -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 5/9] qemu: add missing definition for qemu_system_reset
The following patch fixes : qemu/qemu-kvm.c:349: warning: implicit declaration of function `qemu_system_reset' Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/sysemu.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/sysemu.h b/qemu/sysemu.h index b96ba79..5f6db03 100644 --- a/qemu/sysemu.h +++ b/qemu/sysemu.h @@ -39,6 +39,7 @@ int qemu_powerdown_requested(void); #else void qemu_system_powerdown(void); #endif +void qemu_system_reset(void); void cpu_save(QEMUFile *f, void *opaque); int cpu_load(QEMUFile *f, void *opaque, int version_id); -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 1/9] qemu: re-add missing definition for vmchannel_init
The following patch re applies the definitions added to qemu/vl.h in cbd2cefaf7b6185c3ebdb421a4cc4c363f6dbc39 and which were missed in merge f4b21ce8084fc3ffcfc1a2b92bd26466700d3d40, resulting in the following compilation warning : qemu/vl.c:9378: warning: implicit declaration of function `vmchannel_init' Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/sysemu.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/sysemu.h b/qemu/sysemu.h index 1f5b093..fe71e9c 100644 --- a/qemu/sysemu.h +++ b/qemu/sysemu.h @@ -140,6 +140,7 @@ extern int drive_get_max_bus(BlockInterfaceType interface); /* vmchannel devices */ #define MAX_VMCHANNEL_DEVICES 4 +void vmchannel_init(CharDriverState *hd, uint32_t deviceid, uint32_t index); /* serial ports */ -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 8/9] qemu: re-add missing definitions for qemu_live_{savevm, loadvm}_state
The following patch re applies the definitions added to qemu/vl.h in 4213cbcf86847c8568d0147bd055d6a13bb1c963 and which were missed in merge f4b21ce8084fc3ffcfc1a2b92bd26466700d3d40, resulting in the following compilation warnings : qemu/migration.c:193: warning: implicit declaration of function `qemu_live_savevm_state' qemu/migration.c:855: warning: implicit declaration of function `qemu_live_loadvm_state' Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/sysemu.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/qemu/sysemu.h b/qemu/sysemu.h index 5f6db03..8068b8f 100644 --- a/qemu/sysemu.h +++ b/qemu/sysemu.h @@ -49,6 +49,9 @@ void do_loadvm(const char *name); void do_delvm(const char *name); void do_info_snapshots(void); +int qemu_live_savevm_state(QEMUFile *f); +int qemu_live_loadvm_state(QEMUFile *f); + void main_loop_wait(int timeout); /* Polling handling */ -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 0/9] qemu: missing definitions from qemu-cvs merge
The following patch series fixes compilation warnings from kvm 57 triggered by 25a2e04e5689af63d104de2dea755f30bf643afd : PATCH 1/9 : fix definition for vmchannel_init in qemu/vl.c PATCH 2/9 : fix definition for migrate_incoming in qemu/vl.c PATCH 3/9 : fix definition for pci_hypercall_init in qemu/hw/pc.c PATCH 4/9 : fix definitions for qemu_*_requested in qemu/qemu-kvm.c PATCH 5/9 : fix definition for qemu_system_reset in qemu/qemu-kvm.c PATCH 6/9 : fix definition for bdrv_flush_all in qemu/migration.c PATCH 7/9 : fix definitions for monitor_{resume,suspend} in qemu/migration.c PATCH 8/9 : fix definitions for qemu_live_*_save in qemu/migration.c PATCH 9/9 : fix definition for qemu_get_launch_info in qemu/migration.c All this definitions are kvm specific and therefore were missed by the splitting of vl.h and other headers upstream. Carlo - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 2/9] qemu: add migration.h to vl.c so that migrate_incoming is defined
The following patch fixes : qemu/vl.c:9450: warning: implicit declaration of function `migrate_incoming' Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/vl.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/vl.c b/qemu/vl.c index 28c5df4..b84ddd5 100644 --- a/qemu/vl.c +++ b/qemu/vl.c @@ -37,6 +37,7 @@ #include qemu-char.h #include block.h #include audio/audio.h +#include migration.h #include qemu-kvm.h #include unistd.h -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 3/9] qemu: re-add missing definition for pci_hypercall_init
The following patch re applies the definitions added to qemu/vl.h in 2ea040d9b4a2f0642cb595898801d1abe6e47dc4 and which were missed in merge f4b21ce8084fc3ffcfc1a2b92bd26466700d3d40, resulting in the following compilation warning : qemu/hw/pc.c:1028: warning: implicit declaration of function `pci_hypercall_init' Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/sysemu.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/sysemu.h b/qemu/sysemu.h index fe71e9c..f1994ba 100644 --- a/qemu/sysemu.h +++ b/qemu/sysemu.h @@ -140,6 +140,7 @@ extern int drive_get_max_bus(BlockInterfaceType interface); /* vmchannel devices */ #define MAX_VMCHANNEL_DEVICES 4 +void pci_hypercall_init(PCIBus *bus); void vmchannel_init(CharDriverState *hd, uint32_t deviceid, uint32_t index); /* serial ports */ -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 4/9] qemu: re-add missing definitions for qemu_{shutdown, powerdown, reset}_requested
The following patch re applies the definitions added to qemu/vl.h in 469b506a270347a88d11c65392ac1df7b476d176 and which were missed in merge f4b21ce8084fc3ffcfc1a2b92bd26466700d3d40, resulting in the following compilation warnings : qemu/qemu-kvm.c:343: warning: implicit declaration of function `qemu_shutdown_requested' qemu/qemu-kvm.c:345: warning: implicit declaration of function `qemu_powerdown_requested' qemu/qemu-kvm.c:347: warning: implicit declaration of function `qemu_reset_requested' Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/sysemu.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/qemu/sysemu.h b/qemu/sysemu.h index f1994ba..b96ba79 100644 --- a/qemu/sysemu.h +++ b/qemu/sysemu.h @@ -30,6 +30,9 @@ void cpu_disable_ticks(void); void qemu_system_reset_request(void); void qemu_system_shutdown_request(void); void qemu_system_powerdown_request(void); +int qemu_shutdown_requested(void); +int qemu_reset_requested(void); +int qemu_powerdown_requested(void); #if !defined(TARGET_SPARC) // Please implement a power failure function to signal the OS #define qemu_system_powerdown() do{}while(0) -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 7/9] qemu: add missing definitions for monitor_{resume, suspend}
The following patch fixes : qemu/migration.c:210: warning: implicit declaration of function `monitor_resume' qemu/migration.c:507: warning: implicit declaration of function `monitor_suspend' Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/console.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu/console.h b/qemu/console.h index 9782272..bcc2790 100644 --- a/qemu/console.h +++ b/qemu/console.h @@ -131,6 +131,8 @@ extern uint8_t _translate_keycode(const int key); does not need to include console.h */ /* monitor.c */ void monitor_init(CharDriverState *hd, int show_banner); +void monitor_suspend(void); +void monitor_resume(void); void term_puts(const char *str); void term_vprintf(const char *fmt, va_list ap); void term_printf(const char *fmt, ...) __attribute__ ((__format__ (__printf__, 1, 2))); -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] mailman setup for kvm-devel (was Re: external module sched_in event)
On Fri, Dec 21, 2007 at 07:22:57PM +0100, Andrea Arcangeli wrote: On Fri, Dec 21, 2007 at 07:52:52PM +0200, Izik Eidus wrote: oh, it was sent to the list, dont trust (in case you did) the source forge site for the mails But this time I received it in my kvm-devel folder... for some reason the list is configured with the mailman option for : Receive your own posts to the list? no so you will only see it you post it with another account as the one you have subscribed as you find out, or if waiting long enough for the mail archive to catch up. didn't, so it had to be blocked my some spamfilter and it doesn't have spam filter. Carlo PS. I agree that this setup is confusing and would rather see it changed if that is an open possibility. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] external module: remove dependency on asm/io_apic.h
Complements f2601fd2874b94d14dfcb21a3e1b84d7f3262b17 which made obsolete the use of io_apic provided defines that were not being included for x86 when the host kernel didn't have IO_APIC support. Reverts : 5d6ea6b370ff9aae1dd7671b71e89351749fbeee 26e6e6a8681f1041b61fccdf2fdf2aacb88cee36 Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- kernel/external-module-compat.h | 15 --- 1 files changed, 0 insertions(+), 15 deletions(-) diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h index 1dc5a96..acd7ea5 100644 --- a/kernel/external-module-compat.h +++ b/kernel/external-module-compat.h @@ -537,21 +537,6 @@ out: #define CONFIG_HAS_IOMEM 1 #endif -/* Some kernels don't make dest_* available with some configs. */ - -#include asm/io_apic.h - -#ifndef dest_Fixed -#define dest_Fixed0 -#define dest_LowestPrio 1 -#define dest_SMI 2 -#define dest__reserved_1 3 -#define dest_NMI 4 -#define dest_INIT 5 -#define dest__reserved_2 6 -#define dest_ExtINT 7 -#endif - /* empty_zero_page isn't exported in all kernels */ #include asm/pgtable.h -- 1.5.2.5 - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] external module: define MAX_IO_APICS if missing
Defines MAX_IO_APICS if not defined already with the same value used in asm/apicdef.h and which wasn't loaded for non-smp kernels before 2.6.21 Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- kernel/external-module-compat.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h index acd7ea5..3794a99 100644 --- a/kernel/external-module-compat.h +++ b/kernel/external-module-compat.h @@ -558,6 +558,11 @@ static inline void blahblah(void) #endif +/* apicdef.h doesn't get included before 2.6.21 if non-smp */ +#ifndef MAX_IO_APICS +#define MAX_IO_APICS 64 +#endif + /* X86_FEATURE_NX is missing in some x86_64 kernels */ #include asm/cpufeature.h -- 1.5.2.5 - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] external module: linux/string.h needed for kernel=2.6.16 to define strcmp and memcpy
Fixes the following compilation error : in file included from kernel/include/linux/kvm_para.h:19, from kernel/external-module-compat.h:13, from command line:1: kernel/include/asm/kvm_para.h: In function 'kvm_para_available': kernel/include/asm/kvm_para.h:87: warning: implicit declaration of function 'memcpy' kernel/include/asm/kvm_para.h:92: warning: implicit declaration of function 'strcmp' In file included from include/linux/string.h:24, from include/linux/bitmap.h:8, from include/linux/cpumask.h:86, from include/linux/node.h:23, from include/linux/cpu.h:23, from kernel/external-module-compat.h:14, from command line:1: include/asm/string.h: At top level: include/asm/string.h:104: error: static declaration of 'strcmp' follows non-static declaration Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- kernel/external-module-compat.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h index 3794a99..c6a7d03 100644 --- a/kernel/external-module-compat.h +++ b/kernel/external-module-compat.h @@ -9,6 +9,7 @@ #include linux/compiler.h #include linux/version.h +#include linux/string.h #include include/linux/kvm.h #include include/linux/kvm_para.h #include linux/cpu.h -- 1.5.2.5 - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] README: How to run kvm guests on IA64
On Wed, Dec 19, 2007 at 08:22:01PM +0800, Zhang, Xiantao wrote: KVM/IA64 HOWTO This is the notes about how to enalbe kvm on Itanium series of processors suppoting VT. Probably some tidbits of this should go into the kvm wiki in : http://kvm.qumranet.com/kvmwiki/Host_Support_Status http://kvm.qumranet.com/kvmwiki/Status If you have any question, please feel free to contact me! to complete the host emulation and run a guest shouldn't an EFI BIOS be needed? Carlo - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH] [RESEND] libkvm: NULL pointer dereference in kvm_destroy_phys_mem as used in kvm-56
On Tue, Dec 18, 2007 at 06:20:03PM +0200, Avi Kivity wrote: Carlo Marcelo Arenas Belon wrote: The following patch eliminates the uninitialized mem pointer, using instead the corresponding entry from the slots array to fix : libkvm.c:580: warning: 'mem' is used uninitialized in this function if this part of the patch is applied.. Also changes the formatting type for phys_addr to long to prevent : libkvm.c:581: warning: format '%llx' expects type 'long long unsigned int' , but argument 5 has type 'long unsigned int' this warning will be triggered in the next compile. Applied, thanks. But please avoid unrelated changes in the same patch in the future. sorry about that, will do, even if I disagree there were unrelated as explained above. so just to be clear on this?, would you rather have these changes in a patch series, or as unrelated patches with the second one fixing a formatting issue that the first one triggered? if the later, how to handle in that case the dependency so that they don't get applied in incorrect order triggering conflicts? I understand that the first part of it has higher importance than the second one, but I would rather have them applied together as they make IMHO more sense as an atomic change. Carlo - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [ANNOUNCE] kvm-57 release
On Tue, Dec 18, 2007 at 06:15:07PM +0200, Avi Kivity wrote: The major focus for this release is a qemu-cvs merge, which brings many new features, some introduced by kvm developers. but didn't include my changes to the IDE emulation to allow for OpenSolaris guests to be installed (patch 1 and 4) as shown in : http://sourceforge.net/mailarchive/forum.php?thread_name=20071128180630.GA351%40tapirforum_name=kvm-devel will rebase them (they conflict with the qemu's gcc4 compilation fixes) and resend them. Notes: If you use the modules bundled with kvm-57, you can use any version of Linux from 2.6.17 upwards. just realized I made a typo in my original report for backward compatibility but you got it right :) 2.6.17 will only work if compiled with CONFIG_SMP=y but shouldn't affect any distribution that provides kvm packages AFAIK (Gentoo will be affected, but the packages provided there are not official) Carlo - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 0/2] qemu: IDE/ATAPI emulation fixes
The following patch series implements fixes to the IDE/ATAPI emulation in qemu which affects access to the CD-ROM device preventing installation of OpenSolaris guests because of an incorrect implementation of the MMC6 GET_CONFIGURATION command when it was extended to also support a DVD-ROM profile. Patch 1/2 : fixes GET_CONFIGURATION to allow OpenSolaris CD-ROM access Patch 2/2 : uses DVD-ROM as model name for INQUIRY and IDENTIFY DEVICE They had been tested in Gentoo Linux 2007.0 amd64 using an Intel Core 2 6320 host and several different versions of Linux, FreeBSD, OpenBSD, NetBSD, DragonFlyBSD, OpenSolaris and Windows 2000 guests and to match exact responses when compared with real SATA and ATAPI DVD-ROM hardware. This is a partial RESEND as the original version of patch 2 will conflict with the recently merged qemu due to changes on the type signedness of some variables to avoid warnings when building with gcc4. Carlo - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 1/2] GET_CONFIGURATION fixes to allow OpenSolaris CD-ROM access
This patch complements Partial IDE DVD emulation (revision 1.66 for ide.c in qemu's cvs) that is generating the following timeouts for OpenSolaris guests when trying to access the ATAPI cdrom (ex: during installation): WARNING: /[EMAIL PROTECTED],0/[EMAIL PROTECTED],1/[EMAIL PROTECTED] (ata1); timeout: abort request, target=0 lun=0 WARNING: /[EMAIL PROTECTED],0/[EMAIL PROTECTED],1/[EMAIL PROTECTED] (ata1): timeout: abort device, target=0 lun=0 WARNING: /[EMAIL PROTECTED],0/[EMAIL PROTECTED],1/[EMAIL PROTECTED] (ata1): timeout: reset target, target=0 lun=0 WARNING: /[EMAIL PROTECTED],0/[EMAIL PROTECTED],1/[EMAIL PROTECTED] (ata1): timeout: reset bus, target=0 lun=0 The changes required to the GET CONFIGURATION implementation are : * recognize and honor Allocation Length input parameter * only set current profile for the response if a profile is current (either CD or DVD loaded) * calculate data length including all headers * refactor code and add comments to help document references to all implemented standards (ATAPI-4, SPC-3 and MMC-6) Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/ide.c | 27 +++ 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/qemu/hw/ide.c b/qemu/hw/ide.c index 18431e7..3289964 100644 --- a/qemu/hw/ide.c +++ b/qemu/hw/ide.c @@ -1636,6 +1636,7 @@ static void ide_atapi_cmd(IDEState *s) break; case GPCMD_GET_CONFIGURATION: { +uint32_t len; int64_t total_sectors; /* only feature 0 is supported */ @@ -1644,17 +1645,27 @@ static void ide_atapi_cmd(IDEState *s) ASC_INV_FIELD_IN_CMD_PACKET); break; } -memset(buf, 0, 32); +max_len = ube16_to_cpu(packet + 7); bdrv_get_geometry(s-bs, total_sectors); -buf[3] = 16; -buf[7] = total_sectors = 1433600 ? 0x08 : 0x10; /* current profile */ -buf[10] = 0x10 | 0x1; -buf[11] = 0x08; /* size of profile list */ +memset(buf, 0, 32); +if (total_sectors) { +if (total_sectors 1433600) { +buf[7] = 0x10; /* DVD-ROM */ +} else { +buf[7] = 0x08; /* CD-ROM */ +} +} else { +buf[7] = 0x00; /* no current profile */ +} +buf[10] = 0x02 | 0x01; /* persistent and current */ +buf[11] = 0x08; /* size of profile list = 4 bytes per profile */ buf[13] = 0x10; /* DVD-ROM profile */ -buf[14] = buf[7] == 0x10; /* (in)active */ +buf[14] = buf[13] == buf[7]; /* (in)active */ buf[17] = 0x08; /* CD-ROM profile */ -buf[18] = buf[7] == 0x08; /* (in)active */ -ide_atapi_cmd_reply(s, 32, 32); +buf[18] = buf[17] == buf[7]; /* (in)active */ +len = 8 + 4 + buf[11]; /* headers + size of profile list */ +cpu_to_ube32(buf, len - 4); /* data length */ +ide_atapi_cmd_reply(s, len, max_len); break; } default: -- 1.5.2.5 - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 2/2] use DVD-ROM as model name for INQUIRY and IDENTIFY DEVICE
The following patch report model as DVD-ROM for INQUIRY and IDENTIFY DEVICE commands instead of CD-ROM to reflect that the device is now able to support DVDs Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/ide.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/hw/ide.c b/qemu/hw/ide.c index 3289964..bd579f8 100644 --- a/qemu/hw/ide.c +++ b/qemu/hw/ide.c @@ -541,7 +541,7 @@ static void ide_atapi_identify(IDEState *s) put_le16(p + 21, 512); /* cache size in sectors */ put_le16(p + 22, 4); /* ecc bytes */ padstr((char *)(p + 23), QEMU_VERSION, 8); /* firmware version */ -padstr((char *)(p + 27), QEMU CD-ROM, 40); /* model */ +padstr((char *)(p + 27), QEMU DVD-ROM, 40); /* model */ put_le16(p + 48, 1); /* dword I/O (XXX: should not be set on CDROM) */ #ifdef USE_DMA_CDROM put_le16(p + 49, 1 9 | 1 8); /* DMA and LBA supported */ @@ -1630,7 +1630,7 @@ static void ide_atapi_cmd(IDEState *s) buf[6] = 0; /* reserved */ buf[7] = 0; /* reserved */ padstr8(buf + 8, 8, QEMU); -padstr8(buf + 16, 16, QEMU CD-ROM); +padstr8(buf + 16, 16, QEMU DVD-ROM); padstr8(buf + 32, 4, QEMU_VERSION); ide_atapi_cmd_reply(s, 36, max_len); break; -- 1.5.2.5 - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] [RESEND] libkvm: NULL pointer dereference in kvm_destroy_phys_mem as used in kvm-56
The following patch eliminates the uninitialized mem pointer, using instead the corresponding entry from the slots array to fix : libkvm.c:580: warning: 'mem' is used uninitialized in this function Also changes the formatting type for phys_addr to long to prevent : libkvm.c:581: warning: format '%llx' expects type 'long long unsigned int' , but argument 5 has type 'long unsigned int' Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- libkvm/libkvm.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c index 93d7b6b..fc2e265 100644 --- a/libkvm/libkvm.c +++ b/libkvm/libkvm.c @@ -567,7 +567,6 @@ void kvm_destroy_phys_mem(kvm_context_t kvm, unsigned long phys_start, unsigned long len) { int slot; - struct kvm_memory_region *mem; slot = get_slot(phys_start); @@ -578,9 +577,9 @@ void kvm_destroy_phys_mem(kvm_context_t kvm, unsigned long phys_start, } if (phys_start != slots[slot].phys_addr) { fprintf(stderr, - WARNING: %s: phys_start is 0x%lx expecting 0x%llx\n, - __FUNCTION__, phys_start, mem-guest_phys_addr); - phys_start = mem-guest_phys_addr; + WARNING: %s: phys_start is 0x%lx expecting 0x%lx\n, + __FUNCTION__, phys_start, slots[slot].phys_addr); + phys_start = slots[slot].phys_addr; } kvm_create_phys_mem(kvm, phys_start, 0, 0, 0); } -- 1.5.2.5 - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [RFC] external module: compatibility with older kernels (SMP and non SMP)
The following patch (which is composed of 3 different patches from a series) has been validated to solve compilation issues observed with kvm-56 in x86 with kernels older than 2.6.21 and are posted here for testing and debate. The main points accomplished (in the same sequence that the snippets) are : * kernel = 2.6.16 doesn't define memcpy or strcmp before used by kvm_para.h * complement f2601fd2874b94d14dfcb21a3e1b84d7f3262b17 reverting the inclusion of io_apic.h which to simplify handling of older kernels * kernel 2.6.21 define MAX_IO_APICS to fix non SMP compilations Remaining issues not yet covered for this patch or the series are : * kernel 2.6.19 undefined cpu_online_map in non SMP * kernel = 2.6.16 undefined hrtimer-{init,start,cancel} A fix for the first issue was reverted after regressions were found with non SMP hosts having SMP guests (which are anyway unreliable even with the last kernel), the second issue is still open to debate in a separate thread with the most likely fix (if any) done outside of the external module. Carlo -- diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h index 1dc5a96..c6a7d03 100644 --- a/kernel/external-module-compat.h +++ b/kernel/external-module-compat.h @@ -9,6 +9,7 @@ #include linux/compiler.h #include linux/version.h +#include linux/string.h #include include/linux/kvm.h #include include/linux/kvm_para.h #include linux/cpu.h @@ -537,21 +538,6 @@ out: #define CONFIG_HAS_IOMEM 1 #endif -/* Some kernels don't make dest_* available with some configs. */ - -#include asm/io_apic.h - -#ifndef dest_Fixed -#define dest_Fixed0 -#define dest_LowestPrio 1 -#define dest_SMI 2 -#define dest__reserved_1 3 -#define dest_NMI 4 -#define dest_INIT 5 -#define dest__reserved_2 6 -#define dest_ExtINT 7 -#endif - /* empty_zero_page isn't exported in all kernels */ #include asm/pgtable.h @@ -573,6 +559,11 @@ static inline void blahblah(void) #endif +/* apicdef.h doesn't get included before 2.6.21 if non-smp */ +#ifndef MAX_IO_APICS +#define MAX_IO_APICS 64 +#endif + /* X86_FEATURE_NX is missing in some x86_64 kernels */ #include asm/cpufeature.h - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [ANNOUNCE] kvm-56 release
On Thu, Dec 13, 2007 at 03:32:46PM +0200, Avi Kivity wrote: Notes: If you use the modules bundled with kvm-56, you can use any version of Linux from 2.6.9 upwards. the external module (once patched) will only be able to build against 2.6.17 upwards because the in-kernel PIC/IOAPIC/LAPIC requires hrtimers and that functionality was only made public to external modules during the stabilization of 2.6.17 as seen by : http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=8d16b76421f0b3216012ee2d7819355e1cb847e5 there are obviously 3 possible fixes : 1) rewrite the in-kernel PIC/IOAPIC/LAPIC not to use hrtimers (not worthy) 2) replicate the functionality needed in the compatibility header or with the use of a helper (not that simple) 3) disable the functionality and ifdef the code for kernel 2.6.17 (preferred) but before, I would like to ask: is 2.6.9 upwards support really needed?, the only reason why I would suspect that 2.6.9 was recommended was because of RHEL4 but there is no kvm package available for it from Red Hat or in EPEL and Full Support is due May 15, 2008 so there might not be one ever, specially considering that Red Hat is focused on RHEL 5 Host for virtualization support as can be seen by : http://www.redhat.com/rhel/virtualization/ other Linux distributions that are still under support will be affected as well (mainly because they are corporate linux focused and with longer supported timelines than community oriented distributions) but AFAIK they don't have yet a kvm package (and might never had one) : * Ubuntu Dapper 6.06.1 LTS (2.6.15) * SuSE Linux 10.1 (2.6.16) * Mandriva Corporate 4 (2.6.12) of course ALL community oriented distributions (fedora, ubuntu, gentoo) which are currently packaging kvm are ok and won't be affected by a 2.6.17 upwards requirement. Carlo PS. shouldn't the 2.6.9 or higher requirement be in this page? http://kvm.qumranet.com/kvmwiki/Downloads - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH] external module: include apicdef.h for kernel 2.6.21
On Sun, Dec 16, 2007 at 01:56:06PM +0200, Avi Kivity wrote: Carlo Marcelo Arenas Belon wrote: The following patch fixes building the kvm module for kernels older than 2.6.21 and which were missing an include to asm/apicdef.h in asm/io_apic.h resulting in the following error : include/asm/io_apic.h:61: error: 'MAX_IO_APICS' undeclared here (not in a function) Do all kernels/arches have this file? apicdef.h has been around since 2.6.12 and was added to io_apic.h for 2.6.21 as can be seen in : http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=58a53b246b4aed95f3f93b45828c8d9f26b1cfcb as for arches, it is only available in i386 and x86_64 (and in the merged x86 for 2.6.24) but the same is true for io_apic.h maybe a #ifndef/#define/#endif sequence is better here. for 2.6.21 and 2.6.19 yes, but 2.6.16 needs also FIX_IO_APIC_BASE_0 and __fix_to_virt to build and therefore asm/fixmap.h (which then includes apicdef.h) I agree though that and #if KV/#include/#endif is not good as it doesn't stress the fact that this problem is only visible for CONFIG_SMP=no for old kernels so don't commit this one just yet as it is missing context and is only the first out of 5 patches that I'd been testing for supporting all stable gentoo kernels and that lead to the realization that 2.6.16 wouldn't work as I reported before. Carlo - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [ANNOUNCE] kvm-56 release
On Thu, Dec 13, 2007 at 05:06:41PM +0200, Avi Kivity wrote: Alexey Eremenko wrote: Yes, You're right, KVM-56 doesn't compiles on 32-bit systems. (tested on openSUSE 10.3, 32-bit) It compiles on 32-bit systems. It doesn't compile on 32-bit non-pae systems. gentoo non-pae kernels build ok as explained in previous post when using : CONFIG_NOHIGHMEM=y CONFIG_X86_PAE not set enabling HIGHMEM64G and PAE also enables CONFIG_X86_CMPXCHG64=y Carlo - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [ANNOUNCE] kvm-56 release
On Thu, Dec 13, 2007 at 06:59:06AM -0800, Alexey Eremenko wrote: Yes, You're right, KVM-56 doesn't compiles on 32-bit systems. (tested on openSUSE 10.3, 32-bit) it compiles ok in Gentoo 2007.0 building against the last stable gentoo kernels 2.6.22 and 2.6.23 for x86 : gentoo-sources-2.6.22-r9 gentoo-sources-2.6.23-r3 Carlo PS. 2.6.22 is missing a declaration for cmpxchg64 as reported by Pele. - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] libkvm: null pointer dereference in kvm_destroy_phys_mem
The following patch eliminates the uninitialized mem pointer in kvm_destroy_phys_mem and uses instead the corresponding entry from the slots array in the conditional to fix : libkvm.c:580: warning: 'mem' is used uninitialized in this function Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- libkvm/libkvm.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c index 93d7b6b..8f7a34f 100644 --- a/libkvm/libkvm.c +++ b/libkvm/libkvm.c @@ -567,7 +567,6 @@ void kvm_destroy_phys_mem(kvm_context_t kvm, unsigned long phys_start, unsigned long len) { int slot; - struct kvm_memory_region *mem; slot = get_slot(phys_start); @@ -579,8 +578,8 @@ void kvm_destroy_phys_mem(kvm_context_t kvm, unsigned long phys_start, if (phys_start != slots[slot].phys_addr) { fprintf(stderr, WARNING: %s: phys_start is 0x%lx expecting 0x%llx\n, - __FUNCTION__, phys_start, mem-guest_phys_addr); - phys_start = mem-guest_phys_addr; + __FUNCTION__, phys_start, slots[slot].phys_addr); + phys_start = slots[slot].phys_addr; } kvm_create_phys_mem(kvm, phys_start, 0, 0, 0); } -- 1.5.2.5 - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] How to handle kvm-abi-10 case for other archs.
On Sat, Dec 01, 2007 at 12:10:16PM +0200, Avi Kivity wrote: Zhang, Xiantao wrote: Hi, Avi I think new archs for kvm doesn't need to care about kvm-abi case in their code, since current abi is bigger than 10. But in current libkvm.c, we can see that many abi-specific code in it. How to handle it ? Can we use __x86__ macro to make it sightless for other archs or other good methods ? #ifdef is okay for this. Actually we can probably remove abi 10 support since the F7 kernel now supports the modern ABI (I don't think anybody else uses abi 10, which is pre 2.6.22 when we announced ABI compatibility. ubuntu feisty uses kernel 2.6.20 and is packaging kvm-16 : http://packages.ubuntu.com/feisty/misc/kvm their last release (gutsy) uses 2.6.22 though. Carlo - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] Remove KVM specific defines for MSR_EFER from svm.c
This patch removes the KVM specific defines for MSR_EFER that were being used in the svm support file and migrates all references to use instead the ones from the kernel headers that are used everywhere else and that have the same values. Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- drivers/kvm/svm.c | 17 +++-- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 928fb35..04e6b39 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -42,9 +42,6 @@ MODULE_LICENSE(GPL); #define SEG_TYPE_LDT 2 #define SEG_TYPE_BUSY_TSS16 3 -#define KVM_EFER_LMA (1 10) -#define KVM_EFER_LME (1 8) - #define SVM_FEATURE_NPT (1 0) #define SVM_FEATURE_LBRV (1 1) #define SVM_DEATURE_SVML (1 2) @@ -184,8 +181,8 @@ static inline void flush_guest_tlb(struct kvm_vcpu *vcpu) static void svm_set_efer(struct kvm_vcpu *vcpu, u64 efer) { - if (!(efer KVM_EFER_LMA)) - efer = ~KVM_EFER_LME; + if (!(efer EFER_LMA)) + efer = ~EFER_LME; to_svm(vcpu)-vmcb-save.efer = efer | MSR_EFER_SVME_MASK; vcpu-shadow_efer = efer; @@ -777,15 +774,15 @@ static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) struct vcpu_svm *svm = to_svm(vcpu); #ifdef CONFIG_X86_64 - if (vcpu-shadow_efer KVM_EFER_LME) { + if (vcpu-shadow_efer EFER_LME) { if (!is_paging(vcpu) (cr0 X86_CR0_PG)) { - vcpu-shadow_efer |= KVM_EFER_LMA; - svm-vmcb-save.efer |= KVM_EFER_LMA | KVM_EFER_LME; + vcpu-shadow_efer |= EFER_LMA; + svm-vmcb-save.efer |= EFER_LMA | EFER_LME; } if (is_paging(vcpu) !(cr0 X86_CR0_PG)) { - vcpu-shadow_efer = ~KVM_EFER_LMA; - svm-vmcb-save.efer = ~(KVM_EFER_LMA | KVM_EFER_LME); + vcpu-shadow_efer = ~EFER_LMA; + svm-vmcb-save.efer = ~(EFER_LMA | EFER_LME); } } #endif -- 1.5.2.5 - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 0/5] qemu: IDE/ATAPI emulation reliability fixes
The following patch series implements fixes to the IDE/ATAPI emulation in qemu which are already committed upstream or proposed for inclusion; including 2 serious regressions that result in availability and data loss problems when using OpenSolaris or FreeBSD guests (at least) by the first 2: Patch 1/5 : fixes GET_CONFIGURATION to allow OpenSolaris cdrom access Patch 2/5 : fixes IDE sector write operations resulting in data lost Patch 3/5 : enables ACPI interrupts Patch 4/5 : uses DVD-ROM as model name for INQUIRY and IDENTIFY DEVICE Patch 5/5 : removes obsolete triton chip support They had been tested in Gentoo Linux 2007.0 amd64 using an Intel Core 2 6320 host and several different versions of FreeBSD, OpenBSD, NetBSD, Linux, OpenSolaris and Windows 2000 guests Carlo - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 1/5] qemu: GET_CONFIGURATION fixes for MMC-6 DVD-ROM implementation
The following patch complements Partial IDE DVD emulation, added in ide.c revision 1.66 and that was generating the following timeouts for OpenSolaris guests when trying to access the ATAPI cdrom (during installation for example): WARNING: /[EMAIL PROTECTED],0/[EMAIL PROTECTED],1/[EMAIL PROTECTED] (ata1); timeout: abort request, target=0 lun=0 WARNING: /[EMAIL PROTECTED],0/[EMAIL PROTECTED],1/[EMAIL PROTECTED] (ata1): timeout: abort device, target=0 lun=0 WARNING: /[EMAIL PROTECTED],0/[EMAIL PROTECTED],1/[EMAIL PROTECTED] (ata1): timeout: reset target, target=0 lun=0 WARNING: /[EMAIL PROTECTED],0/[EMAIL PROTECTED],1/[EMAIL PROTECTED] (ata1): timeout: reset bus, target=0 lun=0 The changes required to the GET CONFIGURATION implementation are : * recognize and honor Allocation Length command parameter * only set current profile for the response if a profile is current (either CD or DVD loaded) * calculate data length including all headers * refactor code and add comments to help document references to all implemented standards (ATAPI-4, SPC-3 and MMC-6) Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/ide.c | 27 +++ 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/qemu/hw/ide.c b/qemu/hw/ide.c index 329d053..29fc7a9 100644 --- a/qemu/hw/ide.c +++ b/qemu/hw/ide.c @@ -1648,6 +1648,7 @@ static void ide_atapi_cmd(IDEState *s) break; case GPCMD_GET_CONFIGURATION: { +uint32_t len; int64_t total_sectors; /* only feature 0 is supported */ @@ -1656,17 +1657,27 @@ static void ide_atapi_cmd(IDEState *s) ASC_INV_FIELD_IN_CMD_PACKET); break; } -memset(buf, 0, 32); +max_len = ube16_to_cpu(packet + 7); bdrv_get_geometry(s-bs, total_sectors); -buf[3] = 16; -buf[7] = total_sectors = 1433600 ? 0x08 : 0x10; /* current profile */ -buf[10] = 0x10 | 0x1; -buf[11] = 0x08; /* size of profile list */ +memset(buf, 0, 32); +if (total_sectors) { +if (total_sectors 1433600) { +buf[7] = 0x10; /* DVD-ROM */ +} else { +buf[7] = 0x08; /* CD-ROM */ +} +} else { +buf[7] = 0x00; /* no current profile */ +} +buf[10] = 0x02 | 0x01; /* persistent and current */ +buf[11] = 0x08; /* size of profile list = 4 bytes per profile */ buf[13] = 0x10; /* DVD-ROM profile */ -buf[14] = buf[7] == 0x10; /* (in)active */ +buf[14] = buf[13] == buf[7]; /* (in)active */ buf[17] = 0x08; /* CD-ROM profile */ -buf[18] = buf[7] == 0x08; /* (in)active */ -ide_atapi_cmd_reply(s, 32, 32); +buf[18] = buf[17] == buf[7]; /* (in)active */ +len = 8 + 4 + buf[11]; /* headers + size of profile list */ +cpu_to_ube32(buf, len - 4); /* data length */ +ide_atapi_cmd_reply(s, len, max_len); break; } default: -- 1.5.2.5 - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 5/5] qemu: piix_pci: remove 82371FB support
This patch removes support for 82371FB Step A1 (AKA triton) chips as they are superseded by 82371SB and are currently dead code as all other references were removed already from ide.c since revision 1.57 Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/piix_pci.c | 25 - 1 files changed, 0 insertions(+), 25 deletions(-) diff --git a/qemu/hw/piix_pci.c b/qemu/hw/piix_pci.c index 3c04e3a..f40dad9 100644 --- a/qemu/hw/piix_pci.c +++ b/qemu/hw/piix_pci.c @@ -311,31 +311,6 @@ static int piix_load(QEMUFile* f, void *opaque, int version_id) return pci_device_load(d, f); } -int piix_init(PCIBus *bus, int devfn) -{ -PCIDevice *d; -uint8_t *pci_conf; - -d = pci_register_device(bus, PIIX, sizeof(PCIDevice), -devfn, NULL, NULL); -register_savevm(PIIX, 0, 2, piix_save, piix_load, d); - -piix3_dev = d; -pci_conf = d-config; - -pci_conf[0x00] = 0x86; // Intel -pci_conf[0x01] = 0x80; -pci_conf[0x02] = 0x2E; // 82371FB PIIX PCI-to-ISA bridge -pci_conf[0x03] = 0x12; -pci_conf[0x08] = 0x02; // Step A1 -pci_conf[0x0a] = 0x01; // class_sub = PCI_ISA -pci_conf[0x0b] = 0x06; // class_base = PCI_bridge -pci_conf[0x0e] = 0x80; // header_type = PCI_multifunction, generic - -piix3_reset(d); -return d-devfn; -} - int piix3_init(PCIBus *bus, int devfn) { PCIDevice *d; -- 1.5.2.5 - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 3/5] qemu: piix_pci enable ACPI interrupts
This patch enable ACPI interrupts, by Igor Lvovsky Originally from qemu CVS : cvs -q diff -r1.11 -r1.12 hw/piix_pci.c Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/piix_pci.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/hw/piix_pci.c b/qemu/hw/piix_pci.c index 8c00f0d..3c04e3a 100644 --- a/qemu/hw/piix_pci.c +++ b/qemu/hw/piix_pci.c @@ -208,6 +208,7 @@ static void piix3_set_irq(qemu_irq *pic, int irq_num, int level) { int i, pic_irq, pic_level; +piix3_dev-config[0x60 + irq_num] = ~0x80; // enable bit pci_irq_levels[irq_num] = level; /* now we change the pic irq level according to the piix irq mappings */ -- 1.5.2.5 - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 2/5] qemu: revert ide sector write operation not to use AIO
This patch revert Last AIO Patch as requested by Fabrice, it is incomplete and breaks other (non-Windows) systems. originally from qemu CVS : cvs -q diff -r1.69 -r1.70 hw/ide.c Data corruption resulting in kernel panics and unbootable images is experienced frequently with FreeBSD and OpenSolaris guests unless committed Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/ide.c | 56 ++-- 1 files changed, 18 insertions(+), 38 deletions(-) diff --git a/qemu/hw/ide.c b/qemu/hw/ide.c index 29fc7a9..a8d4339 100644 --- a/qemu/hw/ide.c +++ b/qemu/hw/ide.c @@ -358,7 +358,7 @@ typedef struct IDEState { uint8_t *data_ptr; uint8_t *data_end; uint8_t io_buffer[MAX_MULT_SECTORS*512 + 4]; -QEMUTimer *sector_write_timer; /* only used for win2k instal hack */ +QEMUTimer *sector_write_timer; /* only used for win2k install hack */ uint32_t irq_count; /* counts IRQs when using win2k install hack */ /* CF-ATA extended error */ uint8_t ext_error; @@ -865,44 +865,10 @@ static void ide_sector_write_timer_cb(void *opaque) ide_set_irq(s); } -static void ide_sector_write_aio_cb(void *opaque, int ret) -{ -BMDMAState *bm = opaque; -IDEState *s = bm-ide_if; - -#ifdef TARGET_I386 -if (win2k_install_hack ((++s-irq_count % 16) == 0)) { - /* It seems there is a bug in the Windows 2000 installer HDD - IDE driver which fills the disk with empty logs when the - IDE write IRQ comes too early. This hack tries to correct - that at the expense of slower write performances. Use this - option _only_ to install Windows 2000. You must disable it - for normal use. */ - qemu_mod_timer(s-sector_write_timer, - qemu_get_clock(vm_clock) + (ticks_per_sec / 1000)); -} else -#endif -{ - ide_set_irq(s); -} -bm-aiocb = NULL; -} - static void ide_sector_write(IDEState *s) { -BMDMAState *bm; int64_t sector_num; -int n, n1; - -s-io_buffer_index = 0; -s-io_buffer_size = 0; -bm = s-bmdma; -if(bm == NULL) { - bm = qemu_mallocz(sizeof(BMDMAState)); - s-bmdma = bm; -} -bm-ide_if = s; -bm-dma_cb = ide_sector_write_aio_cb; +int ret, n, n1; s-status = READY_STAT | SEEK_STAT; sector_num = ide_get_sector(s); @@ -912,6 +878,7 @@ static void ide_sector_write(IDEState *s) n = s-nsector; if (n s-req_nb_sectors) n = s-req_nb_sectors; +ret = bdrv_write(s-bs, sector_num, s-io_buffer, n); s-nsector -= n; if (s-nsector == 0) { /* no more sectors to write */ @@ -924,8 +891,21 @@ static void ide_sector_write(IDEState *s) } ide_set_sector(s, sector_num + n); -bm-aiocb = bdrv_aio_write(s-bs, sector_num, s-io_buffer, n, - ide_sector_write_aio_cb, bm); +#ifdef TARGET_I386 +if (win2k_install_hack ((++s-irq_count % 16) == 0)) { +/* It seems there is a bug in the Windows 2000 installer HDD + IDE driver which fills the disk with empty logs when the + IDE write IRQ comes too early. This hack tries to correct + that at the expense of slower write performances. Use this + option _only_ to install Windows 2000. You must disable it + for normal use. */ +qemu_mod_timer(s-sector_write_timer, + qemu_get_clock(vm_clock) + (ticks_per_sec / 1000)); +} else +#endif +{ +ide_set_irq(s); +} } /* XXX: handle errors */ -- 1.5.2.5 - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 4/5] qemu: ide INQUIRY and IDENTIFY DEVICE report DVD-ROM model
This patch complements Partial IDE DVD emulation which was added in ide.c revision 1.66 so that the CD-ROM identifies itself as a DVD-ROM to INQUIRY and IDENTIFY DEVICE commands Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/ide.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/hw/ide.c b/qemu/hw/ide.c index a8d4339..a97d519 100644 --- a/qemu/hw/ide.c +++ b/qemu/hw/ide.c @@ -533,7 +533,7 @@ static void ide_atapi_identify(IDEState *s) put_le16(p + 21, 512); /* cache size in sectors */ put_le16(p + 22, 4); /* ecc bytes */ padstr((uint8_t *)(p + 23), QEMU_VERSION, 8); /* firmware version */ -padstr((uint8_t *)(p + 27), QEMU CD-ROM, 40); /* model */ +padstr((uint8_t *)(p + 27), QEMU DVD-ROM, 40); /* model */ put_le16(p + 48, 1); /* dword I/O (XXX: should not be set on CDROM) */ #ifdef USE_DMA_CDROM put_le16(p + 49, 1 9 | 1 8); /* DMA and LBA supported */ @@ -1622,7 +1622,7 @@ static void ide_atapi_cmd(IDEState *s) buf[6] = 0; /* reserved */ buf[7] = 0; /* reserved */ padstr8(buf + 8, 8, QEMU); -padstr8(buf + 16, 16, QEMU CD-ROM); +padstr8(buf + 16, 16, QEMU DVD-ROM); padstr8(buf + 32, 4, QEMU_VERSION); ide_atapi_cmd_reply(s, 36, max_len); break; -- 1.5.2.5 - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] OpenSolaris 09/2007 (Sun Solaris Express)
On Tue, Nov 27, 2007 at 10:22:57PM +0200, Avi Kivity wrote: magicboiz wrote: Well done Carlo. The patch works perfectly with my OpenSolaris and kvm-53. Good to know. Also tested it with Nexenta alpha 7, and Indiana and had it added as part of my gentoo package for kvm-54 attached patch to qemu (not yet committed upstream) fixed that problem for me. Has it been submitted? yes, as can be seen in : http://lists.gnu.org/archive/html/qemu-devel/2007-11/msg00758.html no response yet, but I'll try a RESEND tomorrow Carlo - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] OpenSolaris 09/2007 (Sun Solaris Express)
On Wed, Oct 10, 2007 at 03:53:10PM +0200, magicboiz wrote: Sun Solaris Express(9/07), does not detect the hard disk..I attach an screenshot. from the screenshot it seems that the problem is not with the hard disk but with the cdrom. attached patch to qemu (not yet committed upstream) fixed that problem for me. Carlo Index: hw/ide.c === RCS file: /sources/qemu/qemu/hw/ide.c,v retrieving revision 1.72 diff -u -p -r1.72 ide.c --- hw/ide.c18 Nov 2007 01:44:37 - 1.72 +++ hw/ide.c26 Nov 2007 07:43:43 - @@ -541,7 +541,7 @@ static void ide_atapi_identify(IDEState put_le16(p + 21, 512); /* cache size in sectors */ put_le16(p + 22, 4); /* ecc bytes */ padstr((uint8_t *)(p + 23), QEMU_VERSION, 8); /* firmware version */ -padstr((uint8_t *)(p + 27), QEMU CD-ROM, 40); /* model */ +padstr((uint8_t *)(p + 27), QEMU DVD-ROM, 40); /* model */ put_le16(p + 48, 1); /* dword I/O (XXX: should not be set on CDROM) */ #ifdef USE_DMA_CDROM put_le16(p + 49, 1 9 | 1 8); /* DMA and LBA supported */ @@ -1630,12 +1630,13 @@ static void ide_atapi_cmd(IDEState *s) buf[6] = 0; /* reserved */ buf[7] = 0; /* reserved */ padstr8(buf + 8, 8, QEMU); -padstr8(buf + 16, 16, QEMU CD-ROM); +padstr8(buf + 16, 16, QEMU DVD-ROM); padstr8(buf + 32, 4, QEMU_VERSION); ide_atapi_cmd_reply(s, 36, max_len); break; case GPCMD_GET_CONFIGURATION: { +uint32_t len; int64_t total_sectors; /* only feature 0 is supported */ @@ -1644,17 +1645,27 @@ static void ide_atapi_cmd(IDEState *s) ASC_INV_FIELD_IN_CMD_PACKET); break; } -memset(buf, 0, 32); +max_len = ube16_to_cpu(packet + 7); bdrv_get_geometry(s-bs, total_sectors); -buf[3] = 16; -buf[7] = total_sectors = 1433600 ? 0x08 : 0x10; /* current profile */ -buf[10] = 0x10 | 0x1; -buf[11] = 0x08; /* size of profile list */ +memset(buf, 0, 32); +if (total_sectors) { +if (total_sectors 1433600) { +buf[7] = 0x10; /* DVD-ROM */ +} else { +buf[7] = 0x08; /* CD-ROM */ +} +} else { +buf[7] = 0x00; /* no current profile */ +} +buf[10] = 0x02 | 0x01; /* persistent and current */ +buf[11] = 0x08; /* size of profile list = 4 bytes per profile */ buf[13] = 0x10; /* DVD-ROM profile */ -buf[14] = buf[7] == 0x10; /* (in)active */ +buf[14] = buf[13] == buf[7]; /* (in)active */ buf[17] = 0x08; /* CD-ROM profile */ -buf[18] = buf[7] == 0x08; /* (in)active */ -ide_atapi_cmd_reply(s, 32, 32); +buf[18] = buf[17] == buf[7]; /* (in)active */ +len = 8 + 4 + buf[11]; /* headers + size of profile list */ +cpu_to_ube32(buf, len - 4); /* data length */ +ide_atapi_cmd_reply(s, len, max_len); break; } default: - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] qemu: add definition for kvm_qemu_check_extension to qemu-kvm.h
The following patch complement c79baa60813812e8d0e34d998d609e8 to avoid the implicit declaration of kvm_qemu_check_extension as shown by : kvm-53/qemu/vl.c: In function `main': kvm-53/qemu/vl.c:8675: warning implicit declaration of function `kvm_qemu_check_extension' kvm-53/qemu/hw/pc.c:727: warning: implicit declaration of function `kvm_qemu_check_extension' Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/qemu-kvm.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm.h b/qemu/qemu-kvm.h index 6fdfc03..57f70ec 100644 --- a/qemu/qemu-kvm.h +++ b/qemu/qemu-kvm.h @@ -14,6 +14,7 @@ void kvm_save_registers(CPUState *env); int kvm_cpu_exec(CPUState *env); int kvm_update_debugger(CPUState *env); int kvm_qemu_init_env(CPUState *env); +int kvm_qemu_check_extension(int ext); void kvm_apic_init(CPUState *env); int kvm_physical_memory_set_dirty_tracking(int enable); -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] [RESEND] qemu: simulate edge-triggered interrupt in master PIC for time-drift-fix
The following patch fixes 1a483ef4040ed380bf69d684783d06a617073256 so that the parent PIC pointer is used to send the edge irq0 instead of the PIC pair and that is an incompatible pointer type as reported in : qemu/hw/i8259.c: In function `pic_read_irq': qemu/hw/i8259.c:248: warning: passing arg 1 of `pic_set_irq1' from incompatible pointer type qemu/hw/i8259.c:249: warning: passing arg 1 of `pic_set_irq1' from incompatible pointer type the code is equivalent as the compiler packs the PicState2 struct for s in a way that makes s and s-pics[0] point to the same address. Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/i8259.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/hw/i8259.c b/qemu/hw/i8259.c index 01447d7..60063d4 100644 --- a/qemu/hw/i8259.c +++ b/qemu/hw/i8259.c @@ -245,8 +245,8 @@ int pic_read_irq(PicState2 *s) if (timer_ints_to_push 0) { timer_ints_to_push--; /* simulate an edge irq0, like the one generated by i8254 */ -pic_set_irq1(s, 0, 0); -pic_set_irq1(s, 0, 1); +pic_set_irq1(s-pics[0], 0, 0); +pic_set_irq1(s-pics[0], 0, 1); } } -- 1.5.2.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [ kvm-Bugs-1829614 ] ioapic.c:214: error: 'dest_LowestPrio' undeclared
On Sat, Nov 10, 2007 at 11:19:01AM -0800, SourceForge.net wrote: Bugs item #1829614, was opened at 2007-11-10 21:19 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=1829614group_id=180599 had to revert the fix for these which was committed here : http://git.kernel.org/?p=virt/kvm/kvm-userspace.git;a=commitdiff;h=5d6ea6b370ff9aae1dd7671b71e89351749fbeee#patch1 because (at least in gentoo and vanilla kernels) all those are defined in asm/io_apic.h as part of the following enum : 64 enum ioapic_irq_destination_types { 65 dest_Fixed = 0, 66 dest_LowestPrio = 1, 67 dest_SMI = 2, 68 dest__reserved_1 = 3, 69 dest_NMI = 4, 70 dest_INIT = 5, 71 dest__reserved_2 = 6, 72 dest_ExtINT = 7 73 }; leading to invalid code after the preprocessor run as shown by the following compilation error : In file included from kvm-52/kernel/ioapic.c:43: include/asm/io_apic.h:65: error: expected identifier before numeric constant make[2]: *** [kernel/ioapic.o] Error 1 make[1]: *** [kernel] Error 2 Carlo - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] qemu: simulate edge-triggered interrupt in master PIC for time-drift-fix
The following patch fixes 1a483ef4040ed380bf69d684783d06a617073256 so that the parent PIC pointer is used to send the edge irq0 instead of the PIC pair and that is an incompatible pointer type as reported in : /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/hw/i8259.c: In function ` pic_read_irq': /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/hw/i8259.c:248: warning: passing arg 1 of `pic_set_irq1' from incompatible pointer type /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/hw/i8259.c:249: warning: passing arg 1 of `pic_set_irq1' from incompatible pointer type Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/i8259.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/hw/i8259.c b/qemu/hw/i8259.c index 01447d7..60063d4 100644 --- a/qemu/hw/i8259.c +++ b/qemu/hw/i8259.c @@ -245,8 +245,8 @@ int pic_read_irq(PicState2 *s) if (timer_ints_to_push 0) { timer_ints_to_push--; /* simulate an edge irq0, like the one generated by i8254 */ -pic_set_irq1(s, 0, 0); -pic_set_irq1(s, 0, 1); +pic_set_irq1(s-pics[0], 0, 0); +pic_set_irq1(s-pics[0], 0, 1); } } -- 1.5.2.5 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [RFC] qemu: simulate edge-triggered interrupt in master PIC for time-drift-fix
wrong patch, this was meant to go to the slave PIC, so it will use s-pics[1] instead of s-pics[0]. also from my tests it might seem that tdf is irrelevant anyway with the new clock work and haven't been able to find a case where enabling it (so triggering this buggy code path) migh be needed. any one care to comment on any current users of tdf? and if there are none in the viability for removing it? Carlo On Fri, Nov 09, 2007 at 11:22:10AM -0600, Carlo Marcelo Arenas Belon wrote: The following patch fixes 1a483ef4040ed380bf69d684783d06a617073256 so that the parent PIC pointer is used to send the edge irq0 instead of the PIC pair and that is an incompatible pointer type as reported in : /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/hw/i8259.c: In function ` pic_read_irq': /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/hw/i8259.c:248: warning: passing arg 1 of `pic_set_irq1' from incompatible pointer type /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/hw/i8259.c:249: warning: passing arg 1 of `pic_set_irq1' from incompatible pointer type Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/i8259.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/hw/i8259.c b/qemu/hw/i8259.c index 01447d7..60063d4 100644 --- a/qemu/hw/i8259.c +++ b/qemu/hw/i8259.c @@ -245,8 +245,8 @@ int pic_read_irq(PicState2 *s) if (timer_ints_to_push 0) { timer_ints_to_push--; /* simulate an edge irq0, like the one generated by i8254 */ -pic_set_irq1(s, 0, 0); -pic_set_irq1(s, 0, 1); +pic_set_irq1(s-pics[0], 0, 0); +pic_set_irq1(s-pics[0], 0, 1); } } -- 1.5.2.5 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [RFC] qemu: simulate edge-triggered interrupt in master PIC for time-drift-fix
On Sat, Nov 10, 2007 at 12:35:34AM +0200, Dor Laor wrote: Carlo Marcelo Arenas Belon wrote: wrong patch, this was meant to go to the slave PIC, so it will use s-pics[1] instead of s-pics[0]. Why to the slave pic? Isn't the pit connected to line 0 of the master? yes, you are right; 8254 should be connected to line 0 of the master 8259 and using the slave PIC is not correct. sadly, with the patch and while trying to test if it make a difference or not, I found that when using -no-kvm-irqchip -tdf with an ACPI enabled guest (Fedora 7 x86_64) it was dying with the following kernel panic : MP-BIOS bug: 8254 timer not connected to IO-APIC Kernel panic - not syncing: IO-APIC + timer doesn't work! Try using the 'noapic' kernel parameter. and pressummed I misread the code and got the wrong PIC; when that problem was already happenning even without the patch. so to resume, the original patch should be right, and probably closer to what the original implementation of tdf was doing; but that original implementation has a bug with ACPI and the current code works eventhough is obviously broken, just because the compiler is packing the PicState2 struct in a way that makes s and s-pics[0] point to the same address. also from my tests it might seem that tdf is irrelevant anyway with the new clock work and haven't been able to find a case where enabling it (so triggering this buggy code path) migh be needed. any one care to comment on any current users of tdf? and if there are none in the viability for removing it? It does work but only for non-acpi guest that has the -no-kvm-irqchip parameter. To test it you can load your host and see what happens to the clock when you run a 1000HZ guest (use taskset to pin the guest with other cpu intensive tasks.) We decided not to fix it in the in-kernel pic since once the tpr optimization enable running acpi/apic guests and thus the pic is not used as time source. Dor. not sure if I follow what you meant here, but I had been able to reproduce the time drifts at least when using -no-acpi Carlo On Fri, Nov 09, 2007 at 11:22:10AM -0600, Carlo Marcelo Arenas Belon wrote: The following patch fixes 1a483ef4040ed380bf69d684783d06a617073256 so that the parent PIC pointer is used to send the edge irq0 instead of the PIC pair and that is an incompatible pointer type as reported in : /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/hw/i8259.c: In function ` pic_read_irq': /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/hw/i8259.c:248: warning: passing arg 1 of `pic_set_irq1' from incompatible pointer type /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/hw/i8259.c:249: warning: passing arg 1 of `pic_set_irq1' from incompatible pointer type Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/hw/i8259.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/hw/i8259.c b/qemu/hw/i8259.c index 01447d7..60063d4 100644 --- a/qemu/hw/i8259.c +++ b/qemu/hw/i8259.c @@ -245,8 +245,8 @@ int pic_read_irq(PicState2 *s) if (timer_ints_to_push 0) { timer_ints_to_push--; /* simulate an edge irq0, like the one generated by i8254 */ -pic_set_irq1(s, 0, 0); -pic_set_irq1(s, 0, 1); +pic_set_irq1(s-pics[0], 0, 0); +pic_set_irq1(s-pics[0], 0, 1); } } -- 1.5.2.5 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 11 of 17] Move msrs functions to libkvm-x86.c
On Tue, Nov 06, 2007 at 10:48:52AM -0600, Jerone Young wrote: Move msrs functions to libkvm-x86.c This patch moves functions: kvm_msr_list move kvm_get_msrs move kvm_set_msrs the problem is that with this the definitions were moved as well from libkvm.h to kvm-x86.h which is private and not meant to be exported outside of libkvm but those 3 functions are used by qemu-kvm.c as shown by : /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/qemu-kvm.c: In function `load_regs': /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/qemu-kvm.c:319: warning: implicit declaration of function `kvm_set_msrs' /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/qemu-kvm.c: In function `save_regs': /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/qemu-kvm.c:457: warning: implicit declaration of function `kvm_get_msrs' /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/qemu-kvm.c: In function `kvm_qemu_create_context': /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/qemu-kvm.c:1020: warning: implicit declaration of function `kvm_get_msr_list' /var/tmp/portage/app-emulation/kvm-51/work/kvm-51/qemu/qemu-kvm.c:1020: warning: assignment makes pointer from integer without a cast the following patch moves them to a new public arch specific header for libkvm named libkvm-x86.h and that needs to be installed in userspace as well but is not completely independent and would had been as well ifdef inside libkvm.h for simplicity. Jerone or anyone else that is working in the architectural work care to comment? Carlo PS. tested in amd64 -- diff --git a/libkvm/Makefile b/libkvm/Makefile index 65efb3a..bbeb564 100644 --- a/libkvm/Makefile +++ b/libkvm/Makefile @@ -26,6 +26,7 @@ libkvm.a: libkvm.o $(libkvm-$(ARCH)-objs) install: install -D libkvm.h $(DESTDIR)/$(PREFIX)/include/libkvm.h + install -D libkvm-x86.h $(DESTDIR)/$(PREFIX)/include/libkvm-x86.h install -D $(KERNELDIR)/include/linux/kvm.h \ $(DESTDIR)/$(PREFIX)/include/linux/kvm.h install -D $(KERNELDIR)/include/linux/kvm_para.h \ diff --git a/libkvm/kvm-x86.h b/libkvm/kvm-x86.h index b531a3b..1e1c718 100644 --- a/libkvm/kvm-x86.h +++ b/libkvm/kvm-x86.h @@ -19,8 +19,7 @@ #define KVM_X86_H #include kvm-common.h - -#include kvm-common.h +#include libkvm-x86.h #define PAGE_SIZE 4096ul #define PAGE_MASK (~(PAGE_SIZE - 1)) @@ -42,8 +41,4 @@ int kvm_run_abi10(kvm_context_t kvm, int vcpu); void kvm_show_code(kvm_context_t kvm, int vcpu); -struct kvm_msr_list *kvm_get_msr_list(kvm_context_t); -int kvm_get_msrs(kvm_context_t, int vcpu, struct kvm_msr_entry *msrs, int n); -int kvm_set_msrs(kvm_context_t, int vcpu, struct kvm_msr_entry *msrs, int n); - #endif diff --git a/libkvm/libkvm-x86.h b/libkvm/libkvm-x86.h new file mode 100644 index 000..6531d1f --- /dev/null +++ b/libkvm/libkvm-x86.h @@ -0,0 +1,12 @@ +/** \file libkvm-x86.h + * libkvm for x86 API + */ + +#ifndef LIBKVM_X86_H +#define LIBKVM_X86_H + +struct kvm_msr_list *kvm_get_msr_list(kvm_context_t kvm); +int kvm_get_msrs(kvm_context_t kvm, int vcpu, struct kvm_msr_entry *msrs, int n); +int kvm_set_msrs(kvm_context_t kvm, int vcpu, struct kvm_msr_entry *msrs, int n); + +#endif diff --git a/libkvm/libkvm.h b/libkvm/libkvm.h index b00d658..173566f 100644 --- a/libkvm/libkvm.h +++ b/libkvm/libkvm.h @@ -19,6 +19,10 @@ struct kvm_context; typedef struct kvm_context *kvm_context_t; +#if defined(__x86_64__) || defined(__i386__) +#include libkvm-x86.h +#endif + /*! * \brief KVM callbacks structure * - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [RFC v2] passthrough for configure options to qemu
The following patch Implement a configure passthrough for qemu and migrate all current qemu specific configuration flags (enable-alsa, disable-vnc-tls and disable-gcc-check) to use it. It uses qemu's configure to get a list of hints for additional options to use and to keep backward compatible descriptions with what was used before (adding disable-gcc-check statically with its warning about using gcc4). Carlo --- diff --git a/configure b/configure index a0c8746..346392d 100755 --- a/configure +++ b/configure @@ -6,9 +6,7 @@ want_module=1 qemu_cc= qemu_cflags= qemu_ldflags= -enable_alsa= -disable_vnc_tls= -disable_gcc_check= +qemu_conf= cross_prefix= arch=`uname -m` target_exec= @@ -26,11 +24,16 @@ usage() { --qemu-cc=CC specify compiler for qemu (must be gcc-3.x) --qemu-cflags=CFLAGS CFLAGS to add to qemu configuration --qemu-ldflags=LDFLAGS LDFLAGS to add to qemu configuration - --enable-alsa enable alsa support for qemu - --disable-vnc-tls disable vnc tls support for qemu + + Any additional option is given to qemu's configure verbatim; including: --disable-gcc-checkdon't insist on gcc-3.x CAUTION: this will break running without kvm EOF +cd qemu +./configure --help | egrep enable-|disable- \ +| grep -v user | grep -v system | grep -v kqemu | grep -v kvm \ +| sed -e s/^ //g \ +| sed -es/ enable/enable/g | sed -e s/ disable/disable/g exit 1 } @@ -60,15 +63,6 @@ while [[ $1 = -* ]]; do --qemu-ldflags) qemu_ldflags=$arg ;; - --enable-alsa) - enable_alsa=1 - ;; - --disable-vnc-tls) - disable_vnc_tls=1 - ;; - --disable-gcc-check) - disable_gcc_check=1 - ;; --arch) arch=$arg ;; @@ -79,7 +73,7 @@ while [[ $1 = -* ]]; do usage ;; *) - usage + qemu_conf=$qemu_conf $opt ;; esac done @@ -111,13 +105,10 @@ fi --disable-kqemu --extra-cflags=-I $PWD/../user $qemu_cflags \ --extra-ldflags=-L $PWD/../user $qemu_ldflags \ --enable-kvm --kernel-path=$libkvm_kerneldir \ -${enable_alsa:+--enable-alsa} \ -${disable_vnc_tls:+--disable-vnc-tls} \ -${disable_gcc_check:+--disable-gcc-check} \ --prefix=$prefix \ ${qemu_cc:+--cc=$qemu_cc} \ ${cross_prefix:+--cross-prefix=$cross_prefix} \ -${cross_prefix:+--cpu=$arch} +${cross_prefix:+--cpu=$arch} $qemu_conf ) - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [RFC] passthrough for configure options to qemu
On Mon, Oct 22, 2007 at 09:51:24PM +0200, Avi Kivity wrote: Carlo Marcelo Arenas Belon wrote: On Sun, Oct 21, 2007 at 01:25:34PM +0200, Avi Kivity wrote: Is it possible in case of a failure due to an unrecognized option to call out usage() instead of qemu's? not sure what you mean, but qemu's configure ignores any unrecognized options so it won't fail. That's a bug. I'm sure qemu-devel would appreciate a patch. I think that was a feature instead, considering that there is almost no implementation for reinforcing the defaults and so --disable-alsa (as an example) will fail as an unknown option. nevertheless will try to upstream the changes required Carlo - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [RFC v3] passthrough for configure options to qemu
The following patch implement a configure passthrough for qemu and migrate all currently implemented qemu specific configuration flags (enable-alsa, disable-vnc-tls and disable-gcc-check) to use it. It uses qemu's configure to get a list of hints for additional options to use and to keep backward compatible descriptions of the options that can be used, but adding disable-gcc-check statically so it is clear what the impact of overriding the use of gcc4 is. Qemu's configure has been enhanced to protect against the use of invalid options as well as reconfigured to stderr for fatal errors so they can be integrated into kvm's configure. Carlo --- diff --git a/configure b/configure index a0c8746..43bd8a7 100755 --- a/configure +++ b/configure @@ -6,9 +6,7 @@ want_module=1 qemu_cc= qemu_cflags= qemu_ldflags= -enable_alsa= -disable_vnc_tls= -disable_gcc_check= +qemu_conf= cross_prefix= arch=`uname -m` target_exec= @@ -26,11 +24,16 @@ usage() { --qemu-cc=CC specify compiler for qemu (must be gcc-3.x) --qemu-cflags=CFLAGS CFLAGS to add to qemu configuration --qemu-ldflags=LDFLAGS LDFLAGS to add to qemu configuration - --enable-alsa enable alsa support for qemu - --disable-vnc-tls disable vnc tls support for qemu + + Any additional option is given to qemu's configure verbatim; including: --disable-gcc-checkdon't insist on gcc-3.x CAUTION: this will break running without kvm EOF +cd qemu +./configure --help | egrep enable-|disable- \ +| grep -v user | grep -v system | grep -v kqemu | grep -v kvm \ +| sed -e s/^ //g \ +| sed -es/ enable/enable/g | sed -e s/ disable/disable/g exit 1 } @@ -60,15 +63,6 @@ while [[ $1 = -* ]]; do --qemu-ldflags) qemu_ldflags=$arg ;; - --enable-alsa) - enable_alsa=1 - ;; - --disable-vnc-tls) - disable_vnc_tls=1 - ;; - --disable-gcc-check) - disable_gcc_check=1 - ;; --arch) arch=$arg ;; @@ -79,7 +73,7 @@ while [[ $1 = -* ]]; do usage ;; *) - usage + qemu_conf=$qemu_conf $opt ;; esac done @@ -111,14 +105,11 @@ fi --disable-kqemu --extra-cflags=-I $PWD/../user $qemu_cflags \ --extra-ldflags=-L $PWD/../user $qemu_ldflags \ --enable-kvm --kernel-path=$libkvm_kerneldir \ -${enable_alsa:+--enable-alsa} \ -${disable_vnc_tls:+--disable-vnc-tls} \ -${disable_gcc_check:+--disable-gcc-check} \ --prefix=$prefix \ ${qemu_cc:+--cc=$qemu_cc} \ ${cross_prefix:+--cross-prefix=$cross_prefix} \ -${cross_prefix:+--cpu=$arch} -) +${cross_prefix:+--cpu=$arch} $qemu_conf /dev/null +) || usage cat EOF config.mak diff --git a/qemu/configure b/qemu/configure index fc1e59a..a95018a 100755 --- a/qemu/configure +++ b/qemu/configure @@ -311,6 +311,8 @@ for opt do *) echo undefined SPARC architecture. Exiting;exit 1;; esac ;; + *) show_help=yes + ;; esac done @@ -419,7 +421,7 @@ EOF if $cc -c -o $TMPO $TMPC 2 /dev/null ; then : C compiler works ok else -echo ERROR: \$cc\ either does not exist or does not work +echo ERROR: \$cc\ either does not exist or does not work 12 exit 1 fi @@ -438,26 +440,26 @@ if test $check_gcc = yes ; then int main(){return 0;} EOF if $cc -o $TMPE $TMPC 2 /dev/null ; then - echo WARNING: \$cc\ looks like gcc 4.x + echo WARNING: \$cc\ looks like gcc 4.x 12 found_compat_cc=no if test $gcc3_search = yes ; then - echo Looking for gcc 3.x + echo Looking for gcc 3.x 12 for compat_cc in $gcc3_list ; do if $cross_prefix$compat_cc --version 2 /dev/null | fgrep '(GCC) 3.' /dev/null 21 ; then - echo Found \$compat_cc\ + echo Found \$compat_cc\ 12 cc=$cross_prefix$compat_cc found_compat_cc=yes break fi done if test $found_compat_cc = no ; then - echo gcc 3.x not found! + echo gcc 3.x not found! 12 fi fi if test $found_compat_cc = no ; then - echo QEMU is known to have problems when compiled with gcc 4.x - echo It is recommended that you use gcc 3.x to build QEMU - echo To use this compiler anyway, configure with --disable-gcc-check + echo QEMU is known to have problems when compiled with gcc 4.x 12 + echo It is recommended that you use gcc 3.x to build QEMU 12 + echo To use this compiler anyway, configure with --disable-gcc-check 12 exit 1; fi fi @@ -970,9 +972,9 @@ esac if test $target_user_only = no -a $check_gfx = yes
[kvm-devel] [RFC] passthrough for configure options to qemu
The following patch Implement a configure passthrough for qemu and migrate all current qemu specific configuration flags (enable-alsa, disable-vnc-tls and disable-gcc-check) to use it. It leaves a description of the current flags (as used in kvm's configure) as a reference but I'm not sure if that is the right approach since the wording with the corresponding qemu flags is different and the list is obviously never going to be all inclusive. Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- configure | 26 +++--- 1 files changed, 7 insertions(+), 19 deletions(-) diff --git a/configure b/configure index a0c8746..e4ef880 100755 --- a/configure +++ b/configure @@ -6,9 +6,7 @@ want_module=1 qemu_cc= qemu_cflags= qemu_ldflags= -enable_alsa= -disable_vnc_tls= -disable_gcc_check= +qemu_conf= cross_prefix= arch=`uname -m` target_exec= @@ -26,8 +24,10 @@ usage() { --qemu-cc=CC specify compiler for qemu (must be gcc-3.x) --qemu-cflags=CFLAGS CFLAGS to add to qemu configuration --qemu-ldflags=LDFLAGS LDFLAGS to add to qemu configuration - --enable-alsa enable alsa support for qemu - --disable-vnc-tls disable vnc tls support for qemu + + Any additional option is given to qemu's configure verbatim, including: + --enable-alsa enable alsa support + --disable-vnc-tls disable vnc tls support --disable-gcc-checkdon't insist on gcc-3.x CAUTION: this will break running without kvm EOF @@ -60,15 +60,6 @@ while [[ $1 = -* ]]; do --qemu-ldflags) qemu_ldflags=$arg ;; - --enable-alsa) - enable_alsa=1 - ;; - --disable-vnc-tls) - disable_vnc_tls=1 - ;; - --disable-gcc-check) - disable_gcc_check=1 - ;; --arch) arch=$arg ;; @@ -79,7 +70,7 @@ while [[ $1 = -* ]]; do usage ;; *) - usage + qemu_conf=$qemu_conf $opt ;; esac done @@ -111,13 +102,10 @@ fi --disable-kqemu --extra-cflags=-I $PWD/../user $qemu_cflags \ --extra-ldflags=-L $PWD/../user $qemu_ldflags \ --enable-kvm --kernel-path=$libkvm_kerneldir \ -${enable_alsa:+--enable-alsa} \ -${disable_vnc_tls:+--disable-vnc-tls} \ -${disable_gcc_check:+--disable-gcc-check} \ --prefix=$prefix \ ${qemu_cc:+--cc=$qemu_cc} \ ${cross_prefix:+--cross-prefix=$cross_prefix} \ -${cross_prefix:+--cpu=$arch} +${cross_prefix:+--cpu=$arch} $qemu_conf ) -- 1.5.2.5 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 0/2] add flags for conditional compilation of qemu dependencies
On Wed, Oct 17, 2007 at 06:55:02PM +0200, Avi Kivity wrote: Carlo Marcelo Arenas Belon wrote: This series adds options to kvm's configure that match the ones used by qemu to conditionally enable or disable options that alter its runtime dependencies and functionality, like for example, support for alsa or TLS encrypted vnc sessions. Applied both, thanks. But if someone is thinking of a patch flood to add all qemu options, I'd prefer a passthrough instead. The only other option I was interested in implementing was the one to conditionally enable or disable support for sdl, but I can see why a passthrough is a better option in the long run. Carlo - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [RFC] modular dependencies for kvm's qemu
On Tue, Oct 16, 2007 at 10:36:03AM -0500, Carlo Marcelo Arenas Belon wrote: On Tue, Oct 16, 2007 at 04:20:37PM +0200, Avi Kivity wrote: Carlo Marcelo Arenas Belon wrote: It seems like rather a bad idea to suddenly switch the configure script defaults in the way you suggest for alsa. It really wouldn't be much harder to set enable_alsa=1 in the top of configure, and then have the flag toggle it to off. ok, but if that is added to kvm's configure then the logic will be inversed when looking at qemu's configure, probably confusing users. If audio output is going to sdl anyway, then this has no effect on most users, right? it probably wouldn't work out of the box, unless they change QEMU_AUDIO_DRV=alsa to : QEMU_AUDIO_DRV=sdl SDL_AUDIODRIVER=alsa but I never had sound support configured so I am no way expert and can't test if that is the case or if that is the way it fallsback (will take a closer look at the code later though). for the cases where qemu doesn't have alsa support but the environment variables point to using alsa, then it will complain with : audio: Unknown audio driver 'alsa' audio: Run with -audio-help to list available drivers but then it will scan for an available audio driver it can use by default and configure SDL instead, probably with alsa support if that is available, as done explicitly by the second set of environment variables. tested it with a 64bit linux host running a 32bit windows 2000 advanced server guest using -soundhw sb16. in a hopefully unrelated note, using alsa directly wouldn't work as well as using alsa through SDL, so I guess that the impact on the users is actually positive if using SDL is also more reliable. anyone with more audio experience care to comment? Carlo - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [RFC] modular dependencies for kvm's qemu
On Tue, Oct 16, 2007 at 02:39:30PM +0100, Daniel P. Berrange wrote: On Tue, Oct 16, 2007 at 04:22:14AM -0500, Carlo Marcelo Arenas Belon wrote: I am curious if the approach taken for alsa (which is the one that fits what qemu's configure allows for this case) is acceptable or not, as it will change the dependency on alsa from being required by default to optional and unless --enable-alsa is used. So why don't you use --disable-alsa in the patch instead. because the only option available in qemu is to enable alsa with that flag; there is no --disable-alsa in qemu's configure unless we add one (*). It seems like rather a bad idea to suddenly switch the configure script defaults in the way you suggest for alsa. It really wouldn't be much harder to set enable_alsa=1 in the top of configure, and then have the flag toggle it to off. ok, but if that is added to kvm's configure then the logic will be inversed when looking at qemu's configure, probably confusing users. on the other hand, if --disable-alsa is added to qemu's configure so that it can be used with the same logic in both sides then the objective of trying to keep the qemu changes to a minimum will be violated. hence why I though that changing the default (which seemed arbitrary at least) was probably the lesser of all evils. Carlo (*) qemu's configure is not coming from autotools but is a custom script that performs a similar function that an autoconf'ed configure would do but not with all the functionality you would usually expect for it. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [RFC] modular dependencies for kvm's qemu
On Tue, Oct 16, 2007 at 04:20:37PM +0200, Avi Kivity wrote: Carlo Marcelo Arenas Belon wrote: It seems like rather a bad idea to suddenly switch the configure script defaults in the way you suggest for alsa. It really wouldn't be much harder to set enable_alsa=1 in the top of configure, and then have the flag toggle it to off. ok, but if that is added to kvm's configure then the logic will be inversed when looking at qemu's configure, probably confusing users. If audio output is going to sdl anyway, then this has no effect on most users, right? it probably wouldn't work out of the box, unless they change QEMU_AUDIO_DRV=alsa to : QEMU_AUDIO_DRV=sdl SDL_AUDIODRIVER=alsa but I never had sound support configured so I am no way expert and can't test if that is the case or if that is the way it fallsback (will take a closer look at the code later though). If so I prefer being closer to qemu as you suggest. you mean closer as on using the same syntax, or closer as on avoiding changing qemu unless absolutely needed? Carlo - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH] Abort if gcc4 was used to compile qemu and kvm is not enabled
On Mon, Oct 08, 2007 at 02:29:32PM -0500, Anthony Liguori wrote: Eventually, KVM will merge with upstream QEMU. In that case, many people will be using QEMU without the desiring to use KVM. We don't want to introduce behavior in QEMU that is unmergable with upstream QEMU b/c that will just cause users more headache when that behavior is eventually change. As I mentioned in the patch proposed, I don't expect for this patch to be ever merged upstream (even if a solution like that might be possible for kqemu based emulations as well). It is for the same reason that I considered this approach; which keeps the changes to a minimum and localized to the KVM patches so it can be easily stripped out when it is no longer needed. The alternatives are IMHO more difficult to manage : 1) Have all users of platforms that have no gcc-3.x (currently OpenSUSE and soon enough Debian and derivatives like Ubuntu) with no way to be able to use kvm, unless they can somehow figure out how to compile a gcc-3.x compiler and use that to build kvm or rely on their distributions to do that for them. 2) Add several patches to our qemu (like the ones from Novell) to get it to build with gcc-4.x. Then everyone (including the ones which should be using gcc-3.x instead) start using it and then we are suddenly supporting performance problems, miscompilation bugs, and overall issues in qemu instead of kvm (not including the misreported bugs from users that though they were running kvm when they forgot to load the module) while making a merge with upstream much more difficult. 3) We do nothing, add a warning to the compilation for the users to read at compile time (most of them not aware that they should be using gcc-3.x instead as they are used to see all the other compilation warnings anyway) and then let kvm segfault when they start it without loading the module first. If nothing, a message saying this won't work because you used the wrong compiler, is IMHO better than a plain segfault. Carlo PS. if qemu gets upstream officially a solution to compile with gcc4, I'll be the first one getting that merged and removing this patch. PS2. getting gcc4 to generate valid chunks of copyable code as required by qemu's dyngen is not something that would happen accidentally, for a promising alternative look at the GCC 2007 proceedings abstract Towards GCC as a compiler for multiple VMs, pages 117-130, http://ols2006.108.redhat.com/2007/GCC-Reprints/GCC2007-Proceedings.pdf - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [RFC] let kvm be compiled with gcc4 and prevent users to shoot themselves in the foot while doing so (was Re: [ kvm-Bugs-1807620 ] KVM's --disable-gcc-check doesn't work)
On Sun, Oct 07, 2007 at 06:18:27PM -0400, Jim Paris wrote: + if test $check_gcc = no ; then +if gcc -v 21 | grep -q 'gcc *version *4\.[0-3]\.[0-9]'; then + echo #define USE_GCC4 1 $config_h +fi + fi Something like #if __GNUC__ = 4 in the code would be simpler. really good idea; and also as a side effect makes the patches independent as there is no need to have that qemu's configure glue anymore. Carlo - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] Allow users to override compiler checks for gcc3 by only using --disable-gcc-check as done in qemu
Allow users to override the compiler checks for gcc3 that are required for compatibility with qemu in the same way that qemu does. If the qemu-cc option is not used but disable-gcc-check is requested then assume that the default system gcc should be used (chosen by name) This patch fixes sourceforge bug id 1807620 Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- configure |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configure b/configure index d9292fe..33a56d2 100755 --- a/configure +++ b/configure @@ -63,8 +63,12 @@ while [[ $1 = -* ]]; do done if [[ -z $qemu_cc ]]; then -echo $0: cannot locate gcc 3.x. please install it or specify with --qemu-cc -exit 1 +if [[ -z $disable_gcc_check ]]; then +echo $0: cannot locate gcc 3.x. please install it or specify with --qemu-cc +exit 1 +else +qemu_cc=gcc +fi fi libkvm_kerneldir=$kerneldir -- 1.5.2.5 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH] Abort if gcc4 was used to compile qemu and kvm is not enabled
Using gcc4 to compile qemu will generate broken code for its cpu emulation but should be fine if using kvm only. This will allow users that have no access to gcc4 on their platforms to at least get kvm compiled and use it while preventing them to run a broken qemu if kvm is not available. This is not meant to be used in the long run when a solution to qemu's use of gcc-3.x for code generation is finally resolved upstream, which is why it is kept inside the KVM specific sections of the code only. Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] --- qemu/vl.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/qemu/vl.c b/qemu/vl.c index 634fb34..549f008 100644 --- a/qemu/vl.c +++ b/qemu/vl.c @@ -8425,8 +8425,13 @@ int main(int argc, char **argv) #endif #ifdef USE_KVM case QEMU_OPTION_no_kvm: +#if __GNUC__ = 4 + fprintf(stderr, Can't run without kvm if compiled with gcc4\n); + exit(1); +#else kvm_allowed = 0; break; +#endif case QEMU_OPTION_no_kvm_irqchip: kvm_irqchip = 0; break; @@ -8559,8 +8564,13 @@ int main(int argc, char **argv) #if USE_KVM if (kvm_allowed) { if (kvm_qemu_init() 0) { +#if __GNUC__ = 4 + fprintf(stderr, Could not initialize KVM, can't run without kvm if compiled with gcc4\n); + exit(1); +#else fprintf(stderr, Could not initialize KVM, will disable KVM support\n); kvm_allowed = 0; +#endif } } #endif -- 1.5.2.5 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [RFC] let kvm be compiled with gcc4 and prevent users to shoot themselves in the foot while doing so (was Re: [ kvm-Bugs-1807620 ] KVM's --disable-gcc-check doesn't work)
On Thu, Oct 04, 2007 at 04:39:30PM -0400, Gregory Haskins wrote: On Thu, 2007-10-04 at 21:49 +0200, Farkas Levente wrote: here i mean that packaging kvm for fedora/redhat/centos using gcc-4.x in stead of gcc-3.x. if currently there is no reason to use gcc-3.x than i change all of my spec file. You *could*, sure. I have done this for local builds here. But if you go that route I would recommend making a patch to KVM so it doesn't fall back into QEMU mode automatically (today if it can't open the kvm module it will assume -no-kvm like behavior). Otherwise you will have a bunch of support calls about why its not working properly should someone cause the system to fall back. And considering also there might be other yet unknown bugs because of gcc4, it is most likely better to stick to use gcc-3.x, unless there is really no other option. For cases where no compat-gcc package is provided (like in OpenSUSE) then the following is IMHO the next best approach to force users to get gcc-3.x compiler installed from source just to be able to compile kvm. Carlo PS. please let me know what you think about it and if interested so I can provide the 3 patches (or more if more changes are needed) in a [PATCH] series for easy git-am'ing --- diff --git a/configure b/configure index d9292fe..33a56d2 100755 --- a/configure +++ b/configure @@ -63,8 +63,12 @@ while [[ $1 = -* ]]; do done if [[ -z $qemu_cc ]]; then -echo $0: cannot locate gcc 3.x. please install it or specify with --qemu-cc -exit 1 +if [[ -z $disable_gcc_check ]]; then +echo $0: cannot locate gcc 3.x. please install it or specify with --qemu-cc +exit 1 +else +qemu_cc=gcc +fi fi libkvm_kerneldir=$kerneldir diff --git a/qemu/configure b/qemu/configure index fc1e59a..15549e3 100755 --- a/qemu/configure +++ b/qemu/configure @@ -1022,6 +1022,11 @@ if test $target_cpu = i386 ; then if test $kqemu = yes -a $target_softmmu = yes -a $cpu = i386 ; then echo #define USE_KQEMU 1 $config_h fi + if test $check_gcc = no ; then +if gcc -v 21 | grep -q 'gcc *version *4\.[0-3]\.[0-9]'; then + echo #define USE_GCC4 1 $config_h +fi + fi configure_kvm elif test $target_cpu = arm -o $target_cpu = armeb ; then echo TARGET_ARCH=arm $config_mak @@ -1059,6 +1064,11 @@ elif test $target_cpu = x86_64 ; then if test $kqemu = yes -a $target_softmmu = yes -a $cpu = x86_64 ; then echo #define USE_KQEMU 1 $config_h fi + if test $check_gcc = no ; then +if gcc -v 21 | grep -q 'gcc *version *4\.[0-3]\.[0-9]'; then + echo #define USE_GCC4 1 $config_h +fi + fi configure_kvm elif test $target_cpu = mips -o $target_cpu = mipsel ; then echo TARGET_ARCH=mips $config_mak diff --git a/qemu/vl.c b/qemu/vl.c index fe49d2c..2f78955 100644 --- a/qemu/vl.c +++ b/qemu/vl.c @@ -8421,8 +8421,13 @@ int main(int argc, char **argv) #endif #ifdef USE_KVM case QEMU_OPTION_no_kvm: +#ifdef USE_GCC4 + fprintf(stderr, Can't run without kvm if compiled with gcc4\n); + exit(1); +#else kvm_allowed = 0; break; +#endif case QEMU_OPTION_no_kvm_irqchip: kvm_irqchip = 0; break; @@ -8552,8 +8557,13 @@ int main(int argc, char **argv) #if USE_KVM if (kvm_allowed) { if (kvm_qemu_init() 0) { +#if USE_GCC4 + fprintf(stderr, Could not initialize KVM, can't run without kvm if compiled with gcc4\n); + exit(1); +#else fprintf(stderr, Could not initialize KVM, will disable KVM support\n); kvm_allowed = 0; +#endif } } #endif - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel