Re: Few general questions on kvm-arm

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

 



Hi Marc,

I got few more questions. Let's say we are going to the guest, and
injecting an interrupt. Consider the following scenario:

1. So basically the HYP mode code is trying to writing 01 (interrupt
pending) to one of the list registers.
2. Guest resumes and immediately gets a virtual interrupt.
3. Before the guest ACKs the interrupt, hardware interrupt arrives and
guest gets preempted but it had enough time to run few instructions.
4. Guest exits and host sees the interrupt , serves it and we get back
to restoring the guest to continue running. Now at this point when HYP
mode code again restores 01 (interrupt pending) in the list register,
wouldn't the guest see another virtual interrupt as soon as it gets
resumed even through it has not ACK'd the last instance?

Another question is, in HYP mode code, does it matter if we restore
HCR register 1st or the list registers 1st?

Thanks a lot!
Mathew

On Wed, Jun 4, 2014 at 7:44 AM, Christoffer Dall
<christoffer.dall@xxxxxxxxxx> wrote:
> On Wed, Jun 04, 2014 at 02:12:57PM +0100, Marc Zyngier wrote:
>> On 04/06/14 13:58, Christoffer Dall wrote:
>> > On Tue, Jun 03, 2014 at 05:39:16PM +0100, Marc Zyngier wrote:
>> >> On Tue, Jun 03 2014 at  5:24:01 pm BST, Mathew Li <mathew.li100@xxxxxxxxx> wrote:
>> >>> Thanks for all the answers Marc. I had one more question:
>> >>>
>> >>> Theoretically, can a pcpu running in kernel mode (i.e. non-HYP mode)
>> >>> write to the list register in vcpu control interface of another pcpu
>> >>> (i.e. different from the writing pcpu)?
>> >>
>> >> There are two things here:
>> >> - Not sure if you could write to the GICH range from EL1. I don't see
>> >> anything in the spec that forbids it, but that clearly contrary to the
>> >> spirit of the architecture.
>> >
>> > FWIW, this actually works just fine on a TC2.
>>
>> Yeah, I don't think the source EL is being carried out on the bus, only
>> the S/NS bit. But that's not very nice, and definitely impossible with
>> GICv3 and system registers.
>>
> Yup, the v7 KVM code did look nice that way though and made for some
> relatively easy optimizations, but I couldn't measure any noticable
> effect from those on TC2 so I abanded that code completely.
>
> -Christoffer
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux