[kvm-devel] KVM Test result, kernel 6fd19d0.., userspace 7e9f4b6..
Hi This is today's KVM test result against kvm.git 6fd19d01a523fd82db3867402ed1774589bcf6c1 and kvm-userspace.git 7e9f4b6f37133f9b064d391ff59bd82efc6c6050. No new issue has been found. Save/restore test passed on IA32-pae host but failed on IA32e host again. Issues: 1. PAE host hanged on some platforms while booting guests https://sourceforge.net/tracker/index.php?func=detailaid=1849200group_id=180599atid=893831 2. Crashme causes RHEL5 guest kernel panic The guest will kernel panic immediately after starting the test. https://sourceforge.net/tracker/?func=detailatid=893831aid=1840711group_id=180599 3. Timer of guest is inaccurate https://sourceforge.net/tracker/?func=detailatid=893831aid=1826080group_id=180599 4. Cannot install 64bit vista guests. https://sourceforge.net/tracker/?func=detailatid=893831aid=1836905group_id=180599 5. Fails to save/restore guests https://sourceforge.net/tracker/index.php?func=detailaid=1824525group_id=180599atid=893831 6. xp and win2k3 guest crashes https://sourceforge.net/tracker/?func=detailatid=893831aid=1819768group_id=180599 7. xpsp2 with 2vpus may fail to boot https://sourceforge.net/tracker/index.php?func=detailaid=1805017group_id=180599atid=893831 8. Cannot boot 32bit smp RHEL5.1 guest on 64bit host https://sourceforge.net/tracker/?func=detailatid=893831aid=1812043group_id=180599 Test environment Platform woodcrest CPU 4 Memory size 8G' Details PAE: 1. boot guest with 256M memory PASS 2. boot two windows xp guest PASS 3. boot 4 same guest in parallel PASS 4. boot linux and windows guest in parallel PASS 5. boot guest with 1500M memory PASS 6. boot windows 2003 with ACPI enabled FAIL 7. boot Windows xp with ACPI enabled FAIL 8. boot Windows 2000 without ACPI PASS 9. kernel build on SMP linux guest PASS 10. LTP on SMP linux guest PASS 11. boot base kernel linux PASS 12. save/restore 32-bit HVM guests FAIL 13. live migration 32-bit HVM guests FAIL 14. boot SMP Windows xp with ACPI enabled FAIL 15. boot SMP windows 2003 with ACPI enabled FAIL 16. boot SMP Windows 2000 with ACPI enabled FAIL IA32e: 1. boot four 32-bit guest in parallel PASS 2. boot four 64-bit guest in parallel PASS 3. boot 4G 64-bit guest PASS 4. boot 4G pae guest PASS 5. boot 32-bit linux and 32 bit windows guest in parallel PASS 6. boot 32-bit guest with 1500M memory PASS 7. boot 64-bit guest with 1500M memory PASS 8. boot 32-bit guest with 256M memory PASS 9. boot 64-bit guest with 256M memory PASS 10. boot two 32-bit windows xp in parallel PASS 11. boot four 32-bit different guest in para PASS 12. save/restore 64-bit linux guests PASS 13. save/restore 32-bit linux guests PASS 14. boot 32-bit SMP windows 2003 with ACPI enabled PASS 15. boot 32-bit SMP Windows 2000 with ACPI enabled PASS 16. boot 32-bit SMP Windows xp with ACPI enabled FAIL 17. boot 32-bit Windows 2000 without ACPI PASS 18. boot 64-bit Windows xp with ACPI enabled PASS 19. boot 32-bit Windows xp without ACPI PASS 20. boot 64-bit vista PASS 21. kernel build in 32-bit linux guest OS PASS 22. kernel build in 64-bit linux guest OS PASS 23. LTP on SMP 32-bit linux guest OS PASS 24. LTP on SMP 64-bit linux guest OS PASS 25. boot 64-bit guests with ACPI enabled PASS 26. boot 32-bit x-server PASS 27. boot 64-bit SMP windows XP with ACPI enabled FAIL 28. boot 64-bit SMP windows 2003 with ACPI enabled FAIL 29. live migration 64bit linux guests PASS 30. live migration 32bit linux guests PASS Report Summary on IA32-pae Summary Test Report of Last Session = Total PassFailNoResult Crash
[kvm-devel] remove redundant VM Exit for non-aligned guest pte write or part of pte write.
I observed 1-2 seconds faster in Windows XPSP2 ACPI bootup with total of 23 seconds. I can;t say it is exactly caused by this patch, but anyway it simplifies the logic and code w/o any additional complexity. thx,eddie A guest non-aligned pte write or part of pte update will leave shadow_trap_nonpresent_pte in spte, which expects a new VM Exit at next access time. This patch fixed this by reading guest pte in advance and thus be able to update spte and reduce next VM Exit. Signed-off-by: Yaozu (Eddie) Dong [EMAIL PROTECTED] diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 401eb7c..b2fd336 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -1285,8 +1285,7 @@ static void mmu_pte_write_zap_pte(struct kvm_vcpu *vcpu, static void mmu_pte_write_new_pte(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, u64 *spte, - const void *new, int bytes, - int offset_in_pte) + const void *new) { if (sp-role.level != PT_PAGE_TABLE_LEVEL) { ++vcpu-kvm-stat.mmu_pde_zapped; @@ -1295,9 +1294,9 @@ static void mmu_pte_write_new_pte(struct kvm_vcpu *vcpu, ++vcpu-kvm-stat.mmu_pte_updated; if (sp-role.glevels == PT32_ROOT_LEVEL) - paging32_update_pte(vcpu, sp, spte, new, bytes, offset_in_pte); + paging32_update_pte(vcpu, sp, spte, new); else - paging64_update_pte(vcpu, sp, spte, new, bytes, offset_in_pte); + paging64_update_pte(vcpu, sp, spte, new); } static bool need_remote_flush(u64 old, u64 new) @@ -1336,8 +1335,8 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa, struct hlist_node *node, *n; struct hlist_head *bucket; unsigned index; - u64 entry; - u64 *spte; + u64 entry, gentry; + u64 *spte, *gpte; unsigned offset = offset_in_page(gpa); unsigned pte_size; unsigned page_offset; @@ -1346,6 +1345,7 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa, int level; int flooded = 0; int npte; + int r; pgprintk(%s: gpa %llx bytes %d\n, __FUNCTION__, gpa, bytes); ++vcpu-kvm-stat.mmu_pte_write; @@ -1406,11 +1406,19 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa, continue; } spte = sp-spt[page_offset / sizeof(*spte)]; + if ((gpa (pte_size - 1)) || (bytes pte_size)) { + gentry = 0; + gpte = gentry; + r = kvm_read_guest(vcpu-kvm, gpa ~(pte_size - 1), + gpte, pte_size); + if (r 0) + continue; + } else + gpte = new; while (npte--) { entry = *spte; mmu_pte_write_zap_pte(vcpu, sp, spte); - mmu_pte_write_new_pte(vcpu, sp, spte, new, bytes, - page_offset (pte_size - 1)); + mmu_pte_write_new_pte(vcpu, sp, spte, gpte); mmu_pte_write_flush_tlb(vcpu, entry, *spte); ++spte; } diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 56b88f7..4e4d859 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -240,20 +240,17 @@ err: } static void FNAME(update_pte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *page, - u64 *spte, const void *pte, int bytes, - int offset_in_pte) + u64 *spte, const void *pte) { pt_element_t gpte; unsigned pte_access; gpte = *(const pt_element_t *)pte; if (~gpte (PT_PRESENT_MASK | PT_ACCESSED_MASK)) { - if (!offset_in_pte !is_present_pte(gpte)) + if (!is_present_pte(gpte)) set_shadow_pte(spte, shadow_notrap_nonpresent_pte); return; } - if (bytes sizeof(pt_element_t)) - return; pgprintk(%s: gpte %llx spte %p\n, __FUNCTION__, (u64)gpte, spte); pte_access = page-role.access FNAME(gpte_access)(vcpu, gpte); mmu_set_spte(vcpu, spte, page-role.access, pte_access, 0, 0, diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h tlb-clean3.patch Description: tlb-clean3.patch - 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.
Re: [kvm-devel] [PATCH] kvm: external module: Remove 'include/asm' before execute 'ln'
Yang, Sheng wrote: From 33d84813131809e962a4cd8cae9b66a9062fa8db Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Thu, 20 Dec 2007 14:22:18 +0800 Subject: [PATCH] kvm: external module: Remove 'include/asm' before execute 'ln' We use 'ln -sf' to refresh the symbolic now. But if 'include/asm' is a directory (as in old layout), 'ln' will give wrong result. Applied, thanks. This has bitten several people already. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. - 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] remove redundant VM Exit for non-aligned guest pte write or part of pte write.
Dong, Eddie wrote: I observed 1-2 seconds faster in Windows XPSP2 ACPI bootup with total of 23 seconds. I can;t say it is exactly caused by this patch, but anyway it simplifies the logic and code w/o any additional complexity. thx,eddie Patch looks good, but will delay so that the guest scaling patch can be merged. kvm_read_guest() will need to change to kvm_read_guest_inatomic(), since the mmu is becoming spinlocked. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. - 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] about apic in uniprocessor
Pengcheng Liu wrote: hi, I'm using kvm-48 which has apic kernel support know. But I found when working on uniprocessor, the ioapic of kvm is not used. Kvm only use pic when it works on uniprocessor? What's the guest OS? If it is windows with standard HAL then you must change the HAL. If it's Linux then you can add kernel cmdline param 'lapic' Does --no-kvm-irqchip changes anything? [this means user space apic] Dor Best Regards Pengcheng Liu Software School, Fudan University Tel: 86-021-51355363-18 MP: 86-13472527372 E_mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - 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 - 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] Guest kernel hangs in smp kvm for older kernels prior to tsc sync cleanup
On Dec 19, 2007 1:41 PM, Avi Kivity [EMAIL PROTECTED] wrote: Glauber de Oliveira Costa wrote: Changes in rate does not sound good. It's possibly what's screwing up my paravirt clock implementation in smp. You should renew the timebase on vcpu migration, and hook cpufreq so that changes in frequency are reflected in the timebase. To be conservative, I do it in every vcpu run, and have any kind of cpu frequency scaling disabled. And it does not work. In a trace in the host, I see that vcpu runs happens very often in vcpu 0 (probably because exits happen often there, so we have to go back), and comparatively, very few times in vcpu 1. So what's probably happening is : vcpu 1 does system_time + tsc_delta, but vcpu 0 has already updated it so many times, the tsc does not keep up, and it end going backwards. I'm running (in the host), the following test, upon module loading (and Ingo can please tell me if I'm doing something idiotic in it, compromising my conclusions) void test (int foo) { u64 start, stop; start = native_read_tsc(); udelay(foo); stop = native_read_tsc(); printk(%d Result: %lld\n, foo, foo * 1000 - cycles_2_ns(stop - start)); } Output is: 30 Result: -126 90 Result: 576 300 Result: 2627 1000 Result: 9381 3000 Result: 28238 5000 Result: 48086 So the delta is expecting to get bigger. If a vcpu passes a long time without having the time updated. Xen manages to keep the guest tsc stable and steady by doing synchronization from time to time. We can either: (If I'm right at this, of course): * put a periodic timer in the host to update the system time from time to time; * use some sort of global timestamp, instead of the per-cpu one. * do something akin to what xen does, and still rely on the tsc. Any thoughts? -- Glauber de Oliveira Costa. Free as in Freedom http://glommer.net The less confident you are, the more serious you have to act. - 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] [Qemu-devel] [PATCH 2/2] Option ROM for booting from SCSI/PV disks
Anthony Liguori wrote: Hi, The attached patch is an option ROM that allows x86 guests to boot from any block device supported by QEMU (and the guest kernel). It works by hijacking the BIOS int13 function and then uses a very simply protocol to communicate all block requests to QEMU. This patch also adds a boot=on|off parameter to the -drive option. When this option is specified, the extboot option ROM is automatically loaded and this device will be exposes by int13 as '0x80'. What '-boot c' really means is boot from the first disk driver or BIOS drive '0x80' so the -boot option is complimentary to this new boot flag. I have successfully booted Linux, Win2k, and WinXP from SCSI with this patch. Windows takes a bit of prep work to be able to boot from SCSI. For win2k, you just need to make sure you have the right driver installed. WinXP, however, seems to require that it be installed on SCSI to boot from SCSI. If anyone knows how to modify WinXP after the fact, please let me know. I can also use this new flag to boot a Linux guest from my previously posted virtio blk driver. This patch is against my previous virtio patches but does not strictly depend on them. When applying this patch, you'll have to build extboot in extboot/ and then copy extboot/extboot.bin to pc-bios/extboot.bin. Now that we have scsi support (with -drive) I would like to apply this to the kvm tree (I already applied the CHS refactoring patch). But as qemu seems to shy away from sources which can only compile on x86, can you rearrange it to build outside the qemu/ dir (i.e. a new toplevel extboot/)? The qemu changes should be in a separate patch. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. - 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] kvm/qemu : Enable coms init, since rtc added back
From: Zhang Xiantao [EMAIL PROTECTED] Date: Thu, 20 Dec 2007 19:30:56 +0800 Subject: [PATCH] kvm: qemu: Enable cmos, since rtc has been added back. Enable cmos, since code is mature and rtc added back Signed-off-by: Zhang Xiantao [EMAIL PROTECTED] --- qemu/hw/ipf.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c index 03df73d..242aa63 100644 --- a/qemu/hw/ipf.c +++ b/qemu/hw/ipf.c @@ -508,8 +508,7 @@ static void ipf_init1(ram_addr_t ram_size, int vga_ram_size, int boot_device, floppy_controller = fdctrl_init(i8259[6], 2, 0, 0x3f0, fd_table); - /*Disable cmos support for ia64.*/ - //cmos_init(ram_size, above_4g_mem_size, boot_device, bs_table, smp_cpus); + cmos_init(ram_size, above_4g_mem_size, boot_device, bs_table, smp_cpus); if (pci_enabled usb_enabled) { usb_uhci_piix3_init(pci_bus, piix3_devfn + 2); -- 1.5.2 0001-kvm-qemu-Enable-cmos-since-rtc-has-been-added-bac.patch Description: 0001-kvm-qemu-Enable-cmos-since-rtc-has-been-added-bac.patch - 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] kvm/qemu :Add one empty entry in hob to adapt the requirement of open GFW
From: Zhang Xiantao [EMAIL PROTECTED] Date: Thu, 20 Dec 2007 19:34:38 +0800 Subject: [PATCH] kvm: qemu: Add one empty entry in hob to adapt the requirement of open guest firmware. Since open guest firmware use hard-code to check hob entries, so add one empty entry to workaround it. Signed-off-by: Zhang Xiantao [EMAIL PROTECTED] --- qemu/target-ia64/firmware.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/qemu/target-ia64/firmware.c b/qemu/target-ia64/firmware.c index 7b1a65d..2469350 100644 --- a/qemu/target-ia64/firmware.c +++ b/qemu/target-ia64/firmware.c @@ -72,6 +72,7 @@ typedef enum { HOB_TYPE_PAL_VM_INFO, HOB_TYPE_PAL_VM_PAGE_SIZE, HOB_TYPE_NR_VCPU, +HOB_TYPE_NR_NVRAM, HOB_TYPE_MAX } hob_type_t; @@ -191,6 +192,13 @@ get_hob_size(void* hob_buf) return phit-length; } +static int +add_max_hob_entry(void* hob_buf) +{ +long max_hob = 0; +return hob_add(hob_buf, HOB_TYPE_MAX, max_hob, sizeof(long)); +} + static int build_hob(void* hob_buf, unsigned long hob_buf_size, unsigned long dom_mem_size, unsigned long vcpus) @@ -216,6 +224,10 @@ build_hob(void* hob_buf, unsigned long hob_buf_size, goto err_out; } +if (add_max_hob_entry(hob_buf) 0) { +Hob_Output(Add max hob entry failed, buffer too small); +goto err_out; +} return 0; err_out: -- 1.5.2 0002-kvm-qemu-Add-one-empty-entry-to-adapt-the-requirem.patch Description: 0002-kvm-qemu-Add-one-empty-entry-to-adapt-the-requirem.patch - 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] installation of win xp hangs
On Thursday 13 December 2007 05:09:20 Norbert Preining wrote: Hi all! (Please Cc, thanks) kernel 2.6.24-rc{3,4,5} kvm user space v55 kvm kernel space v55 or the one from the kernel Which host is this? Intel or AMD? I am trying to install a winxp (either plain or sp2) into a kvm: qemu-img create -f qcow vdisk.img 10G kvm -hda vdisk.img -cdrom /path/to/winxp.iso -boot d -m 384 -no-acpi The initial installation works, then Windows reboots (you know the nice KITT left-right bar), then the normal installation continues and at some point, in fact ALWAYS the same point it hangs and does not continue. It is around 39/37min from being finished (well, that is what Windows tells me). The last thing written is driver probing or so. We had this problem some time back, but it should be now solved. Are you sure you're starting the install afresh, or did the first stage install finish with an older kvm release and you're now in the 2nd stage install with the new kvm modules? I suggest you start the whole install process again with the latest kvm release. Amit. Then it hangs. And it seems that there is *no* activity at all, the kvm is in Sl+ state, using no CPU time. The Alt-PrScreen-t tells me: kvm S e8bb3e10 0 6171 5947 0007ba21 0082 0002 e8bb3e10 e8bb3e08 c0494eb0 c0497940 dd0d6550 dd0d6690 c17fb940 0202 c013654a 01ff 0003 e8bb3e38 c013c609 Call Trace: [c013654a] hrtimer_start+0xf1/0xfd [c013c609] futex_wait+0x1e4/0x291 [c0136061] hrtimer_wakeup+0x0/0x18 [c013c5fd] futex_wait+0x1d8/0x291 for one process and kvm S dd025a7c 0 6170 5947 000a35e9 0082 0002 dd025a7c dd025a74 c0494eb0 c0497940 dd0d6aa0 dd0d6be0 c1803940 0001 f14e2000 c080 0003 e8ee8be0 e91a1000 dd025aac e8ee8be0 f8b17021 Call Trace: [f8b17021] kvm_vcpu_block+0x46/0x97 [kvm] [c011e322] default_wake_function+0x0/0x8 [f8b190cc] kvm_emulate_halt+0x25/0x44 [kvm] [f8a63b8a] kvm_handle_exit+0x6b/0x87 [kvm_intel] [f8b17ddd] kvm_vcpu_ioctl_run+0x2ac/0x3bc [kvm] for the other. I tried several other things, like -no-kvm, -no-kvm-irqchip, -tdf, all without success. Is there anything else I can do to get across this problem? Thanks a lot for any suggestions and all the best Norbert - 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] kvm/qemu : Enable coms init, since rtc added back
Zhang, Xiantao wrote: From: Zhang Xiantao [EMAIL PROTECTED] Date: Thu, 20 Dec 2007 19:30:56 +0800 Subject: [PATCH] kvm: qemu: Enable cmos, since rtc has been added back. Enable cmos, since code is mature and rtc added back Applied this and the next patch; thanks. -- error compiling committee.c: too many arguments to function - 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] installation of win xp hangs
Dear Amit, thanks for the reply! On Do, 20 Dez 2007, Amit Shah wrote: kernel 2.6.24-rc{3,4,5} kvm user space v55 kvm kernel space v55 or the one from the kernel Which host is this? Intel or AMD? Host Intel Core2 We had this problem some time back, but it should be now solved. Are you sure you're starting the install afresh, or did the first stage install finish Yes. I always started with a newly created virtual disk, never reused the old one. Is there any way to debug that? I mean I can hack some debug statements into the kvm kernel module if necessary. Best wishes Norbert --- Dr. Norbert Preining [EMAIL PROTECTED]Vienna University of Technology Debian Developer [EMAIL PROTECTED] Debian TeX Group gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 --- TIGHARRY (n.) The accomplice or 'lure' who gets punters to participate in the three card trick on London streets by winning an improbable amount of money very easily. --- Douglas Adams, The Meaning of Liff - 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] align gdbstub with QEMU
Avi Kivity wrote: Jan Kiszka wrote: Jan Kiszka wrote: We've noticed some problems with current gdbstub in kvm's qemu: # qemu-system-x86_64 -hda myimage -S -s # gdb (gdb) tar re :1234 Remote debugging using :1234 Remote 'g' packet reply is too long: [...] This issue did not occur with QEMU from CVS. As I was aware of an x86_64-related problem in QEMU's gdbstub, I merged its current state into kvm - and things start to work again. Find the update patch below. Any feedback on this? Any chance to see this patch (or some similar version) in kvm-57? Sorry for the non-response. I am hoping to get qemu-cvs merged for kvm-57, which will naturally include this. If that doesn't work out (i.e. we discover regressions), and if this is important for you, I will apply the patch. The qemu update did take place for -57, but a bit too mechanically. Please merge this patch to finally fix the gdbstub. Thanks, Jan Remove left-over from qemu CVS update. Signed-off-by: Jan Kiszka [EMAIL PROTECTED] --- qemu/gdbstub.c | 136 - 1 file changed, 1 insertion(+), 135 deletions(-) Index: kvm-userspace/qemu/gdbstub.c === --- kvm-userspace.orig/qemu/gdbstub.c +++ kvm-userspace/qemu/gdbstub.c @@ -225,141 +225,7 @@ static int put_packet(GDBState *s, char return 0; } -#if defined(TARGET_X86_64) - -static int cpu_gdb_read_registers(CPUState *env, uint8_t *mem_buf) -{ -uint8_t *p = mem_buf; -int i, fpus; - -#define PUTREG(x) do { \ - target_ulong reg = tswapl(x); \ - memcpy(p, reg, sizeof reg); \ - p += sizeof reg; \ -} while (0) -#define PUTREG32(x) do { \ - uint32_t reg = tswap32(x); \ - memcpy(p, reg, sizeof reg); \ - p += sizeof reg; \ -} while (0) -#define PUTREGF(x) do { \ - memcpy(p, (x), 10);\ - p += sizeof (x);\ -} while (0) - -PUTREG(env-regs[R_EAX]); -PUTREG(env-regs[R_EBX]); -PUTREG(env-regs[R_ECX]); -PUTREG(env-regs[R_EDX]); -PUTREG(env-regs[R_ESI]); -PUTREG(env-regs[R_EDI]); -PUTREG(env-regs[R_EBP]); -PUTREG(env-regs[R_ESP]); -PUTREG(env-regs[8]); -PUTREG(env-regs[9]); -PUTREG(env-regs[10]); -PUTREG(env-regs[11]); -PUTREG(env-regs[12]); -PUTREG(env-regs[13]); -PUTREG(env-regs[14]); -PUTREG(env-regs[15]); - -PUTREG(env-eip); -PUTREG32(env-eflags); -PUTREG32(env-segs[R_CS].selector); -PUTREG32(env-segs[R_SS].selector); -PUTREG32(env-segs[R_DS].selector); -PUTREG32(env-segs[R_ES].selector); -PUTREG32(env-segs[R_FS].selector); -PUTREG32(env-segs[R_GS].selector); -/* XXX: convert floats */ -for(i = 0; i 8; i++) { -PUTREGF(env-fpregs[i]); -} -PUTREG32(env-fpuc); -fpus = (env-fpus ~0x3800) | (env-fpstt 0x7) 11; -PUTREG32(fpus); -PUTREG32(0); /* XXX: convert tags */ -PUTREG32(0); /* fiseg */ -PUTREG32(0); /* fioff */ -PUTREG32(0); /* foseg */ -PUTREG32(0); /* fooff */ -PUTREG32(0); /* fop */ - -#undef PUTREG -#undef PUTREG32 -#undef PUTREGF - -return p - mem_buf; -} - -static void cpu_gdb_write_registers(CPUState *env, uint8_t *mem_buf, int size) -{ -uint8_t *p = mem_buf; -uint32_t junk; -int i, fpus; - -#define GETREG(x) do { \ - target_ulong reg; \ - memcpy(reg, p, sizeof reg); \ - x = tswapl(reg); \ - p += sizeof reg; \ -} while (0) -#define GETREG32(x) do { \ - uint32_t reg; \ - memcpy(reg, p, sizeof reg); \ - x = tswap32(reg);\ - p += sizeof reg; \ -} while (0) -#define GETREGF(x) do { \ - memcpy((x), p, 10); \ - p += 10; \ -} while (0) - -GETREG(env-regs[R_EAX]); -GETREG(env-regs[R_EBX]); -GETREG(env-regs[R_ECX]); -GETREG(env-regs[R_EDX]); -GETREG(env-regs[R_ESI]); -GETREG(env-regs[R_EDI]); -GETREG(env-regs[R_EBP]); -GETREG(env-regs[R_ESP]); -GETREG(env-regs[8]); -GETREG(env-regs[9]); -GETREG(env-regs[10]); -GETREG(env-regs[11]); -GETREG(env-regs[12]); -GETREG(env-regs[13]); -GETREG(env-regs[14]); -GETREG(env-regs[15]); - -GETREG(env-eip); -GETREG32(env-eflags); -GETREG32(env-segs[R_CS].selector); -GETREG32(env-segs[R_SS].selector); -GETREG32(env-segs[R_DS].selector); -GETREG32(env-segs[R_ES].selector); -GETREG32(env-segs[R_FS].selector); -GETREG32(env-segs[R_GS].selector); -/* XXX: convert floats */ -for(i = 0; i 8; i++) { -GETREGF(env-fpregs[i]); -} -GETREG32(env-fpuc); -GETREG32(fpus); /* XXX: convert fpus */ -GETREG32(junk); /* XXX: convert tags */ -GETREG32(junk); /* fiseg */ -GETREG32(junk); /* fioff */ -
Re: [kvm-devel] [PATCH] align gdbstub with QEMU
Jan Kiszka wrote: The qemu update did take place for -57, but a bit too mechanically. Please merge this patch to finally fix the gdbstub. Thanks, applied. -- error compiling committee.c: too many arguments to function - 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] installation of win xp hangs
On Thursday 20 December 2007 18:28:44 Norbert Preining wrote: Dear Amit, thanks for the reply! On Do, 20 Dez 2007, Amit Shah wrote: kernel 2.6.24-rc{3,4,5} kvm user space v55 kvm kernel space v55 or the one from the kernel Which host is this? Intel or AMD? Host Intel Core2 We had this problem some time back, but it should be now solved. Are you sure you're starting the install afresh, or did the first stage install finish Yes. I always started with a newly created virtual disk, never reused the old one. Is there any way to debug that? I mean I can hack some debug statements into the kvm kernel module if necessary. Or better, can you git-bisect to a version that worked? That'll point out the commit that broke this. (I know this doesn't give the real thrill of debugging, but it gets us to the faults.) A couple of things you can try before doing that: use the -no-kvm switch and see if the install goes beyond the point it stops with kvm. Also try -no-kvm-irqchip. If qemu fails with any of these options, that gives us some hints. If not, I'd suggest going back to a kvm version where this worked. I'm mostly guessing this should be in userspace, so you could try the git-bisect on userspace first. Best wishes Norbert Best wishes :-) Amit. - 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] installation of win xp hangs
Hi Amit, On Do, 20 Dez 2007, Amit Shah wrote: Or better, can you git-bisect to a version that worked? That'll point out the I never had a version that worked, so it would be quite hard ... A couple of things you can try before doing that: use the -no-kvm switch and see if the install goes beyond the point it stops with kvm. Also try -no-kvm-irqchip. Ok, will do that and report back. Thanks and all the best Norbert --- Dr. Norbert Preining [EMAIL PROTECTED]Vienna University of Technology Debian Developer [EMAIL PROTECTED] Debian TeX Group gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 --- CORRIEVORRIE (n.) Corridor etiquette demands that one a corriedoo (q.v.) has been declared, corrievorrie must be employed. Both protagonists must now embellish their approach with an embarrassing combination of waving, grinning, making idiot faces, doing pirate impressions, and waggling the head from side to side while holding the other person's eyes as the smile drips off their face, until with great relief, they pass each other. --- Douglas Adams, The Meaning of Liff - 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] external module sched_in event
Hello, My worst longstanding problem with KVM is that as the uptime of my host system increased, my opensuse guest images started to destabilize and lockup at boot. The weird thing was that fresh after boot everything was always perfectly ok, so I thought it was rmmod/insmod or some other sticky effect on the CPU after restarting the guest a few times that triggered the crash. Furthermore if I loaded the cpu a lot (like with a while :; do true;done), the crash would magically disappear. Decreasing cpu frequency and timings didn't help. Debugging wasn't trivial because it required a certain uptime and it didn't always crash. So I once debugged this more aggressively I figured out KVM was ok, it was the guest that crashed in the tsc clocksource because tsc wasn't monotone. guest was looping in an infinite loop with irq disabled. So I tried to pass notsc and that fixed the crash just fine. Initially I thought it was the tsc_offset logic being wrong but then I figured out that the vcpu_put/load wasn't always executed, this bugcheck triggers with current git and so I recommend to apply this to kvm.git to avoid similar nasty hard-to-detect bugs in the future (Avi says vmx would crash hard in such a condition, svm is much simpler and it somewhat survives the lack of sched_in and only crashes the guest due to not monotone tsc): Signed-off-by: Andrea Arcangeli [EMAIL PROTECTED] diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index ac876ec..26372fa 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -742,6 +742,7 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) { + WARN_ON(vcpu-cpu != smp_processor_id()); kvm_x86_ops-vcpu_put(vcpu); kvm_put_guest_fpu(vcpu); } So trying to understand why the -cpu was wrong, I looked into the preempt notifiers emulation, and it looked quite fragile without a real sched_in hook. I figured out I could provide a real sched_in hook by loading the proper values in the tsk-thread.debugreg[0/7]. Initially I got the hooking points out of objdump -d vmlinux, but Avi preferred no dependency on the vmlinux and he suggested to try to find the sched_in hook in the stack. So that's what I implemented now and this should provide real robustness to the out of tree module compiled against binary kernel images with CONFIG_KVM=n. I tried to be compatible with all kernels down to 2.6.5 but only 2.6.2x host is tested and only on 64bit and only on SVM (no vmx system around here at all). This fixes my longstanding KVM instability and -smp 2 now works flawlessy with svm too! -smp 2 -snapshot crashes in qemu userland but that's not kernel related, must be some thread mutex lock recursion or lock inversion in the qcow cow code. Removing -snapshot make -smp 2 stable. Multiple guests UP and SMP seems stable too. To reproduce my crash easily without waiting ages for the two tsc to deviate with an error larger than the number of cycles it takes for a CPU migration, run write_tsc(0,0) in kernel mode (like in the svm.c init function and then insmod kvm-amd; rmmod kvm-amd and then remove write_tsc and recompile kvm-amd). #include stdio.h main() { unsigned long x1, x2; unsigned int a, d; asm volatile(rdtsc : =a (a), =d (d)); x1 = ((unsigned long)d 32) | a; for (;;) { asm volatile(rdtsc : =a (a), =d (d)); x2 = ((unsigned long)d 32) | a; if (x2 x1) printf(error %Ld\n, x1-x2); else printf(good %Ld\n, x1-x2); x1 = x2; } } (the good.. printf can be commented out if you run this on the host, but it better stay if you run this in the guest because it helps rescheduling X with SDL that increases the frequency of the CPU-switches of the kvm task) So in short with the below fix applied, after a write_tsc(0,0), the UP guest never return any error anymore. Previously it would return frequent errors because sched_in wasn't properly invoked by svm.c and it would crash at boot every single time after a write_tsc(0,0). The SMP guest of course still returns TSC errors but that's ok, the smp host also return TSC errors, that's ok, it's only the UP guest that is forbidden to have a not monotone TSC or the guest would crash like it happened to me. I'm unsure if special_reload_db7 is needed at all, but it certainly can't hurt so it's the only hack I left. Finally I can enjoy KVM stability too ;). If you always compiled your host kernel with CONFIG_KVM=y on a recent kernels including the preempt-notifiers, you could never run into this. If you compile your host kernel with CONFIG_KVM=n please try to test this. Signed-off-by: Andrea Arcangeli [EMAIL PROTECTED] diff --git a/kernel/hack-module.awk b/kernel/hack-module.awk index 7993aa2..5187c96 100644 --- a/kernel/hack-module.awk +++ b/kernel/hack-module.awk @@ -24,32 +24,6 @@
Re: [kvm-devel] installation of win xp hangs
Hi Amit, On Do, 20 Dez 2007, Amit Shah wrote: I never had a version that worked, so it would be quite hard ... Oh that is strange. This is the first such report. Do non-windows guests work fine for you? Is there any BIOS update available that you can install? Well, I did start playing around with kvm only recently. Never had a need for it until recently. So afair it is something like 2.6.2{2,3,4-pre} where i started. Bios updates, hmm, I will check the Acer website. Would something like the DSDT or other table help you? Best wishes Norbert --- Dr. Norbert Preining [EMAIL PROTECTED]Vienna University of Technology Debian Developer [EMAIL PROTECTED] Debian TeX Group gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 --- You step in the stream, But the water has moved on. This page is not here. --- Windows Error Haiku - 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] Export three symbols for kvm use.
On Thu, Dec 20, 2007 at 01:57:01PM +0800, Zhang, Xiantao wrote: Hi Tony, In order to build kvm source successfully, we need to export three symbols for kvm use. Please review. Maybe Avi can check-in to kvm.git upstream first. Thanks Xiantao From: Zhang Xiantao [EMAIL PROTECTED] Date: Thu, 20 Dec 2007 09:37:41 +0800 Subject: [PATCH] ia64: Export three symbols for module use Since kvm/module needs to use some unexported functions in kernel, so export them with this patch. Please submit this together with the actual kvm code as we don't export symbols for out of tree usage, thanks. - 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] installation of win xp hangs
On Thursday 20 December 2007 22:10:48 Norbert Preining wrote: Hi Amit, On Do, 20 Dez 2007, Amit Shah wrote: I never had a version that worked, so it would be quite hard ... Oh that is strange. This is the first such report. Do non-windows guests work fine for you? Is there any BIOS update available that you can install? Well, I did start playing around with kvm only recently. Never had a need for it until recently. So afair it is something like 2.6.2{2,3,4-pre} where i started. 2.5 stable releases is a really long time in kvm-time. Bios updates, hmm, I will check the Acer website. Would something like the DSDT or other table help you? I'm not sure if that'll help. The BIOS update is to ensure VMX is properly supported; we've not heard of such a report earlier so I can't really say where the problem might lie. Did you try installing with -no-kvm? - 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] Export three symbols for kvm use.
Christoph Hellwig wrote: On Thu, Dec 20, 2007 at 01:57:01PM +0800, Zhang, Xiantao wrote: Hi Tony, In order to build kvm source successfully, we need to export three symbols for kvm use. Please review. Maybe Avi can check-in to kvm.git upstream first. Thanks Xiantao From: Zhang Xiantao [EMAIL PROTECTED] Date: Thu, 20 Dec 2007 09:37:41 +0800 Subject: [PATCH] ia64: Export three symbols for module use Since kvm/module needs to use some unexported functions in kernel, so export them with this patch. Please submit this together with the actual kvm code as we don't export symbols for out of tree usage, thanks. Sure, I have submitted them together with this patch to both mailing lists. You know, this patch should go into kvm tree first, but need ia64 arch maintainer 's nod :) Xiantao - 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] (no subject)
广州市凤安贸易有限公司 致!尊敬的客户您好! 本公司是一家综合性实力雄厚定额纳税企业,与全国各地区众多公司有业务往来,可长期代理全国各地 的各种类发票等业务,(商品销售/建筑工程/广告/运输/维修/租赁/咨询/服务/餐饮定额。。。等)可供网 上查询或税务局验证后付款。谢谢 (如有打扰之处敬请谅解) 联系人: 吴小姐电话/Tel: 135 7042 3935 - 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] Export three symbols for kvm use.
Christoph Hellwig wrote: On Thu, Dec 20, 2007 at 01:57:01PM +0800, Zhang, Xiantao wrote: Hi Tony, In order to build kvm source successfully, we need to export three symbols for kvm use. Please review. Maybe Avi can check-in to kvm.git upstream first. Thanks Xiantao From: Zhang Xiantao [EMAIL PROTECTED] Date: Thu, 20 Dec 2007 09:37:41 +0800 Subject: [PATCH] ia64: Export three symbols for module use Since kvm/module needs to use some unexported functions in kernel, so export them with this patch. Please submit this together with the actual kvm code as we don't export symbols for out of tree usage, thanks. 1. kvm is not out of tree 2. I can't submit unacked ia64 patches in kvm.git 3. Even when this is in kvm.git, it's good to have it in the ia64 tree to avoid conflicts when it hits mainline Thanks. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. - 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] [1-5/17] Patch 1-10 of kvm/ia64 V2
Hi, Xiantao I got reading kvm-ia64 started. :) Which member is p2m table? [2/17] Add kvm-ia64.c to support kvm module on Itanium processors. Some trivial comments. +int kvm_arch_init(void *opaque) +{ + int r; + struct kvm_vmm_info *vmm_info = (struct kvm_vmm_info *)opaque; + + if (kvm_vmm_info) { + printk(KERN_ERR kvm: already loaded the other module!\n); + r = -EEXIST; + goto out; + } + + r = -ENOMEM; extra white space. + kvm_vmm_info = kzalloc(sizeof(struct kvm_vmm_info), GFP_KERNEL); + if (!kvm_vmm_info) + goto out; + Can we get the message of shortage of memory by qemu? + if (!vti_cpu_has_kvm_support()) { + printk(KERN_ERR kvm: no hardware support\n); + r = -EOPNOTSUPP; + goto out_free0; + } + We had better check vti support at the first. + kvm_hack_insert_tr(); + + if (kvm_alloc_vmm_area()) + goto out_free0; + r = kvm_alloc_vmm_area() is better. + r = kvm_relocate_vmm(vmm_info, vmm_info-module); + if (r) + goto out_free1; + + return 0; + +out_free1: + kvm_free_vmm_area(); +out_free0: + kfree(kvm_vmm_info); +out: + return r; +} + +void kvm_arch_exit(void) +{ + kvm_free_vmm_area(); + kfree(kvm_vmm_info); + kvm_vmm_info = 0; +} kvm_vmm_info = (void *)0? Best Regards, Akio Takebe - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [1-5/17] Patch 1-10 of kvm/ia64 V2
Hi Akio, Thank you for your comments. Xiantao Akio Takebe wrote: Hi, Xiantao m: already loaded the other module!\n); + r = -EEXIST; + goto out; + } + + r = -ENOMEM; extra white space. Yes. One more white space here. + kvm_vmm_info = kzalloc(sizeof(struct kvm_vmm_info), GFP_KERNEL); + if (!kvm_vmm_info) + goto out; + Can we get the message of shortage of memory by qemu? The memory allocation here is just for vmm module initialization, and no qemu/vm created so far. Memory shortage here, will leads to module insert fail, and this is our expectable result. + if (!vti_cpu_has_kvm_support()) { + printk(KERN_ERR kvm: no hardware support\n); + r = -EOPNOTSUPP; + goto out_free0; + } + We had better check vti support at the first. OK, I will move it to first in arch_init. :) +} kvm_vmm_info = (void *)0? Maybe NULL is better :) - 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 - 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] [1-5/17] Patch 1-10 of kvm/ia64 V2
Hi, Xiantao [3/17] Add firmware virtualization support. +void kvm_sal_emul(struct kvm_vcpu *vcpu) +{ + + struct sal_ret_values result; + u64 index, in1, in2, in3, in4, in5, in6, in7; + + kvm_get_sal_call_data(vcpu, index, in1, in2, + in3, in4, in5, in6, in7); + if (index) { + result = sal_emulator(index, in1, in2, in3, + in4, in5, in6, in7); + set_sal_result(vcpu, result); + } else + printk(KERN_WARNINGkvm:Unsupported sal call called, +index:%d!\n, index); +} The printk always show index:0. And set_sal_result() doesn't work at the time of index=0. So I think the following code is better. +void kvm_sal_emul(struct kvm_vcpu *vcpu) +{ + + struct sal_ret_values result; + u64 index, in1, in2, in3, in4, in5, in6, in7; + + kvm_get_sal_call_data(vcpu, index, in1, in2, + in3, in4, in5, in6, in7); + result = sal_emulator(index, in1, in2, in3, + in4, in5, in6, in7); + set_sal_result(vcpu, result); +} Best Regards, Akio Takebe - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel