RE: [PATCH 1/2] VT-d: Changes to support KVM

2008-09-10 Thread Han, Weidong
Avi Kivity wrote: > Amit Shah wrote: >> From: Kay, Allen M <[EMAIL PROTECTED]> >> >> This patch extends the VT-d driver to support KVM >> >> [Ben: fixed memory pinning] >> >> Signed-off-by: Kay, Allen M <[EMAIL PROTECTED]> >> Signed-off-by: Weidong Han <[EMAIL PROTECTED]> >> Signed-off-by: Ben-A

Re: RFC: VMX: initialize TSC offset relative to vm creation time

2008-09-10 Thread David S. Ahern
Hi Marcelo: Dramatic improvement. The following is an example with kvm-75 and this patch. Without cpu affinity from a kvm perspective (vcpu-to-pcpu): cpu 0: 1221107886.020298 cpu 1: 1221107886.020290 * cpu 2: 1221107886.020555 cpu 3: 1221107886.020549 * cpu 0: 1221107887.030244 cpu 1: 122110788

Hard Locking Machine

2008-09-10 Thread Adam Barrett
machine specs: Compaq F572US AMD Athlon 64 X2 TK-53 (Dual Core) (had svm flag) 1024MB of RAM I am running Xubuntu 8.04 LTS (Hardy) I have tried both kvm-74 and kvm-75 With 74 anytime I boot using: qemu-system-x86_64 -hda /var/lib/kvm/efx2blogs -cdrom /home/utahcon/ubuntu-8.04-server-i386.iso

RE: [PATCH] kvm/ia64: Add printk support for kvm-intel modules.

2008-09-10 Thread Zhang, Xiantao
Avi Kivity wrote: > Zhang, Xiantao wrote: >> Resend. >> Avi, >> Please help to apply it, Thanks! >> Xiantao >> >> > > (sorry for the late review) > >> Since this module will be reloated to an isolated address >> space from host side, so kvm-intel can't call printk of host >> kernel. This p

Re: [PATCH 3/4 v2] PCI: support SR-IOV capability

2008-09-10 Thread Alex Chiang
* Zhao, Yu <[EMAIL PROTECTED]>: > On Tuesday, September 02, 2008 12:41 AM, Alex Chiang wrote: > > > >So, what happens if another hotplug driver is already loaded? > > > >I don't know the SR-IOV spec well enough to know if you are > >allowed to have SR-IOV + some other form of hotplug, like ACPI or

Re: [PATCH 1/4 v2] PCI: introduce new base functions

2008-09-10 Thread Alex Chiang
* Zhao, Yu <[EMAIL PROTECTED]>: > > It can be PCI_BRIDGE_RESOURCES, because there may be some > non-standard resources following PCI_ROM_RESOURCE and before > PCI_BRIDGE_RESOURCES. > > For example, a standard PCI device has following resources: > 0 - 5 BARs > 6 ROM > 7 -

Re: RFC: VMX: initialize TSC offset relative to vm creation time

2008-09-10 Thread Glauber Costa
On Wed, Sep 10, 2008 at 05:58:42PM -0300, Marcelo Tosatti wrote: > > VMX initializes the TSC offset for each vcpu at different times, and > also reinitializes it for vcpus other than 0 on APIC SIPI message. > > This bug causes the TSC's to appear unsynchronized in the guest, even if > the host is

[ kvm-Bugs-2104487 ] Soft lockups when installing RHEL5 over PXE

2008-09-10 Thread SourceForge.net
Bugs item #2104487, was opened at 2008-09-10 18:07 Message generated for change (Comment added) made by sh0nx You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2104487&group_id=180599 Please note that this message will contain a full copy of the comment thr

[ kvm-Bugs-2104495 ] kernel double fault (kvm induced?)

2008-09-10 Thread SourceForge.net
Bugs item #2104495, was opened at 2008-09-10 18:12 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2104495&group_id=180599 Please note that this message will contain a full copy

[ kvm-Bugs-2104487 ] Soft lockups when installing RHEL5 over PXE

2008-09-10 Thread SourceForge.net
Bugs item #2104487, was opened at 2008-09-10 18:07 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2104487&group_id=180599 Please note that this message will contain a full copy

Re: paravirtualized windows net driver for vista does not work on windows 2008 (64-bit)

2008-09-10 Thread Dor Laor
Sorry for that, seems like there where some instructions missing. Since we did not (yet & soon) sign the drivers you need to install a certificate workaround manually: There are 2 things to do on 64-bit before installation. 1. Install certificate using installcertificate.bat 2. If "Test mode" d

RFC: VMX: initialize TSC offset relative to vm creation time

2008-09-10 Thread Marcelo Tosatti
VMX initializes the TSC offset for each vcpu at different times, and also reinitializes it for vcpus other than 0 on APIC SIPI message. This bug causes the TSC's to appear unsynchronized in the guest, even if the host is good. Older Linux kernels don't handle the situation very well, so gettimeo

