Re: regression: nested: L1 3.15+ fails to load kvm-intel on L0 3.15

2015-03-18 Thread Paolo Bonzini
On 18/03/2015 09:46, Stefan Bader wrote: Regardless of that, I wonder whether the below (this version untested) sound acceptable for upstream? At least it would make debugging much simpler. :) --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2953,8 +2953,11 @@ static __init int

Re: regression: nested: L1 3.15+ fails to load kvm-intel on L0 3.15

2015-03-18 Thread Stefan Bader
On 18.03.2015 11:27, Paolo Bonzini wrote: On 18/03/2015 10:59, Stefan Bader wrote: @@ -2850,7 +2851,7 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf) vmx_capability.ept, vmx_capability.vpid); } - min = 0; + min = VM_EXIT_SAVE_DEBUG_CONTROLS; #ifdef

regression: nested: L1 3.15+ fails to load kvm-intel on L0 3.15

2015-03-18 Thread Stefan Bader
Someone reported[1] that some of their L1 guests fail to load the kvm-intel module (without much details). Turns out that this was (at least) caused by KVM: vmx: Allow the guest to run with dirty debug registers as this adds VM_EXIT_SAVE_DEBUG_CONTROLS to the required MSR_IA32_VMX_EXIT_CTLS

Re: regression: nested: L1 3.15+ fails to load kvm-intel on L0 3.15

2015-03-18 Thread Stefan Bader
On 18.03.2015 10:18, Paolo Bonzini wrote: On 18/03/2015 09:46, Stefan Bader wrote: Regardless of that, I wonder whether the below (this version untested) sound acceptable for upstream? At least it would make debugging much simpler. :) --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c

Re: regression: nested: L1 3.15+ fails to load kvm-intel on L0 3.15

2015-03-18 Thread Paolo Bonzini
On 18/03/2015 10:59, Stefan Bader wrote: @@ -2850,7 +2851,7 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf) vmx_capability.ept, vmx_capability.vpid); } -min = 0; + min = VM_EXIT_SAVE_DEBUG_CONTROLS; #ifdef CONFIG_X86_64 min |= VM_EXIT_HOST_ADDR_SPACE_SIZE;

[GIT PULL 04/11] KVM: s390: Guest's memory access functions get access registers

2015-03-18 Thread Christian Borntraeger
From: Alexander Yarygin yary...@linux.vnet.ibm.com In access register mode, the write_guest() read_guest() and other functions will invoke the access register translation, which requires an ar, designated by one of the instruction fields. Signed-off-by: Alexander Yarygin

[GIT PULL 07/11] KVM: s390: Add MEMOP ioctls for reading/writing guest memory

2015-03-18 Thread Christian Borntraeger
From: Thomas Huth th...@linux.vnet.ibm.com On s390, we've got to make sure to hold the IPTE lock while accessing logical memory. So let's add an ioctl for reading and writing logical memory to provide this feature for userspace, too. The maximum transfer size of this call is limited to 64kB to

[GIT PULL 00/11] KVM: s390: Features and fixes for 4.1 (kvm/next)

2015-03-18 Thread Christian Borntraeger
13211ea7b47db3d8ee2ff258a9a973a6d3aa3d43: KVM: s390: Enable vector support for capable guest (2015-03-06 13:49:35 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-next-20150318 for you to fetch changes up

[GIT PULL 09/11] KVM: s390: Create ioctl for Getting/Setting guest storage keys

2015-03-18 Thread Christian Borntraeger
From: Jason J. Herne jjhe...@linux.vnet.ibm.com Provide the KVM_S390_GET_SKEYS and KVM_S390_SET_SKEYS ioctl which can be used to get/set guest storage keys. This functionality is needed for live migration of s390 guests that use storage keys. Signed-off-by: Jason J. Herne

[GIT PULL 01/11] KVM: s390: Spelling s/intance/instance/

2015-03-18 Thread Christian Borntraeger
From: Geert Uytterhoeven geert+rene...@glider.be Signed-off-by: Geert Uytterhoeven geert+rene...@glider.be Message-Id: 1425932832-6244-1-git-send-email-geert+rene...@glider.be Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/kvm-s390.h | 2 +- 1 file changed, 1

Re: [PATCH v14 19/20] vfio: initialize the virqfd workqueue in VFIO generic code

2015-03-18 Thread Baptiste Reynal
Hello Alex, The module solution seems fine for me, I have no argument against it. I used your patch on my tests, they are running ok. Regards, Baptiste On Wed, Mar 18, 2015 at 12:04 AM, Alex Williamson alex.william...@redhat.com wrote: On Tue, 2015-03-17 at 16:29 -0600, Alex Williamson wrote:

[GIT PULL 06/11] KVM: s390: Add access register mode

2015-03-18 Thread Christian Borntraeger
From: Alexander Yarygin yary...@linux.vnet.ibm.com Access register mode is one of the modes that control dynamic address translation. In this mode the address space is specified by values of the access registers. The effective address-space-control element is obtained from the result of the

[GIT PULL 11/11] KVM: s390: represent SIMD cap in kvm facility

2015-03-18 Thread Christian Borntraeger
From: Michael Mueller m...@linux.vnet.ibm.com The patch represents capability KVM_CAP_S390_VECTOR_REGISTERS by means of the SIMD facility bit. This allows to a) disable the use of SIMD when used in conjunction with a not-SIMD-aware QEMU, b) to enable SIMD when used with a SIMD-aware version of

