[PATCH] Fix build without cpu-emulation
Commit 618ba removed parameter puc, fix it in fake-exec.c. Signed-off-by: Bernhard Held bh...@mgpi.de --- target-i386/fake-exec.c |4 +--- target-ia64/fake-exec.c |4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/target-i386/fake-exec.c b/target-i386/fake-exec.c index e6f8363..da4bd36 100644 --- a/target-i386/fake-exec.c +++ b/target-i386/fake-exec.c @@ -31,9 +31,7 @@ void cpu_gen_init(void) } int cpu_restore_state(TranslationBlock *tb, - CPUState *env, unsigned long searched_pc, - void *puc) - + CPUState *env, unsigned long searched_pc) { return 0; } diff --git a/target-ia64/fake-exec.c b/target-ia64/fake-exec.c index 8d6ded0..eaadadb 100644 --- a/target-ia64/fake-exec.c +++ b/target-ia64/fake-exec.c @@ -42,9 +42,7 @@ void tcg_dump_info(FILE *f, } int cpu_restore_state(TranslationBlock *tb, - CPUState *env, unsigned long searched_pc, - void *puc) - + CPUState *env, unsigned long searched_pc) { return 0; } -- 1.7.6 -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 04/13] qemu-kvm: Remove eventfd compat header
Am 04.07.2011 12:37, schrieb Michael S. Tsirkin: On Sun, Jul 03, 2011 at 08:31:11PM +0200, Bernhard Held wrote: SYS_eventfd2 is not defined on systems with old glibc. These numbers are working for me, for 32 and 64 bit linux. What means __NR_eventfd2 does seem to exit? My system seems to have a definition for the 64 bit _NR_eventfd2 in unistd.h. # grep __NR_eventfd2 /usr/include/*/*h /usr/include/asm-x86_64/unistd.h:#define __NR_eventfd2 290 So I think we should use another name to avoid conflicts. The definition of __NR_eventfd2 is embraced by #ifndef __NR_eventfd2 ... #endif which effectively avoids conflicts. However the definition of the flags is unconditional, this is indeed buggy. Best regards, Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 04/13] qemu-kvm: Remove eventfd compat header
Am 28.06.2011 13:09, schrieb Michael S. Tsirkin: On Mon, Jun 27, 2011 at 08:19:47PM +0200, Jan Kiszka wrote: From: Jan Kiszkajan.kis...@siemens.com No longer used. Signed-off-by: Jan Kiszkajan.kis...@siemens.com I think it's actually handy to build on old systems which have a recent enough kernel but not the header. Yep, I'm running recent qemu-kvm and kernels on CentOS 5.6. The current eventfd.h was handy in the beginning, but some day I had big troubles with crashing qemu-kvm. It turned out that I had to switch from eventfd to eventfd2. IIRC the old eventfd doesn't care about the flags. My version of eventfd.h is attached. Bernhard --- compat/sys/eventfd.h | 13 - 1 files changed, 0 insertions(+), 13 deletions(-) delete mode 100644 compat/sys/eventfd.h diff --git a/compat/sys/eventfd.h b/compat/sys/eventfd.h deleted file mode 100644 index f55d96a..000 --- a/compat/sys/eventfd.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _COMPAT_SYS_EVENTFD -#define _COMPAT_SYS_EVENTFD - -#includeunistd.h -#includesyscall.h - - -static inline int eventfd (int count, int flags) -{ -return syscall(SYS_eventfd, count, flags); -} - -#endif -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html #ifndef _COMPAT_SYS_EVENTFD #define _COMPAT_SYS_EVENTFD #include unistd.h #include syscall.h /* Flags for signalfd. */ enum { EFD_SEMAPHORE = 1, #define EFD_SEMAPHORE EFD_SEMAPHORE EFD_CLOEXEC = 0200, #define EFD_CLOEXEC EFD_CLOEXEC EFD_NONBLOCK = 04000 #define EFD_NONBLOCK EFD_NONBLOCK }; #ifndef __NR_eventfd2 #if defined(__x86_64__) #define __NR_eventfd2 290 #elif defined(__i386__) #define __NR_eventfd2 328 #else #error Cannot detect your architecture! #endif #endif static inline int eventfd (int count, int flags) { return syscall(__NR_eventfd2, count, flags); } #endif
Re: [PATCH 04/13] qemu-kvm: Remove eventfd compat header
Am 03.07.2011 11:57, schrieb Michael S. Tsirkin: On Sun, Jul 03, 2011 at 12:54:06PM +0300, Michael S. Tsirkin wrote: On Sun, Jul 03, 2011 at 11:46:51AM +0200, Bernhard Held wrote: #ifndef _COMPAT_SYS_EVENTFD #define _COMPAT_SYS_EVENTFD #includeunistd.h #includesyscall.h /* Flags for signalfd. */ enum { EFD_SEMAPHORE = 1, #define EFD_SEMAPHORE EFD_SEMAPHORE EFD_CLOEXEC = 0200, #define EFD_CLOEXEC EFD_CLOEXEC EFD_NONBLOCK = 04000 #define EFD_NONBLOCK EFD_NONBLOCK }; #ifndef __NR_eventfd2 #if defined(__x86_64__) #define __NR_eventfd2 290 #elif defined(__i386__) #define __NR_eventfd2 328 #else #error Cannot detect your architecture! #endif #endif Can't we use SYS_eventfd2 instead? Looks like we can't, but __NR_eventfd2 does seem to exit? SYS_eventfd2 is not defined on systems with old glibc. These numbers are working for me, for 32 and 64 bit linux. What means __NR_eventfd2 does seem to exit? The eventfd() man page nicely documents the evolution: http://www.kernel.org/doc/man-pages/online/pages/man2/eventfd.2.html eventfd() is available on Linux since kernel 2.6.22. Working support is provided in glibc since version 2.8. The eventfd2() system call (see NOTES) is available on Linux since kernel 2.6.27. Since version 2.9, the glibc eventfd() wrapper will employ the eventfd2() system call, if it is supported by the kernel. There are two underlying Linux system calls: eventfd() and the more recent eventfd2(). The former system call does not implement a flags argument. The latter system call implements the flags values described above. The glibc wrapper function will use eventfd2() where it is available. This means that the current compat header is buggy; qemu-kvm sets the flags argument, but the wrapper uses the old eventfd() system call. Bernhard static inline int eventfd (int count, int flags) { return syscall(__NR_eventfd2, count, flags); } #endif -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: KVM induced panic on 2.6.38[2367] 2.6.39
Am 03.06.2011 15:38, schrieb Brad Campbell: On 02/06/11 07:03, CaT wrote: On Wed, Jun 01, 2011 at 07:52:33PM +0800, Brad Campbell wrote: Unfortunately the only interface that is mentioned by name anywhere in my firewall is $DMZ (which is ppp0 and not part of any bridge). All of the nat/dnat and other horrible hacks are based on IP addresses. Damn. Not referencing the bridge interfaces at all stopped our host from going down in flames when we passed it a few packets. These are two of the oopses we got from it. Whilst the kernel here is .35 we got the same issue from a range of kernels. Seems related. Well, I tried sending an explanatory message to netdev, netfilter cc'd to kvm, but it appears not to have made it to kvm or netfilter, and the cc to netdev has not elicited a response. My resend to netfilter seems to have dropped into the bit bucket also. Just another reference 3.5 months ago: http://www.spinics.net/lists/netfilter-devel/msg17239.html Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: qemu-kvm-0.12 bug?
I've switched from -0.11.0 to -0.12 and from 2.6.31.6 to 2.6.32.2 to try the new virtio-memory-API introduced in latest libvirt from git. I can start VMs f.e. by kvm -cdrom $someiso --enable-kvm but my domain configs to not work anymore. Just found the other bug report about this Which solves this problem, but introduces the next. My VMs are stuck at boot, after SeaBIOS...gPXE nothing happens. Similar problem here with 0.12.1.1. I prefer to start my linux guests with -kernel, -append and -initrd. With this options qemu-kvm stuck at boot. Windows 2k8 or CDROM images work flawless. 0.12.0-rc2 didn't show this bug. Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Re: [ANNOUNCE] qemu-kvm-0.12.0-rc2 released
Fix compile without eventfd. Signed-off-by: Bernhard Held bh...@mgpi.de --- compatfd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- qemu-kvm-0.12.0-rc2/compatfd.c +++ qemu-kvm-0.12.0-rc2/compatfd.c @@ -118,9 +118,9 @@ int qemu_eventfd(int *fds) { -#if defined(CONFIG_EVENTFD) int ret; +#if defined(CONFIG_EVENTFD) ret = syscall(SYS_eventfd, 0); if (ret = 0) { fds[0] = ret; -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Question about shutting down Guest KVM during HOST OS shutdown
Hi Arun! send_cmd() { QEMU_MONITOR_COMMAND=$1 echo ${QEMU_MONITOR_COMMAND} | socat - UNIX-CONNECT:${FILE_MONITOR} } which sends the exit command to the qemu process via a socket file. Just send system_powerdown, and your guest will receive an ACPI shutdown request. Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] fix typo
There are two more typos: +echo --disable-cap-device-assignmentdisable KVM device assignemnt ^ +echo --enable-cap-device-assignment enable KVM device assignemnt ^ Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Very high memory usage with KVM
Hi Daniel! Aug 4 17:38:39 ss03 kernel: [4.750023] bnx2 :03:00.0: firmware: requesting bnx2/bnx2-mips-06-4.6.16.fw Aug 4 17:38:39 ss03 kernel: [4.751070] bnx2: Can't load firmware file bnx2/bnx2-mips-06-4.6.16.fw Aug 4 17:38:39 ss03 kernel: [4.751141] bnx2 :03:00.0: PCI INT A disabled Aug 4 17:38:39 ss03 kernel: [4.751167] bnx2: probe of :03:00.0 failed with error -2 Aug 4 17:38:39 ss03 kernel: [4.751244] bnx2 :05:00.0: PCI INT A - GSI 17 (level, low) - IRQ 17 Is bnx2.ko loaded by initramfs? Then the initramfs must contain the requested firmware file. Another possibility is to set FIRMWARE_IN_KERNEL in the kernel config. Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Very high memory usage with KVM
Hi Daniel! I've set in the kernel config: CONFIG_FIRMWARE_IN_KERNEL=y And what happened? Are you sure you recompiled and booted the new kernel with CONFIG_FIRMWARE_IN_KERNEL=y? Although I don't see the asked file in initramfs. The file with full path is /lib/firmware/bnx2/bnx2-mips-06-4.6.16.fw: # zcat /boot/initrd.img-2.6.30.4-dgb | cpio -t | grep bnx2 lib/modules/2.6.30.4-dgb/kernel/drivers/net/bnx2.ko 300859 blocks Whereupon this variable is set to 'y' would not have to be sufficient? just_guessing 1) Perhaps firmware must be in some other directory. 2) Perhaps there is no access to the FS in /lib at the moment that loads drivers. /just_guessing Obviously bnx2.ko is loaded from initramfs. At that time the root filesystem is not accessible. I expected CONFIG_FIRMWARE_IN_KERNEL=y is sufficient to solve the problem. Here is what I would try: - make sure the firmware is included in your kernel, or - keep bnx2.ko from including in initramfs (unless you boot via network), or - include /lib/firmware/bnx2/bnx2-mips-06-4.6.16.fw in initramfs HTH Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: kvm-85 build problem
--- cache-utils.h.orig 2009-04-21 10:46:04.0 +0200 +++ cache-utils.h 2009-04-22 08:39:20.0 +0200 @@ -47,6 +47,8 @@ } #else static inline void qemu_sync_idcache(unsigned long start, unsigned long stop) +{ +} #endif #define qemu_cache_utils_init(envp) do { (void) (envp); } while (0) The package kvm-85.tar.gz on sourceforge was broken. The current package doesn't show this problem. It was fixed just 50 minutes after I download the corrupt package. Thanks anyway, Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: kvm-85: virtio-blk not working
does not boot, BIOS complains Boot failed: could not read the boot disk: -drive file=/dev/VolGroup00/testpart,if=virtio,index=0 \ O.k., this doesn't work on my box too. Please try with: -drive file=/dev/VolGroup00/testpart,if=virtio,index=0,boot=on \ Anthony wrote index doesn't have meaning with virtio-blk. You should omit it, but it doesn't harm on my box. Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: kvm-85 won't boot guests with virtio block device
After an upgrade from kvm-84 to kvm-85 all my guests won't start because no boot device could be found. [...] A rollback to kvm-84 OR changing the hdd from vda to ide for the guests and everything is OK again I'm having the same problem and repored it to the list just some hours ago. No problem here, my guests run fine with kvm-85 and 2.6.29.1: -drive file=$IMG,format=raw,cache=none Do you use the kvm kernel modules that came with your host kernel or the ones that came with kvm-85? I used the ones that came with my 2.6.29.1 host kernel. I use the modules from kvm-85. Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: kvm-85 won't boot guests with virtio block device
After an upgrade from kvm-84 to kvm-85 all my guests won't start because no boot device could be found. No problem here, my guests run fine with kvm-85 and 2.6.29.1: -drive file=$IMG,format=raw,cache=none Are you sure you are using a virtio blockdevice and not a regular ide one? IIRC, you need to add if=virtio to the -drive parameter to get virtio. Or became virtio the default these days? Oh, sorry, I picked the wrong one :-( This is the right example: -drive file=$IMAGE1,if=virtio,format=raw,cache=none,boot=on I'm running 32 bit guest on 32 bit host and 32 bit guest on 64 bit host. Both big floppies and images with partition tables work. Sorry for the noise, Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Unable to boot guest on kernel 2.6.29.1 with kvm-84 or kvm-85
When updating to kernel 2.6.29.1, I'm unable to boot my Windows XP Pro 32bit guest. The problem is consistent (actually on both of my laptops, with two different WinXP guests) and it is fixed immediately when downgrading to kernel 2.6.28.8 or an older kernel version. Works for me with modules from kvm-85. Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
kvm-85 build problem
Hi, this happens on CentOS 5.3: # cd kvm-85/qemu # make CCqemu-nbd.o CCqemu-tool.o CCosdep.o CCcutils.o In file included from cutils.c:27: /usr/include/assert.h: In function ‘qemu_sync_idcache’: /usr/include/assert.h:70: error: storage class specified for parameter ‘__assert_fail’ /usr/include/assert.h:76: error: storage class specified for parameter ‘__assert_perror_fail’ /usr/include/assert.h:82: error: storage class specified for parameter ‘__assert’ cutils.c:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token ... cutils.c:224: error: expected ‘{’ at end of input make: *** [cutils.o] Error 1 gcc 4.1.2 doesn't like functions without body, this patch fixes the problem: --- cache-utils.h.orig 2009-04-21 10:46:04.0 +0200 +++ cache-utils.h 2009-04-22 08:39:20.0 +0200 @@ -47,6 +47,8 @@ } #else static inline void qemu_sync_idcache(unsigned long start, unsigned long stop) +{ +} #endif #define qemu_cache_utils_init(envp) do { (void) (envp); } while (0) Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: kvm-81 and Windows XP with HugePages
Avi Kivity schrieb: Bernhard Held wrote: Windows XP Prof. freezes few seconds after booting on kvm-81 with hugepages. The cpu load stays at 200% (on 2 cores), the screen is black. The process can't be killed, a reboot is required. The same guest runs fine - without hugepages or - with kvm-79 with hugepages. Never tried with kvm-80. Can you check kvm-80? This will help pinpointing the evil commit. WXP works with kvm-80 and hugepages. There are no problems with kvm-80 and all three guests. kvm-80 isn't that bad ;-) Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: kvm-81 and Windows XP with HugePages
Can you check kvm-80? This will help pinpointing the evil commit. WXP works with kvm-80 and hugepages. There are no problems with kvm-80 and all three guests. kvm-80 isn't that bad ;-) Works here. Since there's an mmu fix queued, please try kvm-82 when it's released. Of course I will try kvm-82 and report the result. Thanks for reviewing, Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: KVM: MMU: handle large host sptes on invlpg/resync
The invlpg and sync walkers lack knowledge of large host sptes, descending to non-existant pagetable level. Stop at directory level in such case. Fixes SMP Windows XP with hugepages. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com I happily confirm that with Marcelo's patch applied on kvm-81 my WXP guest is working again with hugepages and SMP. Thanks for the quick fix! Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: with kerenl 2.6.27, CONFIG_KVM_GUEST does not work
Using this patch on a vanilla 2.6.27 kernel, I get this when I try to compile it: arch/x86/kvm/mmu.c: In function ‘kvm_pv_mmu_flush_tlb’: arch/x86/kvm/mmu.c:2241: error: ‘KVM_REQ_MMU_SYNC’ undeclared (first use in this function) arch/x86/kvm/mmu.c:2241: error: (Each undeclared identifier is reported only once arch/x86/kvm/mmu.c:2241: error: for each function it appears in.) make[2]: *** [arch/x86/kvm/mmu.o] Error 1 It was fine with kvm-75 but I still not able to start my ubuntu 2.6.27 guest with kvm 75 qnd kvm 76. host : vanilla 2.6.27 x86_64 guest : ubuntu 8.10 (2.6.27) I must be missing a patch somewhere... What kvm version are you building? The patch is not required for kvm-75, kvm-75 won't build with it. I built kvm-77 with the patch. Try again with at least kvm-76. Bernhard -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html