On 12/15/2011 02:53 PM, Liu ping fan wrote:
+struct kvm_vcpu *kvm_vcpu_get(struct kvm_vcpu *vcpu)
+{
+ if (vcpu == NULL)
+ return NULL;
+ if (atomic_add_unless(vcpu-refcount, 1, 0))
Why do not use atomic_inc()?
Also, i think a memory barrier is needed after
On Thu, Dec 15, 2011 at 11:21:37AM +0800, Liu ping fan wrote:
On Tue, Dec 13, 2011 at 7:36 PM, Marcelo Tosatti mtosa...@redhat.com wrote:
On Mon, Dec 12, 2011 at 10:41:23AM +0800, Liu Ping Fan wrote:
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
Currently, vcpu can be destructed only
On 12/15/2011 04:25 PM, Xiao Guangrong wrote:
On 12/15/2011 02:53 PM, Liu ping fan wrote:
+struct kvm_vcpu *kvm_vcpu_get(struct kvm_vcpu *vcpu)
+{
+ if (vcpu == NULL)
+ return NULL;
+ if (atomic_add_unless(vcpu-refcount, 1, 0))
Why do not use atomic_inc()?
Also,
2011/12/15 Gleb Natapov g...@redhat.com:
On Thu, Dec 15, 2011 at 11:21:37AM +0800, Liu ping fan wrote:
On Tue, Dec 13, 2011 at 7:36 PM, Marcelo Tosatti mtosa...@redhat.com wrote:
On Mon, Dec 12, 2011 at 10:41:23AM +0800, Liu Ping Fan wrote:
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
On Thu, Dec 15, 2011 at 05:06:09PM +0800, Liu ping fan wrote:
2011/12/15 Gleb Natapov g...@redhat.com:
On Thu, Dec 15, 2011 at 11:21:37AM +0800, Liu ping fan wrote:
On Tue, Dec 13, 2011 at 7:36 PM, Marcelo Tosatti mtosa...@redhat.com
wrote:
On Mon, Dec 12, 2011 at 10:41:23AM +0800, Liu
On Thu, Dec 15, 2011 at 12:28:48PM +0800, Liu Ping Fan wrote:
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
Currently, vcpu can be destructed only when kvm instance destroyed.
Change this to vcpu's destruction before kvm instance, so vcpu MUST
and CAN be destroyed before kvm's destroy.
I
On 12/14/2011 07:58 PM, Eric B Munson wrote:
I don't think you should see a guest softlockup if the host is
overloaded. Nor should you see it due to a long live migration pause,
or STOP/CONT. You should see a guest softlockup if it is spinning due
to a guest bug, and not for any other
On 12/14/2011 08:21 PM, Marcelo Tosatti wrote:
On Wed, Dec 14, 2011 at 04:39:56PM +0200, Avi Kivity wrote:
On 12/14/2011 02:16 PM, Marcelo Tosatti wrote:
Having this controlled from userspace means it doesn't work for SIGSTOP
or for long scheduling delays. What about doing this
New version below. Changes:
- __pmdp_for_addr and ptep_for_addr now take a vma as argument
- check if a vma exists has moved to gmap_fault and kvm_s390_keyop
- kvm_s390_keyop verifies that a vma is writable so that it's safe to
set the SWC bit
Subject: [PATCH] kvm-s390: storage key interface
On 2011-12-12 17:51, Jan Kiszka wrote:
On 2011-12-12 17:37, Marcelo Tosatti wrote:
On Thu, Dec 08, 2011 at 12:52:19PM +0100, Jan Kiszka wrote:
Changes in v4:
- rebased of current uq/master
- fixed stupid bugs that broke bisectability and user space irqchip mode
- integrated NMI-over-LINT1
Drop bsp_vcpu pointer from kvm struct since its only use is incorrect
anyway.
Signed-off-by: Gleb Natapov g...@redhat.com
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
index cac4746..b6a7353 100644
--- a/arch/x86/kvm/i8259.c
+++ b/arch/x86/kvm/i8259.c
@@ -262,9 +262,10 @@ int
On 12/15/2011 12:33 PM, Jan Kiszka wrote:
Any thoughts on the qemu-kvm merge plan? Sounds painful.
Pain will be where the existing qemu-kvm extensions collide with these
refactored upstream devices (backend/frontend split specifically).
That's where we have to merge very carefully.
On 12/08/2011 01:34 PM, Amit Shah wrote:
On (Mon) 05 Dec 2011 [15:18:59], Eric B Munson wrote:
When a guest kernel is stopped by the host hypervisor it can look like a
soft
lockup to the guest kernel. This false warning can mask later soft lockup
warnings which may be real. This patch
On 2011-12-15 12:54, Avi Kivity wrote:
On 12/15/2011 12:33 PM, Jan Kiszka wrote:
Any thoughts on the qemu-kvm merge plan? Sounds painful.
Pain will be where the existing qemu-kvm extensions collide with these
refactored upstream devices (backend/frontend split specifically).
That's where we
Not all compilers accept anonymous field initialization, e.g. gcc
4.5.1.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
arch/x86/kvm/pmu.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c
index 061a03f..7aad544 100644
---
On Thu, 2011-12-15 at 13:04 +0100, Jan Kiszka wrote:
Not all compilers accept anonymous field initialization, e.g. gcc
4.5.1.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
arch/x86/kvm/pmu.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git
Fix the case when using a rootfs combined with a virtio-blk disk.
Also, simplify custon rootfs name lookup.
Signed-off-by: Sasha Levin levinsasha...@gmail.com
---
tools/kvm/builtin-run.c | 18 ++
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git
When using AIO, submit all requests which exists in the vring in a single
io_submit instead of one io_submit for each descriptor.
Benchmarks:
Short version: 15%+ increase in IOPS, small increase in BW.
Read IOPS:
Before:
vda: ios=291792/0, merge=0/0, ticks=35229/0, in_queue=31025, util=61.30%
On 2011-12-15 13:08, Peter Zijlstra wrote:
On Thu, 2011-12-15 at 13:04 +0100, Jan Kiszka wrote:
Not all compilers accept anonymous field initialization, e.g. gcc
4.5.1.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
arch/x86/kvm/pmu.c |3 ++-
1 files changed, 2 insertions(+), 1
Rename msix_supported to msi_supported and control MSI and MSI-X
activation this way. That was likely to original intention for this
flag, but MSI support came after MSI-X.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
hw/msi.c |8
hw/msi.h |2 ++
hw/msix.c |9
Make the basic in-kernel irqchip support selectable via
-machine ...,kernel_irqchip=on. Leave it off by default until it can
fully replace user space models.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
qemu-config.c |4
qemu-options.hx |5 -
2 files changed, 8
Add the basic infrastructure to active in-kernel irqchip support, inject
interrupts into these models, and maintain IRQ routes.
Routing is optional and depends on the host arch supporting
KVM_CAP_IRQ_ROUTING. When it's not available on x86, we looe the HPET as
we can't route GSI0 to IOAPIC pin 2.
This introduces the alternative APIC backend which makes use of KVM's
in-kernel device model. External NMI injection via LINT1 is emulated by
checking the current state of the in-kernel APIC, only injecting a NMI
into the VCPU if LINT1 is unmasked and configured to DM_NMI.
MSI is not yet
On real hardware, NMI button events are injected via the LINT1 line of
the APICs. E.g. kdump expect this wiring and gets upset if the per-APIC
LINT1 mask is not respected, i.e. if NMIs are injected to VCPUs that
should not receive them. Change the APIC emulation code to reflect this.
Based on
Analogously to the APIC, we will reuse some parts of the user space
i8259 model for KVM. Again, we create a PIC backend infrastructure and
provide hooks for init, reset, and vmload/save. This also introduces a
common helper to instantiate a single i8259 chip from the cascade-
creating i8259_init
This introduces the KVM-accelerated IOAPIC backend and extends the IRQ
routing setup by the 0-2 redirection when needed.
The IOAPIC gains a KVM-specific property that allows to define the GSI
base for injecting interrupts into the kernel model. This will allow to
disentangle PIC and IOAPIC pins
The KVM in-kernel APIC model will reuse parts of the user space model
while providing the same frontend view to guest and most management
interfaces. Introduce an APIC backend concept to encapsulate those
parts that will tell user space and KVM model apart. The backend offers
callback hooks for
Changes in v5:
- properly introduce apic_report_irq_delivered (instead of
apic_set_irq_delivered silently)
- rework apic to kvm core interface according to Blue's suggestion
CC: Lai Jiangshan la...@cn.fujitsu.com
Jan Kiszka (16):
msi: Generalize msix_supported to msi_supported
kvm: Move
Split up the IOAPIC analogously to APIC and i8259. KVM will share the
device description, reset logic and certain init parts with the user
space model.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
Makefile.target |2 +-
hw/ioapic.c | 130
Introduce the alternative i8259 backend that exploits KVM in-kernel
acceleration.
The PIIX3 initialization code is furthermore extended by KVM specific
IRQ route setup. GSI injection differs in KVM mode from the user space
model. As we can dispatch ISA-range IRQs to both IOAPIC and PIC inside
the
To enable migration between accelerated and non-accelerated APIC models,
we will need to handle the timer saving and restoring specially and can
no longer rely on the automatics of VMSTATE_TIMER. Specifically,
accelerated model will not start any QEMUTimer.
This patch therefore factors out the
All LVTs are masked on reset, so the timer becomes ineffective. Letting
it tick nevertheless is harmless, but will at least create a spurious
trace event.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
hw/apic.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git
The in-kernel i8259 and IOAPIC backends for KVM will need this, so
encapsulate the shared bits.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
hw/apic.c| 11 ---
hw/apic.h|1 +
trace-events |2 +-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git
More KVM-specific devices will come, so let's start with moving the
kvmclock into a dedicated folder.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
Makefile.target|4 ++--
configure |1 +
hw/{kvmclock.c = kvm/clock.c} |4 ++--
Introduce a memory region type that can reserve I/O space. Such regions
are useful for modeling I/O that is only handled outside of QEMU, i.e.
in the context of an accelerator like KVM.
Any access to such a region from QEMU is a bug, but could theoretically
be triggered by guest code (DMA to
KVM is forced to disable the IRQ0 override when we run with in-kernel
irqchip but without IRQ routing support of the kernel. Set the fwcfg
value correspondingly. This aligns us with qemu-kvm.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
hw/pc.c|3 ++-
kvm-all.c |5 +
Add compiler.h file to support using kernel error check funciotns(e.g
ERR_PTR, PTR_ERR and so on).
Signed-off-by: Lan Tianyu tianyu@intel.com
---
tools/kvm/include/linux/compiler.h | 16
1 files changed, 16 insertions(+), 0 deletions(-)
create mode 100644
This patch enables allocating new refcount blocks and so then kvm tools
could expand qcow2 image much larger.
Signed-off-by: Lan Tianyu tianyu@intel.com
---
tools/kvm/disk/qcow.c | 111 +---
1 files changed, 94 insertions(+), 17 deletions(-)
diff
I have a CentOS 6 host system running a CentOS 6 KVM guest and the
guest seems to get about 5x slower disk throughput than the host:
host $ sudo dd of=/dev/datavol/disk1 if=/dev/zero bs=1M oflag=direct count=5
5+0 records in
5+0 records out
5242880 bytes (52 GB) copied, 150.36 s,
* Brian J. Murrell br...@interlinx.bc.ca [2011-12-15 15:28]:
I have a CentOS 6 host system running a CentOS 6 KVM guest and the
guest seems to get about 5x slower disk throughput than the host:
host $ sudo dd of=/dev/datavol/disk1 if=/dev/zero bs=1M oflag=direct
count=5
5+0 records
On Thu, Dec 15, 2011 at 11:28:03AM +0100, Carsten Otte wrote:
New version below. Changes:
- __pmdp_for_addr and ptep_for_addr now take a vma as argument
- check if a vma exists has moved to gmap_fault and kvm_s390_keyop
- kvm_s390_keyop verifies that a vma is writable so that it's safe to
On 15/12/11 17:11, Heiko Carstens wrote:
Why again is this needed? Or put in other words: what prevents a guest to
change the storage key contents via sske of a page that is mapped read-only
into the guest address space?
As far as I can see: nothing. Interestingly I could -in theory- do some
On 11-12-15 10:47 AM, Stefan Pietsch wrote:
Did you try to set the cache of the virtio disk to none?
I didn't. It was set at default in virt-manager and I suppose I just
assumed that default would be reasonable.
Changing to none has had a good effect indeed:
host $ ssh guest dd of=/dev/vdb
On Thu, 15 Dec 2011 11:28:03 +0100
Carsten Otte co...@de.ibm.com wrote:
+ case KVM_S390_KEYOP_SSKE:
+ if (!(vma-vm_flags (VM_WRITE | VM_MAYWRITE))) {
+ r = -EACCES;
+ break;
+ }
Unfortunately I just realized while
On Thu, 2011-12-15 at 11:55 -0500, Brian J. Murrell wrote:
So, about 2/3 of host speed now -- which is much better. Is 2/3 about
normal or should I be looking for more?
aio=native
Thats the qemu setting, I'm not sure where libvirt hides that.
--
Sasha.
--
To unsubscribe from this list:
On Thu, Dec 15, 2011 at 05:49:19PM +0100, Christian Borntraeger wrote:
On 15/12/11 17:11, Heiko Carstens wrote:
Why again is this needed? Or put in other words: what prevents a guest to
change the storage key contents via sske of a page that is mapped read-only
into the guest address space?
On Thu, Dec 15, 2011 at 07:16:22PM +0200, Sasha Levin wrote:
On Thu, 2011-12-15 at 11:55 -0500, Brian J. Murrell wrote:
So, about 2/3 of host speed now -- which is much better. Is 2/3 about
normal or should I be looking for more?
aio=native
Thats the qemu setting, I'm not sure where
On Thu, 15 Dec 2011, Avi Kivity wrote:
On 12/14/2011 07:58 PM, Eric B Munson wrote:
I don't think you should see a guest softlockup if the host is
overloaded. Nor should you see it due to a long live migration pause,
or STOP/CONT. You should see a guest softlockup if it is spinning
When a host stops or suspends a VM it will set a flag to show this. The
watchdog will use these functions to determine if a softlockup is real, or the
result of a suspended VM.
Signed-off-by: Eric B Munson emun...@mgebm.net
Cc: mi...@redhat.com
Cc: h...@zytor.com
Cc: a...@arndb.de
Cc:
This flag will be used to check if the vm was stopped by the host when a soft
lockup was detected. The host will set the flag when it stops the guest. On
resume, the guest will check this flag if a soft lockup is detected and skip
issuing the warning.
Signed-off-by: Eric B Munson
Changes from V6:
Use __this_cpu_and when clearing the PVCLOCK_GUEST_STOPPED flag
Changes from V5:
Collapse generic check_and_clear_guest_stopped into patch 2
Include check_and_clear_guest_stopped defintion to ia64, s390, and powerpc
Change check_and_clear_guest_stopped to use __get_cpu_var
A suspended VM can cause spurious soft lockup warnings. To avoid these, the
watchdog now checks if the kernel knows it was stopped by the host and skips
the warning if so. When the watchdog is reset successfully, clear the guest
paused flag.
Signed-off-by: Eric B Munson emun...@mgebm.net
Cc:
Now that we have a flag that will tell the guest it was suspended, create an
interface for that communication using a KVM ioctl.
Signed-off-by: Eric B Munson emun...@mgebm.net
Cc: mi...@redhat.com
Cc: h...@zytor.com
Cc: a...@arndb.de
Cc: ry...@linux.vnet.ibm.com
Cc: aligu...@us.ibm.com
Cc:
On 11-12-15 12:27 PM, Daniel P. Berrange wrote:
On Thu, Dec 15, 2011 at 07:16:22PM +0200, Sasha Levin wrote:
On Thu, 2011-12-15 at 11:55 -0500, Brian J. Murrell wrote:
So, about 2/3 of host speed now -- which is much better. Is 2/3 about
normal or should I be looking for more?
aio=native
On Wed, Dec 14, 2011 at 05:03:54PM +0100, Jens Axboe wrote:
On 2011-12-14 14:43, Avi Kivity wrote:
On 12/14/2011 02:25 PM, Marcelo Tosatti wrote:
On Mon, Dec 05, 2011 at 04:48:16PM -0600, Nate Custer wrote:
Hello,
I am struggling with repeatable full hardware locks when running 8-12 KVM
On Thu, 15 Dec 2011 01:36:44 +, Ben Hutchings bhutchi...@solarflare.com
wrote:
On Fri, 2011-12-09 at 16:01 +1030, Rusty Russell wrote:
On Wed, 7 Dec 2011 17:02:04 +, Ben Hutchings
bhutchi...@solarflare.com wrote:
Most multi-queue controllers could support a kind of hash-based
From: Hongyong Zang zanghongy...@huawei.com
If a guest's ram_size exceeds KVM_32BIT_GAP_START, the corresponding kvm tool's
virtual address size should be (ram_size + KVM_32BIT_GAP_SIZE), rather than
ram_size.
Signed-off-by: Hongyong Zang zanghongy...@huawei.com
---
tools/kvm/x86/kvm.c |4
From: Hongyong Zang zanghongy...@huawei.com
In pci_enable_msix(), the guest's virtio-serial driver tries to set msi-x
with one vector per queue. But it fails and eventually all virtio-serial
ports share one MSI-X vector. Because every virtio-serial port has *two*
virtqueues, virtio-serial needs
- Message from Brian J. Murrell br...@interlinx.bc.ca -
Date: Thu, 15 Dec 2011 14:43:23 -0500
From: Brian J. Murrell br...@interlinx.bc.ca
Subject: Re: 5x slower guest disk performance with virtio disk
To: kvm@vger.kernel.org
Cc: Sasha Levin levinsasha...@gmail.com
On Fri, 2011-12-16 at 09:01 +0800, zanghongy...@huawei.com wrote:
If a guest's ram_size exceeds KVM_32BIT_GAP_START, the corresponding kvm
tool's
virtual address size should be (ram_size + KVM_32BIT_GAP_SIZE), rather than
ram_size.
You're right.
There are more places than just the
From: Hongyong Zang zanghongy...@huawei.com
Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
to translate GPA to HVA. Since kernel's kvm structure already maintains the
address relationship in its member *kvm_memslots*, these patches use kernel's
kvm_memslots
From: Hongyong Zang zanghongy...@huawei.com
Use kvm's memslots instead of vhost_memory to traslate address
from GPA to HVA.
Signed-off-by: Hongyong Zang zanghongy...@huawei.com
---
drivers/vhost/vhost.c | 53 ++--
1 files changed, 20 insertions(+),
From: Hongyong Zang zanghongy...@huawei.com
This function finds the kvm structure from its corresponding user
space process, such as qemu process.
Signed-off-by: Hongyong Zang zanghongy...@huawei.com
---
include/linux/kvm_host.h |2 +-
virt/kvm/kvm_main.c | 13 +
2 files
于 2011/12/16,星期五 13:50, Sasha Levin 写道:
On Fri, 2011-12-16 at 09:01 +0800, zanghongy...@huawei.com wrote:
If a guest's ram_size exceeds KVM_32BIT_GAP_START, the corresponding kvm tool's
virtual address size should be (ram_size + KVM_32BIT_GAP_SIZE), rather than
ram_size.
You're right.
There
(2011/12/16 14:32), zanghongy...@huawei.com wrote:
From: Hongyong Zangzanghongy...@huawei.com
Vhost-net uses its own vhost_memory, which results from user space (qemu)
info,
to translate GPA to HVA. Since kernel's kvm structure already maintains the
address relationship in its member
On Fri, 2011-12-16 at 13:32 +0800, zanghongy...@huawei.com wrote:
From: Hongyong Zang zanghongy...@huawei.com
Vhost-net uses its own vhost_memory, which results from user space (qemu)
info,
to translate GPA to HVA. Since kernel's kvm structure already maintains the
address relationship in
On Fri, 2011-12-16 at 15:02 +0800, Zang Hongyong wrote:
于 2011/12/16,星期五 13:50, Sasha Levin 写道:
On Fri, 2011-12-16 at 09:01 +0800, zanghongy...@huawei.com wrote:
If a guest's ram_size exceeds KVM_32BIT_GAP_START, the corresponding kvm
tool's
virtual address size should be (ram_size +
于 2011/12/16,星期五 15:05, Sasha Levin 写道:
On Fri, 2011-12-16 at 13:32 +0800, zanghongy...@huawei.com wrote:
From: Hongyong Zangzanghongy...@huawei.com
Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
to translate GPA to HVA. Since kernel's kvm structure already
On Thu, Dec 15, 2011 at 5:10 PM, Gleb Natapov g...@redhat.com wrote:
On Thu, Dec 15, 2011 at 12:28:48PM +0800, Liu Ping Fan wrote:
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
Currently, vcpu can be destructed only when kvm instance destroyed.
Change this to vcpu's destruction before kvm
On Thu, 2011-12-15 at 08:49 +0100, Andreas Färber wrote:
Am 15.12.2011 00:58, schrieb Benjamin Herrenschmidt:
We rename the mach64 hack to simple since that's also applicable
to anything using VGA-style DAC IO ports (set to 8-bit DAC) and we
use it for qemu vga.
Note that this is keyed
This series of patches builds on top of my previous series and
modifies the Book3S HV memory management code to use the hardware
reference and change bits in the guest hashed page table. This makes
kvm_age_hva() more efficient, lets us implement the dirty page
tracking properly (which in turn
This uses the host view of the hardware R (referenced) bit to speed
up kvm_age_hva() and kvm_test_age_hva(). Instead of removing all
the relevant HPTEs in kvm_age_hva(), we now just reset their R bits
if set. Also, kvm_test_age_hva() now scans the relevant HPTEs to
see if any of them have R set.
This changes the implementation of kvm_vm_ioctl_get_dirty_log() for
Book3s HV guests to use the hardware C (changed) bits in the guest
hashed page table. Since this makes the implementation quite different
from the Book3s PR case, this moves the existing implementation from
book3s.c to
73 matches
Mail list logo