linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio_mmio: add ACPI probing
@ 2015-07-28  9:44 Graeme Gregory
  2015-07-28 10:08 ` Michael S. Tsirkin
  2015-07-29 18:17 ` Michael S. Tsirkin
  0 siblings, 2 replies; 14+ messages in thread
From: Graeme Gregory @ 2015-07-28  9:44 UTC (permalink / raw)
  To: virtualization; +Cc: mst, linux-kernel, Graeme Gregory

Added the match table and pointers for ACPI probing to the driver.

This uses the same identifier for virt devices as being used for qemu
ARM64 ACPI support.

http://git.linaro.org/people/shannon.zhao/qemu.git/commit/d0bf1955a3ecbab4b51d46f8c5dda02b7e14a17e

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
---
 drivers/virtio/virtio_mmio.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 10189b5..f499d9d 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -58,6 +58,7 @@
 
 #define pr_fmt(fmt) "virtio-mmio: " fmt
 
+#include <linux/acpi.h>
 #include <linux/highmem.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
@@ -732,12 +733,21 @@ static struct of_device_id virtio_mmio_match[] = {
 };
 MODULE_DEVICE_TABLE(of, virtio_mmio_match);
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id virtio_mmio_acpi_match[] = {
+	{ "LNRO0005", },
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, virtio_mmio_acpi_match);
+#endif
+
 static struct platform_driver virtio_mmio_driver = {
 	.probe		= virtio_mmio_probe,
 	.remove		= virtio_mmio_remove,
 	.driver		= {
 		.name	= "virtio-mmio",
 		.of_match_table	= virtio_mmio_match,
+		.acpi_match_table = ACPI_PTR(virtio_mmio_acpi_match),
 	},
 };
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] virtio_mmio: add ACPI probing
  2015-07-28  9:44 [PATCH] virtio_mmio: add ACPI probing Graeme Gregory
@ 2015-07-28 10:08 ` Michael S. Tsirkin
  2015-07-28 10:12   ` Peter Maydell
  2015-07-29 18:17 ` Michael S. Tsirkin
  1 sibling, 1 reply; 14+ messages in thread
From: Michael S. Tsirkin @ 2015-07-28 10:08 UTC (permalink / raw)
  To: Graeme Gregory
  Cc: virtualization, linux-kernel, Shannon Zhao, Alex Bennée,
	Peter Maydell

On Tue, Jul 28, 2015 at 10:44:02AM +0100, Graeme Gregory wrote:
> Added the match table and pointers for ACPI probing to the driver.
> 
> This uses the same identifier for virt devices as being used for qemu
> ARM64 ACPI support.
> 
> http://git.linaro.org/people/shannon.zhao/qemu.git/commit/d0bf1955a3ecbab4b51d46f8c5dda02b7e14a17e
> 
> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
> ---
>  drivers/virtio/virtio_mmio.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
> index 10189b5..f499d9d 100644
> --- a/drivers/virtio/virtio_mmio.c
> +++ b/drivers/virtio/virtio_mmio.c
> @@ -58,6 +58,7 @@
>  
>  #define pr_fmt(fmt) "virtio-mmio: " fmt
>  
> +#include <linux/acpi.h>
>  #include <linux/highmem.h>
>  #include <linux/interrupt.h>
>  #include <linux/io.h>
> @@ -732,12 +733,21 @@ static struct of_device_id virtio_mmio_match[] = {
>  };
>  MODULE_DEVICE_TABLE(of, virtio_mmio_match);
>  
> +#ifdef CONFIG_ACPI
> +static const struct acpi_device_id virtio_mmio_acpi_match[] = {
> +	{ "LNRO0005", },
> +	{ }
> +};

Hmm - we have reserved QEMUXXXX in ASWG explicitly for this purpose.

Pater - do you think it's a good idea to change this before QEMU 2.4
is released?

> +MODULE_DEVICE_TABLE(acpi, virtio_mmio_acpi_match);
> +#endif
> +
>  static struct platform_driver virtio_mmio_driver = {
>  	.probe		= virtio_mmio_probe,
>  	.remove		= virtio_mmio_remove,
>  	.driver		= {
>  		.name	= "virtio-mmio",
>  		.of_match_table	= virtio_mmio_match,
> +		.acpi_match_table = ACPI_PTR(virtio_mmio_acpi_match),
>  	},
>  };
>  
> -- 
> 2.1.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] virtio_mmio: add ACPI probing
  2015-07-28 10:08 ` Michael S. Tsirkin
