Re: Why so many vm exits caused by ept violation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



it ready caused by the the MSIX mask bit.

so i disable the msix in the newer virtio driver, and i found it have
better performent than msix enabled. the cpu rate of host os reduce.

the reason maybe is ept violation.

I couldn't use newer kernels. because the purpose i used kvm is run
old software on new hardware.

but i think this is a common problem, maybe newer kernel also exist.

i think we should not enable msi for virtio.

if anybody also interest on this problem, you can do the same test.

I disalbe msi by modify the function  vp_find_vqs like this:

static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs,
		       struct virtqueue *vqs[],
		       vq_callback_t *callbacks[],
		       const char *names[])
{

#if 0
	int err;

	/* Try MSI-X with one vector per queue. */
	err = vp_try_to_find_vqs(vdev, nvqs, vqs, callbacks, names, true, true);
	if (!err)
		return 0;
	/* Fallback: MSI-X with one vector for config, one shared for queues. */
	err = vp_try_to_find_vqs(vdev, nvqs, vqs, callbacks, names,
				 true, false);
	if (!err)
		return 0;
	/* Finally fall back to regular interrupts. */
#endif

	return vp_try_to_find_vqs(vdev, nvqs, vqs, callbacks, names,
				  false, false);
}



2010/11/15, lidong chen <chen.lidong.kernel@xxxxxxxxx>:
> I think the address maybe initialized in function virtio_pci_probe.
> err = pci_request_regions(pci_dev, "virtio-pci");
>
> but i did not know when used this address.
>
>
> 2010/11/15, lidong chen <chen.lidong.kernel@xxxxxxxxx>:
>> 2010/11/15, Avi Kivity <avi@xxxxxxxxxx>:
>>> On 11/15/2010 09:24 AM, lidong chen wrote:
>>>> the address is the Region 1 of virtio_net.
>>>>
>>>> why virtio_net use this address caused ept violation?
>>>
>>> It's probably the MSIX mask bit.  Older kernels program this bit twice
>>> on every interrupt.  Newer kernels do this much less frequently.  Try
>>> with a new kernel and see.
>>>
>>> --
>>> error compiling committee.c: too many arguments to function
>>>
>>>
>>
>
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux