[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 for-2-12 04/15] s390x/flic: simplify flic ini
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH v1 for-2-12 04/15] s390x/flic: simplify flic initialization |
Date: |
Tue, 12 Dec 2017 12:49:29 +0100 |
On Tue, 12 Dec 2017 11:45:22 +0100
David Hildenbrand <address@hidden> wrote:
> This is what it looks like now:
>
> commit dec1ff5cfc72fa0998e28a25dd23f0695ddfe21b
> Author: David Hildenbrand <address@hidden>
> Date: Mon Nov 13 23:09:56 2017 +0100
>
> s390x/flic: simplify flic initialization
>
> This makes it clearer, which device is used for which accelerator.
>
> We can directly attach both to /machine/s390-flic/ instead of two
> different locations (/machine/s390x-flic[qemu|kvm]). Should not
> harm migration.
Not sure about libvirt usage, though. Let's keep it as-is?
>
> Reviewed-by: Christian Borntraeger <address@hidden>
> Signed-off-by: David Hildenbrand <address@hidden>
>
> diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
> index 6eaf178d79..dd5b157392 100644
> --- a/hw/intc/s390_flic.c
> +++ b/hw/intc/s390_flic.c
> @@ -40,12 +40,13 @@ void s390_flic_init(void)
> {
> DeviceState *dev;
>
> - dev = s390_flic_kvm_create();
> - if (!dev) {
> + if (kvm_enabled()) {
> + dev = qdev_create(NULL, TYPE_KVM_S390_FLIC);
> + } else {
> dev = qdev_create(NULL, TYPE_QEMU_S390_FLIC);
> - object_property_add_child(qdev_get_machine(), TYPE_QEMU_S390_FLIC,
> - OBJECT(dev), NULL);
> }
> + object_property_add_child(qdev_get_machine(), TYPE_S390_FLIC_COMMON,
> + OBJECT(dev), NULL);
Dropping the check for tcg_enabled() is fine with me, though.
> qdev_init_nofail(dev);
> }
>
> ...
>
[Qemu-devel] [PATCH v1 for-2-12 07/15] s390x/tcg: tolerate wrong wakeups due to floating interrupts, David Hildenbrand, 2017/12/11
[Qemu-devel] [PATCH v1 for-2-12 05/15] s390x/tcg: simplify machine check handling, David Hildenbrand, 2017/12/11
[Qemu-devel] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, David Hildenbrand, 2017/12/11
- Re: [Qemu-devel] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, Cornelia Huck, 2017/12/12
- Re: [Qemu-devel] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, Christian Borntraeger, 2017/12/12
- Re: [Qemu-devel] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, Cornelia Huck, 2017/12/12
- Re: [Qemu-devel] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, David Hildenbrand, 2017/12/12
- Re: [Qemu-devel] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, Cornelia Huck, 2017/12/12
- Re: [Qemu-devel] [PATCH v1 for-2-12 06/15] s390x/flic: factor out injection of floating interrupts, Christian Borntraeger, 2017/12/13