@ 2015-07-28 10:12   ` Peter Maydell
  2015-07-28 10:27     ` Michael S. Tsirkin
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Maydell @ 2015-07-28 10:12 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Graeme Gregory, virtualization, lkml - Kernel Mailing List,
	Shannon Zhao, Alex Bennée

On 28 July 2015 at 11:08, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Tue, Jul 28, 2015 at 10:44:02AM +0100, Graeme Gregory wrote:
>> Added the match table and pointers for ACPI probing to the driver.
>>
>> This uses the same identifier for virt devices as being used for qemu
>> ARM64 ACPI support.
>>
>> http://git.linaro.org/people/shannon.zhao/qemu.git/commit/d0bf1955a3ecbab4b51d46f8c5dda02b7e14a17e
>>
>> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
>> ---
>>  drivers/virtio/virtio_mmio.c | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
>> index 10189b5..f499d9d 100644
>> --- a/drivers/virtio/virtio_mmio.c
>> +++ b/drivers/virtio/virtio_mmio.c
>> @@ -58,6 +58,7 @@
>>
>>  #define pr_fmt(fmt) "virtio-mmio: " fmt
>>
>> +#include <linux/acpi.h>
>>  #include <linux/highmem.h>
>>  #include <linux/interrupt.h>
>>  #include <linux/io.h>
>> @@ -732,12 +733,21 @@ static struct of_device_id virtio_mmio_match[] = {
>>  };
>>  MODULE_DEVICE_TABLE(of, virtio_mmio_match);
>>
>> +#ifdef CONFIG_ACPI
>> +static const struct acpi_device_id virtio_mmio_acpi_match[] = {
>> +     { "LNRO0005", },
>> +     { }
>> +};
>
> Hmm - we have reserved QEMUXXXX in ASWG explicitly for this purpose.
>
> Pater - do you think it's a good idea to change this before QEMU 2.4
> is released?

Shannon's call, I guess. I don't know enough about ACPI to say.
I thought these ACPI IDs were already fixed because they were
what the kernel was looking for...

-- PMM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] virtio_mmio: add ACPI probing
  2015-07-28 10:12   ` Peter Maydell
@ 2015-07-28 10:27     ` Michael S. Tsirkin
  2015-07-28 10:33       ` G Gregory
  2015-07-28 20:12       ` Peter Maydell
  0 siblings, 2 replies; 14+ messages in thread
From: Michael S. Tsirkin @ 2015-07-28 10:27 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Graeme Gregory, virtualization, lkml - Kernel Mailing List,
	Shannon Zhao, Alex Bennée

