[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH v1 for-2-12 06/15] s390x/flic: factor out inject
From: |
Christian Borntraeger |
Subject: |
Re: [qemu-s390x] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts |
Date: |
Tue, 12 Dec 2017 15:13:46 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 12/12/2017 02:49 PM, Cornelia Huck wrote:
> On Mon, 11 Dec 2017 14:47:31 +0100
> David Hildenbrand <address@hidden> wrote:
>
>> Let the flic device handle it internally. This will allow us to later
>> on store floating interrupts in the flic for the TCG case.
>>
>> This now also simplifies kvm.c. All that's left is the fallback
>> interface for floating interrupts, which is no triggered directly via
>
> s/no/now/
>
>> the flic in case anything goes wrong.
>>
>> Signed-off-by: David Hildenbrand <address@hidden>
>> ---
>> hw/intc/s390_flic.c | 31 ++++++++++++++++++++
>> hw/intc/s390_flic_kvm.c | 63 ++++++++++++++++++++++++++++++++++++----
>> include/hw/s390x/s390_flic.h | 5 ++++
>> target/s390x/cpu.h | 7 ++++-
>> target/s390x/interrupt.c | 42 +++++++++++----------------
>> target/s390x/kvm-stub.c | 13 ---------
>> target/s390x/kvm.c | 68
>> ++++----------------------------------------
>> target/s390x/kvm_s390x.h | 10 +------
>> 8 files changed, 123 insertions(+), 116 deletions(-)
>>
>> diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
>> index a78bdf1d90..8d521c415a 100644
>> --- a/hw/intc/s390_flic.c
>> +++ b/hw/intc/s390_flic.c
>> @@ -131,6 +131,34 @@ static int qemu_s390_inject_airq(S390FLICState *fs,
>> uint8_t type,
>> return 0;
>> }
>>
>> +static void qemu_s390_inject_service(S390FLICState *fs, uint32_t parm)
>> +{
>> +
>> + S390CPU *dummy_cpu = s390_cpu_addr2state(0);
>> +
>> + /* FIXME: don't inject into dummy CPU */
>> + cpu_inject_service(dummy_cpu, parm);
>> +}
>> +
>> +static void qemu_s390_inject_io(S390FLICState *fs, uint16_t subchannel_id,
>> + uint16_t subchannel_nr, uint32_t
>> io_int_parm,
>> + uint32_t io_int_word)
>> +{
>> + S390CPU *dummy_cpu = s390_cpu_addr2state(0);
>> +
>> + /* FIXME: don't inject into dummy CPU */
>> + cpu_inject_io(dummy_cpu, subchannel_id, subchannel_nr, io_int_parm,
>> + io_int_word);
>> +}
>> +
>> +static void qemu_s390_inject_crw_mchk(S390FLICState *fs)
>> +{
>> + S390CPU *dummy_cpu = s390_cpu_addr2state(0);
>> +
>> + /* FIXME: don't inject into dummy CPU */
>> + cpu_inject_crw_mchk(dummy_cpu);
>> +}
>> +
>> static void qemu_s390_flic_reset(DeviceState *dev)
>> {
>> QEMUS390FLICState *flic = QEMU_S390_FLIC(dev);
>> @@ -172,6 +200,9 @@ static void qemu_s390_flic_class_init(ObjectClass *oc,
>> void *data)
>> fsc->clear_io_irq = qemu_s390_clear_io_flic;
>> fsc->modify_ais_mode = qemu_s390_modify_ais_mode;
>> fsc->inject_airq = qemu_s390_inject_airq;
>> + fsc->inject_service = qemu_s390_inject_service;
>> + fsc->inject_io = qemu_s390_inject_io;
>> + fsc->inject_crw_mchk = qemu_s390_inject_crw_mchk;
>> }
>
> As you now have a callback for ->inject_io(), make
> qemu_s390_inject_airq() invoke it directly instead of going the detour
> through s390_io_interrupt()?
>
>>
>> static Property s390_flic_common_properties[] = {
>
> (...)
>
> Generally looks sane.
>
> One thing I noticed: You removed the caching of the flic (in the old
> kvm inject routine), and you generally do more qom invocations (first,
> to find the common flic; then, to translate to the qemu or kvm flic).
> Not sure if this might be a problem (probably not).
Is any of these calls on a potential fast path (e.g. guest without adapter
interrupts)? If yes, then QOM is a no-go since it is really slow.
- [qemu-s390x] [PATCH v1 for-2-12 00/15] s390x: flic rework, tcg flic support and tcg, David Hildenbrand, 2017/12/11
- [qemu-s390x] [PATCH v1 for-2-12 01/15] cpus: make pause_all_cpus() play with SMP on single threaded TCG, David Hildenbrand, 2017/12/11
- [qemu-s390x] [PATCH v1 for-2-12 02/15] cpu-exec: fix missed CPU kick during interrupt injection, David Hildenbrand, 2017/12/11
- [qemu-s390x] [PATCH v1 for-2-12 03/15] s390x/tcg: deliver multiple interrupts in a row, David Hildenbrand, 2017/12/11
- [qemu-s390x] [PATCH v1 for-2-12 07/15] s390x/tcg: tolerate wrong wakeups due to floating interrupts, David Hildenbrand, 2017/12/11
- [qemu-s390x] [PATCH v1 for-2-12 05/15] s390x/tcg: simplify machine check handling, David Hildenbrand, 2017/12/11
- [qemu-s390x] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, David Hildenbrand, 2017/12/11
- Re: [qemu-s390x] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, Cornelia Huck, 2017/12/12
- Re: [qemu-s390x] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts,
Christian Borntraeger <=
- Re: [qemu-s390x] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, Cornelia Huck, 2017/12/12
- Re: [qemu-s390x] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, David Hildenbrand, 2017/12/12
- Re: [qemu-s390x] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, Cornelia Huck, 2017/12/12
- Re: [qemu-s390x] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, Christian Borntraeger, 2017/12/13
- Re: [qemu-s390x] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, David Hildenbrand, 2017/12/13
- Re: [qemu-s390x] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, Christian Borntraeger, 2017/12/13
- Re: [qemu-s390x] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, Cornelia Huck, 2017/12/13
- Re: [qemu-s390x] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, David Hildenbrand, 2017/12/12
- [qemu-s390x] [PATCH v1 for-2-12 04/15] s390x/flic: simplify flic initialization, David Hildenbrand, 2017/12/11