lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 12 Jul 2021 19:13:39 +0000
From:   Sunil Muthuswamy <sunilmut@...rosoft.com>
To:     Michael Kelley <mikelley@...rosoft.com>,
        KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Wei Liu <liuwe@...rosoft.com>, Dexuan Cui <decui@...rosoft.com>
CC:     "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Rob Herring <robh@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>
Subject: RE: [PATCH 1/1] PCI: hv: Support for create interrupt v3

> > --- a/drivers/pci/controller/pci-hyperv.c
> > +++ b/drivers/pci/controller/pci-hyperv.c
> > @@ -64,6 +64,7 @@ enum pci_protocol_version_t {
> >  	PCI_PROTOCOL_VERSION_1_1 = PCI_MAKE_VERSION(1, 1),	/* Win10 */
> >  	PCI_PROTOCOL_VERSION_1_2 = PCI_MAKE_VERSION(1, 2),	/* RS1 */
> >  	PCI_PROTOCOL_VERSION_1_3 = PCI_MAKE_VERSION(1, 3),	/* Vibranium */
> > +	PCI_PROTOCOL_VERSION_1_4 = PCI_MAKE_VERSION(1, 4),      /* Fe */
> 
> It would be better if we can avoid annotating with internal code names.
> Inside of MSFT we tend to forget over time, and people outside usually
> have no idea what they mean.
> 


Would you like me to just delete the 'Fe' comment or the previous ones as well?

> > @@ -235,6 +239,21 @@ struct hv_msi_desc2 {
> >  	u16	processor_array[32];
> >  } __packed;
> >
> > +/*
> > + * struct hv_msi_desc3 - 1.3 version of hv_msi_desc
> > + *	Everything is the same as in 'hv_msi_desc2' except that the size
> > + *	of the 'vector_count' field is larger to support bigger vector
> 
> Actually, it's the "vector" field that's bigger, not "vector_count".

Will update the comment, thanks.

> 
> > + *	values. For ex: LPI vectors on ARM.
> > + */
> > +struct hv_msi_desc3 {
> > +	u32	vector;
> > +	u8	delivery_mode;
> > +	u8	reserved;
> > +	u16	vector_count;
> > +	u16	processor_count;
> > +	u16	processor_array[32];
> > +} __packed;
> > +
> >  /**
> >   * struct tran_int_desc
> >   * @reserved:		unused, padding
> > @@ -383,6 +402,12 @@ struct pci_create_interrupt2 {
> >  	struct hv_msi_desc2 int_desc;
> >  } __packed;
> >
> > +struct pci_create_interrupt3 {
> > +	struct pci_message message_type;
> > +	union win_slot_encoding wslot;
> > +	struct hv_msi_desc3 int_desc;
> > +} __packed;
> > +
> >  struct pci_delete_interrupt {
> >  	struct pci_message message_type;
> >  	union win_slot_encoding wslot;
> > @@ -1334,26 +1359,55 @@ static u32 hv_compose_msi_req_v1(
> >  	return sizeof(*int_pkt);
> >  }
> >
> > +static void hv_compose_msi_req_get_cpu(struct cpumask *affinity, int *cpu,
> > +				       u16 *count)
> > +{
> > +	/*
> > +	 * Create MSI w/ dummy vCPU set targeting just one vCPU, overwritten
> > +	 * by subsequent retarget in hv_irq_unmask().
> > +	 */
> > +	*cpu = cpumask_first_and(affinity, cpu_online_mask);
> > +	*count = 1;
> > +}
> > +
> >  static u32 hv_compose_msi_req_v2(
> >  	struct pci_create_interrupt2 *int_pkt, struct cpumask *affinity,
> >  	u32 slot, u8 vector)
> >  {
> >  	int cpu;
> > +	u16 cpu_count;
> >
> >  	int_pkt->message_type.type = PCI_CREATE_INTERRUPT_MESSAGE2;
> >  	int_pkt->wslot.slot = slot;
> >  	int_pkt->int_desc.vector = vector;
> >  	int_pkt->int_desc.vector_count = 1;
> >  	int_pkt->int_desc.delivery_mode = APIC_DELIVERY_MODE_FIXED;
> > -
> > -	/*
> > -	 * Create MSI w/ dummy vCPU set targeting just one vCPU, overwritten
> > -	 * by subsequent retarget in hv_irq_unmask().
> > -	 */
> >  	cpu = cpumask_first_and(affinity, cpu_online_mask);
> 
> Shouldn't this line be deleted since the new hv_compose_msi_req_get_cpu()
> function is doing the work?

Yes, this is fixed in v2 that I just sent out.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