On Tue, Apr 28, 2015 at 2:18 AM, Eric Auger wrote:
> The VFIO platform device gets connected to the platform bus
> on a machine init done notifier. Only at that point irqfd can be
> setup. An irq connect notifier would be helpful to do that job.
> Instead of adding a new callback at sysbus or qdev
This patch adds the code requested to assign interrupts to
a guest. The interrupts are mediated through user handled
eventfds only.
Signed-off-by: Eric Auger
---
v12 -> v13:
- start user-side eventfd handling at realize time
- remove start_irq_fn
v10 -> v11:
- use block declaration when possibl
The arm_gic_kvm now calls kvm_irqchip_set_qemuirq_gsi to build
the hash table storing qemu_irq/gsi mappings. From that point on
irqfd can be setup directly from the qemu_irq using
kvm_irqchip_add_irqfd_notifier.
Signed-off-by: Eric Auger
---
v2 -> v3:
- kvm_irqchip_add_qemuirq_irqfd_notifier re
Anticipating for the introduction of new add/remove functions taking
a qemu_irq parameter, let's rename existing ones with a gsi suffix.
Signed-off-by: Eric Auger
---
hw/s390x/virtio-ccw.c | 8
hw/vfio/pci.c | 6 +++---
hw/virtio/virtio-pci.c | 4 ++--
include/sysemu/kvm.h |
Minimal VFIO platform implementation supporting register space
user mapping but not IRQ assignment.
Signed-off-by: Kim Phillips
Signed-off-by: Eric Auger
---
v12 -> v13:
- check device name does not contain any /
- handle case where readlink fully fills the buffer
- in vfio_map_region declare s
Add a new callback in the SysBusDeviceClass. This callback now can
be overriden by devices inheriting from sysbus. By default the callback
is set to the dummy object_property_allow_set_link callback.
Signed-off-by: Eric Auger
---
v1 -> v2:
- use new LinkPropertySetter type
---
hw/core/sysbus.c
This series aims at enabling KVM platform device passthrough.
Kernel dependencies were pulled for 4.1-rc0. This series now only
relies on the following QEMU series
[1] [PATCH v12 0/4] machvirt dynamic sysbus device instantiation
http://comments.gmane.org/gmane.comp.emulators.kvm.arm.devel/886
Bo
This includes, among other things, VFIO platform driver and
irqfd/arm.
Signed-off-by: Eric Auger
---
v12 -> v13:
- update for 4.1-rc0 headers
v10 -> v11:
- only includes header modifications related to vfio platform
driver v14 and not those related to
"vfio: type1: support for ARM SMMUS wi
Check callback now takes as third argument an Object * const*. In
object_set_link_property, we pass the property child as argument.
We also assign the *child before the check call so that enhanced
check can be performed in the callback. In case the check fails,
the old value is restored and ref cou
The platform device class has become abstract. This patch introduces
a calxeda xgmac device that derives from it.
Signed-off-by: Eric Auger
Reviewed-by: Alex Bennee
---
v10 -> v11:
- add Alex Reviewed-by
- move virt modifications in a separate patch
v8 -> v9:
- renamed calxeda_xgmac.c into calx
This patch allows the instantiation of the vfio-calxeda-xgmac device
from the QEMU command line (-device vfio-calxeda-xgmac,host="").
A specialized device tree node is created for the guest, containing
compat, dma-coherent, reg and interrupts properties.
Signed-off-by: Eric Auger
---
v12 -> v13
VFIO platform device needs to setup irqfd but it does not know the
gsi corresponding to the device qemu_irq. This series proposes to
store a hash table in kvm_state using the qemu_irq as key and the gsi
as a value.
kvm_irqchip_set_qemuirq_gsi allows to insert such a pair. The interrupt
controller
qdev_init_gpio_out_named takes a new argument corresponding to the
check callback passed to object_property_add_link. In qdev_init_gpio_out
and sysbus_init_irq, this callback is currently set to the dummy
object_property_allow_set_link.
This will allow qdev_init_gpio_out_named callers to specializ
This patch aims at optimizing IRQ handling using irqfd framework.
Instead of handling the eventfds on user-side they are handled on
kernel side using
- the KVM irqfd framework,
- the VFIO driver virqfd framework.
the virtual IRQ completion is trapped at interrupt controller
This removes the need
Christoffer Dall writes:
> On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter Maydell wrote:
>> On 28 April 2015 at 09:42, Alex Bennée wrote:
>> > Peter Maydell writes:
>> >> Does the kernel already have a conveniently implemented "inject
>> >> exception into guest" lump of code? If so it might b
On 28/04/2015 16:10, Christian Borntraeger wrote:
> > Alternatively, the irq-disabled versions could be called
> > __kvm_guest_{enter,exit}. Then you can use those directly when it makes
> > sense.
>
> ..having a special __kvm_guest_{enter,exit} without the WARN_ON might be even
> the cheapest
Am 28.04.2015 um 13:37 schrieb Paolo Bonzini:
>> --- a/arch/powerpc/kvm/book3s_pr.c
>> +++ b/arch/powerpc/kvm/book3s_pr.c
>> @@ -891,7 +891,9 @@ int kvmppc_handle_exit_pr(struct kvm_run *run, struct
>> kvm_vcpu *vcpu,
>>
>> /* We get here with MSR.EE=1 */
>>
>> +local_irq_disable();
>
On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter Maydell wrote:
> On 28 April 2015 at 09:42, Alex Bennée wrote:
> > Peter Maydell writes:
> >> Does the kernel already have a conveniently implemented "inject
> >> exception into guest" lump of code? If so it might be less effort
> >> to do it that w
On 28/04/2015 11:18, Eric Auger wrote:
> Check callback now takes as third argument an Object **. In
> object_set_link_property, we pass the property child as argument.
> We also assign the *child before the check call so that enhanced
> check can be performed in the callback. In case the check f
On 28/04/2015 12:32, Christian Borntraeger wrote:
> Some architectures already have irq disabled when calling
> kvm_guest_exit. Push down the disabling into the architectures
> to avoid double disabling. This also allows to replace
> irq_save with irq_disable which might be cheaper.
> arm and mip
I was able to get rid of some nanoseconds for a guest exit loop
on s390. I did my best to not break other architectures but
review and comments on the general approach is welcome.
Downside is that the existing irq_save things will just work
no matter what the callers have done, the new code must do
local_irq_disable can be cheaper than local_irq_save, especially
when done only once instead of twice. We can push down the
local_irq_save (and replace it with local_irq_disable) to
save some cycles.
x86, mips and arm already disable the interrupts before calling
kvm_guest_enter. Here we save one l
Some architectures already have irq disabled when calling
kvm_guest_exit. Push down the disabling into the architectures
to avoid double disabling. This also allows to replace
irq_save with irq_disable which might be cheaper.
arm and mips already have interrupts disabled. s390/power/x86
need adopti
On 28 April 2015 at 09:42, Alex Bennée wrote:
> Peter Maydell writes:
>> Does the kernel already have a conveniently implemented "inject
>> exception into guest" lump of code? If so it might be less effort
>> to do it that way round, maybe.
>
> So you pointed out we can't just re-inject the excep
The VFIO platform device gets connected to the platform bus
on a machine init done notifier. Only at that point irqfd can be
setup. An irq connect notifier would be helpful to do that job.
Instead of adding a new callback at sysbus or qdev level, this
series proposes to use the property check() cal
Check callback now takes as third argument an Object **. In
object_set_link_property, we pass the property child as argument.
We also assign the *child before the check call so that enhanced
check can be performed in the callback. In case the check fails,
the old value is restored and ref count is
Add a new callback in the SysBusDeviceClass. This callback now can
be overriden by devices inheriting from sysbus. By default the callback
is set to the dummy object_property_allow_set_link callback.
Signed-off-by: Eric Auger
---
hw/core/sysbus.c| 8 +++-
include/hw/sysbus.h | 1 +
2 fil
qdev_init_gpio_out_named takes a new argument corresponding to the
check callback passed to object_property_add_link. In qdev_init_gpio_out
this callback is set to the dummy object_property_allow_set_link.
This will allow qdev_init_gpio_out_named callers to specialize this
callback, typically sysb
On 27/04/2015 19:43, Peter Crosthwaite wrote:
> To reduce verbosity, I suggest making object_set_link_property() a
> visible API, then RYO link setters can call it surrounded by custom
> behavior e.g:
>
> foo_object_set_bar_property(...)
> {
> pre_set_link_side_effects();
> object_set_li
Peter Maydell writes:
> On 27 April 2015 at 21:04, Christoffer Dall
> wrote:
>> On Thu, Apr 23, 2015 at 03:26:53PM +0100, Alex Bennée wrote:
>>>
>>> Christoffer Dall writes:
>>>
>>> > On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex Bennée wrote:
>>> >> + * just need to report the PC and the HS
On 04/28/2015 08:57 AM, Peter Crosthwaite wrote:
> On Mon, Apr 27, 2015 at 11:46 PM, Eric Auger wrote:
>> Hi Peter,
>>
>> On 04/27/2015 07:43 PM, Peter Crosthwaite wrote:
>>> On Mon, Apr 27, 2015 at 8:01 AM, Paolo Bonzini wrote:
On 27/04/2015 16:56, Eric Auger wrote:
> Peter, P
31 matches
Mail list logo