[kvm-devel] [PATCH 2/3] virtio-net save/restore support

2008-05-08 Thread Anthony Liguori
The only interesting bit here is that we have to ensure that we rearm the timer if necessary. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index d15c2f4..5fe66ac 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio-net.c @@ -207,9

[kvm-devel] [PATCH 2/3] Interrupt io thread in qemu_set_fd_handler2

2008-05-04 Thread Anthony Liguori
The select() in the IO thread may wait a long time before rebuilding the fd set. Whenever we do something that changes the fd set, we should interrupt the IO thread. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/vl.c b/qemu/vl.c index 1192759..e9f0ca4 100644 --- a/qemu/vl.c

[kvm-devel] [PATCH 2/3] Make virtio-net can_receive more accurate (v2)

2008-05-04 Thread Anthony Liguori
In the final patch of this series, we rely on a VLAN client's fd_can_read method to avoid dropping packets. Unfortunately, virtio's fd_can_read method is not very accurate at the moment. This patch addresses this. It also generates a notification to the IO thread when more RX packets become

[kvm-devel] [patch 2/3] QEMU/KVM: ACPI PCI hotplug multiple bus support

2008-05-02 Thread Marcelo Tosatti
Support more than one bus in the ACPI PCI hotplug code. Currently 4 buses are supported, but can be easily extended. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.pci3/qemu/hw/acpi.c === ---

[kvm-devel] [PATCH 2/3] Split out posix-aio code

2008-04-17 Thread Anthony Liguori
This patch moves the posix-aio code into a separate file. It's strictly code motion, no new functionality is introduced. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/Makefile b/Makefile index a8df278..916f071 100644 --- a/Makefile +++ b/Makefile @@ -139,7 +139,7 @@

[kvm-devel] [PATCH 2/3] map regions as registered

2008-04-16 Thread Glauber de Oliveira Costa
From: Glauber Costa [EMAIL PROTECTED] map which io registers where already sucessfuly registered Signed-off-by: Glauber Costa [EMAIL PROTECTED] --- qemu/hw/pci.c |5 +++-- qemu/hw/pci.h |3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c

[kvm-devel] [PATCH 2/3] SVM: align shadow CR4.MCE with host

2008-04-09 Thread Joerg Roedel
This patch aligns the host version of the CR4.MCE bit with the CR4 active in the guest. This is necessary to get MCE exceptions when the guest is running. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/x86/kvm/svm.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git

[kvm-devel] [patch 2/3] QEMU/KVM: add function to handle signals

2008-04-02 Thread Marcelo Tosatti
SIGUSR1 has no handler, and the SIGUSR2 one does nothing useful anymore (thats also true for SIGIO on tap fd, which runs host_alarm_handler unnecessarily). Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.io/qemu/qemu-kvm.c

Re: [kvm-devel] [PATCH 2/3] [PATCH] unregister pci device

2008-03-27 Thread Avi Kivity
Glauber Costa wrote: If we fail after we have allocated the pci device, we have to get rid of it. Otherwise, a bogus device will be found on the bus Maybe, alter the order so the device is registered last thing. This may help avoid races with pci passthrough hotplug. -- error compiling

Re: [kvm-devel] [PATCH 2/3] [PATCH] unregister pci device

2008-03-27 Thread Glauber Costa
Avi Kivity wrote: Glauber Costa wrote: If we fail after we have allocated the pci device, we have to get rid of it. Otherwise, a bogus device will be found on the bus Maybe, alter the order so the device is registered last thing. This may help avoid races with pci passthrough

Re: [kvm-devel] [PATCH 2/3] [PATCH] unregister pci device

2008-03-27 Thread Avi Kivity
Glauber Costa wrote: Avi Kivity wrote: Glauber Costa wrote: If we fail after we have allocated the pci device, we have to get rid of it. Otherwise, a bogus device will be found on the bus Maybe, alter the order so the device is registered last thing. This may help avoid races with

[kvm-devel] [PATCH 2/3] [PATCH] unregister pci device

2008-03-26 Thread Glauber Costa
If we fail after we have allocated the pci device, we have to get rid of it. Otherwise, a bogus device will be found on the bus Signed-off-by: Glauber Costa [EMAIL PROTECTED] --- qemu/hw/passthrough/passthrough.c | 11 +++ qemu/hw/pci.c |6 ++ qemu/hw/pci.h

[kvm-devel] [PATCH 2/3] [PATCH] make native_machine_shutdown non-static

2008-03-18 Thread Glauber Costa
it will allow external users to call it. It is mainly useful for routines that will override its machine_ops field for its own special purposes, but want to call the normal shutdown routine after they're done Signed-off-by: Glauber Costa [EMAIL PROTECTED] --- arch/x86/kernel/reboot.c |2 +-

[kvm-devel] [PATCH 2/3] make native_machine_shutdown non-static

2008-03-17 Thread Glauber Costa
it will allow external users to call it. It is mainly useful for routines that will override its machine_ops field for its own special purposes, but want to call the normal shutdown routine after they're done Signed-off-by: Glauber Costa [EMAIL PROTECTED] --- arch/x86/kernel/reboot.c |2 +-