On Tue, Jul 28, 2015 at 11:12:33AM +0100, Peter Maydell wrote:
> On 28 July 2015 at 11:08, Michael S. Tsirkin <mst@redhat.com> wrote:
> > On Tue, Jul 28, 2015 at 10:44:02AM +0100, Graeme Gregory wrote:
> >> Added the match table and pointers for ACPI probing to the driver.
> >>
> >> This uses the same identifier for virt devices as being used for qemu
> >> ARM64 ACPI support.
> >>
> >> http://git.linaro.org/people/shannon.zhao/qemu.git/commit/d0bf1955a3ecbab4b51d46f8c5dda02b7e14a17e
> >>
> >> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
> >> ---
> >>  drivers/virtio/virtio_mmio.c | 10 ++++++++++
> >>  1 file changed, 10 insertions(+)
> >>
> >> diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
> >> index 10189b5..f499d9d 100644
> >> --- a/drivers/virtio/virtio_mmio.c
> >> +++ b/drivers/virtio/virtio_mmio.c
> >> @@ -58,6 +58,7 @@
> >>
> >>  #define pr_fmt(fmt) "virtio-mmio: " fmt
> >>
> >> +#include <linux/acpi.h>
> >>  #include <linux/highmem.h>
> >>  #include <linux/interrupt.h>
> >>  #include <linux/io.h>
> >> @@ -732,12 +733,21 @@ static struct of_device_id virtio_mmio_match[] = {
> >>  };
> >>  MODULE_DEVICE_TABLE(of, virtio_mmio_match);
> >>
> >> +#ifdef CONFIG_ACPI
> >> +static const struct acpi_device_id virtio_mmio_acpi_match[] = {
> >> +     { "LNRO0005", },
> >> +     { }
> >> +};
> >
> > Hmm - we have reserved QEMUXXXX in ASWG explicitly for this purpose.
> >
> > Pater - do you think it's a good idea to change this before QEMU 2.4
> > is released?
> 
> Shannon's call, I guess. I don't know enough about ACPI to say.
> I thought these ACPI IDs were already fixed because they were
> what the kernel was looking for...
> 
> -- PMM

Apparently not :)

-- 
MST

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] virtio_mmio: add ACPI probing
  2015-07-28 10:27     ` Michael S. Tsirkin
@ 2015-07-28 10:33       ` G Gregory
  2015-07-29 17:52         ` Peter Maydell
  2015-07-28 20:12       ` Peter Maydell
  1 sibling, 1 reply; 14+ messages in thread
From: G Gregory @ 2015-07-28 10:33 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Peter Maydell, virtualization, lkml - Kernel Mailing List,
	Shannon Zhao, Alex Bennée

On 28 July 2015 at 11:27, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Tue, Jul 28, 2015 at 11:12:33AM +0100, Peter Maydell wrote:
>> On 28 July 2015 at 11:08, Michael S. Tsirkin <mst@redhat.com> wrote:
>> > On Tue, Jul 28, 2015 at 10:44:02AM +0100, Graeme Gregory wrote:
>> >> Added the match table and pointers for ACPI probing to the driver.
>> >>
>> >> This uses the same identifier for virt devices as being used for qemu
>> >> ARM64 ACPI support.
>> >>
>> >> http://git.linaro.org/people/shannon.zhao/qemu.git/commit/d0bf1955a3ecbab4b51d46f8c5dda02b7e14a17e
>> >>
>> >> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
>> >> ---
>> >>  drivers/virtio/virtio_mmio.c | 10 ++++++++++
>> >>  1 file changed, 10 insertions(+)
>> >>
>> >> diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
>> >> index 10189b5..f499d9d 100644
>> >> --- a/drivers/virtio/virtio_mmio.c
>> >> +++ b/drivers/virtio/virtio_mmio.c
>> >> @@ -58,6 +58,7 @@
>> >>
>> >>  #define pr_fmt(fmt) "virtio-mmio: " fmt
>> >>
>> >> +#include <linux/acpi.h>
>> >>  #include <linux/highmem.h>
>> >>  #include <linux/interrupt.h>
>> >>  #include <linux/io.h>
>> >> @@ -732,12 +733,21 @@ static struct of_device_id virtio_mmio_match[] = {
>> >>  };
>> >>  MODULE_DEVICE_TABLE(of, virtio_mmio_match);
>> >>
>> >> +#ifdef CONFIG_ACPI
>> >> +static const struct acpi_device_id virtio_mmio_acpi_match[] = {
>> >> +     { "LNRO0005", },
>> >> +     { }
>> >> +};
>> >
>> > Hmm - we have reserved QEMUXXXX in ASWG explicitly for this purpose.
>> >
>> > Pater - do you think it's a good idea to change this before QEMU 2.4
>> > is released?
>>
>> Shannon's call, I guess. I don't know enough about ACPI to say.
>> I thought these ACPI IDs were already fixed because they were
>> what the kernel was looking for...
>>
>> -- PMM
>
> Apparently not :)
>
We assigned LNRO in ASWG to avoid collisions with our prototypes/real
platforms so it makes sense to me to switch to QEMUXXXX.

