Hi folks,
I found that Windows guests often fail reboots in current
kvm.git. Either the guest hangs, or it reports double fault exception
which causes qemu aborts. This is not shown with -no-kvm-irqchip option.
After some investigation, it seems that this is caused by lack
of in-ke
>-Original Message-
>From: Avi Kivity [mailto:[EMAIL PROTECTED]
>Sent: 2007年9月24日 21:24
>To: He, Qing
>Cc: kvm-devel
>Subject: Re: [kvm-devel] [PATCH] KVM: x86_emulator: no writeback for bt
>
>He, Qing wrote:
>> (p.s., this patch is before Laurent's
(p.s., this patch is before Laurent's patch of no_wb removal, the change
is minor to adapt to OP_NONE)
Signed-off-by: Qing He <[EMAIL PROTECTED]>
---
drivers/kvm/x86_emulate.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_em
If no apic is enabled in the bitmap of an interrupt delivery with
delivery
mode of lowest priority, a warning should be reported rather than select
a fallback vcpu
Signed-off-by: Qing He <[EMAIL PROTECTED]>
Signed-off-by: Eddie (Yaozu) Dong <[EMAIL PROTECTED]>
---
drivers/kvm/lapic.c | 13 +++
Dor Laor wrote:
> Haydn Solomon wrote:
> I have a question on guest smp performance. If I have a host with core
2 duo, should > a kvm guest perform better using -smp 2 as opposed to
not using -smp 2?
> Well, it depends:
> In general Avi measured 40% performance increase for using a second
cpu in
From: Dor Laor [mailto:[EMAIL PROTECTED]
Sent: 2007年9月21日 5:09
To: Haydn Solomon
Cc: He, Qing; kvm-devel; Avi Kivity
Subject: Re: [kvm-devel] windows 2003 smp guest
Haydn Solomon wrote:
I have a question on guest smp performance. If I have a host with
>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of Avi Kivity
>Sent: 2007年9月18日 22:06
>To: Haydn Solomon
>Cc: kvm-devel
>Subject: Re: [kvm-devel] windows 2003 smp guest
>
>Haydn Solomon wrote:
>> I am interested in installing smp windows 2003 server guest
This patch changes the PIC interrupts delivery. Now it is only deliverd
to vcpu0 when either condition is met (on vcpu0):
1. local APIC is hardware disabled
2. LVT0 is unmasked and configured to delivery mode ExtInt
It fixes the 2x faster wall clock on x86_64 and SMP i386 Linux guests
Signed
According to Intel Software Developer's Manual, Vol. 3B, Appendix H.4.2,
exit qualification should be of natural width. However, current code
uses u64 as the data type for this register, which occasionally
introduces invalid value to VMExit handling logics. This patch fixes
this bug.
Signed-off-by
PROTECTED]>
>-Original 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,
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
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
>
You can try the attached patch to see if it works
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of He, Qing
Sent: 2007年9月10日 10:55
To: Zhao, Yunfeng; kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-devel] build failure on master branch
As discussed previously, this patch directly passes SMP CPU count to the
guest BIOS from CMOS by qemu, instead of sending SIPI and wait. CMOS
offset 0x7f is used.
This is the last functional piece for in-kernel APIC merge in kvm-37.
Signed-off-by: Qing He <[EMAIL PROTECTED]>
bios/BIOS-bochs-lat
Well, it seems hrtimer-compat patch breaks the build.
HRTIMER_MOD_ABS is declared in enum, so we can’t say:
#ifndef HRTIMER_MOD_ABS
#define HRTIMER_MOD_ABS HRTIMER_ABS
#endif
maybe something like
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2.6.?)
should be OK
>-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:
>>
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.
This patch splits out local apic timer start and divide config
Signed-off-by: Eddie (Yaozu) Dong <[EMAIL PROTECTED]>
Signed-off-by: Qing He <[EMAIL PROTECTED]>
---
drivers/kvm/lapic.c | 104
+++---
1 files changed, 48 insertions
When the local apic timer is inactive (not initialized) or expired
in one
shot mode, it is not reasonable to restart this timer at restore
time. This
patch uses current count register to communicate the state of the
timer
and save/restore the timer according to it
Sign
>-Original Message-
>From: Avi Kivity [mailto:[EMAIL PROTECTED]
>Sent: 2007年9月3日 22:22
>To: He, Qing
>Cc: kvm-devel@lists.sourceforge.net
>Subject: Re: [kvm-devel] [RFC][PATCH 0/7] guest SMP with in-kernel APIC
>
>He, Qing wrote:
>> Hi,
>>
>> T
This patch bypasses user level init/sipi handling when in-kernel
APIC is used.
Signed-off-by: Qing He <[EMAIL PROTECTED]>
Signed-off-by: Xin Li <[EMAIL PROTECTED]>
The bios patch should be in a separate one, as posted by Xin Li. The
current delay code is not accurate, setting delay_ms(2000) actu
This patch enables INIT/SIPI handling using in-kernel APIC by
introducing
a mp_state to emulate the SMP state transition.
Signed-off-by: Qing He <[EMAIL PROTECTED]>
Signed-off-by: Xin Li <[EMAIL PROTECTED]>
This patch works for both with or without apic spinlock, but it has
differences
for two
Signed-off-by: Qing He <[EMAIL PROTECTED]>
---
drivers/kvm/kvm.h |1 +
drivers/kvm/lapic.c | 33 -
2 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index f8fe87d..dbb929d 100644
--- a/drivers/kvm/kvm.h
+
Signed-off-by: Eddie (Yaozu) Dong <[EMAIL PROTECTED]>
---
drivers/kvm/irq.c | 18 +-
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/kvm/irq.c b/drivers/kvm/irq.c
index eb72b56..e527853 100644
--- a/drivers/kvm/irq.c
+++ b/drivers/kvm/irq.c
@@ -33,8 +33,
Signed-off-by: Eddie (Yaozu) Dong <[EMAIL PROTECTED]>
---
drivers/kvm/vmx.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 34a7fad..8a503c2 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -2147,8 +2147,8 @@ static v
Signed-off-by: Qing He <[EMAIL PROTECTED]>
---
drivers/kvm/kvm_main.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index f4cbd4f..a25dfc9 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -2005,7 +2005
With this patch, when the kernel exits with errno of EAGAIN, kvm_run
is restarted like EINTR. It is a preparation patch for SMP using
in-kernel APIC.
This patch also fixes a duplication bug of pre_kvm_run
Signed-off-by: Qing He <[EMAIL PROTECTED]>
---
user/kvmctl.c |3 +--
1 files changed,
Hi,
This patch set enables guest SMP when using in-kernel APIC. It is
independent from the partial kernel apic SMP patch from Avi. We are
posting it here for comments and possible merging with that patch. The
patch set is based on:
KVM: lapic5 branch: e9ddfaf472 (Remove dead code) with a p
I'm updating this patch, by doing this, UP booting of 32bit ACPI MP HAL Windows
is fixed.
Signed-off-by: Qing He <[EMAIL PROTECTED]>
qemu/qemu-kvm.c |9 +
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index 3fc32f7..d07af9f 100644
-
KVM: cleanups on user/kernel irqchip checking
The patch removes the union of userspace irq_pending and kernel apic in
struct vcpu, which minimizes the impact of careless overwriting and
avoids accidentally dereferencing invalid apic pointer.
It also adds a protective checking on KVM_INTERRUPT ioc
>-Original Message-
>From: Avi Kivity [mailto:[EMAIL PROTECTED]
>Sent: 2007年8月9日 22:28
>To: He, Qing
>Cc: Dong, Eddie; kvm-devel
>Subject: Re: [RFC] lapic3: remove the union of user/kernel irq in struct vcpu
>
>He, Qing wrote:
>> Avi,
>>
Avi,
We have found a new bug about irqchip_in_kernel checking, as
addressed by the following patch:
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 88b0b89..69518f8 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -283,7 +283,8 @@ EXPORT_SYMBOL_GPL(kvm
kvm: qemu: fix in-kernel APIC timer saving
This patch fixes a bug that APIC timer is disabled when migrating from
in-kernel APIC to userspace APIC, causing guest lockups.
Singed-off-by: Qing He <[EMAIL PROTECTED]>
Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]>
---
diff --git a/qemu/hw/ap
kvm: qemu: add qemu command line option -no-kvm-irqchip
This option disables in-kernel irqchip (PIC/IOAPIC/LAPIC) and uses
qemu interrupt controllers in userspace instead.
Signed-off-by: Qing He <[EMAIL PROTECTED]>
---
qemu/qemu-kvm.c |4
qemu/vl.c |5 +
kvm: libkvm: export a new function to disable irqchip creation
Signed-off-by: Qing He <[EMAIL PROTECTED]>
Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]>
---
user/kvmctl.c | 25 ++---
user/kvmctl.h | 10 ++
2 files changed, 28 insertions(+), 7
kvm: qemu: fix a possible deadlock situation in save/restore
If a VM using userspace irqchip is saved when it's in HLT state,
and is restored to use the in-kernel irqchip, the HLT state flag
is also restored. This HLT flag in userspace HLT handling prevents
kvm kernel drive
kvm: qemu: in-kernel LAPIC live migration support
This patch adds the live migration support for in-kernel LAPICs. The
kernel
and qemu has different data structures, kernel saves the apic to the
userspace
as a apic page while qemu uses separate varaibles. The translation
is don
kvm: libkvm: in-kernel LAPIC get/set ioctls
This patch allows save and restore of in-kernel local apics
Signed-off-by: Qing He <[EMAIL PROTECTED]>
Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]>
---
user/kvmctl.c | 26 ++
user/kvmctl.h |
KVM: in-kernel LAPIC save and restore support
This patch adds a new vcpu-based IOCTL to save and restore the local
apic
registers for a single vcpu. The kernel only copies the apic page as
a whole,
extraction of registers is left to userspace side. On restore, the
APIC timer
kvm: qemu: in-kernel IOAPIC live migration support
This patch adds the live migration support for in-kernel IOAPIC. It
uses a
similar logic with in-kernel PIC live migration. Also, the original
Qemu
IOAPIC savevm is used.
Signed-off-by: Qing He <[EMAIL PROTECTED]>
KVM: in-kernel IOAPIC save and restore support
This patch adds support for in-kernel ioapic save and restore (to
and from
userspace). It uses the same get/set_irqchip ioctl as in-kernel PIC.
Signed-off-by: Qing He <[EMAIL PROTECTED]>
Signed-off-by: Yaozu (Eddie) Dong <
KVM: remove status in kvm_lapic structure
status is a redundancy to apic spurious vector, it's not needed.
Removing it
also reduces the states that should be saved.
Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]>
Signed-off-by: Qing He <[EMAIL PROTECTED]>
---
d
Hi Avi,
This is the patch set that enables live migration of VMs that
are using in-kernel APIC, it's against lapic3 branch. 6 patches follow:
[PATCH 1/6] a preparation cleanup patch that removes status in
kernel struct kvm_lapic
[PATCH 2/6] ioapic live migration kernel part,
>-Original Message-
>From: Avi Kivity [mailto:[EMAIL PROTECTED]
>Sent: 2007年8月2日 19:58
>To: He, Qing
>Cc: kvm-devel
>Subject: Re: [kvm-devel] [RFC] lapic3: cleanup for save/restore data structure
>of
>in-kernel irqchips
>
>He, Qing wrote:
>> Hi,
>&
>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of Avi Kivity
>Sent: 2007年8月2日 19:00
>To: Yang, Sheng
>Cc: kvm-devel@lists.sourceforge.net
>Subject: Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX
>
>Yang, Sheng wrote:
>> Add MSR Bitmap support
Hi,
The argument of in-kernel irqchip save/restore IOCTL uses a
separate data structure (struct kvm_irqchip and struct kvm_ioctl_pic in
include/linux/kvm.h) different from functional data structure (struct
kvm_pic_state and struct kvm_ioapic in driver/kvm/irq.h), this is
because while most
vcpu->irq_pending is saved in get/set_sreg IOCTL, but when in-kernel
local APIC is used, doing this may occasionally overwrite vcpu->apic to
an invalid value, as in the vm restore path.
Signed-off-by: Qing He <[EMAIL PROTECTED]>
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
in
Avi,
This is the updated patch for the qemu part of PIC save/restore.
All the above patches are against lapic2 branch.
Thanks,
Qing
kvm: qemu: in-kernel PIC live migration support
This patch fixes the live migration of VMs with in-kernel PIC. It saves
the in-kernel PIC using the origina
Avi,
This is the updated patch for libkvm part to adapt get/set
irqchip ioctls.
Thanks,
Qing
kvm: libkvm: in-kernel irqchip get/set ioctls
This patch allows save and restore of in-kernel irqchips
Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]>
Signed-off-by: Qing He <[EMAIL PROTE
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 in
>-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:
>> Th
resend as an attachment.
>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of He, Qing
>Sent: 2007年7月25日 18:04
>To: kvm-devel
>Subject: [kvm-devel] [PATCH 1/3] export kvm_irqchip_in_kernel to Qemu
>
>This patch exports kvm_irqchip_i
This patch is the usermode part of the in-kernel PIC live migration
support. It saves the in kernel PIC using the original usermode PIC
savevm, so it is safe to save a vm using kernel PIC and restore as a vm
using userspace PIC, and vice versa.
Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]>
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
This patch exports kvm_irqchip_in_kernel to Qemu outside kvmctl. This is
a preparation for the in kernel irqchip live migration support.
Signed-off-by: Qing He <[EMAIL PROTECTED]>
kvmctl.c |5 +
kvmctl.h |7 +++
2 files changed, 12 insertions(+)
diff --git a/user/kvmctl.c b/user/k
Avi/Eddie,
I just noticed that the latest commit in lapic2 branch of
kvm-userspace effectively disabled in-kernel apic and ioapic. I don't
suppose it's intended, is it?
Thanks,
Qing
-
This SF.net email is sponsored by
This patch adds a `vcpu_id' field in `struct vcpu', so we can
differentiate BSP and APs without pointer comparison or arithmetic.
Signed-off-by: Qing He <[EMAIL PROTECTED]>
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 65ab268..0f7a4d9 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm
>-Original Message-
>From: Avi Kivity [mailto:[EMAIL PROTECTED]
>Sent: 2007年7月12日 16:16
>To: He, Qing
>Cc: kvm-devel
>Subject: Re: [kvm-devel] [PATCH] SMP: Setup multiple tss for real mode
>emulation
>
>He, Qing wrote:
>> This patch sets up multiple TSS
This patch sets up multiple TSS for real mode emulation on Intel vmx,
one for each vcpu. This is a preparation patch for full SMP real mode
support.
Signed-off-by: Qing He <[EMAIL PROTECTED]>
kvm.h |1 +
kvm_main.c |1 +
vmx.c | 31 +--
3 files change
>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of Avi Kivity
>Sent: 2007年5月7日 15:53
>To: Jorge Lucángeli Obes
>Cc: kvm-devel@lists.sourceforge.net
>Subject: Re: [kvm-devel] kvm-22 and Vista support
>
>Jorge Lucángeli Obes wrote:
>> I have also tried usin
>-Original Message-
>From: Avi Kivity [mailto:[EMAIL PROTECTED]
>Sent: 2007年4月30日 14:47
>To: He, Qing
>Cc: kvm-devel
>Subject: Re: [kvm-devel] [PATCH][UPDATE] vmx: enable io bitmaps to avoid IO
>port
>0x80 VMEXITs
>
>He, Qing wrote:
>> This is upda
This is updated version. Because the bitmaps are only needed to be
mapped at init time, allocating them in high memory if possible saves
low memory and virtual space.
Thanks,
Qing
kvm-vmx-io-bitmaps-0x80-highmem.patch
Description: kvm-vmx-io-bitmaps-0x80-highmem.patch
---
>-Original Message-
>From: Neo Jia [mailto:[EMAIL PROTECTED]
>Sent: 2007年4月29日 14:36
>To: He, Qing
>Cc: kvm-devel
>Subject: Re: [kvm-devel] [PATCH] vmx: enable io bitmaps to avoid IO port 0x80
>VMEXITs
>
>On 4/29/07, He, Qing <[EMAIL PROTECTED]> wrote:
This patch enables IO bitmaps control on vmx and unmask the 0x80 port to
avoid VMEXITs caused by accessing port 0x80. 0x80 is used as delays (see
include/asm/io.h), and handling VMEXITs on its access is unnecessary but
slows things down. This patch improves kernel build test at around
3%~5%.
Current interrupt logic in Qemu unconditionally checks pending irqs on
PIC after checking local APIC, however, this is problematic.
On common platform, PIC is usually connected to the LINT0 of
local APIC. In this way when local APIC is disabled, this pin behaves
like INTR. But when local AP
65 matches
Mail list logo