qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] kvm: Move kvm_allows_irq0_override() to target-


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386
Date: Mon, 23 Jul 2012 17:01:15 +0200

On Mon, 23 Jul 2012 17:27:47 +0300
Avi Kivity <address@hidden> wrote:

> On 07/23/2012 04:55 PM, Cornelia Huck wrote:
> >> > Basically, we have some flags in our control block we can set so that
> >> > the cpu drops out of SIE whenever external/I/O/... interrupts are
> >> > enabled and then have the host do the lowcore updates, psw swaps, etc.
> >> 
> >> Can you write them from a different cpu and expect them to take effect?
> >> 
> >> How do you emulate an interrupt with a large guest?  You have to update
> >> the flags in the control blocks for all vcpus; then restore them when
> >> the interrupt is delivered?
> > 
> > We may access the flags for any vcpu via the kvm_s390_float_interrupt
> > structure which is contained in kvm->arch.
> > 
> > We'll get control when a vcpu enters a wait state and try to deliver
> > pending interrupts or set/clear the flags. Moreover, idle vcpus are on
> > a wait queue and are the first target for getting an interrupt injected.
> 
> Okay.  And you can ask a vcpu to exit when it enables interrupts,
> without interrupting it?

Yes.

See arch/s390/kvm/interrupt.c and the CPUSTAT_* flags.

> 
> On x86, we have to IPI the vcpu so it drops to the host, ask it to let
> us know when interrupts are enabled, and let it run again.
> 

Cornelia




reply via email to

[Prev in Thread] Current Thread [Next in Thread]