Re: [PATCH 2/4 v2] PCI: support ARI capability

2008-09-10 Thread Matthew Wilcox
On Wed, Sep 10, 2008 at 03:48:04PM +0800, Zhao, Yu wrote: > >I agree with this improvement to the help text. But a further question > >is whether ARI even merits its own user-visible config option. Is it > >worth having yet another choice for users? When would someone want ARI > >but not SR-IOV?

Re: [PATCH] remove KVM_CAP_USER_MEMORY reference from qemu-kvm.c

2008-09-10 Thread Jan Kiszka
Glauber Costa wrote: > On Wed, Sep 10, 2008 at 09:23:18PM +0200, Jan Kiszka wrote: >> Glauber Costa wrote: >>> From: Glauber Costa <[EMAIL PROTECTED]> >>> >>> kvm_cpu_register_physical_memory() is its only user. Remove it. >>> >>> Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> >>> --- >>> qemu/q

Re: KVM: x86: do not execute halted vcpus (resend)

2008-09-10 Thread Marcelo Tosatti
On Wed, Sep 10, 2008 at 09:42:05PM +0300, Avi Kivity wrote: > Marcelo Tosatti wrote: > >> Actually it does reproduce. If you reboot twice, the second reboot will > >> hang during reset (with cs:ip = f000:fff0). Plain Windows XP. > >> > > > > OK, easily reproducible by adding a sleep at the

Re: [PATCH] remove KVM_CAP_USER_MEMORY reference from qemu-kvm.c

2008-09-10 Thread Glauber Costa
On Wed, Sep 10, 2008 at 09:23:18PM +0200, Jan Kiszka wrote: > Glauber Costa wrote: > > From: Glauber Costa <[EMAIL PROTECTED]> > > > > kvm_cpu_register_physical_memory() is its only user. Remove it. > > > > Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> > > --- > > qemu/qemu-kvm.c | 52 +

[PATCH] i440fx: do change ISA mappings under KVM

2008-09-10 Thread Jan Kiszka
As long as KVM does not support remapping or protection state changes of guest memory, do not fiddle with the ISA mappings that QEMU see, confusing both the monitor and the gdbstub. Signed-off-by: Jan Kiszka <[EMAIL PROTECTED]> --- qemu/hw/piix_pci.c |6 ++ 1 file changed, 6 insertions(+)

[PATCH 03/12] coalesce memory allocation

2008-09-10 Thread Glauber Costa
From: Glauber Costa <[EMAIL PROTECTED]> Put all memory allocation under qemu_alloc_physram(). Protect the mem_area code with #ifdef USE_KVM. Although it is not really needed, it help us keep track of the fact that this is a kvm-only feature to the moment. Signed-off-by: Glauber Costa <[EMAIL PROT

[PATCH 01/12] start removing kernel memory functions

