On 02/10, Jeremy Fitzhardinge wrote:
On 02/10/2015 05:26 AM, Oleg Nesterov wrote:
On 02/10, Raghavendra K T wrote:
Unfortunately xadd could result in head overflow as tail is high.
The other option was repeated cmpxchg which is bad I believe.
Any suggestions?
Stupid question... what
On 02/11/2015 11:08 PM, Oleg Nesterov wrote:
On 02/11, Raghavendra K T wrote:
On 02/10/2015 06:56 PM, Oleg Nesterov wrote:
In this case __ticket_check_and_clear_slowpath() really needs to cmpxchg
the whole .head_tail. Plus obviously more boring changes. This needs a
separate patch even _if_
If exception_enter happens when already in IN_KERNEL state, the
code still calls context_tracking_exit, which ends up in
rcu_eqs_exit_common, which explodes with a WARN_ON when it is
called in a situation where dynticks are not enabled.
This can be avoided by having exception_enter only switch to
On 02/11, Raghavendra K T wrote:
On 02/10/2015 06:56 PM, Oleg Nesterov wrote:
In this case __ticket_check_and_clear_slowpath() really needs to cmpxchg
the whole .head_tail. Plus obviously more boring changes. This needs a
separate patch even _if_ this can work.
Correct, but apart from
Hi,
This was tested with kernel-3.19.0-1.fc22) and QEMU (qemu-2.2.0-5.fc22)
on L0 L1.
Description
---
Inside L1, boot a nested KVM guest (L2) . Instead of a full blown
guest, let's use `qemu-sanity-check` with KVM:
$ qemu-sanity-check --accel=kvm
Wwich gives you this CLI (run
On Wed, Feb 11, 2015 at 02:43:19PM -0500, Rik van Riel wrote:
If exception_enter happens when already in IN_KERNEL state, the
code still calls context_tracking_exit, which ends up in
rcu_eqs_exit_common, which explodes with a WARN_ON when it is
called in a situation where dynticks are not
Luis R. Rodriguez mcg...@do-not-panic.com writes:
From: Luis R. Rodriguez mcg...@suse.com
The general documentation we have for pv_ops is currenty present
on the IA64 docs, but since this documentation covers IA64 xen
enablement and IA64 Xen support got ripped out a while ago
through commit
On 02/11/2015 09:24 AM, Oleg Nesterov wrote:
I agree, and I have to admit I am not sure I fully understand why
unlock uses the locked add. Except we need a barrier to avoid the race
with the enter_slowpath() users, of course. Perhaps this is the only
reason?
Right now it needs to be a locked
Fix multiple injection of level sensitive forwarded IRQs.
With current code, the second injection fails since the state bitmaps
are not reset (process_maintenance is not called anymore).
New implementation follows those principles:
- A forwarded IRQ only can be sampled when it is pending
- when
When the VGIC is destroyed it must take care of
- restoring the forwarded IRQs in non forwarded state,
- deactivating the IRQ in case the guest left without doing it
- cleaning nodes of the phys_map rbtree
Signed-off-by: Eric Auger eric.au...@linaro.org
---
v1 - v2:
- remove
Add a lock related to the rb tree manipulation. The rb tree can be
searched in one thread (irqfd handler for instance) and map/unmap
may happen in another.
Signed-off-by: Eric Auger eric.au...@linaro.org
---
v2 - v3:
re-arrange lock sequence in vgic_map_phys_irq
---
include/kvm/arm_vgic.h | 1
With current handle_fasteoi_irq implementation, in case irqd_irq_disabled
is true (disable_irq was called) or !irq_may_run, the IRQ is not completed.
Only the running priority is dropped. IN those cases, the IRQ will
never be forwarded and hence will never be deactivated by anyone else.
This series proposes some fixes that appeared to be necessary
to integrate IRQ forwarding in KVM/VFIO.
- deactivation of the forwarded IRQ in irq_disabled case
- a specific handling of forwarded IRQ into the VGIC state machine.
- deactivation of physical IRQ and unforwarding on vgic destruction
-
This patch adds and documents a new KVM_DEV_VFIO_DEVICE group
and 2 device attributes: KVM_DEV_VFIO_DEVICE_FORWARD_IRQ,
KVM_DEV_VFIO_DEVICE_UNFORWARD_IRQ. The purpose is to be able
to set a VFIO device IRQ as forwarded or not forwarded.
the command takes as argument a handle to a new struct named
This patch defines __KVM_HAVE_ARCH_HALT_GUEST and implements
kvm_arch_halt_guest and kvm_arch_resume_guest for ARM.
On halt, the guest is forced to exit and prevented from being
re-entered.
Signed-off-by: Eric Auger eric.au...@linaro.org
---
arch/arm/include/asm/kvm_host.h | 4
A single handler now is registered whatever the use case: automasked
or not. A function pointer is set according to the wished behavior
and the handler calls this function.
The irq lock is taken/released in the root handler. eventfd_signal can
be called in regions not allowed to sleep.
In case the IRQ is forwarded, the VFIO platform IRQ handler does not
need to disable the IRQ anymore.
When setting the IRQ handler we now also test the forwarded state. In
case the IRQ is forwarded we select the vfio_irq_handler.
Signed-off-by: Eric Auger eric.au...@linaro.org
---
v3 - v4:
-
This patch sets __KVM_HAVE_ARCH_KVM_VFIO_FORWARD and implements
kvm_arch_set_forward for ARM.
As a result the KVM-VFIO device now allows to forward/unforward a
VFIO device IRQ on ARM.
kvm_arch_set_forward and kvm_arch_unset_forward mostly take care of
VGIC programming: physical IRQ/guest IRQ
Introduces 3 new external functions aimed at doining some actions
on VFIO platform devices:
- mask a VFIO IRQ
- get the active status of a VFIO IRQ (active at interrupt
controller level or masked by the level-sensitive automasking).
- change the automasked property and the VFIO handler
Note
The VFIO external user API is enriched with 3 new functions that
allows a kernel user external to VFIO to retrieve some information
from a VFIO device.
- vfio_device_get_external_user enables to get a vfio device from
its fd and increments its reference counter
- vfio_device_put_external_user
This patch introduces a new KVM_DEV_VFIO_DEVICE group.
This is a new control channel which enables KVM to cooperate with
viable VFIO devices.
The patch introduces 2 attributes for this group:
KVM_DEV_VFIO_DEVICE_FORWARD_IRQ, KVM_DEV_VFIO_DEVICE_UNFORWARD_IRQ.
Their purpose is to turn a VFIO
Provide wrapper functions that allow KVM-VFIO device code to
interact with a vfio device:
- kvm_vfio_device_get_external_user gets a handle to a struct
vfio_device from the vfio device file descriptor and increments
its reference counter,
- kvm_vfio_device_put_external_user decrements the
This API allows to
- exit the guest and avoid re-entering it
- resume the guest execution
Signed-off-by: Eric Auger eric.au...@linaro.org
---
include/linux/kvm_host.h | 12
1 file changed, 12 insertions(+)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index
The kvm_vcpu_arch pause field is renamed into power_off to prepare
for the introduction of a new pause field.
Signed-off-by: Eric Auger eric.au...@linaro.org
---
arch/arm/include/asm/kvm_host.h | 4 ++--
arch/arm/kvm/arm.c | 10 +-
arch/arm/kvm/psci.c | 10
Those 3 new wrapper functions call the respective VFIO external
functions.
Signed-off-by: Eric Auger eric.au...@linaro.org
---
v4: creation
---
include/linux/vfio.h | 8 +++-
virt/kvm/vfio.c | 44
2 files changed, 47 insertions(+), 5
From: Kim Phillips kim.phill...@linaro.org
The KVM-VFIO device is used by the QEMU VFIO device. It is used to
record the list of in-use VFIO groups so that KVM can manipulate
them. With this series, it will also be used to record the forwarded
IRQs.
Signed-off-by: Kim Phillips
This series proposes an integration of ARM: Forwarding physical
interrupts to a guest VM (http://lwn.net/Articles/603514/) in
KVM.
It enables to set/unset forwarding for a VFIO platform device IRQ.
A forwarded IRQ is deactivated by the guest and not by the host.
When the guest deactivates the
On 02/10/2015 06:56 PM, Oleg Nesterov wrote:
On 02/10, Raghavendra K T wrote:
On 02/10/2015 06:23 AM, Linus Torvalds wrote:
add_smp(lock-tickets.head, TICKET_LOCK_INC);
if (READ_ONCE(lock-tickets.tail) TICKET_SLOWPATH_FLAG) ..
into something like
val =
This is similar to emulator.c, that does not run on 32-bit systems.
This bug happens (due to kvm_mmu_page_fault's call to the emulator)
during Windows 7 boot.
Reported-by: Erik Rull erik.r...@rdsoftware.de
Signed-off-by: Paolo Bonzini pbonz...@redhat.com
---
config/config-i386.mak | 4 +++-
https://bugzilla.kernel.org/show_bug.cgi?id=92291
--- Comment #8 from Mark kernelbugzilla.org.mark...@dfgh.net ---
Created attachment 166461
-- https://bugzilla.kernel.org/attachment.cgi?id=166461action=edit
dmesg
--
You are receiving this mail because:
You are watching the assignee of the
https://bugzilla.kernel.org/show_bug.cgi?id=92291
--- Comment #9 from Mark kernelbugzilla.org.mark...@dfgh.net ---
I'll try both of your suggestions, thanks
--
You are receiving this mail because:
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line
On 2015-02-11 19:12, Kashyap Chamarthy wrote:
Hi,
This was tested with kernel-3.19.0-1.fc22) and QEMU (qemu-2.2.0-5.fc22)
on L0 L1.
Description
---
Inside L1, boot a nested KVM guest (L2) . Instead of a full blown
guest, let's use `qemu-sanity-check` with KVM:
$
It forgets to free coalesced_mmio_ring page after the anon_inode_getfd
fails.
Signed-off-by: Xiubo Li lixi...@cmss.chinamobile.com
---
virt/kvm/kvm_main.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index
33 matches
Mail list logo