diff mbox

[Xen-devel,v2,26/41] arm : acpi add xen environment table

Message ID 1431893048-5214-27-git-send-email-parth.dixit@linaro.org
State New
Headers show

Commit Message

Parth Dixit May 17, 2015, 8:03 p.m. UTC
Xen environment table is ACPI table that is used to pass grant table
and event channel interrupt information to dom0.

Signed-off-by: Parth Dixit <parth.dixit@linaro.org>
---
 xen/include/acpi/actbl2.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

Parth Dixit May 24, 2015, 7:16 a.m. UTC | #1
On 21 May 2015 at 17:11, Julien Grall <julien.grall@citrix.com> wrote:

> On 21/05/15 12:38, Jan Beulich wrote:
> >>>> On 21.05.15 at 12:52, <julien.grall@citrix.com> wrote:
> >> On 21/05/15 11:46, Jan Beulich wrote:
> >>>>>> On 21.05.15 at 12:34, <julien.grall@citrix.com> wrote:
> >>>> On 21/05/15 07:22, Jan Beulich wrote:
> >>>>> The linked to document (on our wiki) is versioned 0.<something>,
> >>>>> which doesn't look like a final stable version. The same applies to
> >>>>> the other (STAO?) one.
> >>>>
> >>>> That's a mistake in the version number. Those tables has been reviewed
> >>>> by Citrix and Linaro people and we agreed about the final tables.
> >>>
> >>> And Citriy+Linaro are the standardizing body here? With no-one
> >>> else involved?
> >>
> >> The content of this table is handled by Xen Project and can be modified
> >> at our convenience during the review process.
> >
> > Now that reads as if the table contents and layout are _not_
> > stable yet.
>
> Sorry for been confusing.
>
> >>>>> Which seems superseded by 6.0's hypervisor vendor identification
> >>>>> in FADT. And the OEM IDs in various table headers could have
> >>>>> served such identification purposes too, as could have "OEMx"
> >>>>> tables.
> >>>>
> >>>> ACPI 6.0 has been released few months after Parth and Naresh began to
> >>>> implement ACPI for Xen. We could take advantage of this new field.
> >>>
> >>> If at all possible - yes please, in favor of any custom tables.
> >>
> >> It would still be necessary to expose the event channel, grant table
> >> region...
> >
> > Sure, but once you know you run on Xen you could retrieve it via
> > hypercall if there's no other means.
>
> Good point.
>
> ok, so to summarize we are going with hypercall based approach for
retreiving xen env. specific info instead of XENV table?
if yes, i'll remove xenv table and add a new patch for hypercall, please
confirm.

> Regards,
>
> --
> Julien Grall
>
Parth Dixit July 5, 2015, 1:19 p.m. UTC | #2
+shannon

On 29 May 2015 at 16:13, Jan Beulich <JBeulich@suse.com> wrote:
>>>> On 29.05.15 at 12:31, <stefano.stabellini@eu.citrix.com> wrote:
>> On Thu, 28 May 2015, Jan Beulich wrote:
>>> >>> On 28.05.15 at 14:12, <stefano.stabellini@eu.citrix.com> wrote:
>>> > Could you please make a concrete suggestion with table names and fields?
>>>
>>> I already pointed you at 6.0's new FADT field "Hypervisor Vendor
>>> Identity".
>>
>> OK, that is a decent alternative.
>>
>> We don't have a suitable hypercall to retrieve the evtchn PPI but we
>> could add one. Overall I still prefer the table approach, but if you
>> really don't want it, I can live with the hypercalls.
>
> I'm clearly not in the position to force any design decision onto the
> ARM side of Xen. But I continue to be of the opinion that custom
> tables should be a last resort approach only, which isn't warranted
> here (anymore).
>
> Jan
>
diff mbox

Patch

diff --git a/xen/include/acpi/actbl2.h b/xen/include/acpi/actbl2.h
index 9c8d807..fc3ec2d 100644
--- a/xen/include/acpi/actbl2.h
+++ b/xen/include/acpi/actbl2.h
@@ -80,6 +80,7 @@ 
 #define ACPI_SIG_WDDT           "WDDT"	/* Watchdog Timer Description Table */
 #define ACPI_SIG_WDRT           "WDRT"	/* Watchdog Resource Table */
 #define ACPI_SIG_STAO           "STAO" /* Status Override Table */
+#define ACPI_SIG_XENV           "XENV" /* Xen Environment Table */
 
 #ifdef ACPI_UNDEFINED_TABLES
 /*
@@ -909,6 +910,25 @@  struct acpi_table_stao {
 
 /*******************************************************************************
  *
+ * XENV - Xen Environment Table
+ *        Version 0.2
+ *
+ ******************************************************************************/
+
+struct acpi_table_xenv {
+    struct acpi_table_header header;    /* Common ACPI table header */
+    u64 gnt_start;    /* Starting address of Xen grant table region */
+    u64 gnt_size;     /* Size of Xen grant table region */
+    u32 evt_intr;    /* Xen event channel interrupt */
+    u8  evt_intr_flag;    /* Flags for event channel interrupt */
+};
+
+/* Event Channel Interrupt Flags */
+#define EVT_CHN_INTR_MODE (1 << 0)
+#define EVT_CHN_INTR_TRIG (1 << 1)
+
+/*******************************************************************************
+ *
  * WAET - Windows ACPI Emulated devices Table
  *        Version 1
  *