Re: [PATCH 7/16 v6] PCI: cleanup pcibios_allocate_resources()

2008-10-23 Thread Yinghai Lu
On Wed, Oct 22, 2008 at 1:42 AM, Yu Zhao [EMAIL PROTECTED] wrote: This cleanup makes pcibios_allocate_resources() easier to read. Cc: Alex Chiang [EMAIL PROTECTED] Cc: Grant Grundler [EMAIL PROTECTED] Cc: Greg KH [EMAIL PROTECTED] Cc: Ingo Molnar [EMAIL PROTECTED] Cc: Jesse Barnes [EMAIL

Re: [PATCH 1/1] KVM: Fix incorrect KVM_USERSPACE_IRQ_SOURCE_ID

2008-10-23 Thread Avi Kivity
Sheng Yang wrote: (When I am curious how this have been fixed without any patch, I edited the patch before pushing it out. I just saw the add-on fix is from Xiantao, and was reverted along with the other part of that patch...) Thanks for the fix; applied. Xiantao, please be more

Re: Bug in protected mode segments?

2008-10-23 Thread Avi Kivity
Anthony Liguori wrote: Mathias Gottschlag wrote: Grub inits the CPU with no paging and flat segmenting, I now activate segments to move the code to 0xE000 and later activate paging and reset the segments. When I run this code on qemu or on real hardware (Athlon XP), everything works

RE: [PATCH 1/1] KVM: Fix incorrect KVM_USERSPACE_IRQ_SOURCE_ID

2008-10-23 Thread Zhang, Xiantao
Avi Kivity wrote: Sheng Yang wrote: (When I am curious how this have been fixed without any patch, I edited the patch before pushing it out. I just saw the add-on fix is from Xiantao, and was reverted along with the other part of that patch...) Thanks for the fix; applied. Xiantao,

Re: [PATCH 1/1] KVM: Fix incorrect KVM_USERSPACE_IRQ_SOURCE_ID

2008-10-23 Thread Avi Kivity
Zhang, Xiantao wrote: I am also curious about this issue. In my original patch, it doesn't include this stuff, but don't know why it is in this commit. Attached my original patch :) Then it's probably my fault. I probably had some garbage in the git index which got merged into

Re: [PATCH 1/1] kvm: bios: Update e820 table for EPT real mode pagetable

2008-10-23 Thread Sheng Yang
On Friday 17 October 2008 15:17:52 Sheng Yang wrote: I remembered I had sent this long long ago, but happened to find it missing in upstream... Signed-off-by: Sheng Yang [EMAIL PROTECTED] Avi? -- regards Yang, Sheng --- bios/rombios.c |5 +++-- 1 files changed, 3 insertions(+), 2

Re: [PATCH 7/16 v6] PCI: cleanup pcibios_allocate_resources()

2008-10-23 Thread Yu Zhao
On Thu, Oct 23, 2008 at 03:10:26PM +0800, Yinghai Lu wrote: On Wed, Oct 22, 2008 at 1:42 AM, Yu Zhao [EMAIL PROTECTED] wrote: diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 844df0c..8729bde 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c @@ -147,7 +147,7 @@

Re: [PATCH] KVM: x86: Don't deliver PIC interrupts to disabled APICs - v2