I will submit a new patch if Shannon wants to switch to that form.

Graeme

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] virtio_mmio: add ACPI probing
  2015-07-28 10:27     ` Michael S. Tsirkin
  2015-07-28 10:33       ` G Gregory
@ 2015-07-28 20:12       ` Peter Maydell
  2015-07-28 20:28         ` G Gregory
  1 sibling, 1 reply; 14+ messages in thread
From: Peter Maydell @ 2015-07-28 20:12 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Graeme Gregory, virtualization, lkml - Kernel Mailing List,
	Shannon Zhao, Alex Bennée

On 28 July 2015 at 11:27, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Tue, Jul 28, 2015 at 11:12:33AM +0100, Peter Maydell wrote:
>> On 28 July 2015 at 11:08, Michael S. Tsirkin <mst@redhat.com> wrote:
>> > On Tue, Jul 28, 2015 at 10:44:02AM +0100, Graeme Gregory wrote:
>> >> Added the match table and pointers for ACPI probing to the driver.
>> >>
>> >> This uses the same identifier for virt devices as being used for qemu
>> >> ARM64 ACPI support.
>> >>
>> >> http://git.linaro.org/people/shannon.zhao/qemu.git/commit/d0bf1955a3ecbab4b51d46f8c5dda02b7e14a17e
>> >>
>> >> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>

>> >> +#ifdef CONFIG_ACPI
>> >> +static const struct acpi_device_id virtio_mmio_acpi_match[] = {
>> >> +     { "LNRO0005", },
>> >> +     { }
>> >> +};
>> >
>> > Hmm - we have reserved QEMUXXXX in ASWG explicitly for this purpose.
>> >
>> > Pater - do you think it's a good idea to change this before QEMU 2.4
>> > is released?
>>
>> Shannon's call, I guess. I don't know enough about ACPI to say.
>> I thought these ACPI IDs were already fixed because they were
>> what the kernel was looking for...

> Apparently not :)

Mmm. I'm not terribly happy about stuff being in QEMU before the
ACPI spec for it has been finalised. We should not be picking
stuff randomly on the fly...

If we want to fix the ACPI IDs QEMU is using for 2.4 then we
really need to do that now (ie within the next day or two).

-- PMM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] virtio_mmio: add ACPI probing
  2015-07-28 20:12       ` Peter Maydell
@ 2015-07-28 20:28         ` G Gregory
  2015-07-28 21:10           ` Peter Maydell
  0 siblings, 1 reply; 14+ messages in thread
From: G Gregory @ 2015-07-28 20:28 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Michael S. Tsirkin, virtualization, lkml - Kernel Mailing List,
	Shannon Zhao, Alex Bennée

On 28 July 2015 at 21:12, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 28 July 2015 at 11:27, Michael S. Tsirkin <mst@redhat.com> wrote:
>> On Tue, Jul 28, 2015 at 11:12:33AM +0100, Peter Maydell wrote:
>>> On 28 July 2015 at 11:08, Michael S. Tsirkin <mst@redhat.com> wrote:
>>> > On Tue, Jul 28, 2015 at 10:44:02AM +0100, Graeme Gregory wrote:
>>> >> Added the match table and pointers for ACPI probing to the driver.
>>> >>
>>> >> This uses the same identifier for virt devices as being used for qemu
>>> >> ARM64 ACPI support.
>>> >>
>>> >> http://git.linaro.org/people/shannon.zhao/qemu.git/commit/d0bf1955a3ecbab4b51d46f8c5dda02b7e14a17e
>>> >>
>>> >> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
>
>>> >> +#ifdef CONFIG_ACPI
>>> >> +static const struct acpi_device_id virtio_mmio_acpi_match[] = {
>>> >> +     { "LNRO0005", },
>>> >> +     { }
>>> >> +};
>>> >
>>> > Hmm - we have reserved QEMUXXXX in ASWG explicitly for this purpose.
>>> >
>>> > Pater - do you think it's a good idea to change this before QEMU 2.4
>>> > is released?
>>>
>>> Shannon's call, I guess. I don't know enough about ACPI to say.
>>> I thought these ACPI IDs were already fixed because they were
>>> what the kernel was looking for...
>
>> Apparently not :)
>
> Mmm. I'm not terribly happy about stuff being in QEMU before the
> ACPI spec for it has been finalised. We should not be picking
> stuff randomly on the fly...
>
> If we want to fix the ACPI IDs QEMU is using for 2.4 then we
> really need to do that now (ie within the next day or two).
>
It is upto the owner of the QEMU prefix to allocate numbers. This is
not an issue for ACPI spec at all.

Graeme

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] virtio_mmio: add ACPI probing
  2015-07-28 20:28         ` G Gregory
