diff mbox

[v4,6/7] drivers:hv: Define the channel type for Hyper-V PCI Express pass-through

Message ID 1446162376-43419-7-git-send-email-jakeo@microsoft.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Jake Oshins Oct. 29, 2015, 11:46 p.m. UTC
From: Jake Oshins <jakeo@microsoft.com>

This defines the channel type for PCI front-ends in Hyper-V VMs.

Signed-off-by: Jake Oshins <jakeo@microsoft.com>
---
 include/linux/hyperv.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Andy Shevchenko Oct. 30, 2015, 12:44 a.m. UTC | #1
On Fri, Oct 30, 2015 at 1:46 AM,  <jakeo@microsoft.com> wrote:
> From: Jake Oshins <jakeo@microsoft.com>
>
> This defines the channel type for PCI front-ends in Hyper-V VMs.
>
> Signed-off-by: Jake Oshins <jakeo@microsoft.com>
> ---
>  include/linux/hyperv.h | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
> index ea0a0e3..5587899 100644
> --- a/include/linux/hyperv.h
> +++ b/include/linux/hyperv.h
> @@ -1140,6 +1140,17 @@ u64 hv_do_hypercall(u64 control, void *input, void *output);
>                 }
>
>  /*
> + * PCI Express Pass Through
> + * {44C4F61D-4444-4400-9D52-802E27EDE19F}
> + */
> +
> +#define HV_PCIE_GUID \
> +       .guid = { \
> +                       0x1D, 0xF6, 0xC4, 0x44, 0x44, 0x44, 0x00, 0x44, \
> +                       0x9D, 0x52, 0x80, 0x2E, 0x27, 0xED, 0xE1, 0x9F \
> +               }

What about
#include <linux/uuid.h>

UUID_LE(...)

And you may use uuid_le type instead of custom raw buffer.

> +
> +/*
>   * Common header for Hyper-V ICs
>   */
>
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
Jake Oshins Oct. 30, 2015, 3:57 p.m. UTC | #2
> -----Original Message-----

> From: Andy Shevchenko [mailto:andy.shevchenko@gmail.com]

> Sent: Thursday, October 29, 2015 5:45 PM

> To: Jake Oshins <jakeo@microsoft.com>

> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; KY Srinivasan

> <kys@microsoft.com>; linux-kernel@vger.kernel.org;

> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com; Vitaly

> Kuznetsov <vkuznets@redhat.com>; tglx@redhat.com; Haiyang Zhang

> <haiyangz@microsoft.com>; marc.zyngier@arm.com; Jiang Liu

> <jiang.liu@linux.intel.com>; Bjorn Helgaas <bhelgaas@google.com>; linux-

> pci@vger.kernel.org

> Subject: Re: [PATCH v4 6/7] drivers:hv: Define the channel type for Hyper-V

> PCI Express pass-through

> 

> >

> >  /*

> > + * PCI Express Pass Through

> > + * {44C4F61D-4444-4400-9D52-802E27EDE19F}

> > + */

> > +

> > +#define HV_PCIE_GUID \

> > +       .guid = { \

> > +                       0x1D, 0xF6, 0xC4, 0x44, 0x44, 0x44, 0x00, 0x44, \

> > +                       0x9D, 0x52, 0x80, 0x2E, 0x27, 0xED, 0xE1, 0x9F \

> > +               }

> 

> What about

> #include <linux/uuid.h>

> 

> UUID_LE(...)

> 

> And you may use uuid_le type instead of custom raw buffer.

> 


Thanks.  I was just following the form of all the others in this file.  I think that this was done to match up with the representation that's coming across the VM boundary from Windows.

I do very much appreciate the feedback, though,
Jake Oshins
Andy Shevchenko Oct. 30, 2015, 4:52 p.m. UTC | #3
On Fri, Oct 30, 2015 at 5:57 PM, Jake Oshins <jakeo@microsoft.com> wrote:

>> > + * PCI Express Pass Through
>> > + * {44C4F61D-4444-4400-9D52-802E27EDE19F}
>> > + */
>> > +
>> > +#define HV_PCIE_GUID \
>> > +       .guid = { \
>> > +                       0x1D, 0xF6, 0xC4, 0x44, 0x44, 0x44, 0x00, 0x44, \
>> > +                       0x9D, 0x52, 0x80, 0x2E, 0x27, 0xED, 0xE1, 0x9F \
>> > +               }
>>
>> What about
>> #include <linux/uuid.h>
>>
>> UUID_LE(...)
>>
>> And you may use uuid_le type instead of custom raw buffer.
>>
>
> Thanks.  I was just following the form of all the others in this file.  I think that this was done to match up with the representation that's coming across the VM boundary from Windows.

Perhaps a separate patch to move to uuid.h then?
KY Srinivasan Oct. 30, 2015, 4:56 p.m. UTC | #4
> -----Original Message-----

> From: Andy Shevchenko [mailto:andy.shevchenko@gmail.com]

> Sent: Friday, October 30, 2015 9:52 AM

> To: Jake Oshins <jakeo@microsoft.com>

> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; KY Srinivasan

> <kys@microsoft.com>; linux-kernel@vger.kernel.org;

> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com; Vitaly