2008-09-10 Thread Glauber Costa
From: Glauber Costa <[EMAIL PROTECTED]> kvm_arch_create_default_phys_mem and kvm_alloc_kernel_memory are legacy. Remove them, and their callers. The whole removal will be split for bisectability. These ones goes first because they are only called at initialization Signed-off-by: Glauber Costa <[E

[PATCH 04/12] remove KVM_CAP_USER_MEMORY reference from qemu-kvm.c

2008-09-10 Thread Glauber Costa
From: Glauber Costa <[EMAIL PROTECTED]> kvm_cpu_register_physical_memory() is its only user. Remove it. Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- qemu/qemu-kvm.c | 52 +--- 1 files changed, 21 insertions(+), 31 deletions(-) diff --git

[PATCH 02/12] remove tests of user memory from vl.c

2008-09-10 Thread Glauber Costa
From: Glauber Costa <[EMAIL PROTECTED]> kvm_qemu_create_context() will fail if we don't have userspace memory capability, so no need to check it here. Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- qemu/vl.c | 19 +-- 1 files changed, 5 insertions(+), 14 deletions(-) dif

[PATCH 06/12] remove create_kernel_phys_mem

2008-09-10 Thread Glauber Costa
From: Glauber Costa <[EMAIL PROTECTED]> Wipe out create_kernel_phys_mem(), and all of its users. Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- libkvm/kvm-common.h |3 --- libkvm/libkvm-ia64.c|6 -- libkvm/libkvm-powerpc.c |7 --- libkvm/libkvm-s390.c|7

[PATCH 07/12] get rid of kvm_create_userspace_phys_mem

2008-09-10 Thread Glauber Costa
From: Glauber Costa <[EMAIL PROTECTED]> It is just kvm_create_phys_mem() right now. Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- libkvm/libkvm.c | 15 --- 1 files changed, 4 insertions(+), 11 deletions(-) diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c index 5b48240..5d42b4

[PATCH 08/12] remove user_alloc field from slot representation

2008-09-10 Thread Glauber Costa
From: Glauber Costa <[EMAIL PROTECTED]> All allocations are "user" now. So we don't need this field anymore. Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- libkvm/kvm-common.h |2 +- libkvm/libkvm.c | 39 +++ 2 files changed, 16 insertions(+),

[PATCH 10/12] rename kvm_register_userspace_phys_mem

2008-09-10 Thread Glauber Costa
From: Glauber Costa <[EMAIL PROTECTED]> Change its name to kvm_register_phys_mem(). Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- libkvm/libkvm.c |2 +- libkvm/libkvm.h |2 +- qemu/qemu-kvm.c |4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libkvm/libkvm

[PATCH 09/12] merge destroy phys mem functions

2008-09-10 Thread Glauber Costa
From: Glauber Costa <[EMAIL PROTECTED]> kvm_destroy_userspace_phys_mem() and kvm_destroy_phys_mem() can be merged into a single function, now that kernel allocation is no more. Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- libkvm/libkvm.c | 45 +--

[PATCH 12/12] remove kernel memory allocation code from ipf.c

2008-09-10 Thread Glauber Costa
From: Glauber Costa <[EMAIL PROTECTED]> Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- qemu/hw/ipf.c | 27 ++- 1 files changed, 6 insertions(+), 21 deletions(-) diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c index 2f7054c..d70af90 100644 --- a/qemu/hw/ipf.c +++ b/qemu

[PATCH 05/12] remove KVM_CAP_USER_MEMORY from libkvm.c.

2008-09-10 Thread Glauber Costa
From: Glauber Costa <[EMAIL PROTECTED]> One of them is left, which is the initial check. Code that does ioctl checking is left to be removed in a future commit. Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- libkvm/libkvm.c | 18 -- 1 files changed, 0 insertions(+), 18 de

[PATCH 11/12] remove kernel memory code from hw/pc.c

2008-09-10 Thread Glauber Costa
From: Glauber Costa <[EMAIL PROTECTED]> Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- qemu/hw/pc.c | 19 ++- 1 files changed, 2 insertions(+), 17 deletions(-) diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c index 026e96d..8a50096 100644 --- a/qemu/hw/pc.c +++ b/qemu/hw/pc.c @@

[PATCH 0/12] get rid of kernel memory registration

2008-09-10 Thread Glauber Costa
Avi, I hope it is better now. For libkvm code, I'm still using tabs. For qemu, spaces. However, I'm not fixing places that were already using it. There are a lot of patches in flight right now, anthony's integration effort being the most significant ones, and simple whitespace fixes could break t

Re: [PATCH] remove KVM_CAP_USER_MEMORY reference from qemu-kvm.c

2008-09-10 Thread Jan Kiszka
Glauber Costa wrote: > From: Glauber Costa <[EMAIL PROTECTED]> > > kvm_cpu_register_physical_memory() is its only user. Remove it. > > Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> > --- > qemu/qemu-kvm.c | 52 +--- > 1 files changed, 21 inser

Re: [PATCH 8/9] Add VMEXIT handler and intercepts v2

2008-09-10 Thread Joerg Roedel
On Fri, Sep 05, 2008 at 09:51:23AM +0200, Alexander Graf wrote: > This adds the #VMEXIT intercept, so we return to the level 1 guest > when something happens in the level 2 guest that should return to > the level 1 guest. > > v2 implements HIF handling and cleans up exception interception > > Sig

Re: [PATCH 3/9] Implement GIF, clgi and stgi v2

2008-09-10 Thread Joerg Roedel
On Fri, Sep 05, 2008 at 09:51:18AM +0200, Alexander Graf wrote: > This patch implements the GIF flag and the clgi and stgi instructions that > set this flag. Only if the flag is set (default), interrupts can be received > by > the CPU. > > To keep the information about that somewhere, this patch

Re: [PATCH 1/2] VT-d: Changes to support KVM

2008-09-10 Thread David Woodhouse
On Wed, 2008-09-10 at 11:11 -0700, Jesse Barnes wrote: > I assume the KVM bits depend on this patch. I can take it (after the next > spin) unless David already has his IOMMU tree set up, in which case he should > probably apply them. I haven't -- I hadn't actually got any further muttering to y

Re: KVM: x86: do not execute halted vcpus (resend)

2008-09-10 Thread Avi Kivity
Marcelo Tosatti wrote: >> Actually it does reproduce. If you reboot twice, the second reboot will >> hang during reset (with cs:ip = f000:fff0). Plain Windows XP. >> > > OK, easily reproducible by adding a sleep at the start of > qemu_kvm_system_reset. > > The problem is that the vcpu HLT'

Re: [PATCH 2/4 v2] PCI: support ARI capability

2008-09-10 Thread Roland Dreier
> ARI is an independent PCI Express extended capability. Multi-function > devices supporting this capability may use it to track dependency > between different functions and assign function group numbers to > these functions. > Another reason to keep this separated with SR-IOV is that after A

Re: KVM: x86: do not execute halted vcpus (resend)

2008-09-10 Thread Marcelo Tosatti
On Wed, Sep 10, 2008 at 03:04:10PM +0300, Avi Kivity wrote: > Avi Kivity wrote: >> Marcelo Tosatti wrote: >>> Offline or uninitialized vcpu's can be executed if requested to perform >>> userspace work. >>> Follow Avi's suggestion to handle halted vcpu's in the main loop, >>> simplifying kvm_emulate

Re: [PATCH 1/2] VT-d: Changes to support KVM

2008-09-10 Thread Jesse Barnes
On Wednesday, September 10, 2008 8:53 am Avi Kivity wrote: > Amit Shah wrote: > > From: Kay, Allen M <[EMAIL PROTECTED]> > > > > This patch extends the VT-d driver to support KVM > > > > [Ben: fixed memory pinning] > > > > Signed-off-by: Kay, Allen M <[EMAIL PROTECTED]> > > Signed-off-by: Weidong H

[PATCH] add MAINTAINERS entry for the KVM AMD module

2008-09-10 Thread Joerg Rodel
From: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> --- MAINTAINERS |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index af27945..228e6d5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2414,6 +2414,13 @@

Re: [PATCH] Fix COMPAT_csum_offset #endif in virtio_net.c

2008-09-10 Thread Mark McLoughlin
On Mon, 2008-08-25 at 22:12 +0930, Mark Pulford wrote: > Fix COMPAT_csum_offset #else/#endif block in virtio_net.c. The #endif > was being output 1 line too early. > > Signed-off-by: Mark Pulford <[EMAIL PROTECTED]> > > diff --git a/hack-module.awk b/hack-module.awk > index a3275fa..7cb9381 10064

Re: mandrake-10 not able to boot on kvm-71-73

2008-09-10 Thread Farkas Levente
Farkas Levente wrote: > Avi Kivity wrote: >> Farkas Levente wrote: >>> ok this last one was my fault:-( >>> but i retest is again. >>> - kvm-74 with kmod-kvm-74 not working >>> - kvm-71 with kmod-kvm-74 working >>> any progress with this? >>> anyone can test it with a simple minimal mandrake-10 ins

Re: [Qemu-devel] [PATCH 10/10] TCP based live migration

2008-09-10 Thread Anthony Liguori
Blue Swirl wrote: On 9/9/08, Anthony Liguori <[EMAIL PROTECTED]> wrote: This patch introduces a tcp protocol for live migration. It can be used as follows: qemu-system-x86_64 -hda ~/images/linux-test.img -monitor stdio (qemu) migrate tcp:localhost:1025 On the same system: qemu-sys

Re: [Qemu-devel] [PATCH 10/10] TCP based live migration

2008-09-10 Thread Blue Swirl
On 9/9/08, Anthony Liguori <[EMAIL PROTECTED]> wrote: > This patch introduces a tcp protocol for live migration. It can be used as > follows: > > qemu-system-x86_64 -hda ~/images/linux-test.img -monitor stdio > > (qemu) migrate tcp:localhost:1025 > > On the same system: > > qemu-system-x86

Re: [Qemu-devel] [PATCH 3/10] Add bdrv_flush_all()

2008-09-10 Thread Paul Brook
> I'm actually liking bdrv_flush_all() less and less. If there are any > outstanding IO requests, it will increase the down time associated with > live migration. I think we definitely need to add a live save handler > that waits until there are no outstanding IO requests to converge. I'm > conc

Re: [Qemu-devel] [PATCH 2/10] Allow the monitor to be suspended during non-blocking op

2008-09-10 Thread Jamie Lokier
Avi Kivity wrote: > (logically we would copy all of the data of all block devices, but > that's not very practical, so we assume shared storage). Speaking of that, if the guest RAM were a memory-mapped file, couldn't that use shared storage too? You'd have to be careful: it would need a distribu

Re: [PATCH 1/2] VT-d: Changes to support KVM

2008-09-10 Thread Avi Kivity
Amit Shah wrote: From: Kay, Allen M <[EMAIL PROTECTED]> This patch extends the VT-d driver to support KVM [Ben: fixed memory pinning] Signed-off-by: Kay, Allen M <[EMAIL PROTECTED]> Signed-off-by: Weidong Han <[EMAIL PROTECTED]> Signed-off-by: Ben-Ami Yassour <[EMAIL PROTECTED]> Signed-off-by:

[PATCH][RFC] Refactor AIO to allow multiple AIO implementations

2008-09-10 Thread Anthony Liguori
This patch refactors the AIO layer to allow multiple AIO implementations. It's only possible because of the recent signalfd() patch. Right now, the AIO infrastructure is pretty specific to the block raw backend. For other block devices to implement AIO, the qemu_aio_wait function must support

Re: [Qemu-devel] [PATCH 2/10] Allow the monitor to be suspended during non-blocking op

2008-09-10 Thread Anthony Liguori
Avi Kivity wrote: Daniel P. Berrange wrote: Or rather, such state should be part of the migration. There's the question of whether to transform the path on the target, but "which media is in the drive" is part of the hardware state. (logically we would copy all of the data of all block dev

Re: [Qemu-devel] [PATCH 3/10] Add bdrv_flush_all()

2008-09-10 Thread Avi Kivity
Anthony Liguori wrote: I'm actually liking bdrv_flush_all() less and less. If there are any outstanding IO requests, it will increase the down time associated with live migration. I think we definitely need to add a live save handler that waits until there are no outstanding IO requests to

Re: [Qemu-devel] [PATCH 2/10] Allow the monitor to be suspended during non-blocking op

2008-09-10 Thread Avi Kivity
Daniel P. Berrange wrote: Or rather, such state should be part of the migration. There's the question of whether to transform the path on the target, but "which media is in the drive" is part of the hardware state. (logically we would copy all of the data of all block devices, but that's n

Re: [Qemu-devel] [PATCH 3/10] Add bdrv_flush_all()

2008-09-10 Thread Glauber Costa
On Wed, Sep 10, 2008 at 12:19 PM, Anthony Liguori <[EMAIL PROTECTED]> wrote: > Glauber Costa wrote: >> >> On Wed, Sep 10, 2008 at 10:26 AM, Chris Lalancette <[EMAIL PROTECTED]> >> wrote: >> >>> >>> Anthony Liguori wrote: >>> This patch adds a bdrv_flush_all() function. It's necessary to

Re: [PATCH] kvm: testsuite: Add test for 'call near absolute'

2008-09-10 Thread Avi Kivity
Mohammed Gamal wrote: Adds 'call near absolute' to the real mode test harness Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info

Re: [PATCH] x86 emulator: Add call near absolute instruction (group5: opcode 0xff mod r/m 2)

2008-09-10 Thread Avi Kivity
Mohammed Gamal wrote: Add call near absolute instruction Applied, thanks. -- error compiling committee.c: too many arguments to function -- 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.kerne

Re: [PATCH] virtio-blk: change config to guest endian

2008-09-10 Thread Avi Kivity
Liu Yu wrote: Since virtio-blk in kernel has already changed, qemu needs to be updated. see http://thread.gmane.org/gmane.linux.kernel.virtualization/5776/focus=580 Only tested it on branch kvm-70rc1 for e500/powerpc platform. Applied, thanks. -- error compiling committee.c: too many argu

Re: [Qemu-devel] [PATCH 3/10] Add bdrv_flush_all()

2008-09-10 Thread Anthony Liguori
Glauber Costa wrote: On Wed, Sep 10, 2008 at 10:26 AM, Chris Lalancette <[EMAIL PROTECTED]> wrote: Anthony Liguori wrote: This patch adds a bdrv_flush_all() function. It's necessary to ensure that all IO operations have been flushed to disk before completely a live migration. N.B. we

Re: [PATCH] kvm/ia64: Add printk support for kvm-intel modules.

2008-09-10 Thread Avi Kivity
Zhang, Xiantao wrote: Resend. Avi, Please help to apply it, Thanks! Xiantao (sorry for the late review) Since this module will be reloated to an isolated address space from host side, so kvm-intel can't call printk of host kernel. This patch implements the printk function for kvm-inte

Re: [PATCH 1/10] Refactor QEMUFile for live migration

2008-09-10 Thread Anthony Liguori
+static int fd_put_buffer(void *opaque, const uint8_t *buf, + int64_t pos, int size) +{ +QEMUFileFD *s = opaque; +ssize_t len; + +do { +len = write(s->fd, buf, size); +} while (len == -1 && errno == EINTR); What about the len == size case ?

Re: [PATCH] KVM: SVM: fix guest global tlb flushes with NPT

2008-09-10 Thread Avi Kivity
Joerg Rodel wrote: From: Joerg Roedel <[EMAIL PROTECTED]> Accesses to CR4 are intercepted even with Nested Paging enabled. But the code does not check if the guest wants to do a global TLB flush. So this flush gets lost. This patch adds the check and the flush to svm_set_cr4. Applied, than

Re: [Qemu-devel] Re: [PATCH 1/10] Refactor QEMUFile for live migration

2008-09-10 Thread Avi Kivity
Glauber Costa wrote: +static int fd_put_buffer(void *opaque, const uint8_t *buf, + int64_t pos, int size) +{ +QEMUFileFD *s = opaque; +ssize_t len; + +do { +len = write(s->fd, buf, size); +} while (len == -1 && errno == EINTR); What about the

Re: [Qemu-devel] [PATCH 4/10] Add dirty tracking for live migration

2008-09-10 Thread Glauber Costa
On Wed, Sep 10, 2008 at 11:56 AM, Anthony Liguori <[EMAIL PROTECTED]> wrote: > Glauber Costa wrote: >> >> On Tue, Sep 9, 2008 at 4:49 PM, Anthony Liguori <[EMAIL PROTECTED]> >> wrote: >> >>> >>> This patch adds a dirty tracking bit for live migration. We use 0x08 >>> because >>> kqemu uses 0x04. >

Re: [PATCH] KVM: VMX: Leave atomic context while emulating real mode

2008-09-10 Thread Avi Kivity
Laurent Vivier wrote: int err; + preempt_enable(); + local_irq_enable(); + while (!guest_state_valid(vcpu)) { err = emulate_instruction(vcpu, kvm_run, 0, 0, 0); @@ -2932,6 +2935,9 @@ static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,

Re: [Qemu-devel] [PATCH 4/10] Add dirty tracking for live migration

2008-09-10 Thread Anthony Liguori
Glauber Costa wrote: On Tue, Sep 9, 2008 at 4:49 PM, Anthony Liguori <[EMAIL PROTECTED]> wrote: This patch adds a dirty tracking bit for live migration. We use 0x08 because kqemu uses 0x04. For which purpose, and where is it? I think it deserves at least a comment on the source itself

Re: [Qemu-devel] [PATCH 4/10] Add dirty tracking for live migration

2008-09-10 Thread Glauber Costa
On Tue, Sep 9, 2008 at 4:49 PM, Anthony Liguori <[EMAIL PROTECTED]> wrote: > This patch adds a dirty tracking bit for live migration. We use 0x08 because > kqemu uses 0x04. For which purpose, and where is it? I think it deserves at least a comment on the source itself for future generations. > >

Re: [Qemu-devel] [PATCH 3/10] Add bdrv_flush_all()

2008-09-10 Thread Glauber Costa
On Wed, Sep 10, 2008 at 10:26 AM, Chris Lalancette <[EMAIL PROTECTED]> wrote: > Anthony Liguori wrote: >> This patch adds a bdrv_flush_all() function. It's necessary to ensure that >> all >> IO operations have been flushed to disk before completely a live migration. >> >> N.B. we don't actually u

Re: [PATCH 1/10] Refactor QEMUFile for live migration

2008-09-10 Thread Glauber Costa
On Tue, Sep 9, 2008 at 4:49 PM, Anthony Liguori <[EMAIL PROTECTED]> wrote: > To support live migration, we override QEMUFile so that instead of writing to > disk, the save/restore state happens over a network connection. > > This patch makes QEMUFile read/write operations function pointers so that

[ANNOUNCE] kvm-75 release

2008-09-10 Thread Avi Kivity
Ballooning is finally enabled in kvm-75. You will need a 2.6.27+ host for ballooning to work properly. Changes from kvm-74: - add 1280x768 std-vga resolution - ballooning (Anthony Liguori) - requires 2.6.27+ host to work correctly - fix bad memory sizing on ia64 (Xiantao Zhang) - restore opti

Re: [PATCH] KVM: VMX: Leave atomic context while emulating real mode

2008-09-10 Thread Laurent Vivier
Le mercredi 20 août 2008 à 14:01 +, Avi Kivity a écrit : > From: Avi Kivity <[EMAIL PROTECTED]> > > Emulation requires access to user memory, and potentially schedules. > > Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index d5d25a2.

Re: New version of my kvmctl script

2008-09-10 Thread Marshal Newrock
First, I'd suggest changing the name of the init script from kvm to kvmctl. On some platforms, installing the kvm package will include a kvm init script which loads the modules. I've also been working on an init script, based off some other efforts that I've seen. It is written in python. From

Re: [Qemu-devel] [PATCH 5/10] Add network announce function

2008-09-10 Thread Avi Kivity
Chris Lalancette wrote: Anthony Liguori wrote: +static int announce_self_create(uint8_t *buf, +uint8_t *mac_addr) +{ +uint32_t magic = EXPERIMENTAL_MAGIC; +uint16_t proto = htons(ETH_P_EXPERIMENTAL); + +/* FIXME: should we send a different packet (arp/rarp/ping)? */ + +me

Re: [Qemu-devel] [PATCH 5/10] Add network announce function

2008-09-10 Thread Anthony Liguori
Chris Lalancette wrote: Anthony Liguori wrote: +static int announce_self_create(uint8_t *buf, +uint8_t *mac_addr) +{ +uint32_t magic = EXPERIMENTAL_MAGIC; +uint16_t proto = htons(ETH_P_EXPERIMENTAL); + +/* FIXME: should we send a different packet (arp/rarp/ping)? */ + +me

Re: [Qemu-devel] [PATCH 3/10] Add bdrv_flush_all()

2008-09-10 Thread Chris Lalancette
Anthony Liguori wrote: > This patch adds a bdrv_flush_all() function. It's necessary to ensure that > all > IO operations have been flushed to disk before completely a live migration. > > N.B. we don't actually use this now. We really should flush the block drivers > using an live savevm callba

Re: [Qemu-devel] [PATCH 2/10] Allow the monitor to be suspended during non-blocking op

2008-09-10 Thread Chris Lalancette
Avi Kivity wrote: > Anthony Liguori wrote: >> Live migration happens in the background, but it is useful to make the >> monitor >> command appear as if it's blocking. This allows a management tool to >> immediately know when the live migration has completed without having to poll >> the migration

Re: [Qemu-devel] [PATCH 5/10] Add network announce function

2008-09-10 Thread Chris Lalancette
Anthony Liguori wrote: > +static int announce_self_create(uint8_t *buf, > + uint8_t *mac_addr) > +{ > +uint32_t magic = EXPERIMENTAL_MAGIC; > +uint16_t proto = htons(ETH_P_EXPERIMENTAL); > + > +/* FIXME: should we send a different packet (arp/rarp/ping)? */

Re: [Qemu-devel] [PATCH 1/10] Refactor QEMUFile for live migration

2008-09-10 Thread Chris Lalancette
Anthony Liguori wrote: > void qemu_fflush(QEMUFile *f) > { > -if (!f->is_writable) > +if (!f->put_buffer) > return; > + > if (f->buf_index > 0) { > -if (f->is_file) { > -fseek(f->outfile, f->buf_offset, SEEK_SET); > -fwrite(f->buf, 1, f->buf_

Re: [Qemu-devel] [PATCH 2/10] Allow the monitor to be suspended during non-blocking op

2008-09-10 Thread Anthony Liguori
Daniel P. Berrange wrote: On Tue, Sep 09, 2008 at 02:49:54PM -0500, Anthony Liguori wrote: Live migration happens in the background, but it is useful to make the monitor command appear as if it's blocking. This allows a management tool to immediately know when the live migration has complete

Re: [Qemu-devel] [PATCH 7/10] Switch the memory savevm handler to be "live"

2008-09-10 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: This patch replaces the static memory savevm/loadvm handler with a "live" one. This handler is used even if performing a non-live migration. The key difference between this handler and the previous is that each page is prefixed with the address of the

Re: [Qemu-devel] [PATCH 2/10] Allow the monitor to be suspended during non-blocking op

2008-09-10 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: Live migration happens in the background, but it is useful to make the monitor command appear as if it's blocking. This allows a management tool to immediately know when the live migration has completed without having to poll the migration status. Th

Re: KVM: x86: do not execute halted vcpus (resend)

2008-09-10 Thread Avi Kivity
Avi Kivity wrote: Marcelo Tosatti wrote: Offline or uninitialized vcpu's can be executed if requested to perform userspace work. Follow Avi's suggestion to handle halted vcpu's in the main loop, simplifying kvm_emulate_halt(). Introduce a new vcpu->requests bit to indicate events that promote st

Re: [Qemu-devel] [PATCH 2/10] Allow the monitor to be suspended during non-blocking op

2008-09-10 Thread Daniel P. Berrange
On Wed, Sep 10, 2008 at 02:11:56PM +0300, Avi Kivity wrote: > Daniel P. Berrange wrote: > > >>This means that migration is no longer transparent. While migration is > >>going on, you can't change the cdrom media, look at cpu registers, or do > >>anything that requires the monitor. > >> > >

Re: [Qemu-devel] [PATCH 2/10] Allow the monitor to be suspended during non-blocking op

2008-09-10 Thread Avi Kivity
Daniel P. Berrange wrote: This means that migration is no longer transparent. While migration is going on, you can't change the cdrom media, look at cpu registers, or do anything that requires the monitor. Changing cdrom media while in the middle of migration sounds like a rather trou

Re: [PATCH] KVM: VMX: Add PAT support for EPT

2008-09-10 Thread Yang, Sheng
On Tuesday 09 September 2008 22:36:22 Avi Kivity wrote: > Avi Kivity wrote: > > This appears to be a new feature? My documentation (a bit old) > > doesn't show it. If so, we need a check to see that it is available. > > The check is actually there. > > If the feature is present, we need to expose

Re: [Qemu-devel] [PATCH 2/10] Allow the monitor to be suspended during non-blocking op

2008-09-10 Thread Daniel P. Berrange
On Wed, Sep 10, 2008 at 09:52:33AM +0300, Avi Kivity wrote: > Anthony Liguori wrote: > >Live migration happens in the background, but it is useful to make the > >monitor > >command appear as if it's blocking. This allows a management tool to > >immediately know when the live migration has complet

Re: [Qemu-devel] [PATCH 2/10] Allow the monitor to be suspended during non-blocking op

2008-09-10 Thread Daniel P. Berrange
On Tue, Sep 09, 2008 at 02:49:54PM -0500, Anthony Liguori wrote: > Live migration happens in the background, but it is useful to make the monitor > command appear as if it's blocking. This allows a management tool to > immediately know when the live migration has completed without having to poll >

Re: [Qemu-devel] 8139cp problems - steps to reproduce

2008-09-10 Thread Nikola Ciprich
Hello one more time, I've just found some older thread on the topic, and it concluded that disabling APIC fixes the problem. I tried, and ... it works! So as workaround, it's OK for me now, but I guess this should still be considered a bug... If I could provide any help in fixing this, please le

Re: [PATCH] x86 emulator: Add call near absolute instruction (group5: opcode 0xff mod r/m 2)

2008-09-10 Thread Guillaume Thouvenin
On Tue, 9 Sep 2008 15:49:35 +0300 "Mohammed Gamal" <[EMAIL PROTECTED]> wrote: > > Thus I added the following patch (see the end of this email) and now > > another problem: > > > > emulation failed (mmio) rip 44b5b 03 84 c0 75 > > > We don't handle mmio emulation yet. It'd be great to see it handle

RE: [PATCH 1/4 v2] PCI: introduce new base functions

2008-09-10 Thread Zhao, Yu
On Tuesday, September 02, 2008 12:16 AM, Alex Chiang wrote: >* Zhao, Yu <[EMAIL PROTECTED]>: >> Some basic changes to allocation bus range, MMIO resource for SR-IOV device. > >This following comment is a bit confusing: >> And add new sysfs entry to hotplug core to pass parameter to a >> slot, which

RE: [PATCH 3/4 v2] PCI: support SR-IOV capability

2008-09-10 Thread Zhao, Yu
On Tuesday, September 02, 2008 12:41 AM, Alex Chiang wrote: >* Zhao, Yu <[EMAIL PROTECTED]>: >> Support SR-IOV capability. By default, this feature is not enabled and the >SR-IOV device behaves as traditional PCI device. After it's enabled, each >Virtual Function's PCI configuration space can be ac

RE: [PATCH 4/4 v2] PCI: document the change

2008-09-10 Thread Zhao, Yu
On Monday, September 01, 2008 11:42 PM, Alex Chiang wrote: >To: Zhao, Yu >Cc: Jesse Barnes; [EMAIL PROTECTED]; Randy Dunlap; Greg KH; Grant >Grundler; Matthew Wilcox; [EMAIL PROTECTED]; kvm@vger.kernel.org; >[EMAIL PROTECTED]; [EMAIL PROTECTED] >Subject: Re: [PATCH 4/4 v2] PCI: document the change

RE: [PATCH 2/4 v2] PCI: support ARI capability

2008-09-10 Thread Zhao, Yu
On Monday, September 01, 2008 11:50 PM, Roland Dreier wrote: >To: Alex Chiang >Cc: Zhao, Yu; Jesse Barnes; [EMAIL PROTECTED]; Randy Dunlap; Greg KH; >Grant Grundler; Matthew Wilcox; [EMAIL PROTECTED]; >kvm@vger.kernel.org; [EMAIL PROTECTED]; >[EMAIL PROTECTED] >Subject: Re: [PATCH 2/4 v2] PCI: supp

RE: [PATCH 3/4 v2] PCI: support SR-IOV capability

2008-09-10 Thread Zhao, Yu
On Monday, September 01, 2008 11:30 PM, Alex Chiang wrote: >To: Zhao, Yu >Cc: Jesse Barnes; [EMAIL PROTECTED]; Randy Dunlap; Greg KH; Grant >Grundler; Matthew Wilcox; [EMAIL PROTECTED]; kvm@vger.kernel.org; >[EMAIL PROTECTED]; [EMAIL PROTECTED] >Subject: Re: [PATCH 3/4 v2] PCI: support SR-IOV capab

RE: [PATCH 2/4 v2] PCI: support ARI capability

2008-09-10 Thread Zhao, Yu
On Monday, September 01, 2008 11:28 PM, Alex Chiang wrote: >* Zhao, Yu <[EMAIL PROTECTED]>: >> Support Alternative Routing-ID Interpretation (ARI), which increases the >number of functions that can be supported by a PCIe endpoint. ARI is required >by SR-IOV. >> >> PCI-SIG ARI specification can be f

Re: [PATCH] x86 emulator: Add call near absolute instruction (group5: opcode 0xff mod r/m 2)

2008-09-10 Thread Avi Kivity
Mohammed Gamal wrote: SrcAcc would remove the need for this change. Stupid question: What does Acc stand for? :) Accumulator (al/ax/eax/rax). In the good old days cpus would have only one register that was able to fully participate in arithmetic operations, typically called A for

Re: [Qemu-devel] [PATCH 7/10] Switch the memory savevm handler to be "live"

2008-09-10 Thread Avi Kivity
Anthony Liguori wrote: This patch replaces the static memory savevm/loadvm handler with a "live" one. This handler is used even if performing a non-live migration. The key difference between this handler and the previous is that each page is prefixed with the address of the page. The QEMUFile r

Re: [Qemu-devel] [PATCH 6/10] Introduce v3 of savevm protocol

2008-09-10 Thread Avi Kivity
iAnthony Liguori wrote: The current savevm/loadvm protocol has some draw backs. It does not support the ability to do progressive saving which means it cannot be used for live checkpointing or migration. The sections sizes are 32-bit integers which means that it will not function when using mor