kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Marc Zyngier <marc.zyngier@arm.com>,
	Christoffer Dall <cdall@linaro.org>,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Cc: kvm@vger.kernel.org, Peter Maydell <peter.maydell@linaro.org>,
	Pekka Enberg <penberg@iki.fi>,
	Christoffer Dall <christoffer.dall@linaro.org>
Subject: Re: [PATCH v3 3/5] KVM: arm/arm64: Support arch timers with a userspace gic
Date: Thu, 6 Apr 2017 10:27:27 +0200	[thread overview]
Message-ID: <404c7b67-663e-2c09-f07a-944f767127d5@suse.de> (raw)
In-Reply-To: <d1ac49c8-3a17-17e5-95e6-fd993d768bdc@arm.com>



On 06.04.17 10:25, Marc Zyngier wrote:
> On 06/04/17 09:16, Alexander Graf wrote:
>>
>>
>> On 05.04.17 11:28, Christoffer Dall wrote:
>>> From: Alexander Graf <agraf@suse.de>
>>>

>>> @@ -559,6 +628,13 @@ int kvm_timer_enable(struct kvm_vcpu *vcpu)
>>>  	if (timer->enabled)
>>>  		return 0;
>>>
>>> +	/* Without a VGIC we do not map virtual IRQs to physical IRQs */
>>> +	if (!irqchip_in_kernel(vcpu->kvm))
>>> +		goto no_vgic;
>>> +
>>> +	if (!vgic_initialized(vcpu->kvm))
>>> +		return -ENODEV;
>>> +
>>>  	/*
>>>  	 * Find the physical IRQ number corresponding to the host_vtimer_irq
>>>  	 */
>>> @@ -582,8 +658,8 @@ int kvm_timer_enable(struct kvm_vcpu *vcpu)
>>>  	if (ret)
>>>  		return ret;
>>>
>>> +no_vgic:
>>>  	timer->enabled = 1;
>>
>> What happens if
>>
>>    1) User space spawns a VM with user space irqchip
>>    2) Runs the VM
>>    3) Then adds a virtual gic device
>
> As soon as a vcpu has run once, it is not possible to instantiate a vgic
> (see virt/kvm/arm/vgic/vgic-init.c:kvm_vgic_create around line 101).

Ah, I was missing that part. Awesome, all problems solved :).


Alex

  reply	other threads:[~2017-04-06  8:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05  9:28 [PATCH v3 0/5] Support userspace irqchip with arch timers Christoffer Dall
2017-04-05  9:28 ` [PATCH v3 1/5] KVM: arm/arm64: Cleanup the arch timer code's irqchip checking Christoffer Dall
2017-04-05  9:28 ` [PATCH v3 2/5] KVM: arm/arm64: Add ARM user space interrupt signaling ABI Christoffer Dall
2017-04-05  9:28 ` [PATCH v3 3/5] KVM: arm/arm64: Support arch timers with a userspace gic Christoffer Dall
2017-04-06  8:16   ` Alexander Graf
2017-04-06  8:25     ` Marc Zyngier
2017-04-06  8:27       ` Alexander Graf [this message]
2017-04-06 16:49   ` Marc Zyngier
2017-04-05  9:28 ` [PATCH v3 4/5] KVM: arm/arm64: Report PMU overflow interrupts to userspace irqchip Christoffer Dall
2017-04-06 17:12   ` Marc Zyngier
2017-04-06 19:04     ` Christoffer Dall
2017-04-05  9:28 ` [PATCH v3 5/5] KVM: arm/arm64: Advertise support for KVM_CAP_ARM_USER_IRQ Christoffer Dall
2017-04-06 17:13   ` Marc Zyngier
2017-04-06  8:28 ` [PATCH v3 0/5] Support userspace irqchip with arch timers Alexander Graf
2017-04-06 17:31 ` Marc Zyngier
2017-04-06 19:13   ` Christoffer Dall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=404c7b67-663e-2c09-f07a-944f767127d5@suse.de \
    --to=agraf@suse.de \
    --cc=cdall@linaro.org \
    --cc=christoffer.dall@linaro.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marc.zyngier@arm.com \
    --cc=penberg@iki.fi \
    --cc=peter.maydell@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).