> Kuznetsov <vkuznets@redhat.com>; tglx@redhat.com; Haiyang Zhang

> <haiyangz@microsoft.com>; marc.zyngier@arm.com; Jiang Liu

> <jiang.liu@linux.intel.com>; Bjorn Helgaas <bhelgaas@google.com>; linux-

> pci@vger.kernel.org

> Subject: Re: [PATCH v4 6/7] drivers:hv: Define the channel type for Hyper-V

> PCI Express pass-through

> 

> On Fri, Oct 30, 2015 at 5:57 PM, Jake Oshins <jakeo@microsoft.com> wrote:

> 

> >> > + * PCI Express Pass Through

> >> > + * {44C4F61D-4444-4400-9D52-802E27EDE19F}

> >> > + */

> >> > +

> >> > +#define HV_PCIE_GUID \

> >> > +       .guid = { \

> >> > +                       0x1D, 0xF6, 0xC4, 0x44, 0x44, 0x44, 0x00, 0x44, \

> >> > +                       0x9D, 0x52, 0x80, 0x2E, 0x27, 0xED, 0xE1, 0x9F \

> >> > +               }

> >>

> >> What about

> >> #include <linux/uuid.h>

> >>

> >> UUID_LE(...)

> >>

> >> And you may use uuid_le type instead of custom raw buffer.

> >>

> >

> > Thanks.  I was just following the form of all the others in this file.  I think

> that this was done to match up with the representation that's coming across

> the VM boundary from Windows.

> 

> Perhaps a separate patch to move to uuid.h then?


Yes; I am about to send out a patch to use the UUID_LE macro for all of the Hyper-V guids.

Regards,

K. Y
> 

> --

> With Best Regards,

> Andy Shevchenko
Andy Shevchenko Oct. 30, 2015, 4:58 p.m. UTC | #5
On Fri, Oct 30, 2015 at 6:56 PM, KY Srinivasan <kys@microsoft.com> wrote:

>> >> What about
>> >> #include <linux/uuid.h>
>> >>
>> >> UUID_LE(...)
>> >>
>> >> And you may use uuid_le type instead of custom raw buffer.
>> >>
>> >
>> > Thanks.  I was just following the form of all the others in this file.  I think
>> that this was done to match up with the representation that's coming across
>> the VM boundary from Windows.
>>
>> Perhaps a separate patch to move to uuid.h then?
>
> Yes; I am about to send out a patch to use the UUID_LE macro for all of the Hyper-V guids.

And switching to struct uuid_le ?
KY Srinivasan Oct. 30, 2015, 5:30 p.m. UTC | #6
DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogQW5keSBTaGV2Y2hlbmtv
IFttYWlsdG86YW5keS5zaGV2Y2hlbmtvQGdtYWlsLmNvbV0NCj4gU2VudDogRnJpZGF5LCBPY3Rv
YmVyIDMwLCAyMDE1IDk6NTkgQU0NCj4gVG86IEtZIFNyaW5pdmFzYW4gPGt5c0BtaWNyb3NvZnQu
Y29tPg0KPiBDYzogSmFrZSBPc2hpbnMgPGpha2VvQG1pY3Jvc29mdC5jb20+OyBHcmVnIEtyb2Fo
LUhhcnRtYW4NCj4gPGdyZWdraEBsaW51eGZvdW5kYXRpb24ub3JnPjsgbGludXgta2VybmVsQHZn
ZXIua2VybmVsLm9yZzsNCj4gZGV2ZWxAbGludXhkcml2ZXJwcm9qZWN0Lm9yZzsgb2xhZkBhZXBm
bGUuZGU7IGFwd0BjYW5vbmljYWwuY29tOyBWaXRhbHkNCj4gS3V6bmV0c292IDx2a3V6bmV0c0By
ZWRoYXQuY29tPjsgdGdseEByZWRoYXQuY29tOyBIYWl5YW5nIFpoYW5nDQo+IDxoYWl5YW5nekBt
aWNyb3NvZnQuY29tPjsgbWFyYy56eW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byBzZW5kIG91dCBhIHBhdGNoIHRvIHVzZSB0aGUgVVVJRF9MRSBtYWNy
byBmb3IgYWxsIG9mIHRoZQ0KPiBIeXBlci1WIGd1aWRzLg0KPiANCj4gQW5kIHN3aXRjaGluZyB0
byBzdHJ1Y3QgdXVpZF9sZSA/DQoNClllcy4NCg0KSy4gWQ0KPiANCj4gLS0NCj4gV2l0aCBCZXN0
IFJlZ2FyZHMsDQo+IEFuZHkgU2hldmNoZW5rbw0K
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index ea0a0e3..5587899 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -1140,6 +1140,17 @@  u64 hv_do_hypercall(u64 control, void *input, void *output);
 		}
 
 /*
+ * PCI Express Pass Through
+ * {44C4F61D-4444-4400-9D52-802E27EDE19F}
+ */
+
+#define HV_PCIE_GUID \
+	.guid = { \
+			0x1D, 0xF6, 0xC4, 0x44, 0x44, 0x44, 0x00, 0x44, \
+			0x9D, 0x52, 0x80, 0x2E, 0x27, 0xED, 0xE1, 0x9F \
+		}
+
+/*
  * Common header for Hyper-V ICs
  */