From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24E97C43603 for ; Wed, 4 Dec 2019 16:12:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E8D8A2081B for ; Wed, 4 Dec 2019 16:12:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="aGSA02pw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728697AbfLDQMt (ORCPT ); Wed, 4 Dec 2019 11:12:49 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:26052 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728663AbfLDQMs (ORCPT ); Wed, 4 Dec 2019 11:12:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575475967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iBPKZZ1S6h+pflfRLsbt4YQvZfduXk93viwFWwQMor4=; b=aGSA02pwwzytN8y3tE4HRa5Prop91D5RQcHkzqEKQUWG74dsOjwZ4mWy7xvt5ul9pgrsvu q3Y/8oTQNQPGZPab2R6sVXq+r4pAM1V5gyOClhxVwFpP8Rgh/IRwdNm29YW7yTIZziO5OE ToWQA/EM+SdH1wscfLqvnH237NX7JBQ= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-171-xhApEHU3NRav-i6UB4POgA-1; Wed, 04 Dec 2019 11:12:46 -0500 Received: by mail-wr1-f72.google.com with SMTP id z15so83001wrw.0 for ; Wed, 04 Dec 2019 08:12:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=az7yGx5mjj6saclgmtqUq3bomG8Y9h4yXQPUO7zazjU=; b=KJFAcsM8lUSWLmJ+Fasfy1L+7fVHy8x5ZIFUxpjOO/f+8yZO24iY9uGJPwf/bO2M5r po3t43+Hg6wlMJ8oSBkkE0kZRPZN8DmFNcEbWojwLUC6Rr2SJ+oLNuz+Oj8/bYRMj2xW aBAJQGSFNdNkMYq6X/t7Z96GwOIg4SYjYFWS5rinf26k/G5e86BFaJ3jUcP78SBOzjFm u41YFcIP6eLmVBEk2M2H8d6jzonE92QQYRMR+V2l6uZERNRIgpMERLNCrXKucJXuThls KHX7uO/zBMuxxPIhPrtfsex12oDmh4nD5CuezKgMP0TO9tTwdk50kHyM5YU1RLVnE3T2 WRSg== X-Gm-Message-State: APjAAAX8hDR+n1cPJP4MwtbGt5PH2PHpkDSTYlcALoSZe4p5x7IhmiHg 24gQ3R0HzCiE/D8JFlM28Xsh/bSRGz/AWD8tmGfPsADajaYTQmZlHmis1hG6DKyLwQhbE8O2f8V 61KZcLmJFLrkGnP7/5uRqKpri X-Received: by 2002:adf:f18b:: with SMTP id h11mr4779046wro.56.1575475964972; Wed, 04 Dec 2019 08:12:44 -0800 (PST) X-Google-Smtp-Source: APXvYqxTJH5SA3fe8QAEzL29ciROHFyN3zU3Fi4M6fp77QL0tF0/UnHDFahXlLgvuujaCUbQPRN9pw== X-Received: by 2002:adf:f18b:: with SMTP id h11mr4779023wro.56.1575475964785; Wed, 04 Dec 2019 08:12:44 -0800 (PST) Received: from vitty.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id f1sm8745843wrp.93.2019.12.04.08.12.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2019 08:12:44 -0800 (PST) From: Vitaly Kuznetsov To: Peter Xu , kvm@vger.kernel.org Cc: Nitesh Narayan Lal , Paolo Bonzini , Sean Christopherson , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 6/6] KVM: X86: Conert the last users of "shorthand = 0" to use macros In-Reply-To: <20191203165903.22917-7-peterx@redhat.com> References: <20191203165903.22917-1-peterx@redhat.com> <20191203165903.22917-7-peterx@redhat.com> Date: Wed, 04 Dec 2019 17:12:43 +0100 Message-ID: <875ziwt6h0.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 X-MC-Unique: xhApEHU3NRav-i6UB4POgA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Peter Xu writes: > Change the last users of "shorthand =3D 0" to use APIC_DEST_NOSHORT. > > Signed-off-by: Peter Xu > --- > arch/x86/kvm/ioapic.c | 4 ++-- > arch/x86/kvm/irq_comm.c | 2 +- > arch/x86/kvm/x86.c | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c > index f53daeaaeb37..77538fd77dc2 100644 > --- a/arch/x86/kvm/ioapic.c > +++ b/arch/x86/kvm/ioapic.c > @@ -330,7 +330,7 @@ static void ioapic_write_indirect(struct kvm_ioapic *= ioapic, u32 val) > =09=09if (e->fields.delivery_mode =3D=3D APIC_DM_FIXED) { > =09=09=09struct kvm_lapic_irq irq; > =20 > -=09=09=09irq.shorthand =3D 0; > +=09=09=09irq.shorthand =3D APIC_DEST_NOSHORT; > =09=09=09irq.vector =3D e->fields.vector; > =09=09=09irq.delivery_mode =3D e->fields.delivery_mode << 8; > =09=09=09irq.dest_id =3D e->fields.dest_id; > @@ -379,7 +379,7 @@ static int ioapic_service(struct kvm_ioapic *ioapic, = int irq, bool line_status) > =09irqe.trig_mode =3D entry->fields.trig_mode; > =09irqe.delivery_mode =3D entry->fields.delivery_mode << 8; > =09irqe.level =3D 1; > -=09irqe.shorthand =3D 0; > +=09irqe.shorthand =3D APIC_DEST_NOSHORT; > =09irqe.msi_redir_hint =3D false; > =20 > =09if (irqe.trig_mode =3D=3D IOAPIC_EDGE_TRIG) > diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c > index 7d083f71fc8e..9d711c2451c7 100644 > --- a/arch/x86/kvm/irq_comm.c > +++ b/arch/x86/kvm/irq_comm.c > @@ -121,7 +121,7 @@ void kvm_set_msi_irq(struct kvm *kvm, struct kvm_kern= el_irq_routing_entry *e, > =09irq->msi_redir_hint =3D ((e->msi.address_lo > =09=09& MSI_ADDR_REDIRECTION_LOWPRI) > 0); > =09irq->level =3D 1; > -=09irq->shorthand =3D 0; > +=09irq->shorthand =3D APIC_DEST_NOSHORT; > } > EXPORT_SYMBOL_GPL(kvm_set_msi_irq); > =20 > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 3b00d662dc14..f6d778436e15 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -7355,7 +7355,7 @@ static void kvm_pv_kick_cpu_op(struct kvm *kvm, uns= igned long flags, int apicid) > { > =09struct kvm_lapic_irq lapic_irq; > =20 > -=09lapic_irq.shorthand =3D 0; > +=09lapic_irq.shorthand =3D APIC_DEST_NOSHORT; > =09lapic_irq.dest_mode =3D APIC_DEST_PHYSICAL; > =09lapic_irq.level =3D 0; > =09lapic_irq.dest_id =3D apicid; Reviewed-by: Vitaly Kuznetsov And, while on it, and if you're not yet tired I just noticed that kvm_apic_match_dest()'s parameter is called 'short_hand' while everywhere else we use 'shorthand'. Value the consistency we should :-) --=20 Vitaly