Re: bridge mode without network rework

2014-12-24 Thread Paolo Bonzini
On 24/12/2014 02:02, Zhang Haoyu wrote: Hi, Paolo, do you mean the commit fc57ac2 KVM: lapic: sync highest ISR to hardware apic on EOI ? I want to backport it to our product. Yes. Paolo -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [bisected] KVM in 3.19-rc1 is completely broken

2014-12-24 Thread Chen, Tiejun
On 2014/12/24 5:29, Andy Lutomirski wrote: On Tue, Dec 23, 2014 at 1:13 PM, Paolo Bonzini pbonz...@redhat.com wrote: I can reproduce it using the same steps on a Sandy Bridge laptop, with whatever QEMU is packaged in Fedora 21. I attached the config. I also submitted a virtme update for

Re: regression bisected; KVM: entry failed, hardware error 0x80000021

2014-12-24 Thread Chen, Tiejun
On 2014/12/23 15:26, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/23 9:50, Chen, Tiejun wrote: On 2014/12/22 17:23, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/21 20:46, Jamie Heilman wrote: With v3.19-rc1 when I run qemu-system-x86_64 -machine pc,accel=kvm I get: KVM: entry

Re: regression bisected; KVM: entry failed, hardware error 0x80000021

2014-12-24 Thread Jamie Heilman
Chen, Tiejun wrote: On 2014/12/23 15:26, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/23 9:50, Chen, Tiejun wrote: On 2014/12/22 17:23, Jamie Heilman wrote: KVM internal error. Suberror: 1 emulation failure EAX=000de494 EBX= ECX= EDX=0cfd ESI=0059

Re: regression bisected; KVM: entry failed, hardware error 0x80000021

2014-12-24 Thread Paolo Bonzini
On 24/12/2014 12:02, Jamie Heilman wrote: Running qemu-system-x86_64 -machine pc,accel=kvm -nodefaults works, my real (headless) kvm guests work, but this new patch makes running qemu-system-x86_64 -machine pc,accel=kvm fail again, this time with errors in the host to the tune of:

Re: [PATCH 1/1] KVM: ioapic: Record edge-triggered interrupts delivery status.

2014-12-24 Thread Jan Kiszka
On 2014-12-24 04:14, Wincy Van wrote: This patch fixes the bug discussed in https://www.mail-archive.com/kvm@vger.kernel.org/msg109813.html This patch uses a new field named irr_delivered to record the delivery status of edge-triggered interrupts, and clears the delivered interrupts in

Re: [bisected] KVM in 3.19-rc1 is completely broken

2014-12-24 Thread Andy Lutomirski
On Wed, Dec 24, 2014 at 12:23 AM, Chen, Tiejun tiejun.c...@intel.com wrote: On 2014/12/24 5:29, Andy Lutomirski wrote: On Tue, Dec 23, 2014 at 1:13 PM, Paolo Bonzini pbonz...@redhat.com wrote: I can reproduce it using the same steps on a Sandy Bridge laptop, with whatever QEMU is packaged

Re: [RFC 2/2] x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader

2014-12-24 Thread David Matlack
On Mon, Dec 22, 2014 at 4:39 PM, Andy Lutomirski l...@amacapital.net wrote: The pvclock vdso code was too abstracted to understand easily and excessively paranoid. Simplify it for a huge speedup. This opens the door for additional simplifications, as the vdso no longer accesses the pvti for

Re: [RFC 2/2] x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader

2014-12-24 Thread Andy Lutomirski
On Wed, Dec 24, 2014 at 1:30 PM, David Matlack dmatl...@google.com wrote: On Mon, Dec 22, 2014 at 4:39 PM, Andy Lutomirski l...@amacapital.net wrote: The pvclock vdso code was too abstracted to understand easily and excessively paranoid. Simplify it for a huge speedup. This opens the door

[PATCH 2/8] KVM: x86: pop sreg accesses only 2 bytes

2014-12-24 Thread Nadav Amit
Although pop sreg updates RSP according to the operand size, only 2 bytes are read. The current behavior may result in incorrect #GP or #PF exceptions. Signed-off-by: Nadav Amit na...@cs.technion.ac.il --- arch/x86/kvm/emulate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH 0/8] KVM: x86: Emulator fixes