@ 2015-07-28 21:10           ` Peter Maydell
  2015-07-29  2:01             ` Shannon Zhao
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Maydell @ 2015-07-28 21:10 UTC (permalink / raw)
  To: G Gregory
  Cc: Michael S. Tsirkin, virtualization, lkml - Kernel Mailing List,
	Shannon Zhao, Alex Bennée

On 28 July 2015 at 21:28, G Gregory <graeme.gregory@linaro.org> wrote:
> On 28 July 2015 at 21:12, Peter Maydell <peter.maydell@linaro.org> wrote:
>> Mmm. I'm not terribly happy about stuff being in QEMU before the
>> ACPI spec for it has been finalised. We should not be picking
>> stuff randomly on the fly...
>>
>> If we want to fix the ACPI IDs QEMU is using for 2.4 then we
>> really need to do that now (ie within the next day or two).
>>
> It is upto the owner of the QEMU prefix to allocate numbers. This is
> not an issue for ACPI spec at all.

I mean "the specification for how this device should be advertised
in an ACPI table". I don't care whether that's an official ACPI
consortium thing or something less official. The table is
constructed by QEMU and read by the kernel (and possibly
also by UEFI?), so everybody needs to agree on what the
string is...

thanks
-- PMM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] virtio_mmio: add ACPI probing
  2015-07-28 21:10           ` Peter Maydell
@ 2015-07-29  2:01             ` Shannon Zhao
  2015-07-29 10:01               ` Michael S. Tsirkin
  0 siblings, 1 reply; 14+ messages in thread
From: Shannon Zhao @ 2015-07-29  2:01 UTC (permalink / raw)
  To: Peter Maydell, G Gregory
  Cc: Michael S. Tsirkin, virtualization, lkml - Kernel Mailing List,
	Alex Bennée



On 2015/7/29 5:10, Peter Maydell wrote:
> On 28 July 2015 at 21:28, G Gregory <graeme.gregory@linaro.org> wrote:
>> > On 28 July 2015 at 21:12, Peter Maydell <peter.maydell@linaro.org> wrote:
>>> >> Mmm. I'm not terribly happy about stuff being in QEMU before the
>>> >> ACPI spec for it has been finalised. We should not be picking
>>> >> stuff randomly on the fly...
>>> >>
>>> >> If we want to fix the ACPI IDs QEMU is using for 2.4 then we
>>> >> really need to do that now (ie within the next day or two).
>>> >>
>> > It is upto the owner of the QEMU prefix to allocate numbers. This is
>> > not an issue for ACPI spec at all.
> I mean "the specification for how this device should be advertised
> in an ACPI table". I don't care whether that's an official ACPI
> consortium thing or something less official. The table is
> constructed by QEMU and read by the kernel (and possibly
> also by UEFI?), so everybody needs to agree on what the
> string is...

I agree with Peter. Maybe we should record these IDs at some place.
Since QEMU is owner of this device and we register QEMU in ASWG, the
official ID can be assigned by QEMU and the ID could(or should) be
"QEMUXXXX". But what's the exact ID for this virtio-mmio? That's what we
need to agree on and record.

P.S. I don't see "QEMU" in the list of approved Vendor IDs for ACPI.
http://www.uefi.org/sites/default/files/resources/PNPID_List.pdf
http://www.uefi.org/sites/default/files/resources/ACPIID_List.pdf

-- 
Shannon

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] virtio_mmio: add ACPI probing
  2015-07-29  2:01             ` Shannon Zhao