[GIT PULL 03/11] KVM: s390: Fix low-address protection for real addresses

2015-03-18 Thread Christian Borntraeger
From: Alexander Yarygin yary...@linux.vnet.ibm.com The kvm_s390_check_low_addr_protection() function is used only with real addresses. According to the POP (the Low-Address Protection paragraph in chapter 3), if the effective address is real or absolute, the low-address protection procedure

[GIT PULL 10/11] KVM: s390: drop SIMD bit from kvm_s390_fac_list_mask

2015-03-18 Thread Christian Borntraeger
From: Michael Mueller m...@linux.vnet.ibm.com Setting the SIMD bit in the KVM mask is an issue because it makes the facility visible but not usable to the guest, thus it needs to be removed again. Signed-off-by: Michael Mueller m...@linux.vnet.ibm.com Reviewed-by: Eric Farman

[GIT PULL 02/11] KVM: s390: cleanup jump lables in kvm_arch_init_vm

2015-03-18 Thread Christian Borntraeger
From: Dominik Dingel din...@linux.vnet.ibm.com As all cleanup functions can handle their respective NULL case there is no need to have more than one error jump label. Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com Acked-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Christian

[GIT PULL 08/11] KVM: s390: introduce post handlers for STSI

2015-03-18 Thread Christian Borntraeger
From: Ekaterina Tumanova tuman...@linux.vnet.ibm.com The Store System Information (STSI) instruction currently collects all information it relays to the caller in the kernel. Some information, however, is only available in user space. An example of this is the guest name: The kernel always sets

[GIT PULL 05/11] KVM: s390: Optimize paths where get_vcpu_asce() is invoked

2015-03-18 Thread Christian Borntraeger
From: Alexander Yarygin yary...@linux.vnet.ibm.com During dynamic address translation the get_vcpu_asce() function can be invoked several times. It's ok for usual modes, but will be slow if CPUs are in AR mode. Let's call the get_vcpu_asce() once and pass the result to the called functions.

Re: [Qemu-devel] PCI passthrough of 40G ethernet interface (Openstack/KVM)

2015-03-18 Thread Bandan Das
[Ccing netdev and Stefan] Bandan Das b...@redhat.com writes: jacob jacob opstk...@gmail.com writes: On Mon, Mar 16, 2015 at 2:12 PM, Bandan Das b...@redhat.com wrote: jacob jacob opstk...@gmail.com writes: I also see the following in dmesg in the VM. [0.095758] ACPI: PCI Root Bridge

[GSoC] project proposal

2015-03-18 Thread Catalin Vasile
Hi, My name is Catalin Vasile and I want to participate with a project for qemu at GSoC. From what I understand from the rules, I can participate with things I could also use for my college projects. This is my last bachelor year and I'm doing my diploma project, which is related to

Re: [GSoC] project proposal

2015-03-18 Thread Paolo Bonzini
On 18/03/2015 17:01, Catalin Vasile wrote: To be more exact, I want to make a virtio-crypto device to emulate a virtual cryptographic offloading device that will send jobs from the guest to a vhost that will process the jobs. This mechanism will link CryptoAPI from the guest to the CryptoAPI

Re: [Qemu-devel] PCI passthrough of 40G ethernet interface (Openstack/KVM)

