2010/12/8 Isaku Yamahata yamah...@valinux.co.jp:
QLIST_FOREACH_SAFE?
Thanks! So, it should be,
QLIST_FOREACH_SAFE(e, vm_change_state_head, entries, ne) {
e-cb(e-opaque, running, reason);
}
I'll put it in the next spin.
Yoshi
On Thu, Nov 25, 2010 at 03:06:45PM +0900, Yoshiaki Tamura
On 12/07/2010 11:16 PM, David Sharp wrote:
I don't understand this. Can you elaborate? What does 32-bit addressable
mean?
The ring buffer gives you space that is a multiple of 4 bytes in
length, and 32-bit aligned. Therefore it is useless to attempt to
align the structure beyond 32-bit
On 12/08/2010 04:49 AM, Sheng Yang wrote:
CPUID's OSXSAVE is a mirror of CR4.OSXSAVE bit. We need to update the CPUID
after migration.
Applied, thanks.
@@ -5585,6 +5585,8 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
mmu_reset_needed |= kvm_read_cr4(vcpu) !=
Am 06.12.2010 20:53, schrieb Christian Brunner:
This is a new version of the rbd driver. The only difference from v8 is
a check for a recent librados version in configure. If the librados version
is too old, rbd support will be disabled.
RBD is an block driver for the distributed file system
On 12/07/2010 06:15 PM, Joerg Roedel wrote:
This patch implements the xsetbv intercept to the AMD part
of KVM. This makes AVX usable in a save way for the guest on
AVX capable AMD hardware.
The patch is tested by using AVX in the guest and host in
parallel and checking for data corruption. I
Avi, Marcello,
can you please commit this simple fix? (turning 40 to 80?)
Without it QEMU crashes reliably on our new CPUs (they return 46 leaves)
and causes pain in our testing, because we have to manually apply this
patch on each tree.
Thanks!
Andre.
Currently the number of CPUID leaves
The handling of CR8 writes in KVM is currently somewhat cumbersome.
This patch makes it look like the other CR register handlers
and fixes a possible issue in VMX, where the RIP would be incremented
despite an injected #GP.
Signed-off-by: Andre Przywara andre.przyw...@amd.com
---
Store all io ports used by device in ISADevice structure.
Signed-off-by: Gleb Natapov g...@redhat.com
---
hw/cs4231a.c |1 +
hw/fdc.c |3 +++
hw/gus.c |4
hw/ide/isa.c |2 ++
hw/isa-bus.c | 25 +
hw/isa.h |4
New get_fw_dev_path callback will be used for build device path usable
by firmware in contrast to qdev qemu internal device path.
Signed-off-by: Gleb Natapov g...@redhat.com
---
hw/qdev.h |7 +++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/hw/qdev.h b/hw/qdev.h
index
Signed-off-by: Gleb Natapov g...@redhat.com
---
hw/fw_cfg.c | 14 ++
sysemu.h|1 +
vl.c| 48
3 files changed, 63 insertions(+), 0 deletions(-)
diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c
index 7b9434f..20a816f 100644
Use device ioports to create unique device path.
Signed-off-by: Gleb Natapov g...@redhat.com
---
hw/isa-bus.c | 16
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index c0ac7e9..c423c1b 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
Signed-off-by: Gleb Natapov g...@redhat.com
---
hw/scsi-bus.c | 23 +++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index 93f0e9a..7febb86 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -5,9 +5,12 @@
#include qdev.h
Signed-off-by: Gleb Natapov g...@redhat.com
---
hw/usb-bus.c | 42 ++
1 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/hw/usb-bus.c b/hw/usb-bus.c
index 256b881..8b4583c 100644
--- a/hw/usb-bus.c
+++ b/hw/usb-bus.c
@@ -5,11 +5,13 @@
Add fw_name to DeviceInfo to use in device path building. In
contrast to name fw_name should refer to functionality device
provides instead of particular device model like name does.
Signed-off-by: Gleb Natapov g...@redhat.com
---
hw/fdc.c|1 +
hw/ide/isa.c|1 +
hw/ide/qdev.c
Prints out mmio or pio used to access child device.
Signed-off-by: Gleb Natapov g...@redhat.com
---
hw/pci_host.c |2 ++
hw/sysbus.c | 30 ++
hw/sysbus.h |4
3 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/hw/pci_host.c
Change fw_cfg_add_file() to get full file path as a parameter instead
of building one internally. Two reasons for that. First caller may need
to know how file is named. Second this moves policy of file naming out
from fw_cfg. Platform may want to use more then two levels of
directories for
If bootindex is specified on command line a string that describes device
in firmware readable way is added into sorted list. Later this list will
be passed into firmware to control boot order.
Signed-off-by: Gleb Natapov g...@redhat.com
---
block_int.h |4 +++-
hw/e1000.c |4
Ports on root hub will have NULL here. This is needed to reconstruct
path from device to its root hub to build device path.
Signed-off-by: Gleb Natapov g...@redhat.com
---
hw/usb-bus.c |3 ++-
hw/usb-hub.c |2 +-
hw/usb-musb.c |2 +-
hw/usb-ohci.c |2 +-
hw/usb-uhci.c |2 +-
Signed-off-by: Gleb Natapov g...@redhat.com
---
hw/pci.c | 108 -
1 files changed, 85 insertions(+), 23 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index 0c15b13..e7ea907 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -43,6 +43,7 @@
Signed-off-by: Gleb Natapov g...@redhat.com
---
hw/ide/cmd646.c |4 ++--
hw/ide/internal.h |3 ++-
hw/ide/isa.c |2 +-
hw/ide/piix.c |4 ++--
hw/ide/qdev.c |3 ++-
hw/ide/via.c |4 ++--
6 files changed, 11 insertions(+), 9 deletions(-)
diff --git
Signed-off-by: Gleb Natapov g...@redhat.com
---
hw/ide/qdev.c | 13 +
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 88ff657..01a181b 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -24,9 +24,12 @@
/*
Extend -option-rom command to have additional parameter ,bootindex=.
Signed-off-by: Gleb Natapov g...@redhat.com
---
hw/loader.c| 16 +++-
hw/loader.h|8
hw/multiboot.c |3 ++-
hw/ne2000.c|2 +-
hw/nseries.c |4 ++--
hw/palm.c |6
Forget to save a couple of buffers before sending version 7 :(
Anthony, Blue can this be applied now?
Gleb Natapov (16):
Introduce fw_name field to DeviceInfo structure.
Introduce new BusInfo callback get_fw_dev_path.
Keep track of ISA ports ISA device is using in qdev.
Add
Action that depends on fully initialized device model should register
with this notifier chain.
Signed-off-by: Gleb Natapov g...@redhat.com
---
sysemu.h |2 ++
vl.c | 15 +++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/sysemu.h b/sysemu.h
index
On 12/08/2010 01:13 PM, Andre Przywara wrote:
Avi, Marcello,
can you please commit this simple fix? (turning 40 to 80?)
Without it QEMU crashes reliably on our new CPUs (they return 46
leaves) and causes pain in our testing, because we have to manually
apply this patch on each tree.
Sorry
On 12/01/2010 02:55 PM, Andre Przywara wrote:
Avi Kivity wrote:
On 12/01/2010 01:17 PM, Andre Przywara wrote:
Currently the number of CPUID leaves KVM handles is limited to 40.
My desktop machine (AthlonII) already has 35 and future CPUs will
expand this well beyond the limit. Extend the limit
On 12/08/2010 02:11 AM, Yoshiaki Tamura wrote:
2010/12/8 Isaku Yamahatayamah...@valinux.co.jp:
QLIST_FOREACH_SAFE?
Thanks! So, it should be,
QLIST_FOREACH_SAFE(e,vm_change_state_head, entries, ne) {
e-cb(e-opaque, running, reason);
}
I'll put it in the next spin.
This is
Make it available for all archs.
Signed-off-by: Avi Kivity a...@redhat.com
---
include/linux/kvm_host.h |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index bd0da8f..b5021db 100644
--- a/include/linux/kvm_host.h
+++
Hi,
This is the seventh iteration of the nested VMX patch set. It fixes a bunch
of bugs in the previous iteration, and in particular it now works correctly
with EPT in the L0 hypervisor, so ept=0 no longer needs to be specified.
This new set of patches should apply to the current KVM trunk (I
This patch adds a module option nested to vmx.c, which controls whether
the guest can use VMX instructions, i.e., whether we allow nested
virtualization. A similar, but separate, option already exists for the
SVM module.
This option currently defaults to 0, meaning that nested VMX must be
If the nested module option is enabled, add the VMX CPU feature to the
list of CPU features KVM advertises with the KVM_GET_SUPPORTED_CPUID ioctl.
Qemu uses this ioctl, and intersects KVM's list with its own list of desired
cpu features (depending on the -cpu option given to qemu) to determine
This patch allows a guest to use the VMXON and VMXOFF instructions, and
emulates them accordingly. Basically this amounts to checking some
prerequisites, and then remembering whether the guest has enabled or disabled
VMX operation.
Signed-off-by: Nadav Har'El n...@il.ibm.com
---
This patch allows the guest to enable the VMXE bit in CR4, which is a
prerequisite to running VMXON.
Whether to allow setting the VMXE bit now depends on the architecture (svm
or vmx), so its checking has moved to kvm_x86_ops-set_cr4(). This function
now returns an int: If kvm_x86_ops-set_cr4()
An implementation of VMX needs to define a VMCS structure. This structure
is kept in guest memory, but is opaque to the guest (who can only read or
write it with VMX instructions).
This patch starts to define the VMCS structure which our nested VMX
implementation will present to L1. We call it
When the guest can use VMX instructions (when the nested module option is
on), it should also be able to read and write VMX MSRs, e.g., to query about
VMX capabilities. This patch adds this support.
Signed-off-by: Nadav Har'El n...@il.ibm.com
---
arch/x86/kvm/vmx.c | 117
This patch includes a utility function for decoding pointer operands of VMX
instructions issued by L1 (a guest hypervisor)
Signed-off-by: Nadav Har'El n...@il.ibm.com
---
arch/x86/kvm/vmx.c | 59 +++
arch/x86/kvm/x86.c |3 +-
arch/x86/kvm/x86.h |
In this patch we add a list of L0 (hardware) VMCSs, which we'll use to hold a
hardware VMCS for each active vmcs12 (i.e., for each L2 guest).
We call each of these L0 VMCSs a vmcs02, as it is the VMCS that L0 uses
to run its nested guest L2.
Signed-off-by: Nadav Har'El n...@il.ibm.com
---
This patch implements the VMCLEAR instruction.
Signed-off-by: Nadav Har'El n...@il.ibm.com
---
arch/x86/kvm/vmx.c | 60 ++-
1 file changed, 59 insertions(+), 1 deletion(-)
--- .before/arch/x86/kvm/vmx.c 2010-12-08 18:56:50.0 +0200
+++
This patch implements the VMPTRLD instruction.
Signed-off-by: Nadav Har'El n...@il.ibm.com
---
arch/x86/kvm/vmx.c | 61 ++-
1 file changed, 60 insertions(+), 1 deletion(-)
--- .before/arch/x86/kvm/vmx.c 2010-12-08 18:56:50.0 +0200
+++
This patch implements the VMPTRST instruction.
Signed-off-by: Nadav Har'El n...@il.ibm.com
---
arch/x86/kvm/vmx.c | 27 ++-
arch/x86/kvm/x86.c |3 ++-
arch/x86/kvm/x86.h |3 +++
3 files changed, 31 insertions(+), 2 deletions(-)
--- .before/arch/x86/kvm/x86.c
This patch contains code to prepare the VMCS which can be used to actually
run the L2 guest, vmcs02. prepare_vmcs02 appropriately merges the information
in vmcs12 (the vmcs that L1 built for L2) and in vmcs01 (the vmcs that we
built for L1).
VMREAD/WRITE can only access one VMCS at a time (the
Move code that syncs dirty RSP and RIP registers back to the VMCS, into a
function. We will need to call this function from additional places in the
next patch.
Signed-off-by: Nadav Har'El n...@il.ibm.com
---
arch/x86/kvm/vmx.c | 15 ++-
1 file changed, 10 insertions(+), 5
Implement the VMLAUNCH and VMRESUME instructions, allowing a guest
hypervisor to run its own guests.
Signed-off-by: Nadav Har'El n...@il.ibm.com
---
arch/x86/kvm/vmx.c | 235 ++-
1 file changed, 232 insertions(+), 3 deletions(-)
---
This patch implements nested_vmx_vmexit(), called when the nested L2 guest
exits and we want to run its L1 parent and let it handle this exit.
Note that this will not necessarily be called on every L2 exit. L0 may decide
to handle a particular exit on its own, without L1's involvement; In that
When KVM wants to inject an interrupt, the guest should think a real interrupt
has happened. Normally (in the non-nested case) this means checking that the
guest doesn't block interrupts (and if it does, inject when it doesn't - using
the interrupt window VMX mechanism), and setting up the
Similar to the previous patch, but concerning injection of exceptions rather
than external interrupts.
Signed-off-by: Nadav Har'El n...@il.ibm.com
---
arch/x86/kvm/vmx.c | 26 ++
1 file changed, 26 insertions(+)
--- .before/arch/x86/kvm/vmx.c 2010-12-08
This patch adds correct handling of IDT_VECTORING_INFO_FIELD for the nested
case.
When a guest exits while handling an interrupt or exception, we get this
information in IDT_VECTORING_INFO_FIELD in the VMCS. When L2 exits to L1,
there's nothing we need to do, because L1 will see this field in
When L2 tries to modify CR0 or CR4 (with mov or clts), and modifies a bit
which L1 asked to shadow (via CR[04]_GUEST_HOST_MASK), we already do the right
thing: we let L1 handle the trap (see nested_vmx_exit_handled_cr() in a
previous patch).
When L2 modifies bits that L1 doesn't care about, we let
KVM's Lazy FPU loading means that sometimes L0 needs to set CR0.TS, even
if a guest didn't set it. Moreover, L0 must also trap CR0.TS changes and
NM exceptions, even if we have a guest hypervisor (L1) who didn't want these
traps. And of course, conversely: If L1 wanted to trap these events, we
In the unlikely case that L1 does not capture MSR_IA32_TSC, L0 needs to
emulate this MSR write by L2 by modifying vmcs02.tsc_offset.
We also need to set vmcs12.tsc_offset, for this change to survive the next
nested entry (see prepare_vmcs02()).
Signed-off-by: Nadav Har'El n...@il.ibm.com
---
Small corrections of KVM (spelling, etc.) not directly related to nested VMX.
Signed-off-by: Nadav Har'El n...@il.ibm.com
---
arch/x86/kvm/vmx.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- .before/arch/x86/kvm/vmx.c 2010-12-08 18:56:52.0 +0200
+++
This patch includes a brief introduction to the nested vmx feature in the
Documentation/kvm directory. The document also includes a copy of the
vmcs12 structure, as requested by Avi Kivity.
Signed-off-by: Nadav Har'El n...@il.ibm.com
---
Documentation/kvm/nested-vmx.txt | 237
On 12/03/2010 08:23 AM, Peter Zijlstra wrote:
On Thu, 2010-12-02 at 14:44 -0500, Rik van Riel wrote:
unsigned long clone_flags);
+
+#ifdef CONFIG_SCHED_HRTICK
+extern u64 slice_remain(struct task_struct *);
+extern void yield_to(struct task_struct *);
+#else
Hi,
I tried a relatively simple task with qemu-kvm. I have two qcow hd images and
try to create filesystems on them using a gentoo installation disk.
Starting qemu with:
qemu -m 512 -cdrom install-x86-minimal-20101116.iso -hda hda.img -hdb hdb.img
However, mkfs always hangs indefinitely.
On Tue, Dec 07, 2010 at 03:12:36PM -0200, Glauber Costa wrote:
On Mon, 2010-12-06 at 19:04 -0200, Marcelo Tosatti wrote:
On Mon, Dec 06, 2010 at 09:03:46AM -0500, Glauber Costa wrote:
Usually nobody usually thinks about that scenario (me included and
specially),
but kvmclock can be
On Wed, Dec 08, 2010 at 01:45:06AM +0900, Takuya Yoshikawa wrote:
Memo:
- kvm_io_bus_register_dev() was protected as far as I checked.
- kvm_create_pit() was commented like Caller must hold slots_lock
but kvm_free_pit() was not. So I don't know if I should protect
the whole
On Wednesday, December 08, 2010 01:09:25 pm Hanno Böck wrote:
Hi,
I tried a relatively simple task with qemu-kvm. I have two qcow hd images
and try to create filesystems on them using a gentoo installation disk.
qcow2 (I hope you are using that vs just qcow) is known to be a tad on the
On Wed, 2010-12-08 at 12:55 -0500, Rik van Riel wrote:
Right, so another approach might be to simply swap the vruntime between
curr and p.
Doesn't that run into the same scale issue you described
above?
Not really, but its tricky on SMP because vruntime only has meaning
within a
On Wed, 2010-12-08 at 21:00 +0100, Peter Zijlstra wrote:
+ lag0 = avg_vruntime(cfs_rq_of(se));
+ p_lag0 = avg_vruntime(cfs_rq_of(p_se));
+
+ lag = se-vruntime - avg_vruntime(cfs_rq);
+ p_lag = p_se-vruntime - avg_vruntime(p_cfs_rq);
+
+ if (p_lag lag) { /* if
On Wed, Dec 1, 2010 at 10:16 AM, Freddie Cash fjwc...@gmail.com wrote:
Just an update on this. We made the change over the weekend to enable
cache=off for all the VMs, including the libvirt managed ones (turns
out, libvirtd only reads the .xml files at startup); and enabeld KSM
on the host.
Am Wednesday 08 December 2010 schrieb Brian Jackson:
qcow2 (I hope you are using that vs just qcow) is known to be a tad on the
slow side on metadata heavy operations (i.e. mkfs, installing lots of
files, etc.). One trick some of us use is to use the -drive syntax (vs
-hda) and set the cache
On 12/05/2010 07:56 AM, Avi Kivity wrote:
+ if (vcpu == me)
+ continue;
+ if (vcpu-spinning)
+ continue;
You may well want to wake up a spinner. Suppose
A takes a lock
B preempts A
B grabs a ticket, starts spinning, yields to A
A releases lock
A grabs ticket, starts spinning
at this point,
On 12/08/2010 03:00 PM, Peter Zijlstra wrote:
Anyway, complete untested and such..
Looks very promising. I've been making a few changes in the same
direction (except for the fancy CFS bits) and have one way to solve
the one problem you pointed out in your patch.
+void yield_to(struct
' -monitor
unix:'/tmp/monitor-humanmonitor1-20101208-191729-GpeV',server,nowait -serial
unix:'/tmp/serial-20101208-191729-GpeV',server,nowait -m 512 -smp 2 -kernel
'/usr/local/autotest/tests/kvm/unittests/vmexit.flat' -vnc :0 -chardev
file,id=testlog,path=/tmp/testlog-20101208-191729-GpeV
Fix the following compile error in next tree:
CCx86_64-softmmu/device-assignment.o
hw/device-assignment.c: In function ‘assigned_device_pci_cap_init’:
hw/device-assignment.c:1463: error: ‘PCI_PM_CTRL_NO_SOFT_RST’ undeclared (first
use in this function)
hw/device-assignment.c:1463: error:
Make use of the new KVM_NMI IOCTL to send NMIs into the KVM guest if the
user space APIC emulation or some other source raised them.
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com
---
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 7dfc357..c4ebe28 100644
--- a/target-i386/kvm.c
+++
Convert do_inject_nmi() to QObject, we need to use it(via libvirt).
It is trivial, as it never fails, doesn't have output nor return any data.
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com
---
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 7a49b74..2e6b034 100644
---
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com
---
diff --git a/qerror.c b/qerror.c
index ac2cdaf..a7ef758 100644
--- a/qerror.c
+++ b/qerror.c
@@ -117,6 +117,10 @@ static const QErrorStringTable qerror_table[] = {
.desc = Invalid block format '%(name)',
},
{
+
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com
---
diff --git a/qerror.c b/qerror.c
index a7ef758..fd66d2a 100644
--- a/qerror.c
+++ b/qerror.c
@@ -197,6 +197,10 @@ static const QErrorStringTable qerror_table[] = {
.desc = Too many open files,
},
{
+.error_fmt =
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com
---
diff --git a/qerror.c b/qerror.c
index fd66d2a..07b4cfc 100644
--- a/qerror.c
+++ b/qerror.c
@@ -205,6 +205,10 @@ static const QErrorStringTable qerror_table[] = {
.desc = An undefined error has ocurred,
},
{
+
Convert do_sendkey() to QObject,QError, we need to use it.(via libvirt)
It is a trivial conversion, carefully converted the error reports.
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com
---
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 23024ba..7a49b74 100644
--- a/hmp-commands.hx
+++
Am 09.12.2010 07:58, Lai Jiangshan wrote:
Make use of the new KVM_NMI IOCTL to send NMIs into the KVM guest if the
user space APIC emulation or some other source raised them.
In that light, the subject is not absolutely correct.
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com
---
diff
72 matches
Mail list logo