[PATCH v2 3/5] KVM: VMX: Move vmx_nmi_allowed after vmx_set_nmi_mask

2013-03-16 Thread Jan Kiszka
From: Jan Kiszka vmx_set_nmi_mask will soon be used by vmx_nmi_allowed. No functional changes. Signed-off-by: Jan Kiszka --- arch/x86/kvm/vmx.c | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index ca74358..a

[PATCH v2 1/5] KVM: nVMX: Fix injection of PENDING_INTERRUPT and NMI_WINDOW exits to L1

2013-03-16 Thread Jan Kiszka
From: Jan Kiszka Check if the interrupt or NMI window exit is for L1 by testing if it has the corresponding controls enabled. This is required when we allow direct injection from L0 to L2 Signed-off-by: Jan Kiszka --- arch/x86/kvm/vmx.c |9 ++--- 1 files changed, 2 insertions(+), 7 del

[PATCH v2 2/5] KVM: nVMX: Rework event injection and recovery

2013-03-16 Thread Jan Kiszka
From: Jan Kiszka The basic idea is to always transfer the pending event injection on vmexit into the architectural state of the VCPU and then drop it from there if it turns out that we left L2 to enter L1. VMX and SVM are now identical in how they recover event injections from unperformed vmlaun

[PATCH v2 5/5] KVM: nVMX: Fix conditions for NMI injection

2013-03-16 Thread Jan Kiszka
From: Jan Kiszka The logic for checking if interrupts can be injected has to be applied also on NMIs. The difference is that if NMI interception is on these events are consumed and blocked by the VM exit. Signed-off-by: Jan Kiszka --- arch/x86/kvm/vmx.c | 35 +

[PATCH v2 0/5] KVM: nVMX: Make direct IRQ/NMI injection work

2013-03-16 Thread Jan Kiszka
Version 2 both takes review comments into account, reorders some patches that have dependencies and also addresses new findings regarding NMI injections. Fixes for vmx_interrupt_allowed and vmx_nmi_allowed were split up as they turn out to be more different to each other and are independent anyway.

[PATCH v2 4/5] KVM: nVMX: Fix conditions for interrupt injection

2013-03-16 Thread Jan Kiszka
From: Jan Kiszka If we are in guest mode, L0 can only inject events into L2 if L1 has nothing pending. Otherwise, L0 would overwrite L1's events and they would get lost. But even if no injection of L1 is pending, we do not want L0 to interrupt unnecessarily an on going vmentry with all its side e

Re: [PATCH v2 0/5] KVM: nVMX: Make direct IRQ/NMI injection work

2013-03-16 Thread Jan Kiszka
On 2013-03-16 11:23, Jan Kiszka wrote: > Version 2 both takes review comments into account, reorders some patches > that have dependencies and also addresses new findings regarding NMI > injections. Fixes for vmx_interrupt_allowed and vmx_nmi_allowed were > split up as they turn out to be more diff

Host hard lockup when rebooting VM with GPU assigned via VT-d

2013-03-16 Thread Stijn Tintel
While I know that assignment of graphics cards isn't officially supported, I'm reporting this problem nonetheless. This was suggested by danpb on irc.oftc.net/virt. I am able to pass through an ATI HD7970 via VT-d, to a VM, and the guest OS can successfully use it. I tested this with a Windows 7 V

How to save vcpupin to xml file?

2013-03-16 Thread Anthony Acquanita
I keep running vcpupin from the command line and can't seem to find out how to write this out to the XML with doing an virsh edit. I just want the cpu pinning info saved to the xml from the command line. Is there a simple command I'm missing or some trick? -- To unsubscribe from this list: send t

Re: How to save vcpupin to xml file?

2013-03-16 Thread Michael Tokarev
16.03.2013 22:15, Anthony Acquanita wrote: > I keep running vcpupin from the command line and can't seem to find > out how to write this out to the XML with doing an virsh edit. [...] You're on a wrong list. Neither KVM nor Qemu has anything to do with virsh or XML. Neither _understand_ xml to s

[PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-16 Thread Jan Kiszka
From: Jan Kiszka If the guest didn't take the last APIC timer interrupt yet and generates another one on top, e.g. via periodic mode, we do not block the VCPU even if the guest state is halted. The reason is that apic_has_pending_timer continues to return a non-zero value. Fix this busy loop by

KVM question regarding use of __direct_map()

2013-03-16 Thread siddhesh phadke
Hello, KVM uses __direct_map() to setup EPT entries for gfn->pfn mappings. Is it possible to map gfns of two different guest to same pfn using this function? I tried doing this but I get following messages, [] bad_page+0x117/0x130 [] free_pages_check+0x39/0x56 [] free_hot_cold_page+0x3e/0x128 []