Re: [PATCH] KVM: VMX: Preserve host CR4.MCE value while in guest mode.

2015-04-19 Thread Wanpeng Li
On Fri, Apr 17, 2015 at 12:16:18PM +0200, Paolo Bonzini wrote: > > >On 17/04/2015 07:10, Wanpeng Li wrote: >>> > >>> >Before the change, if guest CR4.MCE==0, then the machine check is >>> >escalated to Catastrophic Error (CATERR) and the machine dies. >> Could you point out which section of SDM des

[PATCH v2] KVM: x86: Fix DR7 mask on task-switch while debugging

2015-04-19 Thread Nadav Amit
If the host sets hardware breakpoints to debug the guest, and a task-switch occurs in the guest, the architectural DR7 will not be updated. The effective DR7 would be updated instead. This fix puts the DR7 update during task-switch emulation, so it now uses the standard DR setting mechanism instea

Re: XP machine freeze

2015-04-19 Thread Paolo Bonzini
On 19/04/2015 18:50, Brad Campbell wrote: > And I can confidently state that over the years I've seen this happen a > number of times, but in each case I was using qemu with an SDL console > as a user-interactive VM, and a moving the mouse would restore network > connectivity. It was obviously se

Re: [PATCH] KVM: x86: Mask DR7 correctly on task-switch while debugging

2015-04-19 Thread Nadav Amit
Paolo Bonzini wrote: > > > On 19/04/2015 14:18, Nadav Amit wrote: >> If the host sets hardware breakpoints to debug the guest, and a task-switch >> occurs in the guest, the architectural DR7 will not be updated. The effective >> DR7 would be updated instead. >> >> This fix uses the standard DR

Re: KVM x86 emulator design question

2015-04-19 Thread Paolo Bonzini
On 19/04/2015 15:16, Nadav Amit wrote: > Hi, > > I would appreciate if someone briefly explains the design choice that leaded > to separating the x86 emulator from the rest of x86 code, i.e., making it > oblivious to VCPUs and using the x86_emulate_ops as an interface. I think the reason was to

Re: [PATCH] KVM: x86: Mask DR7 correctly on task-switch while debugging

2015-04-19 Thread Paolo Bonzini
On 19/04/2015 14:18, Nadav Amit wrote: > If the host sets hardware breakpoints to debug the guest, and a task-switch > occurs in the guest, the architectural DR7 will not be updated. The effective > DR7 would be updated instead. > > This fix uses the standard DR setting mechanism instead of the

Re: XP machine freeze

2015-04-19 Thread Brad Campbell
On 19/04/15 23:48, Nadav Amit wrote: Brad Campbell wrote: On 13/04/15 22:02, Paolo Bonzini wrote: On 13/04/2015 14:45, Brad Campbell wrote: G'day Paolo, Yes, on AMD and I've tried hard to reproduce it on Intel and been unable to thus far. Now you mention it may be AMD specific, I have a s

Re: XP machine freeze

2015-04-19 Thread Nadav Amit
Brad Campbell wrote: > > On 13/04/15 22:02, Paolo Bonzini wrote: >> On 13/04/2015 14:45, Brad Campbell wrote: >>> G'day Paolo, >>> >>> Yes, on AMD and I've tried hard to reproduce it on Intel and been unable >>> to thus far. >>> >>> Now you mention it may be AMD specific, I have a spare mother

Re: XP machine freeze

2015-04-19 Thread Brad Campbell
On 13/04/15 22:02, Paolo Bonzini wrote: On 13/04/2015 14:45, Brad Campbell wrote: G'day Paolo, Yes, on AMD and I've tried hard to reproduce it on Intel and been unable to thus far. Now you mention it may be AMD specific, I have a spare motherboard and processor sitting in a drawer. I'll bolt

KVM x86 emulator design question

2015-04-19 Thread Nadav Amit
Hi, I would appreciate if someone briefly explains the design choice that leaded to separating the x86 emulator from the rest of x86 code, i.e., making it oblivious to VCPUs and using the x86_emulate_ops as an interface. Thanks, Nadav -- To unsubscribe from this list: send the line "unsubscribe k

[PATCH] KVM: x86: Mask DR7 correctly on task-switch while debugging

2015-04-19 Thread Nadav Amit
If the host sets hardware breakpoints to debug the guest, and a task-switch occurs in the guest, the architectural DR7 will not be updated. The effective DR7 would be updated instead. This fix uses the standard DR setting mechanism instead of the one that was previously used. As a bonus, the updat