2014-12-24 Thread Nadav Amit
Few more emulator fixes. Each is logically independent from the others. The first one is the most interesting one. It appears that the current behavior may cause the VM to enter the page-fault handler twice on certain faulting write accesses. If you do not like my solution, please propose a

[PATCH 1/8] KVM: x86: #PF error-code on R/W operations is wrong

2014-12-24 Thread Nadav Amit
When emulating an instruction that reads the destination memory operand (i.e., instructions without the Mov flag in the emulator), the operand is first read. If a page-fault is detected in this phase, the error-code which would be delivered to the VM does not indicate that the access that caused

[PATCH 4/8] KVM: x86: JMP/CALL using call- or task-gate causes exception

2014-12-24 Thread Nadav Amit
The KVM emulator does not emulate JMP and CALL that target a call gate or a task gate. This patch does not try to implement these scenario as they are presumably rare; yet it returns X86EMUL_UNHANDLEABLE error in such cases instead of generating an exception. Signed-off-by: Nadav Amit

[PATCH 8/8] KVM: x86: Access to LDT/GDT that wraparound is incorrect

2014-12-24 Thread Nadav Amit
When access to descriptor in LDT/GDT wraparound outside long-mode, the address of the descriptor should be truncated to 32-bit. Citing Intel SDM 2.1.1.1 Global and Local Descriptor Tables in IA-32e Mode: GDTR and LDTR registers are expanded to 64-bits wide in both IA-32e sub-modes (64-bit mode

[PATCH 6/8] KVM: x86: POP [ESP] is not emulated correctly

2014-12-24 Thread Nadav Amit
According to Intel SDM: If the ESP register is used as a base register for addressing a destination operand in memory, the POP instruction computes the effective address of the operand after it increments the ESP register. The current emulation does not behave so. The fix required to waste

[PATCH 5/8] KVM: x86: em_call_far should return failure result

2014-12-24 Thread Nadav Amit
Currently, if em_call_far fails it returns success instead of the resulting error-code. Fix it. Signed-off-by: Nadav Amit na...@cs.technion.ac.il --- arch/x86/kvm/emulate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index

[PATCH 3/8] KVM: x86: fnstcw and fnstsw may cause spurious exception

2014-12-24 Thread Nadav Amit
Since the operand size of fnstcw and fnstsw is updated during the execution, the emulation may cause spurious exceptions as it reads the memory beforehand. Marking these instructions as Mov (since the previous value is ignored) and DstMem16 to simplify the setting of operand size. Signed-off-by:

[PATCH 7/8] KVM: x86: Do not set access bit on accessed segments

2014-12-24 Thread Nadav Amit
When segment is loaded, the segment access bit is set unconditionally. In fact, it should be set conditionally, based on whether the segment had the accessed bit set before. In addition, it can improve performance. Signed-off-by: Nadav Amit na...@cs.technion.ac.il --- arch/x86/kvm/emulate.c |

Re: [bisected] KVM in 3.19-rc1 is completely broken

2014-12-24 Thread Chen, Tiejun
On 2014/12/25 1:11, Andy Lutomirski wrote: On Wed, Dec 24, 2014 at 12:23 AM, Chen, Tiejun tiejun.c...@intel.com wrote: On 2014/12/24 5:29, Andy Lutomirski wrote: On Tue, Dec 23, 2014 at 1:13 PM, Paolo Bonzini pbonz...@redhat.com wrote: I can reproduce it using the same steps on a Sandy

Re: regression bisected; KVM: entry failed, hardware error 0x80000021

2014-12-24 Thread Chen, Tiejun
On 2014/12/24 19:02, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/23 15:26, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/23 9:50, Chen, Tiejun wrote: On 2014/12/22 17:23, Jamie Heilman wrote: KVM internal error. Suberror: 1 emulation failure EAX=000de494 EBX=

Re: regression bisected; KVM: entry failed, hardware error 0x80000021

2014-12-24 Thread Chen, Tiejun
On 2014/12/24 19:11, Paolo Bonzini wrote: On 24/12/2014 12:02, Jamie Heilman wrote: Running qemu-system-x86_64 -machine pc,accel=kvm -nodefaults works, my real (headless) kvm guests work, but this new patch makes running qemu-system-x86_64 -machine pc,accel=kvm fail again, this time with