2015-03-18 Thread jacob jacob
On Wed, Mar 18, 2015 at 11:24 AM, Bandan Das b...@redhat.com wrote: [Ccing netdev and Stefan] Bandan Das b...@redhat.com writes: jacob jacob opstk...@gmail.com writes: On Mon, Mar 16, 2015 at 2:12 PM, Bandan Das b...@redhat.com wrote: jacob jacob opstk...@gmail.com writes: I also see the

[PATCH] vfio: Split virqfd into a separate module for vfio bus drivers

2015-03-18 Thread Alex Williamson
An unintended consequence of commit 42ac9bd18d4f (vfio: initialize the virqfd workqueue in VFIO generic code) is that the vfio module is renamed to vfio_core so that it can include both vfio and virqfd. That's a user visible change that may break module loading scritps and it imposes eventfd

Re: [PATCH 0/9] qspinlock stuff -v15

2015-03-18 Thread Waiman Long
On 03/16/2015 09:16 AM, Peter Zijlstra wrote: Hi Waiman, As promised; here is the paravirt stuff I did during the trip to BOS last week. All the !paravirt patches are more or less the same as before (the only real change is the copyright lines in the first patch). The paravirt stuff is

Re: [PATCH] KVM: x86: call irq notifiers with directed EOI

2015-03-18 Thread Bandan Das
Radim Krčmář rkrc...@redhat.com writes: kvm_ioapic_update_eoi() wasn't called if directed EOI was enabled. We need to do that for irq notifiers. (Like with edge interrupts.) Fix it by skipping EOI broadcast only. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=82211 Signed-off-by: Radim

[PATCH] KVM: x86: call irq notifiers with directed EOI

2015-03-18 Thread Radim Krčmář
kvm_ioapic_update_eoi() wasn't called if directed EOI was enabled. We need to do that for irq notifiers. (Like with edge interrupts.) Fix it by skipping EOI broadcast only. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=82211 Signed-off-by: Radim Krčmář rkrc...@redhat.com ---

[Bug 82211] Cannot boot Xen under KVM with X2APIC enabled

2015-03-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=82211 --- Comment #11 from Radim Krčmář rkrc...@redhat.com --- Should be fixed with KVM: x86: call irq notifiers with directed EOI, (http://www.spinics.net/lists/kernel/msg1949367.html) can you check if it is? Thanks. -- You are receiving this mail

Re: [Patch v5] x86: irq_comm: Add check for RH bit in kvm_set_msi_irq

2015-03-18 Thread Marcelo Tosatti
On Fri, Mar 13, 2015 at 09:14:35AM -0600, James Sullivan wrote: This patch adds a check for RH=1 in kvm_set_msi_irq. Currently the DM bit is the only thing used to decide irq-dest_mode (logical when DM set, physical when unset). Documentation indicates that the DM bit will be 'ignored' when

Re: XP machine freeze

2015-03-18 Thread Marcelo Tosatti
On Mon, Mar 16, 2015 at 04:10:40PM +0100, Saso Slavicic wrote: Hi, I'm fairly experienced with KVM (Centos 5/6), running about a dozen servers with 20-30 different (Linux MS platform) systems. I have one Windows XP machine that acts very strangely - it freezes. I get ping timeout for the

Re: [Patch v5] x86: irq_comm: Add check for RH bit in kvm_set_msi_irq

2015-03-18 Thread Marcelo Tosatti
On Wed, Mar 18, 2015 at 06:59:22PM -0600, James Sullivan wrote: The documentation states the following: * When RH is 0, the interrupt is directed to the processor listed in the Destination ID field. * If RH is 0, then the DM bit is ignored and the message is sent ahead

Re: [Patch v5] x86: irq_comm: Add check for RH bit in kvm_set_msi_irq

2015-03-18 Thread Marcelo Tosatti
On Wed, Mar 18, 2015 at 06:59:22PM -0600, James Sullivan wrote: The documentation states the following: * When RH is 0, the interrupt is directed to the processor listed in the Destination ID field. * If RH is 0, then the DM bit is ignored and the message is sent ahead

Re: [PATCH] KVM: Eliminate extra function calls in kvm_get_dirty_log_protect()

2015-03-18 Thread Marcelo Tosatti
On Tue, Mar 17, 2015 at 09:58:21AM +0100, Paolo Bonzini wrote: On 17/03/2015 08:19, Takuya Yoshikawa wrote: When all bits in mask are not set, kvm_arch_mmu_enable_log_dirty_pt_masked() has nothing to do. But since it needs to be called from the generic code, it cannot be inlined, and