2008-10-23 Thread Jan Kiszka
Yang, Sheng wrote: On Thursday 23 October 2008 04:44:48 Jan Kiszka wrote: Jan Kiszka wrote: Jan Kiszka wrote: Jan Kiszka wrote: Avi Kivity wrote: Jan Kiszka wrote: [ taking Sheng's comments into account ] The logic of kvm_apic_accept_pic_intr has a minor, practically hardly relevant

[PATCH] userspace: update .gitignore

2008-10-23 Thread Jan Kiszka
Signed-off-by: Jan Kiszka [EMAIL PROTECTED] --- diff --git a/.gitignore b/.gitignore index 0cabc17..fcdc357 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,8 @@ kernel/x86/tss.h kernel/x86/x86.[ch] kernel/x86/coalesced_mmio.[ch] kernel/x86/kvm_cache_regs.h +kernel/x86/vtd.c

[RESEND][PATCH] KVM: VMX: Report VNMI emulation

2008-10-23 Thread Jan Kiszka
In case we ever have to debug possibly NMI-related issues of the guest, it may help to correlate them with the VNMI emulation for older VMX CPUs. Signed-off-by: Jan Kiszka [EMAIL PROTECTED] --- arch/x86/kvm/vmx.c |4 1 file changed, 4 insertions(+) Index: b/arch/x86/kvm/vmx.c

MTU on a virtio-net device?

2008-10-23 Thread Michael Tokarev
Right now (2.6.27), there's no way to change MTU of a virtio-net interface, since the mtu-changing method is not provided. Is there a simple way to add such a beast? I'm asking because I'm not familiar with the internals, and because, I think, increasing MTU (so that the resulting skb still

Re: kvm XP P2V required ACPI-Standard PC HAL change, keep or revert to ACPI?

2008-10-23 Thread Dor Laor
Jeff Kowalczyk wrote: I'm running a physical-to-virtual Windows XP Dell OEM instance on Ubuntu 8.04.1 kvm-62 with kvm-intel and bridged networking. After early BSOD difficulty with the output of VMWare Converter 3.0.3, I did manage to get the XP P2V instance ready to run under kvm after

Re: MTU on a virtio-net device?

2008-10-23 Thread Dor Laor
Michael Tokarev wrote: Right now (2.6.27), there's no way to change MTU of a virtio-net interface, since the mtu-changing method is not provided. Is there a simple way to add such a beast? It should be a nice easy patch for mtu 4k. You can just implement a 'change_mtu' handler like: static

Re: MTU on a virtio-net device?

2008-10-23 Thread Michael Tokarev
Dor Laor wrote: Michael Tokarev wrote: Right now (2.6.27), there's no way to change MTU of a virtio-net interface, since the mtu-changing method is not provided. Is there a simple way to add such a beast? It should be a nice easy patch for mtu 4k. You can just implement a 'change_mtu'

Re: MTU on a virtio-net device?

2008-10-23 Thread Michael Tokarev
Dor Laor wrote: Michael Tokarev wrote: Dor Laor wrote: Michael Tokarev wrote: Right now (2.6.27), there's no way to change MTU of a virtio-net interface, since the mtu-changing method is not provided. Is there a simple way to add such a beast? It should be a nice easy

Re: MTU on a virtio-net device?

2008-10-23 Thread Dor Laor
Michael Tokarev wrote: Dor Laor wrote: Michael Tokarev wrote: Dor Laor wrote: Michael Tokarev wrote: Right now (2.6.27), there's no way to change MTU of a virtio-net interface, since the mtu-changing method is not provided. Is there a simple way to add such a

[PATCH 1/2] kvm: libkvm: Unmap kvm_run struct and close vcpu fds in kvm_finalize.

2008-10-23 Thread François Diakhate
Signed-off-by: François Diakhaté [EMAIL PROTECTED] --- libkvm/libkvm.c | 24 +++- 1 files changed, 19 insertions(+), 5 deletions(-) diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c index 444b97f..44c931b 100644 --- a/libkvm/libkvm.c +++ b/libkvm/libkvm.c @@ -286,6 +286,7 @@

[PATCH 2/2] KVM: Fix kvm_free_physmem memory leak.

2008-10-23 Thread François Diakhate
Make sure that kvm_free_physmem actually frees memory when a memory slot is not user allocated. Signed-off-by: François Diakhaté [EMAIL PROTECTED] --- arch/x86/kvm/x86.c |2 +- virt/kvm/kvm_main.c | 11 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git

[PATCH 0/2] Fix memory leaks when VMs are destroyed

2008-10-23 Thread François Diakhate
Currently, due to a few oversights, when kvm_finalize is called there are several memory allocations which are not taken care of and are only freed when the process exits. - In libkvm, VCPU file descriptors are not closed and the corresponding kvm_run structures are not unmapped. - In the kvm

[PATCH 0/8] Support for S3 ACPI state (suspend to memory)

2008-10-23 Thread Gleb Natapov
Hello, This patch series adds S3 (suspend to RAM) ACPI state. Most changes are in the BIOS code and concern themselves with preventing BIOS from using memory available to OS. --- Gleb Natapov (8): Don't power down vga card on entering S3 state. Add DPMS support to cirrus vga bios.

[PATCH 3/8] Add S3 state to DSDT. Handle resume event in the BIOS.

2008-10-23 Thread Gleb Natapov
Signed-off-by: Gleb Natapov [EMAIL PROTECTED] --- bios/acpi-dsdt.dsl | 33 ++- bios/rombios.c | 35 + bios/rombios32.c | 74 3 files changed, 130 insertions(+), 12 deletions(-) diff

[PATCH 5/8] Execute rombios32 code from rom address 0xe0000.

2008-10-23 Thread Gleb Natapov
Signed-off-by: Gleb Natapov [EMAIL PROTECTED] --- bios/Makefile |1 + bios/rombios.c| 17 + bios/rombios32.ld |8 +++- bios/rombios32start.S |9 - 4 files changed, 13 insertions(+), 22 deletions(-) diff --git a/bios/Makefile

[PATCH 6/8] Don't use unreserved memory in BIOS.

2008-10-23 Thread Gleb Natapov
Use only first page and last page of low memory. OSes assumes that first page is used by bios and last page is reserved in e820 map. Signed-off-by: Gleb Natapov [EMAIL PROTECTED] --- bios/rombios.c |6 +++--- bios/rombios.h |4 ++-- bios/rombios32.c |2 +- 3 files changed, 6

[PATCH 7/8] Add DPMS support to cirrus vga bios.

2008-10-23 Thread Gleb Natapov
Signed-off-by: Gleb Natapov [EMAIL PROTECTED] --- vgabios/clext.c | 36 ++-- 1 files changed, 34 insertions(+), 2 deletions(-) diff --git a/vgabios/clext.c b/vgabios/clext.c index ea37ec5..c7a2ad0 100644 --- a/vgabios/clext.c +++ b/vgabios/clext.c @@ -510,7

[PATCH 4/8] Disable init of SMM.

2008-10-23 Thread Gleb Natapov
SMM initialization uses memory available for OS use. Signed-off-by: Gleb Natapov [EMAIL PROTECTED] --- bios/rombios32.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/bios/rombios32.c b/bios/rombios32.c index 3833878..2c08bfb 100755 --- a/bios/rombios32.c +++

[PATCH 2/8] Handle suspend in qemu.

2008-10-23 Thread Gleb Natapov
Signed-off-by: Gleb Natapov [EMAIL PROTECTED] --- qemu/hw/acpi.c | 10 ++ qemu/hw/pc.c|8 qemu/hw/pc.h|1 + qemu/qemu-kvm.c |2 +- qemu/qemu-kvm.h |1 + 5 files changed, 21 insertions(+), 1 deletions(-) diff --git a/qemu/hw/acpi.c b/qemu/hw/acpi.c

[PATCH 8/8] Don't power down vga card on entering S3 state.

2008-10-23 Thread Gleb Natapov
This is needed to fool windows to enter S3. The trick works for XP and Windows2003, but Vista still refuse to allow S3. Signed-off-by: Gleb Natapov [EMAIL PROTECTED] --- bios/acpi-dsdt.dsl | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git

Re: [PATCH 8/8] Don't power down vga card on entering S3 state.

2008-10-23 Thread Anthony Liguori
Gleb Natapov wrote: This is needed to fool windows to enter S3. The trick works for XP and Windows2003, but Vista still refuse to allow S3. This is because the Cirrus VGA card does not support suspend? That's what you mean by fooling, correct? What about std-vga? Regards, Anthony

Re: [PATCH 0/8] Support for S3 ACPI state (suspend to memory)

2008-10-23 Thread Anthony Liguori
Hi Gleb, Gleb Natapov wrote: Hello, This patch series adds S3 (suspend to RAM) ACPI state. Most changes are in the BIOS code and concern themselves with preventing BIOS from using memory available to OS. I thought you initially sent this to qemu-devel. Any reason not to push this

Re: [PATCH 0/8] Support for S3 ACPI state (suspend to memory)

2008-10-23 Thread Avi Kivity
Anthony Liguori wrote: I thought you initially sent this to qemu-devel. Any reason not to push this through QEMU instead of in KVM? Since it requires bios changes, it is basically unpushable to qemu. It may also depend on existing kvm bios and acpi changes. If it is possible to do

compiling with icc: kvm.h(240): error

2008-10-23 Thread Antoine Martin
Hi, I am testing kernel builds with Intel's ICC and got a failure on KVM (not that the rest was very smooth either...) Just in case someone is interested, here it is (this kernel tree is loosely based on linux-next + other patches): CC [M] arch/x86/kvm/svm.o - due to: include/linux/bounds.h

Re: [PATCH 0/8] Support for S3 ACPI state (suspend to memory)

2008-10-23 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: I thought you initially sent this to qemu-devel. Any reason not to push this through QEMU instead of in KVM? Since it requires bios changes, it is basically unpushable to qemu. Why? As long as Gleb is willing to push those changes to Bochs,

Re: [PATCH 0/8] Support for S3 ACPI state (suspend to memory)

2008-10-23 Thread Anthony Liguori
Gleb Natapov wrote: On Thu, Oct 23, 2008 at 11:12:59AM -0500, Anthony Liguori wrote: Hi Gleb, Gleb Natapov wrote: Hello, This patch series adds S3 (suspend to RAM) ACPI state. Most changes are in the BIOS code and concern themselves with preventing BIOS from using memory available to

Re: [PATCH 0/8] Support for S3 ACPI state (suspend to memory)

2008-10-23 Thread Anthony Liguori
Gleb Natapov wrote: On Thu, Oct 23, 2008 at 01:18:45PM -0500, Anthony Liguori wrote: 90% of this patch touches BIOS code. It is easy to push QEMU bits upstream, but BIOS part may be problematic. KVM BIOS is already different from upstream. I'm willing to expand the bios.diff that

Re: [PATCH 0/2] kvm: disable virtualization on kdump

2008-10-23 Thread Eduardo Habkost
On Thu, Oct 23, 2008 at 10:28:24AM +1100, Simon Horman wrote: On Mon, Oct 20, 2008 at 01:01:32PM -0200, Eduardo Habkost wrote: The following two patches should make kdump work when the kvm-intel module is loaded. We need to disable vmx mode before booting the kdump kernel, so I've

Re: [PATCH 0/8] Support for S3 ACPI state (suspend to memory)

2008-10-23 Thread Avi Kivity
Anthony Liguori wrote: Since it requires bios changes, it is basically unpushable to qemu. Why? As long as Gleb is willing to push those changes to Bochs, I'll stick them in the bios.diff for now. The hard part is the dsdt changes but if the build is changed to run the dsdt through cpp

Re: [PATCH 0/8] Support for S3 ACPI state (suspend to memory)

2008-10-23 Thread Sebastian Herbszt
Gleb Natapov wrote: Hello, This patch series adds S3 (suspend to RAM) ACPI state. Most changes are in the BIOS code and concern themselves with preventing BIOS from using memory available to OS. --- Gleb Natapov (8): Don't power down vga card on entering S3 state. Add DPMS support

Re: [PATCH 0/2] kvm: disable virtualization on kdump

2008-10-23 Thread Simon Horman
[ Added Andrew Morton, Eric Biederman, Vivek Goyal and Haren Myneni to CC ] On Thu, Oct 23, 2008 at 05:41:29PM -0200, Eduardo Habkost wrote: On Thu, Oct 23, 2008 at 10:28:24AM +1100, Simon Horman wrote: On Mon, Oct 20, 2008 at 01:01:32PM -0200, Eduardo Habkost wrote: The following two

Re: [PATCH 0/2] kvm: disable virtualization on kdump

2008-10-23 Thread Eric W. Biederman
Simon Horman [EMAIL PROTECTED] writes: [ Added Andrew Morton, Eric Biederman, Vivek Goyal and Haren Myneni to CC ] On Thu, Oct 23, 2008 at 05:41:29PM -0200, Eduardo Habkost wrote: On Thu, Oct 23, 2008 at 10:28:24AM +1100, Simon Horman wrote: On Mon, Oct 20, 2008 at 01:01:32PM -0200, Eduardo