@ 2015-07-29 10:01               ` Michael S. Tsirkin
  0 siblings, 0 replies; 14+ messages in thread
From: Michael S. Tsirkin @ 2015-07-29 10:01 UTC (permalink / raw)
  To: Shannon Zhao
  Cc: Peter Maydell, G Gregory, virtualization,
	lkml - Kernel Mailing List, Alex Bennée

On Wed, Jul 29, 2015 at 10:01:35AM +0800, Shannon Zhao wrote:
> 
> 
> On 2015/7/29 5:10, Peter Maydell wrote:
> > On 28 July 2015 at 21:28, G Gregory <graeme.gregory@linaro.org> wrote:
> >> > On 28 July 2015 at 21:12, Peter Maydell <peter.maydell@linaro.org> wrote:
> >>> >> Mmm. I'm not terribly happy about stuff being in QEMU before the
> >>> >> ACPI spec for it has been finalised. We should not be picking
> >>> >> stuff randomly on the fly...
> >>> >>
> >>> >> If we want to fix the ACPI IDs QEMU is using for 2.4 then we
> >>> >> really need to do that now (ie within the next day or two).
> >>> >>
> >> > It is upto the owner of the QEMU prefix to allocate numbers. This is
> >> > not an issue for ACPI spec at all.
> > I mean "the specification for how this device should be advertised
> > in an ACPI table". I don't care whether that's an official ACPI
> > consortium thing or something less official. The table is
> > constructed by QEMU and read by the kernel (and possibly
> > also by UEFI?), so everybody needs to agree on what the
> > string is...
> 
> I agree with Peter. Maybe we should record these IDs at some place.

Right. And it should apply even if you keep using LNRO.
Pls create docs/specs/acpi_ids.txt and list them there.

For simplicity, I'd just replace LNRO with QEMU.

> Since QEMU is owner of this device and we register QEMU in ASWG, the
> official ID can be assigned by QEMU and the ID could(or should) be
> "QEMUXXXX". But what's the exact ID for this virtio-mmio? That's what we
> need to agree on and record.

So far we only had PVPANIC with ACPI ID QEMU0001.

> P.S. I don't see "QEMU" in the list of approved Vendor IDs for ACPI.
> http://www.uefi.org/sites/default/files/resources/PNPID_List.pdf
> http://www.uefi.org/sites/default/files/resources/ACPIID_List.pdf

Should appear there any day now.

> -- 
> Shannon

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] virtio_mmio: add ACPI probing
  2015-07-28 10:33       ` G Gregory
@ 2015-07-29 17:52         ` Peter Maydell
  2015-07-29 18:03           ` Michael S. Tsirkin
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Maydell @ 2015-07-29 17:52 UTC (permalink / raw)
  To: G Gregory
  Cc: Michael S. Tsirkin, virtualization, lkml - Kernel Mailing List,
	Shannon Zhao, Alex Bennée

On 28 July 2015 at 11:33, G Gregory <graeme.gregory@linaro.org> wrote:
> We assigned LNRO in ASWG to avoid collisions with our prototypes/real
> platforms so it makes sense to me to switch to QEMUXXXX.

So just to check, if we switch virtio-mmio from an LNRO0005 ID
to a QEMUxxxx ID we aren't going to break any existing widely
shipped or deployed code, right?

If we can change the ID without breaking anything significant
then I think the QEMU ID makes more sense; but it doesn't
really gain us much beyond tidiness.

PS: https://www.kernel.org/doc/Documentation/arm64/arm-acpi.txt
uses virtio-mmio and LNRO0005 as its code example, so if
we change this then it might be nice to update the docs
as a followup.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] virtio_mmio: add ACPI probing
  2015-07-29 17:52         ` Peter Maydell
@ 2015-07-29 18:03           ` Michael S. Tsirkin
  0 siblings, 0 replies; 14+ messages in thread