Re: [PATCH] KVM: SVM: Fix confusing message if no exit handlers are installed

2015-03-18 Thread Marcelo Tosatti
On Mon, Mar 16, 2015 at 05:18:25PM -0400, Bandan Das wrote: I hit this path on a AMD box and thought someone was playing a April Fool's joke on me. Signed-off-by: Bandan Das b...@redhat.com --- arch/x86/kvm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks.

randconfig build error with next-20150318, in drivers/vfio/virqfd.c

2015-03-18 Thread Jim Davis
/vfio/virqfd.o' failed HEAD is now at 78c876aef4f28... Add linux-next specific files for 20150318 CLEAN . CLEAN arch/x86/kernel/cpu CLEAN arch/x86/kernel CLEAN arch/x86/purgatory CLEAN arch/x86/realmode/rm CLEAN arch/x86/vdso CLEAN crypto/asymmetric_keys CLEAN kernel

[PATCH v4 1/2] kvm: x86: Extended struct kvm_lapic_irq with msi_redir_hint for MSI delivery

2015-03-18 Thread James Sullivan
Extended struct kvm_lapic_irq with bool msi_redir_hint, which will be used to determine if the delivery of the MSI should target only the lowest priority CPU in the logical group specified for delivery. (In physical dest mode, the RH bit is not relevant). Initialized the value of msi_redir_hint to

[PATCH v4 2/2] kvm: x86: Deliver MSI IRQ to only lowest prio cpu if msi_redir_hint is true

2015-03-18 Thread James Sullivan
An MSI interrupt should only be delivered to the lowest priority CPU when it has RH=1, regardless of the delivery mode. Modified kvm_is_dm_lowest_prio() to check for either irq-delivery_mode == APIC_DM_LOWPRI or irq-msi_redir_hint. Moved kvm_is_dm_lowest_prio() into lapic.h and renamed to

[PATCH v4 0/2] kvm: x86: Implement handling of RH=1 for MSI delivery in KVM

2015-03-18 Thread James Sullivan
Changes Since v1: * Reworked patches into two commits: 1) [Patch v2 1/2] Extended struct kvm_lapic_irq with bool msi_redir_hint * Initialize msi_redir_hint = true in kvm_set_msi_irq when RH=1 * Initialize msi_redir_hint = false otherwise

Re: [PATCH kvm-unit-tests] x86: fix build (macro R interpreted as raw string)

2015-03-18 Thread Marcelo Tosatti
On Fri, Mar 13, 2015 at 05:48:04PM +0100, Radim Krčmář wrote: GCC 5.0.0 enables raw strings by default and they have higher priority than macros, thus R[...] is interpreted incorrectly: lib/x86/isr.c:112:30: error: invalid character ')' in raw string delimiter lib/x86/isr.c:112:8: error:

Re: [Patch v5] x86: irq_comm: Add check for RH bit in kvm_set_msi_irq

2015-03-18 Thread James Sullivan
The documentation states the following: * When RH is 0, the interrupt is directed to the processor listed in the Destination ID field. * If RH is 0, then the DM bit is ignored and the message is sent ahead independent of whether the physical or logical destination mode is used.

Re: randconfig build error with next-20150318, in drivers/vfio/virqfd.c

2015-03-18 Thread Alex Williamson
On Wed, 2015-03-18 at 15:57 -0700, Jim Davis wrote: Building with the attached random configuration file, drivers/vfio/virqfd.c: In function 'vfio_virqfd_enable': drivers/vfio/virqfd.c:132:2: error: implicit declaration of function 'eventfd_ctx_fileget'

Re: [PATCH] KVM: x86: call irq notifiers with directed EOI

2015-03-18 Thread Bandan Das
Radim Krčmář rkrc...@redhat.com writes: kvm_ioapic_update_eoi() wasn't called if directed EOI was enabled. We need to do that for irq notifiers. (Like with edge interrupts.) Wow! It's interesting that this path is only hit with Xen as guest. I always thought of directed EOI as a security

Re: [GSoC] project proposal

