Re: [PATCH 5/5] KVM: PPC: booke: Improve timer register emulation

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

 



On 08.09.2011, at 17:34, Scott Wood wrote:

> On Wed, Sep 07, 2011 at 12:41:35PM +0200, Alexander Graf wrote:
>> Yes, but why can't we do this in the vcpu thread's context so we only
>> ever have a single instance accessing the vcpu struct?  It makes a lot
>> of things a lot easier.
> 
> Why?  We don't do it for external interrupts.  It would complicate
> locking, not simplify it -- we'd need to defer the execution to some
> context which can block, and then kick the guest out of guest mode, and
> make sure it doesn't reenter before we get the mutex...

We need to kick the vcpu thread out of context anyways because we're otherwise delaying delivery of the decr interrupt. So we can just as well handle it all there then. Being lazy is good, but please not at the cost of latency.

> 
>> And for the watchdog, we don't have to set the bit unless it's clean,
>> right?
> 
> Not sure what you mean by "clean".  We always set the bit when the timer
> expires.
> 
> Likewise for the decrementer.

What I mean is that we don't want to have a timer periodically triggering in the background for watchdog when the guest never clears the watchdog delivered bit.


Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux