[ kvm-Bugs-2926083 ] qcow2 default cache slows 0.12.1.2 vs kvm-88

2010-01-05 Thread SourceForge.net
Bugs item #2926083, was opened at 2010-01-05 08:16 Message generated for change (Tracker Item Submitted) made by bakaproject You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2926083group_id=180599 Please note that this message will contain a full copy of

[Autotest PATCH 1/2] KVM-test: linux_s3 subtest: Tune up timeout for suspend command

2010-01-05 Thread Yolkfull Chow
As suggested by Jason, timeout value can be various if different guest CPU number specified. This patch fixs the problem. Signed-off-by: Yolkfull Chow yz...@redhat.com --- client/tests/kvm/tests/linux_s3.py |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git

[Autotest PATCH 2/2] KVM-test: guest_s4 subtest: Tune up timeout value for `set_s4_cmd' command

2010-01-05 Thread Yolkfull Chow
Signed-off-by: Yolkfull Chow yz...@redhat.com --- client/tests/kvm/tests/guest_s4.py |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/tests/guest_s4.py b/client/tests/kvm/tests/guest_s4.py index f08b9d2..82572f6 100644 ---

[BUGFIX] MCE: Fix bug of IA32_MCG_STATUS after system reset

2010-01-05 Thread Huang Ying
Now, if we inject a fatal MCE into guest OS, for example Linux, Linux will go panic and then reboot. But if we inject another MCE now, system will reset directly instead of go panic firstly, because MCG_STATUS.MCIP is set to 1 and not cleared after reboot. This is does not follow the behavior in

[ kvm-Bugs-2926083 ] qcow2 default cache slows 0.12.1.2 vs kvm-88

2010-01-05 Thread SourceForge.net
Bugs item #2926083, was opened at 2010-01-05 10:16 Message generated for change (Comment added) made by avik You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2926083group_id=180599 Please note that this message will contain a full copy of the comment

[PATCH 0/3] EPT 1GB page support

2010-01-05 Thread Sheng Yang
-- 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 2/3] KVM: x86: Fix host_mapping_level()

2010-01-05 Thread Sheng Yang
When found a error hva, should not return PAGE_SIZE but the level... Also clean up the coding style of the following loop. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/mmu.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu.c

[PATCH 1/3] KVM: x86: Rename gb_page_enable() to get_lpage_level() in kvm_x86_ops

2010-01-05 Thread Sheng Yang
Then the callback can provide the maximum supported large page level, which is more flexible. Also move the gb page support into x86_64 specific. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/include/asm/kvm_host.h |2 +- arch/x86/kvm/svm.c |6 +++---

[PATCH 3/3] KVM: VMX: Enable EPT 1GB page support

2010-01-05 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/include/asm/vmx.h |1 + arch/x86/kvm/mmu.c |8 +--- arch/x86/kvm/vmx.c | 11 ++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/vmx.h

RE: pci-stub error and MSI-X for KVM guest

2010-01-05 Thread Fischer, Anna
Subject: Re: pci-stub error and MSI-X for KVM guest * Fischer, Anna (anna.fisc...@hp.com) wrote: Ouch. Can you do debuginfo-install qemu-system-x86 to get the debug packages, then attach gdb to the QEMU process so that when you do lspci -v in the guest (assuming this is QEMU

Re: [PATCH 3/3] KVM: VMX: Enable EPT 1GB page support

2010-01-05 Thread Avi Kivity
On 01/05/2010 12:12 PM, Sheng Yang wrote: Signed-off-by: Sheng Yangsh...@linux.intel.com --- arch/x86/include/asm/vmx.h |1 + arch/x86/kvm/mmu.c |8 +--- arch/x86/kvm/vmx.c | 11 ++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git

Re: [BUGFIX] MCE: Fix bug of IA32_MCG_STATUS after system reset

2010-01-05 Thread Andi Kleen
--- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -1015,6 +1015,7 @@ void kvm_arch_load_regs(CPUState *env) #endif set_msr_entry(msrs[n++], MSR_KVM_SYSTEM_TIME, env-system_time_msr); set_msr_entry(msrs[n++], MSR_KVM_WALL_CLOCK, env-wall_clock_msr); +set_msr_entry(msrs[n++],

Re: [BUGFIX] MCE: Fix bug of IA32_MCG_STATUS after system reset

2010-01-05 Thread Avi Kivity
On 01/05/2010 10:34 AM, Huang Ying wrote: Now, if we inject a fatal MCE into guest OS, for example Linux, Linux will go panic and then reboot. But if we inject another MCE now, system will reset directly instead of go panic firstly, because MCG_STATUS.MCIP is set to 1 and not cleared after

[PATCH 0/4 v2] EPT 1GB page support

2010-01-05 Thread Sheng Yang
-- 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 1/4] KVM: x86: Moving PT_*_LEVEL to mmu.h

2010-01-05 Thread Sheng Yang
We can use them in x86.c and vmx.c now... Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/mmu.c |4 arch/x86/kvm/mmu.h |4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index c43c2ab..15daf3c 100644 ---

[PATCH 2/4] KVM: x86: Rename gb_page_enable() to get_lpage_level() in kvm_x86_ops

2010-01-05 Thread Sheng Yang
Then the callback can provide the maximum supported large page level, which is more flexible. Also move the gb page support into x86_64 specific. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/include/asm/kvm_host.h |2 +- arch/x86/kvm/svm.c |6 +++---

[PATCH 3/4] KVM: x86: Fix host_mapping_level()

2010-01-05 Thread Sheng Yang
When found a error hva, should not return PAGE_SIZE but the level... Also clean up the coding style of the following loop. Cc: sta...@kernel.org Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/mmu.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH v3 11/12] Let host know whether the guest can handle async PF in non-userspace context.

2010-01-05 Thread Gleb Natapov
If guest can detect that it runs in non-preemptable context it can handle async PFs at any time, so let host know that it can send async PF even if guest cpu is not in userspace. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_host.h |1 +

[PATCH v3 10/12] Handle async PF in non preemptable context

2010-01-05 Thread Gleb Natapov
If async page fault is received by idle task or when preemp_count is not zero guest cannot reschedule, so do sti; hlt and wait for page to be ready. vcpu can still process interrupts while it waits for the page to be ready. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kernel/kvm.c |

[PATCH v3 03/12] Add async PF initialization to PV guest.

2010-01-05 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_para.h |5 arch/x86/kernel/kvm.c | 49 +++ arch/x86/kernel/smpboot.c |3 ++ include/linux/kvm_para.h|2 + 4 files changed, 59 insertions(+), 0

[PATCH v3 08/12] Inject asynchronous page fault into a guest if page is swapped out.

2010-01-05 Thread Gleb Natapov
If guest access swapped out memory do not swap it in from vcpu thread context. Setup slow work to do swapping and send async page fault to a guest. Allow async page fault injection only when guest is in user mode since otherwise guest may be in non-sleepable context and will not be able to

[PATCH v3 04/12] Add handle page fault PV helper.

2010-01-05 Thread Gleb Natapov
Allow paravirtualized guest to do special handling for some page faults. The patch adds one 'if' to do_page_fault() function. The call is patched out when running on physical HW. I ran kernbech on the kernel with and without that additional 'if' and result were rawly the same: With 'if':

[PATCH v3 02/12] Add PV MSR to enable asynchronous page faults delivery.

2010-01-05 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_host.h |3 ++ arch/x86/include/asm/kvm_para.h |4 +++ arch/x86/kvm/x86.c | 49 +- include/linux/kvm.h |1 + 4 files changed, 55 insertions(+), 2

[PATCH v3 06/12] Add get_user_pages() variant that fails if major fault is required.

2010-01-05 Thread Gleb Natapov
This patch add get_user_pages() variant that only succeeds if getting a reference to a page doesn't require major fault. Reviewed-by: Rik van Riel r...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com --- fs/ncpfs/mmap.c|2 ++ include/linux/mm.h |5 + mm/filemap.c |

[PATCH v3 00/12] KVM: Add host swap event notifications for PV guest

2010-01-05 Thread Gleb Natapov
KVM virtualizes guest memory by means of shadow pages or HW assistance like NPT/EPT. Not all memory used by a guest is mapped into the guest address space or even present in a host memory at any given time. When vcpu tries to access memory page that is not mapped into the guest address space KVM

[PATCH v3 05/12] Export __get_user_pages_fast.

2010-01-05 Thread Gleb Natapov
KVM will use it to try and find a page without falling back to slow gup. That is why get_user_pages_fast() is not enough. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/mm/gup.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/mm/gup.c

[PATCH v3 01/12] Move kvm_smp_prepare_boot_cpu() from kvmclock.c to kvm.c.

2010-01-05 Thread Gleb Natapov
Async PF also needs to hook into smp_prepare_boot_cpu so move the hook into generic code. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_para.h |1 + arch/x86/kernel/kvm.c | 11 +++ arch/x86/kernel/kvmclock.c | 13 + 3 files

[PATCH v3 09/12] Retry fault before vmentry

2010-01-05 Thread Gleb Natapov
When page is swapped in it is mapped into guest memory only after guest tries to access it again and generate another fault. To save this fault we can map it immediately since we know that guest is going to access the page. Signed-off-by: Gleb Natapov g...@redhat.com ---

[PATCH v3 12/12] Send async PF when guest is not in userspace too.

2010-01-05 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/mmu.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 9fd29cb..7945abf 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2204,7 +2204,13 @@ static

Re: [PATCH v3 00/12] KVM: Add host swap event notifications for PV guest

2010-01-05 Thread Jun Koi
On Tue, Jan 5, 2010 at 11:12 PM, Gleb Natapov g...@redhat.com wrote: KVM virtualizes guest memory by means of shadow pages or HW assistance like NPT/EPT. Not all memory used by a guest is mapped into the guest address space or even present in a host memory at any given time. When vcpu tries to

[ kvm-Bugs-2926083 ] qcow2 default cache slows 0.12.1.2 vs kvm-88

2010-01-05 Thread SourceForge.net
Bugs item #2926083, was opened at 2010-01-05 08:16 Message generated for change (Comment added) made by bakaproject You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2926083group_id=180599 Please note that this message will contain a full copy of the comment

Re: [PATCH v3 00/12] KVM: Add host swap event notifications for PV guest

2010-01-05 Thread Rik van Riel
On 01/05/2010 10:05 AM, Jun Koi wrote: On Tue, Jan 5, 2010 at 11:12 PM, Gleb Natapovg...@redhat.com wrote: KVM virtualizes guest memory by means of shadow pages or HW assistance like NPT/EPT. Not all memory used by a guest is mapped into the guest address space or even present in a host memory

Re: [PATCH v3 00/12] KVM: Add host swap event notifications for PV guest

2010-01-05 Thread Avi Kivity
On 01/05/2010 05:05 PM, Jun Koi wrote: Is it true that to make this work, we will need a (PV) kernel driver for each guest OS (Windows, Linux, ...)? It's partially usable even without guest modifications; while servicing a host page fault we can still deliver interrupts to the guest

[...@redhat.com: [PATCHv2-RFC 2/2] qemu-kvm: use common code for assigned msix]

2010-01-05 Thread Michael S. Tsirkin
Here's an old patch of mine that switches device assignement to use msix bits in qemu. It bitrotted so needs to be refreshed, reposting here in case anyone wants to use it as starting point for pci assignment cleanup. Main change this would be needed is that msix upstream does not have a flag to

WinXP virtual crashes on 0.12.1.2 but not 0.12.1.1

2010-01-05 Thread Mark Cave-Ayland
Hi all, I think I'm experiencing a regression with the new qemu-kvm-0.12.1.2 release compared to qemu-kvm-0.12.1.1 with a WinXP guest on Linux. I can boot my WinXP guest without a problem under qemu-kvm-0.12.1.1, however under qemu-kvm-0.12.1.2 a couple of seconds after reaching the login

Re: Networking-related crash?

2010-01-05 Thread Adam Huffman
On Mon, Dec 14, 2009 at 1:16 PM, Patrick McHardy ka...@trash.net wrote: Adam Huffman wrote: On Thu, Dec 10, 2009 at 11:01 AM, Patrick McHardy ka...@trash.net wrote: Eric Dumazet wrote: Le 09/12/2009 16:11, Avi Kivity a écrit : On 12/09/2009 03:46 PM, Adam Huffman wrote: I've been seeing lots

Re: [PATCH] PPC: Adjust memory slot accesses to recent patches

2010-01-05 Thread Marcelo Tosatti
On Sun, Jan 03, 2010 at 03:14:27AM +0100, Alexander Graf wrote: Commit 18657960237322b8f6ba84938d27524634212aaf apparently broke PPC Book3S compilation. This patch tries to mechanically fix it. Marcelo, please look over it if I'm doing the right thing. Signed-off-by: Alexander Graf

Re: build error

2010-01-05 Thread Marcelo Tosatti
On Sun, Jan 03, 2010 at 03:09:52AM +0100, Alexander Graf wrote: Hi Marcelo, On 30.12.2009, at 16:40, Giuseppe Falsetti wrote: Hi, I get this error when compile the git tree virt/kvm/kvm.git next My machine is a Xserve G5 DUAL processor, Lenny with gcc-4.3.2 HOSTCC

Re: kernel memory allocation bug in 2.6.27.32-2.6.27.41 kvm section

2010-01-05 Thread Greg KH
On Sun, Dec 27, 2009 at 12:13:00PM +0200, Avi Kivity wrote: On 12/17/2009 05:35 PM, Oscon wrote: Hello! I can't register new account in bugzilla.kernel.org. / my ISP's spamfilter problem (?) maybe./ -- I sent this mail to Greg KH (2.6.27.y maintainer), he

Re: [Qemu-devel] Re: [PATCH v2] virtio-blk physical block size

2010-01-05 Thread Jamie Lokier
Avi Kivity wrote: On 01/05/2010 02:56 PM, Rusty Russell wrote: Those should be the same for any sane interface. They are for classical disk devices with larger block sizes (MO, s390 dasd) and also for the now appearing 4k sector scsi disks. But in the ide world people are concerned about

Re: [Qemu-devel] Re: [PATCH v2] virtio-blk physical block size

2010-01-05 Thread Jamie Lokier
Avi Kivity wrote: Physical block size is the what the logical block size would have been is software didn't suck. In theory they should be the same, but since compatibility reaons clamp the logical block size to 512, they have to differ. A disk may have a physical block size of 4096 and

Re: [PATCH 5/5] KVM: VMX: Give the guest ownership of cr0.ts when the fpu is active

2010-01-05 Thread Marcelo Tosatti
On Wed, Dec 30, 2009 at 06:25:42PM +0200, Avi Kivity wrote: If the guest fpu is loaded, there is nothing interesing about cr0.ts; let the guest play with it as it will. This makes context switches between fpu intensive guest processes faster, as we won't trap the clts and cr0 write

Re: [PATCH 4/5] KVM: Lazify fpu activation and deactivation

2010-01-05 Thread Marcelo Tosatti
On Wed, Dec 30, 2009 at 06:25:41PM +0200, Avi Kivity wrote: Defer fpu deactivation as much as possible - if the guest fpu is loaded, keep it loaded until the next heavyweight exit (where we are forced to unload it). This reduces unnecessary exits. We also defer fpu activation on clts; while

Re: [PATCH 4/5] KVM: Lazify fpu activation and deactivation

2010-01-05 Thread Avi Kivity
On 01/06/2010 02:25 AM, Marcelo Tosatti wrote: On Wed, Dec 30, 2009 at 06:25:41PM +0200, Avi Kivity wrote: Defer fpu deactivation as much as possible - if the guest fpu is loaded, keep it loaded until the next heavyweight exit (where we are forced to unload it). This reduces unnecessary

[Autotest PATCH] KVM-test: Add a subtest image_copy

2010-01-05 Thread Yolkfull Chow
Add image_copy subtest for convenient KVM functional testing. The target image will be copied into the linked directory if link 'images' is created, and copied to the directory specified in config file otherwise. Signed-off-by: Yolkfull Chow yz...@redhat.com --- client/tests/kvm/kvm_utils.py

Re: [PATCH 4/5] KVM: Lazify fpu activation and deactivation

2010-01-05 Thread Avi Kivity
On 01/06/2010 05:18 AM, Avi Kivity wrote: +static void svm_fpu_deactivate(struct kvm_vcpu *vcpu) +{ +struct vcpu_svm *svm = to_svm(vcpu); + +if (npt_enabled) { +/* hack: npt requires active fpu at this time */ +vcpu-fpu_active = 1; +return; +} Why is that ?

[PATCH] Fix the explanation of write_emulated

2010-01-05 Thread Takuya Yoshikawa
The explanation of write_emulated is confused with that of read_emulated. This patch fix it. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- arch/x86/include/asm/kvm_emulate.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [PATCH] Fix the explanation of write_emulated

2010-01-05 Thread Takuya Yoshikawa
Sorry but I had mistakenly broken the patch, so this does not apply cleanly, I'll repair this later. Takuya Yoshikawa wrote: The explanation of write_emulated is confused with that of read_emulated. This patch fix it. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp ---

Re: [BUGFIX] MCE: Fix bug of IA32_MCG_STATUS after system reset

2010-01-05 Thread Huang Ying
Hi, Avi, On Tue, 2010-01-05 at 18:50 +0800, Avi Kivity wrote: On 01/05/2010 10:34 AM, Huang Ying wrote: Now, if we inject a fatal MCE into guest OS, for example Linux, Linux will go panic and then reboot. But if we inject another MCE now, system will reset directly instead of go panic

Re: build error

2010-01-05 Thread Marcelo Tosatti
On Sun, Jan 03, 2010 at 03:09:52AM +0100, Alexander Graf wrote: Hi Marcelo, On 30.12.2009, at 16:40, Giuseppe Falsetti wrote: Hi, I get this error when compile the git tree virt/kvm/kvm.git next My machine is a Xserve G5 DUAL processor, Lenny with gcc-4.3.2 HOSTCC