2015-03-18 Thread Catalin Vasile
cryptodev is not merged into upstream from what I know. gnutls can use cryptodev and AF_ALG as crypto engines. From some benchmarks (that can also be found on cryptodev's webpage) you can see AF_ALG has a lot overhead over a standalone misc/char device. On Wed, Mar 18, 2015 at 6:42 PM, Paolo

KVM live migration i/o error

2015-03-18 Thread Francesc Guasch
Hi. I have three Ubuntu Server 14.04 trusty with KVM. Two of them are HP servers and one is Dell. Both brands run fine the KVM virtual servers, and I can do live migration between the HPs. But I get I/O errors in the vda when I migrate to or from the Dell server. I have shared storage with NFS,

[Bug 92871] nested kvm - Warning in L0 kernel when trying to launch L2 guest in L1 guest

2015-03-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=92871 Radim Krčmář rkrc...@redhat.com changed: What|Removed |Added CC||rkrc...@redhat.com ---

Re: [Qemu-devel] PCI passthrough of 40G ethernet interface (Openstack/KVM)

2015-03-18 Thread Shannon Nelson
On Wed, Mar 18, 2015 at 3:01 PM, Shannon Nelson shannon.nel...@intel.com wrote: On Wed, Mar 18, 2015 at 8:40 AM, jacob jacob opstk...@gmail.com wrote: On Wed, Mar 18, 2015 at 11:24 AM, Bandan Das b...@redhat.com wrote: Actually, Stefan suggests that support for this card is still

[PATCH v2 5/6] vfio-pci: Remove warning if try-reset fails

2015-03-18 Thread Alex Williamson
As indicated in the comment, this is not entirely uncommon and causes user concern for no reason. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/vfio/pci/vfio_pci.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci.c

[PATCH v2 4/6] vfio-pci: Allow PCI IDs to be specified as module options

2015-03-18 Thread Alex Williamson
This copies the same support from pci-stub for exactly the same purpose, enabling a set of PCI IDs to be automatically added to the driver's dynamic ID table at module load time. The code here is pretty simple and both vfio-pci and pci-stub are fairly unique in being meta drivers, capable of

[PATCH v2 3/6] vfio-pci: Add VGA arbiter client

2015-03-18 Thread Alex Williamson
If VFIO VGA access is disabled for the user, either by CONFIG option or module parameter, we can often opt-out of VGA arbitration. We can do this when PCI bridge control of VGA routing is possible. This means that we must have a parent bridge and there must only be a single VGA device below that

[PATCH v2 0/6] vfio-pci: Misc enhancements

2015-03-18 Thread Alex Williamson
v2: - Incorporate comments from Bandan and Bjorn for vfio-pci.ids option - Include necessary vgaarb change, already Ack'd by Dave - Rebase on top of my current next branch - Rename D3 disable parameter There are really 3 separate features added in this series, the first is to opt-out VGA

[PATCH v2 2/6] vfio-pci: Add module option to disable VGA region access

2015-03-18 Thread Alex Williamson
Add a module option so that we don't require a CONFIG change and kernel rebuild to disable VGA support. Not only can VGA support be troublesome in itself, but by disabling it we can reduce the impact to host devices by doing a VGA arbitration opt-out. Signed-off-by: Alex Williamson

Re: [PATCH] KVM: x86: call irq notifiers with directed EOI

2015-03-18 Thread Radim Krčmář
2015-03-18 15:37-0400, Bandan Das: Radim Krčmář rkrc...@redhat.com writes: kvm_ioapic_update_eoi() wasn't called if directed EOI was enabled. We need to do that for irq notifiers. (Like with edge interrupts.) Wow! It's interesting that this path is only hit with Xen as guest. Linux

[PATCH v2 6/6] vfio-pci: Move idle devices to D3hot power state

2015-03-18 Thread Alex Williamson
We can save some power by putting devices that are bound to vfio-pci but not in use by the user in the D3hot power state. Devices get woken into D0 when opened by the user. Resets return the device to D0, so we need to re-apply the low power state after a bus reset. It's tempting to try to use

[PATCH v2 1/6] vgaarb: Stub vga_set_legacy_decoding()

2015-03-18 Thread Alex Williamson
vga_set_legacy_decoding() is defined in drivers/gpu/vga/vgaarb.c, which is only compiled with CONFIG_VGA_ARB. A caller would therefore get an undefined symbol if the VGA arbiter is not enabled. Signed-off-by: Alex Williamson alex.william...@redhat.com Acked-by: Dave Airlie airl...@redhat.com ---

Re: [GSoC] project proposal

2015-03-18 Thread Paolo Bonzini
On 18/03/2015 18:05, Catalin Vasile wrote: cryptodev is not merged into upstream from what I know. Yes, but QEMU runs on non-Linux platforms too. Of course doing vhost+driver or gnutls+driver would be already more than enough for the summer. In any case, just put all the justification in