[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 4/4] s390x/virtio-ccw: Wire up irq routing an
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH v5 4/4] s390x/virtio-ccw: Wire up irq routing and irqfds. |
Date: |
Mon, 12 May 2014 15:24:09 +0200 |
On Mon, 12 May 2014 10:58:46 +0200
Christian Borntraeger <address@hidden> wrote:
> On 08/05/14 15:03, Cornelia Huck wrote:
> > Make use of the new s390 adapter irq routing support to enable real
> > in-kernel irqfds for virtio-ccw with adapter interrupts.
> >
> > Note that s390 doesn't provide the common KVM_CAP_IRQCHIP capability, but
> > rather needs KVM_CAP_S390_IRQCHIP to be enabled. This is to ensure backward
> > compatibility.
> >
> > Reviewed-by: Thomas Huth <address@hidden>
> > Signed-off-by: Cornelia Huck <address@hidden>
>
> Small things, otherwise
>
> Reviewed-by: Christian Borntraeger <address@hidden>
>
>
> [...]
> > --- /dev/null
> > +++ b/include/hw/s390x/adapter.h
> > @@ -0,0 +1,23 @@
> > +/*
> > + * s390 adapter definitions
> > + *
> > + * Copyright 2013 IBM Corp.
>
> 2014 as well
ok
>
> [...]
> > diff --git a/kvm-all.c b/kvm-all.c
> > index 5cb7f26..51983bf 100644
> > --- a/kvm-all.c
> > +++ b/kvm-all.c
> > @@ -1267,6 +1297,11 @@ int kvm_irqchip_add_msi_route(KVMState *s,
> > MSIMessage msg)
> > return -ENOSYS;
> > }
> >
> > +int kvm_irqchip_add_adapter_route(KVMState *s, AdapterInfo *adapter)
> > +{
> > + return -ENOSYS;
> > +}
> > +
> > static int kvm_irqchip_assign_irqfd(KVMState *s, int fd, int virq, bool
> > assign)
> > {
> > abort();
> > @@ -1296,7 +1331,8 @@ static int kvm_irqchip_create(KVMState *s)
> > int ret;
> >
> > if (!qemu_opt_get_bool(qemu_get_machine_opts(), "kernel_irqchip",
> > true) ||
> > - !kvm_check_extension(s, KVM_CAP_IRQCHIP)) {
> > + (!kvm_check_extension(s, KVM_CAP_IRQCHIP) &&
> > + (kvm_vm_enable_cap(s, KVM_CAP_S390_IRQCHIP, 0) < 0))) {
> > return 0;
> > }
>
> Do we need a comment here and/or in target-s390x/kvm.c why
> kvm_halt_in_kernel_allowed does not work without breaking backward
> compatibility on s390?
Probably not here but...
>
>
> >
> > diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
> > index b7b0edc..43859e9 100644
> > --- a/target-s390x/kvm.c
> > +++ b/target-s390x/kvm.c
> > @@ -938,6 +938,11 @@ void kvm_s390_enable_css_support(S390CPU *cpu)
> >
> > void kvm_arch_init_irq_routing(KVMState *s)
> > {
> > + if (kvm_check_extension(s, KVM_CAP_IRQ_ROUTING)) {
> > + kvm_irqfds_allowed = true;
> > + kvm_gsi_routing_allowed = true;
> > + kvm_halt_in_kernel_allowed = false;
> > + }
>
> Do we need a comment here and/or in kvm-all why kvm_halt_in_kernel_allowed
> does not work without breaking backward compatibility on s390?
...I'll add the following here:
/*
* Note that while irqchip capabilities generally imply that cpustates
* are handled in-kernel, it is not true for s390 (yet); therefore, we
* have to override the common code kvm_halt_in_kernel_allowed setting.
*/
>
> [...]
>
>
> Should Paolo ack the common kvm changes? (CCed)
>
> Christian