From: Michael S. Tsirkin @ 2015-07-29 18:03 UTC (permalink / raw)
  To: Peter Maydell
  Cc: G Gregory, virtualization, lkml - Kernel Mailing List,
	Shannon Zhao, Alex Bennée

On Wed, Jul 29, 2015 at 06:52:29PM +0100, Peter Maydell wrote:
> On 28 July 2015 at 11:33, G Gregory <graeme.gregory@linaro.org> wrote:
> > We assigned LNRO in ASWG to avoid collisions with our prototypes/real
> > platforms so it makes sense to me to switch to QEMUXXXX.
> 
> So just to check, if we switch virtio-mmio from an LNRO0005 ID
> to a QEMUxxxx ID we aren't going to break any existing widely
> shipped or deployed code, right?
> 
> If we can change the ID without breaking anything significant
> then I think the QEMU ID makes more sense; but it doesn't
> really gain us much beyond tidiness.
> 
> PS: https://www.kernel.org/doc/Documentation/arm64/arm-acpi.txt
> uses virtio-mmio and LNRO0005 as its code example, so if
> we change this then it might be nice to update the docs
> as a followup.
> 
> thanks
> -- PMM

So this is the proposed patch. I agree it's merely about tidyness.
Pls ack or nack - we need to decide before 2.4 is out.

-->

arm: change vendor ID for virtio-mmio

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

---

diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index f365140..d10bd69 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -145,7 +145,7 @@ static void acpi_dsdt_add_virtio(Aml *scope,
 
     for (i = 0; i < num; i++) {
         Aml *dev = aml_device("VR%02u", i);
-        aml_append(dev, aml_name_decl("_HID", aml_string("LNRO0005")));
+        aml_append(dev, aml_name_decl("_HID", aml_string("QEMU0005")));
         aml_append(dev, aml_name_decl("_UID", aml_int(i)));
 
         Aml *crs = aml_resource_template();

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] virtio_mmio: add ACPI probing
  2015-07-28  9:44 [PATCH] virtio_mmio: add ACPI probing Graeme Gregory
  2015-07-28 10:08 ` Michael S. Tsirkin
@ 2015-07-29 18:17 ` Michael S. Tsirkin
  2015-08-27 14:55   ` Graeme Gregory
  1 sibling, 1 reply; 14+ messages in thread
From: Michael S. Tsirkin @ 2015-07-29 18:17 UTC (permalink / raw)
  To: Graeme Gregory; +Cc: virtualization, linux-kernel

On Tue, Jul 28, 2015 at 10:44:02AM +0100, Graeme Gregory wrote:
> Added the match table and pointers for ACPI probing to the driver.
> 
> This uses the same identifier for virt devices as being used for qemu
> ARM64 ACPI support.
> 
> http://git.linaro.org/people/shannon.zhao/qemu.git/commit/d0bf1955a3ecbab4b51d46f8c5dda02b7e14a17e
> 
> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>

To summarize, let's wait a bit with this until QEMU 2.4
with the relevant code is out, to make sure ID does not
change.

> ---
>  drivers/virtio/virtio_mmio.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
> index 10189b5..f499d9d 100644
> --- a/drivers/virtio/virtio_mmio.c
> +++ b/drivers/virtio/virtio_mmio.c
> @@ -58,6 +58,7 @@
>  
>  #define pr_fmt(fmt) "virtio-mmio: " fmt
>  
> +#include <linux/acpi.h>
>  #include <linux/highmem.h>
>  #include <linux/interrupt.h>
>  #include <linux/io.h>
> @@ -732,12 +733,21 @@ static struct of_device_id virtio_mmio_match[] = {
>  };
>  MODULE_DEVICE_TABLE(of, virtio_mmio_match);
>  
> +#ifdef CONFIG_ACPI
> +static const struct acpi_device_id virtio_mmio_acpi_match[] = {
> +	{ "LNRO0005", },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(acpi, virtio_mmio_acpi_match);
> +#endif
> +
>  static struct platform_driver virtio_mmio_driver = {
>  	.probe		= virtio_mmio_probe,
>  	.remove		= virtio_mmio_remove,
>  	.driver		= {
>  		.name	= "virtio-mmio",
>  		.of_match_table	= virtio_mmio_match,
> +		.acpi_match_table = ACPI_PTR(virtio_mmio_acpi_match),
>  	},
>  };
>  
> -- 
> 2.1.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] virtio_mmio: add ACPI probing
  2015-07-29 18:17 ` Michael S. Tsirkin
@ 2015-08-27 14:55   ` Graeme Gregory
  0 siblings, 0 replies; 14+ messages in thread
From: Graeme Gregory @ 2015-08-27 14:55 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: virtualization, linux-kernel

On Wed, Jul 29, 2015 at 09:17:08PM +0300, Michael S. Tsirkin wrote:
> On Tue, Jul 28, 2015 at 10:44:02AM +0100, Graeme Gregory wrote:
> > Added the match table and pointers for ACPI probing to the driver.
> > 
> > This uses the same identifier for virt devices as being used for qemu
> > ARM64 ACPI support.
> > 
> > http://git.linaro.org/people/shannon.zhao/qemu.git/commit/d0bf1955a3ecbab4b51d46f8c5dda02b7e14a17e
> > 
> > Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
> 
> To summarize, let's wait a bit with this until QEMU 2.4
> with the relevant code is out, to make sure ID does not
> change.
> 

It seems qemu 2.4 released with the LNRO0005 identifier.

Graeme

> > ---
> >  drivers/virtio/virtio_mmio.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
> > index 10189b5..f499d9d 100644
> > --- a/drivers/virtio/virtio_mmio.c
> > +++ b/drivers/virtio/virtio_mmio.c
> > @@ -58,6 +58,7 @@
> >  
> >  #define pr_fmt(fmt) "virtio-mmio: " fmt
> >  
> > +#include <linux/acpi.h>
> >  #include <linux/highmem.h>
> >  #include <linux/interrupt.h>
> >  #include <linux/io.h>
> > @@ -732,12 +733,21 @@ static struct of_device_id virtio_mmio_match[] = {
> >  };
> >  MODULE_DEVICE_TABLE(of, virtio_mmio_match);
> >  
> > +#ifdef CONFIG_ACPI
> > +static const struct acpi_device_id virtio_mmio_acpi_match[] = {
> > +	{ "LNRO0005", },
> > +	{ }
> > +};
> > +MODULE_DEVICE_TABLE(acpi, virtio_mmio_acpi_match);
> > +#endif
> > +
> >  static struct platform_driver virtio_mmio_driver = {
> >  	.probe		= virtio_mmio_probe,
> >  	.remove		= virtio_mmio_remove,
> >  	.driver		= {
> >  		.name	= "virtio-mmio",
> >  		.of_match_table	= virtio_mmio_match,
> > +		.acpi_match_table = ACPI_PTR(virtio_mmio_acpi_match),
> >  	},
> >  };
> >  
> > -- 
> > 2.1.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-08-27 14:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-28  9:44 [PATCH] virtio_mmio: add ACPI probing Graeme Gregory
2015-07-28 10:08 ` Michael S. Tsirkin
2015-07-28 10:12   ` Peter Maydell
2015-07-28 10:27     ` Michael S. Tsirkin
2015-07-28 10:33       ` G Gregory
2015-07-29 17:52         ` Peter Maydell
2015-07-29 18:03           ` Michael S. Tsirkin
2015-07-28 20:12       ` Peter Maydell
2015-07-28 20:28         ` G Gregory
2015-07-28 21:10           ` Peter Maydell
2015-07-29  2:01             ` Shannon Zhao
2015-07-29 10:01               ` Michael S. Tsirkin
2015-07-29 18:17 ` Michael S. Tsirkin
2015-08-27 14:55   ` Graeme Gregory

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).