[kvm-devel] [patch 2/3] QEMU/KVM: virtio register pow2 memory regions

2008-03-17 Thread Marcelo Tosatti
Otherwise the PCI size for such regions will be calculated erroneously. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Cc: Anthony Liguori [EMAIL PROTECTED] Index: kvm-userspace.hotplug3/qemu/hw/virtio.c === ---

[kvm-devel] [patch 2/3] QEMU: balloon: dont allow target larger than ram size

2008-03-12 Thread Marcelo Tosatti
Truncate the target size to be at most ram size. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.balloon/qemu/hw/virtio-balloon.c === --- kvm-userspace.balloon.orig/qemu/hw/virtio-balloon.c +++

[kvm-devel] [PATCH 2/3] Factor out the VGA vram mapping updating routine

2008-02-22 Thread Anthony Liguori
This function is useful for enabling KVM support in VMware VGA. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/vga.c b/qemu/hw/vga.c index 222a39c..1cfc154 100644 --- a/qemu/hw/vga.c +++ b/qemu/hw/vga.c @@ -1813,6 +1813,36 @@ typedef struct PCIVGAState { VGAState

[kvm-devel] [PATCH 2/3] x86, kvm: make register_address, address_mask static inlines

2008-02-19 Thread Harvey Harrison
Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Against kvm.git:master arch/x86/kvm/x86_emulate.c | 48 ++- 1 files changed, 29 insertions(+), 19 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index

[kvm-devel] [PATCH 2/3] KVM: SVM: allocate the MSR permission map per VCPU

2008-02-13 Thread Joerg Roedel
This patch changes the kvm-amd module to allocate the SVM MSR permission map per VCPU instead of a global map for all VCPUs. With this we have more flexibility allowing specific guests to access virtualized MSRs. This is required for LBR virtualization. Signed-off-by: Joerg Roedel [EMAIL

[kvm-devel] [PATCH 2/3] KVM: SVM: allocate the MSR permission map per VCPU

2008-02-12 Thread Joerg Roedel
This patch changes the kvm-amd module to allocate the SVM MSR permission map per VCPU instead of a global map for all VCPUs. With this we have more flexibility allowing specific guests to access virtualized MSRs. This is required for LBRV virtualization. Signed-off-by: Joerg Roedel [EMAIL

Re: [kvm-devel] [patch 2/3] mmu_notifier: Callbacks to invalidate address ranges

2008-02-01 Thread Robin Holt
On Fri, Feb 01, 2008 at 04:32:21AM -0600, Robin Holt wrote: On Thu, Jan 31, 2008 at 08:43:58PM -0800, Christoph Lameter wrote: On Thu, 31 Jan 2008, Robin Holt wrote: Index: linux-2.6/mm/memory.c ... @@ -1668,6 +1678,7 @@ gotten: page_cache_release(old_page);

Re: [kvm-devel] [patch 2/3] mmu_notifier: Callbacks to invalidate address ranges

2008-02-01 Thread Robin Holt
On Thu, Jan 31, 2008 at 08:43:58PM -0800, Christoph Lameter wrote: On Thu, 31 Jan 2008, Robin Holt wrote: Index: linux-2.6/mm/memory.c ... @@ -1668,6 +1678,7 @@ gotten: page_cache_release(old_page); unlock: pte_unmap_unlock(page_table, ptl); +

Re: [kvm-devel] [patch 2/3] mmu_notifier: Callbacks to invalidate address ranges

2008-02-01 Thread Christoph Lameter
On Fri, 1 Feb 2008, Robin Holt wrote: Maybe I haven't looked closely enough, but let's start with some common assumptions. Looking at do_wp_page from 2.6.24 (I believe that is what my work area is based upon). On line 1559, the function begins being declared. Aah I looked at the wrong

Re: [kvm-devel] [patch 2/3] mmu_notifier: Callbacks to invalidate address ranges

2008-01-31 Thread Andrea Arcangeli
On Wed, Jan 30, 2008 at 08:57:52PM -0800, Christoph Lameter wrote: @@ -211,7 +212,9 @@ asmlinkage long sys_remap_file_pages(uns spin_unlock(mapping-i_mmap_lock); } + mmu_notifier(invalidate_range_begin, mm, start, start + size, 0); err = populate_range(mm,

Re: [kvm-devel] [patch 2/3] mmu_notifier: Callbacks to invalidate address ranges

2008-01-31 Thread Christoph Lameter
On Thu, 31 Jan 2008, Robin Holt wrote: Index: linux-2.6/mm/memory.c ... @@ -1668,6 +1678,7 @@ gotten: page_cache_release(old_page); unlock: pte_unmap_unlock(page_table, ptl); + mmu_notifier(invalidate_range_end, mm, 0); I think we can get an _end call without

[kvm-devel] [patch 2/3] mmu_notifier: Callbacks to invalidate address ranges

2008-01-30 Thread Christoph Lameter
The invalidation of address ranges in a mm_struct needs to be performed when pages are removed or permissions etc change. invalidate_range_begin/end() is frequently called with only mmap_sem held. If invalidate_range_begin() is called with locks held then we pass a flag into invalidate_range() to

[kvm-devel] [PATCH 2/3] kvmclock - the host part.

2008-01-15 Thread Glauber de Oliveira Costa
This is the host part of kvm clocksource implementation. As it does not include clockevents, it is a fairly simple implementation. We only have to register a per-vcpu area, and start writting to it periodically. The area is binary compatible with xen, as we use the same shadow_info structure.

Re: [kvm-devel] [PATCH 2/3] [PATCH] kvmclock - the host part.

2008-01-12 Thread Avi Kivity
Glauber de Oliveira Costa wrote: This is the host part of kvm clocksource implementation. As it does not include clockevents, it is a fairly simple implementation. We only have to register a per-vcpu area, and start writting to it periodically. The area is binary compatible with xen, as we

Re: [kvm-devel] [PATCH 2/3] [PATCH] kvmclock - the host part.

2008-01-12 Thread Avi Kivity
Anthony Liguori wrote: Glauber de Oliveira Costa wrote: This is the host part of kvm clocksource implementation. As it does not include clockevents, it is a fairly simple implementation. We only have to register a per-vcpu area, and start writting to it periodically. The area is binary

Re: [kvm-devel] [PATCH 2/3] [PATCH] kvmclock - the host part.

2008-01-12 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: Glauber de Oliveira Costa wrote: This is the host part of kvm clocksource implementation. As it does not include clockevents, it is a fairly simple implementation. We only have to register a per-vcpu area, and start writting to it periodically.

Re: [kvm-devel] [PATCH 2/3] [PATCH] kvmclock - the host part.

2008-01-11 Thread Anthony Liguori
Glauber de Oliveira Costa wrote: This is the host part of kvm clocksource implementation. As it does not include clockevents, it is a fairly simple implementation. We only have to register a per-vcpu area, and start writting to it periodically. The area is binary compatible with xen, as we

[kvm-devel] [PATCH 2/3] Add PowerPC kvmctl harness and fix building the testcases

2008-01-09 Thread Christian Ehrhardt
Subject: [PATCH 2/3] Add PowerPC kvmctl harness and fix building the testcases From: Hollis Blanchard [EMAIL PROTECTED] From: Christian Ehrhardt [EMAIL PROTECTED] These patches get the kvm-userspace/user/ test harness building and somewhat working for PowerPC. For the moment it's just a simply

[kvm-devel] [PATCH 2/3] Add support for VRING_USED_F_NOTIFY_ON_FULL

2008-01-07 Thread Anthony Liguori
This patch adds support for VRING_USED_F_NOTIFY_ON_FULL. When this bit is set, virtio ring notifications will be suppressed unless the virtio ring is full. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index

[kvm-devel] [PATCH 2/3] Make virtio_pci license be GPL2+

2008-01-02 Thread Anthony Liguori
This patch changes the virtio_pci license to be GPL2 or later. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 45ff193..f8df571 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -9,8 +9,8 @@

Re: [kvm-devel] [Patch][2/3] Move kvm_mmu init and exit functionality to arch.

2007-11-19 Thread Carsten Otte
Zhang, Xiantao wrote: Move kvm_mmu init and exit functionality to arch. Acked-by: Carsten Otte [EMAIL PROTECTED] - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.

[kvm-devel] [Patch][2/3] Move kvm_mmu init and exit functionality to arch.

2007-11-18 Thread Zhang, Xiantao
Move kvm_mmu init and exit functionality to arch. Xiantao 0002-KVM-Portability-MMU-split.patch Description: 0002-KVM-Portability-MMU-split.patch - This SF.net email is sponsored by: Microsoft Defy all challenges.

Re: [kvm-devel] [PATCH 2/3] kvmclock - the host part.

2007-11-13 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Avi Kivity escreveu: Glauber de Oliveira Costa wrote: This is the host part of kvm clocksource implementation. As it does not include clockevents, it is a fairly simple implementation. We only have to register a per-vcpu area, and start writting

Re: [kvm-devel] [PATCH 2/3] kvmclock - the host part.

2007-11-13 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dong, Eddie escreveu: +static void kvm_write_guest_time(struct kvm_vcpu *vcpu) +{ +struct timespec ts; +int r; + +if (!vcpu-clock_gpa) +return; + +/* Updates version to the next odd number, indicating we're writing

Re: [kvm-devel] [PATCH 2/3] kvmclock - the host part.

2007-11-13 Thread Izik Eidus
Glauber de Oliveira Costa wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dong, Eddie escreveu: +static void kvm_write_guest_time(struct kvm_vcpu *vcpu) +{ + struct timespec ts; + int r; + + if (!vcpu-clock_gpa) + return; + + /* Updates version to the next

Re: [kvm-devel] [PATCH 2/3] kvmclock - the host part.

2007-11-13 Thread Avi Kivity
Glauber de Oliveira Costa wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Avi Kivity escreveu: Glauber de Oliveira Costa wrote: This is the host part of kvm clocksource implementation. As it does not include clockevents, it is a fairly simple implementation. We only have to

Re: [kvm-devel] [PATCH 2/3] kvmclock - the host part.

2007-11-13 Thread Avi Kivity
Glauber de Oliveira Costa wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dong, Eddie escreveu: +static void kvm_write_guest_time(struct kvm_vcpu *vcpu) +{ + struct timespec ts; + int r; + + if (!vcpu-clock_gpa) + return; + + /* Updates version to the next

Re: [kvm-devel] [PATCH 2/3] kvmclock - the host part.

2007-11-13 Thread Dong, Eddie
Avi Kivity wrote: Glauber de Oliveira Costa wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dong, Eddie escreveu: +static void kvm_write_guest_time(struct kvm_vcpu *vcpu) +{ + struct timespec ts; + int r; + + if (!vcpu-clock_gpa) + return; + + /* Updates version

Re: [kvm-devel] [PATCH 2/3] kvmclock - the host part.

2007-11-13 Thread Avi Kivity
Dong, Eddie wrote: After thinking for a little while, you are theoretically right. In the current state, we could even be preempted between all operations ;-) Maybe after avi's suggestion of moving the call to it it will end up in a preempt safe region, but anyway, it's safer to add the

Re: [kvm-devel] [PATCH 2/3] kvmclock - the host part.

2007-11-13 Thread Dong, Eddie
+kvm_get_msr(vcpu, MSR_IA32_TIME_STAMP_COUNTER, + vcpu-hv_clock.last_tsc); + +ktime_get_ts(ts); +vcpu-hv_clock.now_ns = ts.tv_nsec + (NSEC_PER_SEC * (u64)ts.tv_sec); + vcpu-hv_clock.wc_sec = get_seconds(); I am even thinking we have to disable

Re: [kvm-devel] [PATCH 2/3] kvmclock - the host part.

2007-11-12 Thread Dong, Eddie
+static void kvm_write_guest_time(struct kvm_vcpu *vcpu) +{ + struct timespec ts; + int r; + + if (!vcpu-clock_gpa) + return; + + /* Updates version to the next odd number, indicating we're writing */ + vcpu-hv_clock.version++; +

Re: [kvm-devel] [PATCH 2/3] kvmclock - the host part.

2007-11-11 Thread Avi Kivity
Glauber de Oliveira Costa wrote: This is the host part of kvm clocksource implementation. As it does not include clockevents, it is a fairly simple implementation. We only have to register a per-vcpu area, and start writting to it periodically. Missing live migration support (a way for

[kvm-devel] [PATCH 2/3] kvmclock - the host part.

2007-11-08 Thread Glauber de Oliveira Costa
This is the host part of kvm clocksource implementation. As it does not include clockevents, it is a fairly simple implementation. We only have to register a per-vcpu area, and start writting to it periodically. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] ---

Re: [kvm-devel] [PATCH 2/3] Put the virtio under the virtualization menu

2007-11-07 Thread Avi Kivity
Anthony Liguori wrote: This patch moves virtio under the virtualization menu and changes virtio devices to not claim to only be for lguest. Perhaps the virt menu needs to be split into a host-side support menu and guest-side support menu. -- Do not meddle in the internals of kernels, for

[kvm-devel] [PATCH 2/3] Put the virtio under the virtualization menu

2007-11-07 Thread Anthony Liguori
This patch moves virtio under the virtualization menu and changes virtio devices to not claim to only be for lguest. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/drivers/Kconfig b/drivers/Kconfig index f4076d9..d945ffc 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -93,6

Re: [kvm-devel] [PATCH 2/3] Split kvmctl for architectures

2007-10-18 Thread Jerone Young
On Thu, 2007-10-18 at 15:28 -0500, Anthony Liguori wrote: Jerone Young wrote: This patch splits kvmctl architecture specific declarations implementations into their own files headers. Common interfaces are kept in kvmctl.h, as well as the arch specific headers are included from within

Re: [kvm-devel] [PATCH 2/3] Split kvmctl for architectures

2007-10-18 Thread Izik Eidus
Jerone Young wrote: diff --git a/user/kvmctl-powerpc.c b/user/kvmctl-powerpc.c new file mode 100644 --- /dev/null +++ b/user/kvmctl-powerpc.c @@ -0,0 +1,351 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public

Re: [kvm-devel] [PATCH 2/3] Split kvmctl for architectures

2007-10-18 Thread Jerone Young
On Thu, 2007-10-18 at 22:47 +0200, Izik Eidus wrote: Jerone Young wrote: diff --git a/user/kvmctl-powerpc.c b/user/kvmctl-powerpc.c new file mode 100644 --- /dev/null +++ b/user/kvmctl-powerpc.c @@ -0,0 +1,351 @@ +/* + * This program is free software; you can redistribute it and/or

[kvm-devel] [Patch][2/3]

2007-10-11 Thread Zhang, Xiantao
From cdbc4c54cf65e46e5545fe44c9a31ae457385ee0 Mon Sep 17 00:00:00 2001 From: Zhang xiantao [EMAIL PROTECTED] Date: Thu, 11 Oct 2007 16:42:46 +0800 In order to adapt different architectures, we have to change it to an neutral name. kvm_ops maybe not the best name, but shouldn't introduce different

Re: [kvm-devel] [Patch][2/3]

2007-10-11 Thread Zhang, Xiantao
Kivity Subject: [kvm-devel] [Patch][2/3] From cdbc4c54cf65e46e5545fe44c9a31ae457385ee0 Mon Sep 17 00:00:00 2001 From: Zhang xiantao [EMAIL PROTECTED] Date: Thu, 11 Oct 2007 16:42:46 +0800 In order to adapt different architectures, we have to change it to an neutral name. kvm_ops maybe

[kvm-devel] [PATCH 2/3] Allow memory to be specified in kvmctl (v2)

2007-10-10 Thread Anthony Liguori
This patch adds a --memory option to kvmctl to allow the memory size of the guest to be specified. Since v1, I added more checks for bad input as suggested by Muli. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/user/main.c b/user/main.c index 9a57a24..a08e0a7 100644 ---

[kvm-devel] [PATCH 2/3] Hoist kvm_create_lapic() into kvm_vcpu_init()

2007-10-07 Thread Rusty Russell
Move kvm_create_lapic() into kvm_vcpu_init(), rather than having svm and vmx do it. And make it return the error rather than a fairly random -ENOMEM. This also solves the problem that neither svm.c nor vmx.c actually handles the error path properly. Signed-off-by: Rusty Russell [EMAIL

Re: [kvm-devel] [PATCH 2/3] virtio ring implementation

2007-09-26 Thread Dor Laor
Rusty Russell wrote: On Tue, 2007-09-25 at 19:15 +0200, Dor Laor wrote: At the moment it's not good enough, there is a potential race were the guest optimistically turn off the VRING_AVAIL_F_NO_INTERRUPT in the vring_restart and afterwards finds there are more_used so it consume them in

Re: [kvm-devel] [PATCH 2/3] virtio ring implementation

2007-09-25 Thread Dor Laor
Rusty Russell wrote: On Mon, 2007-09-24 at 15:44 +0200, Dor Laor wrote: Rusty Russell wrote: +irqreturn_t vring_interrupt(int irq, void *_vq) +{ + struct vring_virtqueue *vq = to_vvq(_vq); + + pr_debug(virtqueue interrupt for %p\n, vq); + + if

Re: [kvm-devel] [PATCH 2/3] virtio ring implementation

2007-09-25 Thread Rusty Russell
On Tue, 2007-09-25 at 19:15 +0200, Dor Laor wrote: At the moment it's not good enough, there is a potential race were the guest optimistically turn off the VRING_AVAIL_F_NO_INTERRUPT in the vring_restart and afterwards finds there are more_used so it consume them in the poll function. If in

[kvm-devel] [PATCH 2/3] remove _eflags and use directly ctxt-eflags.

2007-09-24 Thread Laurent Vivier
Remove _eflags and use directly ctxt-eflags. Caching eflags is not needed as it is restored to vcpu by kvm_main.c:emulate_instruction() from ctxt-eflags only if emulation doesn't fail. Signed-off-by: Laurent Vivier [EMAIL PROTECTED] --- drivers/kvm/x86_emulate.c | 121

[kvm-devel] [PATCH 2/3] virtio ring implementation

2007-09-24 Thread Rusty Russell
These helper routines supply most of the virtqueue_ops for hypervisors which want to use a ring for virtio. Unlike the previous lguest implementation: 1) The rings are variable sized (2^n-1 elements). 2) They have an unfortunate limit of 65535 bytes per sg element. 3) The page numbers are always

Re: [kvm-devel] [PATCH 2/3] virtio ring implementation

2007-09-24 Thread Dor Laor
Rusty Russell wrote: These helper routines supply most of the virtqueue_ops for hypervisors which want to use a ring for virtio. Unlike the previous lguest implementation: 1) The rings are variable sized (2^n-1 elements). 2) They have an unfortunate limit of 65535 bytes per sg element. 3) The

Re: [kvm-devel] [PATCH 2/3] virtio ring implementation

2007-09-24 Thread Rusty Russell
On Mon, 2007-09-24 at 15:44 +0200, Dor Laor wrote: Seems like there is a problem with shared irq line, the interrupt handler always returns IRQ_HANDLED (except for the trivial case were the callback is null). It can be solved by having a host irq counter (in the shared ring) and a guest irq

[kvm-devel] [PATCH 2/3] remove _eflags and use directly ctxt-eflags.

2007-09-21 Thread Laurent Vivier
Remove _eflags and use directly ctxt-eflags. Caching eflags is not needed as it is restored to vcpu by kvm_main.c:emulate_instruction() from ctxt-eflags only if emulation doesn't fail Signed-off-by: Laurent Vivier [EMAIL PROTECTED] --- drivers/kvm/x86_emulate.c | 120

Re: [kvm-devel] [PATCH 2/3] Refactor hypercall infrastructure (v3)

2007-09-18 Thread Avi Kivity
Anthony Liguori wrote: This patch refactors the current hypercall infrastructure to better support live migration and SMP. It eliminates the hypercall page by trapping the UD exception that would occur if you used the wrong hypercall instruction for the underlying architecture and replacing

Re: [kvm-devel] [PATCH 2/3] Refactor hypercall infrastructure (v3)

2007-09-18 Thread Avi Kivity
Avi Kivity wrote: Avi Kivity wrote: Anthony Liguori wrote: This patch refactors the current hypercall infrastructure to better support live migration and SMP. It eliminates the hypercall page by trapping the UD exception that would occur if you used the wrong hypercall instruction for

Re: [kvm-devel] [PATCH 2/3] Refactor hypercall infrastructure (v3)

2007-09-18 Thread Avi Kivity
Avi Kivity wrote: Anthony Liguori wrote: This patch refactors the current hypercall infrastructure to better support live migration and SMP. It eliminates the hypercall page by trapping the UD exception that would occur if you used the wrong hypercall instruction for the underlying

Re: [kvm-devel] [PATCH 2/3] Refactor hypercall infrastructure (v3)

2007-09-18 Thread Anthony Liguori
Avi Kivity wrote: Avi Kivity wrote: Avi Kivity wrote: Anthony Liguori wrote: This patch refactors the current hypercall infrastructure to better support live migration and SMP. It eliminates the hypercall page by trapping the UD exception that would occur if you used

Re: [kvm-devel] [PATCH 2/3] Refactor hypercall infrastructure (v3)

2007-09-17 Thread Nakajima, Jun
Anthony Liguori wrote: This patch refactors the current hypercall infrastructure to better support live migration and SMP. It eliminates the hypercall page by trapping the UD exception that would occur if you used the wrong hypercall instruction for the underlying architecture and replacing

[kvm-devel] [PATCH 2/3] Refactor hypercall infrastructure (v3)

2007-09-17 Thread Anthony Liguori
This patch refactors the current hypercall infrastructure to better support live migration and SMP. It eliminates the hypercall page by trapping the UD exception that would occur if you used the wrong hypercall instruction for the underlying architecture and replacing it with the right one

Re: [kvm-devel] [PATCH 2/3] KVM: fix apic timer save/migration wheninactive

2007-09-10 Thread He, Qing
resended, due to wrong attachment -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of He, Qing Sent: 2007年9月10日 13:59 To: Avi Kivity Cc: kvm-devel@lists.sourceforge.net Subject: Re: [kvm-devel] [PATCH 2/3] KVM: fix apic timer save/migration wheninactive Avi

Re: [kvm-devel] [PATCH 2/3] KVM: fix apic timer save/migration wheninactive

2007-09-10 Thread He, Qing
Message- From: Avi Kivity [mailto:[EMAIL PROTECTED] Sent: 2007年9月10日 15:27 To: He, Qing Cc: kvm-devel@lists.sourceforge.net Subject: Re: [kvm-devel] [PATCH 2/3] KVM: fix apic timer save/migration wheninactive He, Qing wrote: resended, due to wrong attachment Patch looks good, but needs

Re: [kvm-devel] [PATCH 2/3] KVM: fix apic timer save/migration when inactive

2007-09-09 Thread Avi Kivity
He, Qing wrote: +if (atomic_read(apic-timer.active)) Or here? +hrtimer_start(timer, timer-expires, + HRTIMER_MODE_ABS); } EXPORT_SYMBOL_GPL(kvm_migrate_apic_timer); I think you could use the return value of hrtimer_cancel()

Re: [kvm-devel] [PATCH 2/3] KVM: fix apic timer save/migration when inactive

2007-09-09 Thread He, Qing
BIOS time, maybe we can defer it to some later time -Original Message- From: Avi Kivity [mailto:[EMAIL PROTECTED] Sent: 2007年9月9日 15:39 To: He, Qing Cc: kvm-devel@lists.sourceforge.net Subject: Re: [kvm-devel] [PATCH 2/3] KVM: fix apic timer save/migration when inactive He, Qing wrote

[kvm-devel] [PATCH 2/3] KVM: fix apic timer save/migration when inactive

2007-09-06 Thread He, Qing
When local apic timer is inactive or is expired in oneshot mode, it should not be restarted in save/restore or hrtimer migration. This patch fixes this. Signed-off-by: Eddie (Yaozu) Dong [EMAIL PROTECTED] Signed-off-by: Qing He [EMAIL PROTECTED] --- drivers/kvm/irq.h

Re: [kvm-devel] [PATCH 2/3] KVM: fix apic timer save/migration when inactive

2007-09-06 Thread Avi Kivity
Avi Kivity wrote: He, Qing wrote: When local apic timer is inactive or is expired in oneshot mode, it should not be restarted in save/restore or hrtimer migration. This patch fixes this. diff --git a/drivers/kvm/irq.h b/drivers/kvm/irq.h index 5f97e25..68d454c 100644 ---

Re: [kvm-devel] [PATCH 2/3] KVM: fix apic timer save/migration when inactive

2007-09-06 Thread Avi Kivity
He, Qing wrote: When local apic timer is inactive or is expired in oneshot mode, it should not be restarted in save/restore or hrtimer migration. This patch fixes this. diff --git a/drivers/kvm/irq.h b/drivers/kvm/irq.h index 5f97e25..68d454c 100644 --- a/drivers/kvm/irq.h

Re: [kvm-devel] [PATCH 2/3] KVM: fix apic timer save/migration when inactive

2007-09-06 Thread He, Qing
-Original Message- From: Avi Kivity [mailto:[EMAIL PROTECTED] Sent: 2007年9月6日 17:47 To: He, Qing Cc: kvm-devel@lists.sourceforge.net Subject: Re: [kvm-devel] [PATCH 2/3] KVM: fix apic timer save/migration when inactive Avi Kivity wrote: He, Qing wrote: When local apic timer

[kvm-devel] [PATCH 2/3] Fix option ROM loading

2007-09-05 Thread Anthony Liguori
Make sure to copy the option ROMs into physical memory so they're visible to KVM guests. With the older BIOS, this allows -boot n to work although the CVS BIOS does not work. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c index a5c08bc..f2917ca 100644

Re: [kvm-devel] [PATCH 2/3] Refactor hypercall infrastructure

2007-08-28 Thread Anthony Liguori
On Wed, 2007-08-29 at 04:12 +1000, Rusty Russell wrote: On Mon, 2007-08-27 at 10:16 -0500, Anthony Liguori wrote: This patch refactors the current hypercall infrastructure to better support live migration and SMP. It eliminates the hypercall page by trapping the UD exception that would

Re: [kvm-devel] [PATCH 2/3] Refactor hypercall infrastructure

2007-08-27 Thread Avi Kivity
Anthony Liguori wrote: This patch refactors the current hypercall infrastructure to better support live migration and SMP. It eliminates the hypercall page by trapping the UD exception that would occur if you used the wrong hypercall instruction for the underlying architecture and replacing

[kvm-devel] [PATCH 2/3] KVM paravirt-ops implementation (v2)

2007-08-27 Thread Anthony Liguori
A very simple paravirt_ops implementation for KVM. Future patches will add more sophisticated optimizations. The goal of having this presenting this now is to validate the new hypercall infrastructure and to make my patch queue smaller. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff

[kvm-devel] [PATCH 2/3] Architecture independence layer - v0 - basic mechanism

2007-08-22 Thread Christian Ehrhardt
[Patch 2/3] This introduces the Kconfig Makefile changes as well as creating the still empty body of kvm_x86.* Related part from the 0/3 mail: - Since architecture will not change at runtime I do not use a arch_ops structure - Instead I used a hidden Kconfig value specifying the kvm

Re: [kvm-devel] [PATCH 2/3] Architecture independence layer - v0 - basic mechanism

2007-08-22 Thread Avi Kivity
Christian Ehrhardt wrote: [Patch 2/3] This introduces the Kconfig Makefile changes as well as creating the still empty body of kvm_x86.* Related part from the 0/3 mail: - Since architecture will not change at runtime I do not use a arch_ops structure - Instead I used a hidden Kconfig

Re: [kvm-devel] [PATCH 2/3] add support for dynamicly allocation of mmu pages.

2007-08-19 Thread Avi Kivity
Izik Eidus wrote: simply make the slot memory allocation function to count how much it allocate, and create blocks of mmu pages by this, in addition it initiate the lists. +++ new_kvm_main.c2007-08-19 06:21:45.0 +0300 @@ -297,6 +297,8 @@ Please use 'diff -p' (or simply

[kvm-devel] [PATCH 2/3] qemu: don't start a new migration if one is already in progress

2007-08-08 Thread Jim Paris
Signed-off-by: Jim Paris [EMAIL PROTECTED] --- Having two migrations run simultaneously was causing my crashes. The command was sent twice because of a bug in the readline routines, but adding a check here as well seems like a good idea. qemu/migration.c |6 ++ 1 files changed, 6

[kvm-devel] [PATCH 2/3] KVM: Clean up VMCLEAR/VMPTRLD code on VMX

2007-07-26 Thread Gregory Haskins
Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- drivers/kvm/vmx.c | 70 +++-- 1 files changed, 57 insertions(+), 13 deletions(-) diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 5f0a7fd..d6354ca 100644 --- a/drivers/kvm/vmx.c +++

[kvm-devel] [PATCH 2/3] add get/set irqchip ioctls for in kernel PIC live migration support

2007-07-25 Thread He, Qing
This patch adds two new ioctls to dump and write kernel irqchips for save/restore and live migration. PIC s/r and l/m is implemented in this patch. Signed-off-by: Yaozu (Eddie) Dong [EMAIL PROTECTED] Signed-off-by: Qing He [EMAIL PROTECTED] drivers/kvm/i8259.c|7 drivers/kvm/irq.h

[kvm-devel] [PATCH 2/3] KVM: Use the scheduler preemption hooks to make kvm preemptible

2007-07-25 Thread Avi Kivity
Current kvm disables preemption while the new virtualization registers are in use. This of course is not very good for latency sensitive workloads (one use of virtualization is to offload user interface and other latency insensitive stuff to a container, so that it is easier to analyze the

Re: [kvm-devel] [PATCH 2/3] add get/set irqchip ioctls for in kernel PIC live migration support

2007-07-25 Thread He, Qing
Avi, This is the updated patch for the kernel part, please check. Thanks, Qing kvm: add get/set irqchip ioctls for in-kernel PIC live migration support This patch adds two new ioctls to dump and write kernel irqchips for save/restore and live migration. PIC s/r and l/m is implemented

Re: [kvm-devel] [PATCH 2/3] add get/set irqchip ioctls for in kernel PIC live migration support

2007-07-25 Thread Avi Kivity
He, Qing wrote: +union { + struct kvm_ioctl_pic pic; Reserve some space here so that other members can be added to the union without changing the ioctl number. I checked the kvm_ioapic structure, if IOAPIC_NUM_PINS==24, at least 216 bytes is required

Re: [kvm-devel] [PATCH 2/3] add get/set irqchip ioctls for in kernel PIC live migration support

2007-07-25 Thread He, Qing
-Original Message- From: Avi Kivity [mailto:[EMAIL PROTECTED] Sent: 2007年7月25日 19:22 To: He, Qing Cc: kvm-devel Subject: Re: [kvm-devel] [PATCH 2/3] add get/set irqchip ioctls for in kernel PIC live migration support He, Qing wrote: This patch adds two new ioctls to dump and write

Re: [kvm-devel] [PATCH 2/3] i386: use x86_64's desc_def.h

2007-07-20 Thread Chris Wright
* Rusty Russell ([EMAIL PROTECTED]) wrote: On Thu, 2007-07-19 at 09:27 +1000, Rusty Russell wrote: On Wed, 2007-07-18 at 09:19 -0700, Zachary Amsden wrote: +#define GET_CONTENTS(desc) (((desc)-raw32.b 10) 3) +#define GET_WRITABLE(desc) (((desc)-raw32.b 9) 1) You got

[kvm-devel] [PATCH 2/3] i386: use x86_64's desc_def.h

2007-07-18 Thread Rusty Russell
The main effect is to change the definition of struct desc_struct to a union of more complex types. I kept the old 32-bit comparisons, but many could be changed to use the 64-bit desc-raw. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 656f3ff2c9ce arch/i386/kernel/cpu/common.c ---

Re: [kvm-devel] [PATCH 2/3] i386: use x86_64's desc_def.h

2007-07-18 Thread Zachary Amsden
Rusty Russell wrote: The main effect is to change the definition of struct desc_struct to a union of more complex types. Yay! Someone finally killed it. Every time I tried to kill it, I ended up off in the weeds chasing some bug. diff -r 656f3ff2c9ce arch/i386/kernel/process.c @@

Re: [kvm-devel] [PATCH 2/3] i386: use x86_64's desc_def.h

2007-07-18 Thread Rusty Russell
On Wed, 2007-07-18 at 09:19 -0700, Zachary Amsden wrote: +#define GET_CONTENTS(desc) (((desc)-raw32.b 10) 3) +#define GET_WRITABLE(desc) (((desc)-raw32.b 9) 1) You got rid of the duplicate definitions here, but then added new duplicates (GET_CONTENTS / WRITABLE). Can you stick them

Re: [kvm-devel] [PATCH 2/3] i386: use x86_64's desc_def.h

2007-07-18 Thread Rusty Russell
On Thu, 2007-07-19 at 09:27 +1000, Rusty Russell wrote: On Wed, 2007-07-18 at 09:19 -0700, Zachary Amsden wrote: +#define GET_CONTENTS(desc) (((desc)-raw32.b 10) 3) +#define GET_WRITABLE(desc) (((desc)-raw32.b 9) 1) You got rid of the duplicate definitions here, but

Re: [kvm-devel] [PATCH 2/3] i386: use x86_64's desc_def.h

2007-07-18 Thread Andi Kleen
On Thu, Jul 19, 2007 at 09:27:41AM +1000, Rusty Russell wrote: On Wed, 2007-07-18 at 09:19 -0700, Zachary Amsden wrote: +#define GET_CONTENTS(desc) (((desc)-raw32.b 10) 3) +#define GET_WRITABLE(desc) (((desc)-raw32.b 9) 1) You got rid of the duplicate definitions here,

Re: [kvm-devel] [PATCH 2/3] KVM - Fix hypercall arguments

2007-07-17 Thread Avi Kivity
Jeff Dike wrote: It looks like kvm_hypercall is trying to match the system call convention and mixed up the call number and first argument in the 32-bit case. Signed-off-by: Jeff Dike [EMAIL PROTECTED] -- drivers/kvm/kvm_main.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[kvm-devel] [PATCH 2/3] KVM: Fix memory slot management functions for guest smp

2007-07-17 Thread Avi Kivity
The memory slot management functions were oriented against vcpu 0, where they should be kvm-wide. This causes hangs starting X on guest smp. Fix by making the functions (and resultant tail in the mmu) non-vcpu-specific. Unfortunately this reduces the efficiency of the mmu object cache a bit. We

  1   2   >