* [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC
@ 2016-01-18 14:12 Laszlo Ersek
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 1/4] acpi: take oem_id in build_header(), optionally Laszlo Ersek
` (5 more replies)
0 siblings, 6 replies; 14+ messages in thread
From: Laszlo Ersek @ 2016-01-18 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Aleksei Kovura, Xiao Guangrong, Steven Newbury,
Michael S. Tsirkin, Shannon Zhao, Michael Tokarev,
Richard W.M. Jones, Paolo Bonzini, Igor Mammedov
This is version 2 of
<http://thread.gmane.org/gmane.comp.emulators.qemu/386728>.
Changes in v2 (also annotated per patch):
- introduce acpi_get_slic_oem() [MST],
- drop machine property that disables the SLIC-based override [MST].
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Aleksei Kovura <alex3kov@zoho.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Michael Tokarev <mjt@tls.msk.ru>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard W.M. Jones <rjones@redhat.com>
Cc: Shannon Zhao <zhaoshenglong@huawei.com>
Cc: Steven Newbury <steve@snewbury.org.uk>
Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Thanks
Laszlo
Laszlo Ersek (4):
acpi: take oem_id in build_header(), optionally
acpi: expose oem_id and oem_table_id in build_rsdt()
acpi: add function to extract oem_id and oem_table_id from the user's
SLIC
pc: set the OEM fields in the RSDT and the FADT from the SLIC
include/hw/acpi/acpi.h | 7 +++++++
include/hw/acpi/aml-build.h | 5 +++--
hw/acpi/aml-build.c | 14 ++++++++++----
hw/acpi/core.c | 16 ++++++++++++++++
hw/acpi/nvdimm.c | 4 ++--
hw/arm/virt-acpi-build.c | 14 +++++++-------
hw/i386/acpi-build.c | 31 ++++++++++++++++++-------------
qemu-options.hx | 4 ++++
8 files changed, 67 insertions(+), 28 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH v2 1/4] acpi: take oem_id in build_header(), optionally
2016-01-18 14:12 [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC Laszlo Ersek
@ 2016-01-18 14:12 ` Laszlo Ersek
2016-01-19 3:27 ` Shannon Zhao
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 2/4] acpi: expose oem_id and oem_table_id in build_rsdt() Laszlo Ersek
` (4 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Laszlo Ersek @ 2016-01-18 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Aleksei Kovura, Xiao Guangrong, Michael S. Tsirkin,
Steven Newbury, Michael Tokarev, Richard W.M. Jones,
Paolo Bonzini, Shannon Zhao, Igor Mammedov
This patch is the continuation of commit 8870ca0e94f2 ("acpi: support
specified oem table id for build_header"). It will allow us to control the
OEM ID field too in the SDT header.
Cc: "Michael S. Tsirkin" <mst@redhat.com> (supporter:ACPI/SMBIOS)
Cc: Igor Mammedov <imammedo@redhat.com> (supporter:ACPI/SMBIOS)
Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com> (maintainer:NVDIMM)
Cc: Shannon Zhao <zhaoshenglong@huawei.com> (maintainer:ARM ACPI Subsystem)
Cc: Paolo Bonzini <pbonzini@redhat.com> (maintainer:X86)
Cc: Richard W.M. Jones <rjones@redhat.com>
Cc: Aleksei Kovura <alex3kov@zoho.com>
Cc: Michael Tokarev <mjt@tls.msk.ru>
Cc: Steven Newbury <steve@snewbury.org.uk>
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1248758
LP: https://bugs.launchpad.net/qemu/+bug/1533848
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
Notes:
v2:
- no change
include/hw/acpi/aml-build.h | 2 +-
hw/acpi/aml-build.c | 11 ++++++++---
hw/acpi/nvdimm.c | 4 ++--
hw/arm/virt-acpi-build.c | 12 ++++++------
hw/i386/acpi-build.c | 20 ++++++++++----------
5 files changed, 27 insertions(+), 22 deletions(-)
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index 6d6f705..c460bdd 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -357,7 +357,7 @@ Aml *aml_sizeof(Aml *arg);
void
build_header(GArray *linker, GArray *table_data,
AcpiTableHeader *h, const char *sig, int len, uint8_t rev,
- const char *oem_table_id);
+ const char *oem_id, const char *oem_table_id);
void *acpi_data_push(GArray *table_data, unsigned size);
unsigned acpi_data_len(GArray *table);
void acpi_add_table(GArray *table_offsets, GArray *table_data);
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 78e1290..05b8bd0 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -1430,12 +1430,17 @@ Aml *aml_alias(const char *source_object, const char *alias_object)
void
build_header(GArray *linker, GArray *table_data,
AcpiTableHeader *h, const char *sig, int len, uint8_t rev,
- const char *oem_table_id)
+ const char *oem_id, const char *oem_table_id)
{
memcpy(&h->signature, sig, 4);
h->length = cpu_to_le32(len);
h->revision = rev;
- memcpy(h->oem_id, ACPI_BUILD_APPNAME6, 6);
+
+ if (oem_id) {
+ strncpy((char *)h->oem_id, oem_id, sizeof h->oem_id);
+ } else {
+ memcpy(h->oem_id, ACPI_BUILD_APPNAME6, 6);
+ }
if (oem_table_id) {
strncpy((char *)h->oem_table_id, oem_table_id, sizeof(h->oem_table_id));
@@ -1510,5 +1515,5 @@ build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets)
sizeof(uint32_t));
}
build_header(linker, table_data,
- (void *)rsdt, "RSDT", rsdt_len, 1, NULL);
+ (void *)rsdt, "RSDT", rsdt_len, 1, NULL, NULL);
}
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index df1b176..73749aa 100644
--- a/hw/acpi/nvdimm.c
+++ b/hw/acpi/nvdimm.c
@@ -365,7 +365,7 @@ static void nvdimm_build_nfit(GSList *device_list, GArray *table_offsets,
build_header(linker, table_data,
(void *)(table_data->data + header), "NFIT",
- sizeof(NvdimmNfitHeader) + structures->len, 1, NULL);
+ sizeof(NvdimmNfitHeader) + structures->len, 1, NULL, NULL);
g_array_free(structures, true);
}
@@ -470,7 +470,7 @@ static void nvdimm_build_ssdt(GSList *device_list, GArray *table_offsets,
g_array_append_vals(table_data, ssdt->buf->data, ssdt->buf->len);
build_header(linker, table_data,
(void *)(table_data->data + table_data->len - ssdt->buf->len),
- "SSDT", ssdt->buf->len, 1, "NVDIMM");
+ "SSDT", ssdt->buf->len, 1, NULL, "NVDIMM");
free_aml_allocator();
}
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 0d5c635..985fca4 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -407,7 +407,7 @@ build_spcr(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info)
spcr->pci_vendor_id = 0xffff; /* PCI Vendor ID: not a PCI device */
build_header(linker, table_data, (void *)spcr, "SPCR", sizeof(*spcr), 2,
- NULL);
+ NULL, NULL);
}
static void
@@ -426,7 +426,7 @@ build_mcfg(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info)
mcfg->allocation[0].end_bus_number = (memmap[VIRT_PCIE_ECAM].size
/ PCIE_MMCFG_SIZE_MIN) - 1;
- build_header(linker, table_data, (void *)mcfg, "MCFG", len, 1, NULL);
+ build_header(linker, table_data, (void *)mcfg, "MCFG", len, 1, NULL, NULL);
}
/* GTDT */
@@ -452,7 +452,7 @@ build_gtdt(GArray *table_data, GArray *linker)
build_header(linker, table_data,
(void *)(table_data->data + gtdt_start), "GTDT",
- table_data->len - gtdt_start, 2, NULL);
+ table_data->len - gtdt_start, 2, NULL, NULL);
}
/* MADT */
@@ -514,7 +514,7 @@ build_madt(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info,
build_header(linker, table_data,
(void *)(table_data->data + madt_start), "APIC",
- table_data->len - madt_start, 3, NULL);
+ table_data->len - madt_start, 3, NULL, NULL);
}
/* FADT */
@@ -539,7 +539,7 @@ build_fadt(GArray *table_data, GArray *linker, unsigned dsdt)
sizeof fadt->dsdt);
build_header(linker, table_data,
- (void *)fadt, "FACP", sizeof(*fadt), 5, NULL);
+ (void *)fadt, "FACP", sizeof(*fadt), 5, NULL, NULL);
}
/* DSDT */
@@ -578,7 +578,7 @@ build_dsdt(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info)
g_array_append_vals(table_data, dsdt->buf->data, dsdt->buf->len);
build_header(linker, table_data,
(void *)(table_data->data + table_data->len - dsdt->buf->len),
- "DSDT", dsdt->buf->len, 2, NULL);
+ "DSDT", dsdt->buf->len, 2, NULL, NULL);
free_aml_allocator();
}
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 78758e2..e1ebd07 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -358,7 +358,7 @@ build_fadt(GArray *table_data, GArray *linker, AcpiPmInfo *pm,
fadt_setup(fadt, pm);
build_header(linker, table_data,
- (void *)fadt, "FACP", sizeof(*fadt), 1, NULL);
+ (void *)fadt, "FACP", sizeof(*fadt), 1, NULL, NULL);
}
static void
@@ -428,7 +428,7 @@ build_madt(GArray *table_data, GArray *linker, AcpiCpuInfo *cpu,
build_header(linker, table_data,
(void *)(table_data->data + madt_start), "APIC",
- table_data->len - madt_start, 1, NULL);
+ table_data->len - madt_start, 1, NULL, NULL);
}
/* Assign BSEL property to all buses. In the future, this can be changed
@@ -2197,7 +2197,7 @@ build_ssdt(GArray *table_data, GArray *linker,
g_array_append_vals(table_data, ssdt->buf->data, ssdt->buf->len);
build_header(linker, table_data,
(void *)(table_data->data + table_data->len - ssdt->buf->len),
- "SSDT", ssdt->buf->len, 1, NULL);
+ "SSDT", ssdt->buf->len, 1, NULL, NULL);
free_aml_allocator();
}
@@ -2213,7 +2213,7 @@ build_hpet(GArray *table_data, GArray *linker)
hpet->timer_block_id = cpu_to_le32(0x8086a201);
hpet->addr.address = cpu_to_le64(HPET_BASE);
build_header(linker, table_data,
- (void *)hpet, "HPET", sizeof(*hpet), 1, NULL);
+ (void *)hpet, "HPET", sizeof(*hpet), 1, NULL, NULL);
}
static void
@@ -2236,7 +2236,7 @@ build_tpm_tcpa(GArray *table_data, GArray *linker, GArray *tcpalog)
sizeof(tcpa->log_area_start_address));
build_header(linker, table_data,
- (void *)tcpa, "TCPA", sizeof(*tcpa), 2, NULL);
+ (void *)tcpa, "TCPA", sizeof(*tcpa), 2, NULL, NULL);
acpi_data_push(tcpalog, TPM_LOG_AREA_MINIMUM_SIZE);
}
@@ -2253,7 +2253,7 @@ build_tpm2(GArray *table_data, GArray *linker)
tpm2_ptr->start_method = cpu_to_le32(TPM2_START_METHOD_MMIO);
build_header(linker, table_data,
- (void *)tpm2_ptr, "TPM2", sizeof(*tpm2_ptr), 4, NULL);
+ (void *)tpm2_ptr, "TPM2", sizeof(*tpm2_ptr), 4, NULL, NULL);
}
typedef enum {
@@ -2367,7 +2367,7 @@ build_srat(GArray *table_data, GArray *linker, PcGuestInfo *guest_info)
build_header(linker, table_data,
(void *)(table_data->data + srat_start),
"SRAT",
- table_data->len - srat_start, 1, NULL);
+ table_data->len - srat_start, 1, NULL, NULL);
}
static void
@@ -2396,7 +2396,7 @@ build_mcfg_q35(GArray *table_data, GArray *linker, AcpiMcfgInfo *info)
} else {
sig = "MCFG";
}
- build_header(linker, table_data, (void *)mcfg, sig, len, 1, NULL);
+ build_header(linker, table_data, (void *)mcfg, sig, len, 1, NULL, NULL);
}
static void
@@ -2420,7 +2420,7 @@ build_dmar_q35(GArray *table_data, GArray *linker)
drhd->address = cpu_to_le64(Q35_HOST_BRIDGE_IOMMU_ADDR);
build_header(linker, table_data, (void *)(table_data->data + dmar_start),
- "DMAR", table_data->len - dmar_start, 1, NULL);
+ "DMAR", table_data->len - dmar_start, 1, NULL, NULL);
}
static void
@@ -2529,7 +2529,7 @@ build_dsdt(GArray *table_data, GArray *linker,
g_array_append_vals(table_data, dsdt->buf->data, dsdt->buf->len);
build_header(linker, table_data,
(void *)(table_data->data + table_data->len - dsdt->buf->len),
- "DSDT", dsdt->buf->len, 1, NULL);
+ "DSDT", dsdt->buf->len, 1, NULL, NULL);
free_aml_allocator();
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH v2 2/4] acpi: expose oem_id and oem_table_id in build_rsdt()
2016-01-18 14:12 [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC Laszlo Ersek
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 1/4] acpi: take oem_id in build_header(), optionally Laszlo Ersek
@ 2016-01-18 14:12 ` Laszlo Ersek
2016-01-19 3:29 ` Shannon Zhao
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 3/4] acpi: add function to extract oem_id and oem_table_id from the user's SLIC Laszlo Ersek
` (3 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Laszlo Ersek @ 2016-01-18 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Aleksei Kovura, Michael S. Tsirkin, Steven Newbury,
Michael Tokarev, Richard W.M. Jones, Paolo Bonzini, Shannon Zhao,
Igor Mammedov
Since build_rsdt() is implemented as common utility code (in
"hw/acpi/aml-build.c"), it should expose -- and forward -- the oem_id and
oem_table_id parameters between board code and the generic build_header()
function.
Cc: "Michael S. Tsirkin" <mst@redhat.com> (supporter:ACPI/SMBIOS)
Cc: Igor Mammedov <imammedo@redhat.com> (supporter:ACPI/SMBIOS)
Cc: Shannon Zhao <zhaoshenglong@huawei.com> (maintainer:ARM ACPI Subsystem)
Cc: Paolo Bonzini <pbonzini@redhat.com> (maintainer:X86)
Cc: Richard W.M. Jones <rjones@redhat.com>
Cc: Aleksei Kovura <alex3kov@zoho.com>
Cc: Michael Tokarev <mjt@tls.msk.ru>
Cc: Steven Newbury <steve@snewbury.org.uk>
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1248758
LP: https://bugs.launchpad.net/qemu/+bug/1533848
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
Notes:
v2:
- no change
include/hw/acpi/aml-build.h | 3 ++-
hw/acpi/aml-build.c | 5 +++--
hw/arm/virt-acpi-build.c | 2 +-
hw/i386/acpi-build.c | 2 +-
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index c460bdd..aa29d30 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -364,6 +364,7 @@ void acpi_add_table(GArray *table_offsets, GArray *table_data);
void acpi_build_tables_init(AcpiBuildTables *tables);
void acpi_build_tables_cleanup(AcpiBuildTables *tables, bool mfre);
void
-build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets);
+build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets,
+ const char *oem_id, const char *oem_table_id);
#endif
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 05b8bd0..ce7fe81 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -1496,7 +1496,8 @@ void acpi_build_tables_cleanup(AcpiBuildTables *tables, bool mfre)
/* Build rsdt table */
void
-build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets)
+build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets,
+ const char *oem_id, const char *oem_table_id)
{
AcpiRsdtDescriptorRev1 *rsdt;
size_t rsdt_len;
@@ -1515,5 +1516,5 @@ build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets)
sizeof(uint32_t));
}
build_header(linker, table_data,
- (void *)rsdt, "RSDT", rsdt_len, 1, NULL, NULL);
+ (void *)rsdt, "RSDT", rsdt_len, 1, oem_id, oem_table_id);
}
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 985fca4..2e90515 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -642,7 +642,7 @@ void virt_acpi_build(VirtGuestInfo *guest_info, AcpiBuildTables *tables)
/* RSDT is pointed to by RSDP */
rsdt = tables_blob->len;
- build_rsdt(tables_blob, tables->linker, table_offsets);
+ build_rsdt(tables_blob, tables->linker, table_offsets, NULL, NULL);
/* RSDP is in FSEG memory, so allocate it separately */
build_rsdp(tables->rsdp, tables->linker, rsdt);
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index e1ebd07..6408362 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2705,7 +2705,7 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
/* RSDT is pointed to by RSDP */
rsdt = tables_blob->len;
- build_rsdt(tables_blob, tables->linker, table_offsets);
+ build_rsdt(tables_blob, tables->linker, table_offsets, NULL, NULL);
/* RSDP is in FSEG memory, so allocate it separately */
build_rsdp(tables->rsdp, tables->linker, rsdt);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH v2 3/4] acpi: add function to extract oem_id and oem_table_id from the user's SLIC
2016-01-18 14:12 [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC Laszlo Ersek
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 1/4] acpi: take oem_id in build_header(), optionally Laszlo Ersek
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 2/4] acpi: expose oem_id and oem_table_id in build_rsdt() Laszlo Ersek
@ 2016-01-18 14:12 ` Laszlo Ersek
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 4/4] pc: set the OEM fields in the RSDT and the FADT from the SLIC Laszlo Ersek
` (2 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Laszlo Ersek @ 2016-01-18 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Aleksei Kovura, Steven Newbury, Michael S. Tsirkin,
Michael Tokarev, Richard W.M. Jones, Igor Mammedov
The acpi_get_slic_oem() function stores pointers to these fields in the
(first) SLIC table that the user passes in with the -acpitable switch.
Cc: "Michael S. Tsirkin" <mst@redhat.com> (supporter:ACPI/SMBIOS)
Cc: Igor Mammedov <imammedo@redhat.com> (supporter:ACPI/SMBIOS)
Cc: Richard W.M. Jones <rjones@redhat.com>
Cc: Aleksei Kovura <alex3kov@zoho.com>
Cc: Michael Tokarev <mjt@tls.msk.ru>
Cc: Steven Newbury <steve@snewbury.org.uk>
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1248758
LP: https://bugs.launchpad.net/qemu/+bug/1533848
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
Notes:
v2:
- introduce [MST]
include/hw/acpi/acpi.h | 7 +++++++
hw/acpi/core.c | 16 ++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h
index b20bd55..2de3021 100644
--- a/include/hw/acpi/acpi.h
+++ b/include/hw/acpi/acpi.h
@@ -196,4 +196,11 @@ unsigned acpi_table_len(void *current);
void acpi_table_add(const QemuOpts *opts, Error **errp);
void acpi_table_add_builtin(const QemuOpts *opts, Error **errp);
+typedef struct AcpiSlicOem AcpiSlicOem;
+struct AcpiSlicOem {
+ char *id;
+ char *table_id;
+};
+int acpi_get_slic_oem(AcpiSlicOem *oem);
+
#endif /* !QEMU_HW_ACPI_H */
diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index 21e113d..a9d0f68 100644
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -349,6 +349,22 @@ uint8_t *acpi_table_next(uint8_t *current)
}
}
+int acpi_get_slic_oem(AcpiSlicOem *oem)
+{
+ uint8_t *u;
+
+ for (u = acpi_table_first(); u; u = acpi_table_next(u)) {
+ struct acpi_table_header *hdr = (void *)(u - sizeof(hdr->_length));
+
+ if (memcmp(hdr->sig, "SLIC", 4) == 0) {
+ oem->id = hdr->oem_id;
+ oem->table_id = hdr->oem_table_id;
+ return 0;
+ }
+ }
+ return -1;
+}
+
static void acpi_notify_wakeup(Notifier *notifier, void *data)
{
ACPIREGS *ar = container_of(notifier, ACPIREGS, wakeup);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH v2 4/4] pc: set the OEM fields in the RSDT and the FADT from the SLIC
2016-01-18 14:12 [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC Laszlo Ersek
` (2 preceding siblings ...)
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 3/4] acpi: add function to extract oem_id and oem_table_id from the user's SLIC Laszlo Ersek
@ 2016-01-18 14:12 ` Laszlo Ersek
2016-01-19 7:35 ` [Qemu-devel] [PATCH v2 0/4] " Steven Newbury
2016-01-27 18:31 ` Laszlo Ersek
5 siblings, 0 replies; 14+ messages in thread
From: Laszlo Ersek @ 2016-01-18 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Aleksei Kovura, Michael S. Tsirkin, Steven Newbury,
Michael Tokarev, Richard W.M. Jones, Paolo Bonzini, Igor Mammedov
The Microsoft spec about the SLIC and MSDM ACPI tables at
<http://go.microsoft.com/fwlink/p/?LinkId=234834> requires the OEM ID and
OEM Table ID fields to be consistent between the SLIC and the RSDT/XSDT.
That further affects the FADT, because a similar match between the FADT
and the RSDT/XSDT is required by the ACPI spec in general.
This patch wires up the previous three patches.
Cc: "Michael S. Tsirkin" <mst@redhat.com> (supporter:ACPI/SMBIOS)
Cc: Igor Mammedov <imammedo@redhat.com> (supporter:ACPI/SMBIOS)
Cc: Paolo Bonzini <pbonzini@redhat.com> (maintainer:X86)
Cc: Richard W.M. Jones <rjones@redhat.com>
Cc: Aleksei Kovura <alex3kov@zoho.com>
Cc: Michael Tokarev <mjt@tls.msk.ru>
Cc: Steven Newbury <steve@snewbury.org.uk>
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1248758
LP: https://bugs.launchpad.net/qemu/+bug/1533848
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
Notes:
v2:
- rebase to new acpi_get_slic_oem() [MST]
- drop machine type property to disable this behavior [MST]
hw/i386/acpi-build.c | 13 +++++++++----
qemu-options.hx | 4 ++++
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 6408362..9a74284 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -337,7 +337,8 @@ static void fadt_setup(AcpiFadtDescriptorRev1 *fadt, AcpiPmInfo *pm)
/* FADT */
static void
build_fadt(GArray *table_data, GArray *linker, AcpiPmInfo *pm,
- unsigned facs, unsigned dsdt)
+ unsigned facs, unsigned dsdt,
+ const char *oem_id, const char *oem_table_id)
{
AcpiFadtDescriptorRev1 *fadt = acpi_data_push(table_data, sizeof(*fadt));
@@ -358,7 +359,7 @@ build_fadt(GArray *table_data, GArray *linker, AcpiPmInfo *pm,
fadt_setup(fadt, pm);
build_header(linker, table_data,
- (void *)fadt, "FACP", sizeof(*fadt), 1, NULL, NULL);
+ (void *)fadt, "FACP", sizeof(*fadt), 1, oem_id, oem_table_id);
}
static void
@@ -2621,11 +2622,13 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
uint8_t *u;
size_t aml_len = 0;
GArray *tables_blob = tables->table_data;
+ AcpiSlicOem slic_oem = { .id = NULL, .table_id = NULL };
acpi_get_cpu_info(&cpu);
acpi_get_pm_info(&pm);
acpi_get_misc_info(&misc);
acpi_get_pci_info(&pci);
+ acpi_get_slic_oem(&slic_oem);
table_offsets = g_array_new(false, true /* clear */,
sizeof(uint32_t));
@@ -2654,7 +2657,8 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
/* ACPI tables pointed to by RSDT */
acpi_add_table(table_offsets, tables_blob);
- build_fadt(tables_blob, tables->linker, &pm, facs, dsdt);
+ build_fadt(tables_blob, tables->linker, &pm, facs, dsdt,
+ slic_oem.id, slic_oem.table_id);
ssdt = tables_blob->len;
acpi_add_table(table_offsets, tables_blob);
@@ -2705,7 +2709,8 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
/* RSDT is pointed to by RSDP */
rsdt = tables_blob->len;
- build_rsdt(tables_blob, tables->linker, table_offsets, NULL, NULL);
+ build_rsdt(tables_blob, tables->linker, table_offsets,
+ slic_oem.id, slic_oem.table_id);
/* RSDP is in FSEG memory, so allocate it separately */
build_rsdp(tables->rsdp, tables->linker, rsdt);
diff --git a/qemu-options.hx b/qemu-options.hx
index b4763ba..0ef79ee 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1472,6 +1472,10 @@ ACPI headers (possible overridden by other options).
For data=, only data
portion of the table is used, all header information is specified in the
command line.
+If a SLIC table is supplied to QEMU, then the SLIC's oem_id and oem_table_id
+fields will override the same in the RSDT and the FADT (a.k.a. FACP), in order
+to ensure the field matches required by the Microsoft SLIC spec and the ACPI
+spec.
ETEXI
DEF("smbios", HAS_ARG, QEMU_OPTION_smbios,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/4] acpi: take oem_id in build_header(), optionally
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 1/4] acpi: take oem_id in build_header(), optionally Laszlo Ersek
@ 2016-01-19 3:27 ` Shannon Zhao
0 siblings, 0 replies; 14+ messages in thread
From: Shannon Zhao @ 2016-01-19 3:27 UTC (permalink / raw)
To: Laszlo Ersek, qemu-devel
Cc: Aleksei Kovura, Xiao Guangrong, Michael S. Tsirkin,
Steven Newbury, Michael Tokarev, Richard W.M. Jones,
Paolo Bonzini, Igor Mammedov
On 2016/1/18 22:12, Laszlo Ersek wrote:
> This patch is the continuation of commit 8870ca0e94f2 ("acpi: support
> specified oem table id for build_header"). It will allow us to control the
> OEM ID field too in the SDT header.
>
> Cc: "Michael S. Tsirkin" <mst@redhat.com> (supporter:ACPI/SMBIOS)
> Cc: Igor Mammedov <imammedo@redhat.com> (supporter:ACPI/SMBIOS)
> Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com> (maintainer:NVDIMM)
> Cc: Shannon Zhao <zhaoshenglong@huawei.com> (maintainer:ARM ACPI Subsystem)
> Cc: Paolo Bonzini <pbonzini@redhat.com> (maintainer:X86)
> Cc: Richard W.M. Jones <rjones@redhat.com>
> Cc: Aleksei Kovura <alex3kov@zoho.com>
> Cc: Michael Tokarev <mjt@tls.msk.ru>
> Cc: Steven Newbury <steve@snewbury.org.uk>
> RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1248758
> LP: https://bugs.launchpad.net/qemu/+bug/1533848
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
> ---
>
> Notes:
> v2:
> - no change
>
> include/hw/acpi/aml-build.h | 2 +-
> hw/acpi/aml-build.c | 11 ++++++++---
> hw/acpi/nvdimm.c | 4 ++--
> hw/arm/virt-acpi-build.c | 12 ++++++------
> hw/i386/acpi-build.c | 20 ++++++++++----------
> 5 files changed, 27 insertions(+), 22 deletions(-)
>
> diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
> index 6d6f705..c460bdd 100644
> --- a/include/hw/acpi/aml-build.h
> +++ b/include/hw/acpi/aml-build.h
> @@ -357,7 +357,7 @@ Aml *aml_sizeof(Aml *arg);
> void
> build_header(GArray *linker, GArray *table_data,
> AcpiTableHeader *h, const char *sig, int len, uint8_t rev,
> - const char *oem_table_id);
> + const char *oem_id, const char *oem_table_id);
> void *acpi_data_push(GArray *table_data, unsigned size);
> unsigned acpi_data_len(GArray *table);
> void acpi_add_table(GArray *table_offsets, GArray *table_data);
> diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
> index 78e1290..05b8bd0 100644
> --- a/hw/acpi/aml-build.c
> +++ b/hw/acpi/aml-build.c
> @@ -1430,12 +1430,17 @@ Aml *aml_alias(const char *source_object, const char *alias_object)
> void
> build_header(GArray *linker, GArray *table_data,
> AcpiTableHeader *h, const char *sig, int len, uint8_t rev,
> - const char *oem_table_id)
> + const char *oem_id, const char *oem_table_id)
> {
> memcpy(&h->signature, sig, 4);
> h->length = cpu_to_le32(len);
> h->revision = rev;
> - memcpy(h->oem_id, ACPI_BUILD_APPNAME6, 6);
> +
> + if (oem_id) {
> + strncpy((char *)h->oem_id, oem_id, sizeof h->oem_id);
> + } else {
> + memcpy(h->oem_id, ACPI_BUILD_APPNAME6, 6);
> + }
>
> if (oem_table_id) {
> strncpy((char *)h->oem_table_id, oem_table_id, sizeof(h->oem_table_id));
> @@ -1510,5 +1515,5 @@ build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets)
> sizeof(uint32_t));
> }
> build_header(linker, table_data,
> - (void *)rsdt, "RSDT", rsdt_len, 1, NULL);
> + (void *)rsdt, "RSDT", rsdt_len, 1, NULL, NULL);
> }
> diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
> index df1b176..73749aa 100644
> --- a/hw/acpi/nvdimm.c
> +++ b/hw/acpi/nvdimm.c
> @@ -365,7 +365,7 @@ static void nvdimm_build_nfit(GSList *device_list, GArray *table_offsets,
>
> build_header(linker, table_data,
> (void *)(table_data->data + header), "NFIT",
> - sizeof(NvdimmNfitHeader) + structures->len, 1, NULL);
> + sizeof(NvdimmNfitHeader) + structures->len, 1, NULL, NULL);
> g_array_free(structures, true);
> }
>
> @@ -470,7 +470,7 @@ static void nvdimm_build_ssdt(GSList *device_list, GArray *table_offsets,
> g_array_append_vals(table_data, ssdt->buf->data, ssdt->buf->len);
> build_header(linker, table_data,
> (void *)(table_data->data + table_data->len - ssdt->buf->len),
> - "SSDT", ssdt->buf->len, 1, "NVDIMM");
> + "SSDT", ssdt->buf->len, 1, NULL, "NVDIMM");
> free_aml_allocator();
> }
>
> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> index 0d5c635..985fca4 100644
> --- a/hw/arm/virt-acpi-build.c
> +++ b/hw/arm/virt-acpi-build.c
> @@ -407,7 +407,7 @@ build_spcr(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info)
> spcr->pci_vendor_id = 0xffff; /* PCI Vendor ID: not a PCI device */
>
> build_header(linker, table_data, (void *)spcr, "SPCR", sizeof(*spcr), 2,
> - NULL);
> + NULL, NULL);
> }
>
> static void
> @@ -426,7 +426,7 @@ build_mcfg(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info)
> mcfg->allocation[0].end_bus_number = (memmap[VIRT_PCIE_ECAM].size
> / PCIE_MMCFG_SIZE_MIN) - 1;
>
> - build_header(linker, table_data, (void *)mcfg, "MCFG", len, 1, NULL);
> + build_header(linker, table_data, (void *)mcfg, "MCFG", len, 1, NULL, NULL);
> }
>
> /* GTDT */
> @@ -452,7 +452,7 @@ build_gtdt(GArray *table_data, GArray *linker)
>
> build_header(linker, table_data,
> (void *)(table_data->data + gtdt_start), "GTDT",
> - table_data->len - gtdt_start, 2, NULL);
> + table_data->len - gtdt_start, 2, NULL, NULL);
> }
>
> /* MADT */
> @@ -514,7 +514,7 @@ build_madt(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info,
>
> build_header(linker, table_data,
> (void *)(table_data->data + madt_start), "APIC",
> - table_data->len - madt_start, 3, NULL);
> + table_data->len - madt_start, 3, NULL, NULL);
> }
>
> /* FADT */
> @@ -539,7 +539,7 @@ build_fadt(GArray *table_data, GArray *linker, unsigned dsdt)
> sizeof fadt->dsdt);
>
> build_header(linker, table_data,
> - (void *)fadt, "FACP", sizeof(*fadt), 5, NULL);
> + (void *)fadt, "FACP", sizeof(*fadt), 5, NULL, NULL);
> }
>
> /* DSDT */
> @@ -578,7 +578,7 @@ build_dsdt(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info)
> g_array_append_vals(table_data, dsdt->buf->data, dsdt->buf->len);
> build_header(linker, table_data,
> (void *)(table_data->data + table_data->len - dsdt->buf->len),
> - "DSDT", dsdt->buf->len, 2, NULL);
> + "DSDT", dsdt->buf->len, 2, NULL, NULL);
> free_aml_allocator();
> }
>
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 78758e2..e1ebd07 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -358,7 +358,7 @@ build_fadt(GArray *table_data, GArray *linker, AcpiPmInfo *pm,
> fadt_setup(fadt, pm);
>
> build_header(linker, table_data,
> - (void *)fadt, "FACP", sizeof(*fadt), 1, NULL);
> + (void *)fadt, "FACP", sizeof(*fadt), 1, NULL, NULL);
> }
>
> static void
> @@ -428,7 +428,7 @@ build_madt(GArray *table_data, GArray *linker, AcpiCpuInfo *cpu,
>
> build_header(linker, table_data,
> (void *)(table_data->data + madt_start), "APIC",
> - table_data->len - madt_start, 1, NULL);
> + table_data->len - madt_start, 1, NULL, NULL);
> }
>
> /* Assign BSEL property to all buses. In the future, this can be changed
> @@ -2197,7 +2197,7 @@ build_ssdt(GArray *table_data, GArray *linker,
> g_array_append_vals(table_data, ssdt->buf->data, ssdt->buf->len);
> build_header(linker, table_data,
> (void *)(table_data->data + table_data->len - ssdt->buf->len),
> - "SSDT", ssdt->buf->len, 1, NULL);
> + "SSDT", ssdt->buf->len, 1, NULL, NULL);
> free_aml_allocator();
> }
>
> @@ -2213,7 +2213,7 @@ build_hpet(GArray *table_data, GArray *linker)
> hpet->timer_block_id = cpu_to_le32(0x8086a201);
> hpet->addr.address = cpu_to_le64(HPET_BASE);
> build_header(linker, table_data,
> - (void *)hpet, "HPET", sizeof(*hpet), 1, NULL);
> + (void *)hpet, "HPET", sizeof(*hpet), 1, NULL, NULL);
> }
>
> static void
> @@ -2236,7 +2236,7 @@ build_tpm_tcpa(GArray *table_data, GArray *linker, GArray *tcpalog)
> sizeof(tcpa->log_area_start_address));
>
> build_header(linker, table_data,
> - (void *)tcpa, "TCPA", sizeof(*tcpa), 2, NULL);
> + (void *)tcpa, "TCPA", sizeof(*tcpa), 2, NULL, NULL);
>
> acpi_data_push(tcpalog, TPM_LOG_AREA_MINIMUM_SIZE);
> }
> @@ -2253,7 +2253,7 @@ build_tpm2(GArray *table_data, GArray *linker)
> tpm2_ptr->start_method = cpu_to_le32(TPM2_START_METHOD_MMIO);
>
> build_header(linker, table_data,
> - (void *)tpm2_ptr, "TPM2", sizeof(*tpm2_ptr), 4, NULL);
> + (void *)tpm2_ptr, "TPM2", sizeof(*tpm2_ptr), 4, NULL, NULL);
> }
>
> typedef enum {
> @@ -2367,7 +2367,7 @@ build_srat(GArray *table_data, GArray *linker, PcGuestInfo *guest_info)
> build_header(linker, table_data,
> (void *)(table_data->data + srat_start),
> "SRAT",
> - table_data->len - srat_start, 1, NULL);
> + table_data->len - srat_start, 1, NULL, NULL);
> }
>
> static void
> @@ -2396,7 +2396,7 @@ build_mcfg_q35(GArray *table_data, GArray *linker, AcpiMcfgInfo *info)
> } else {
> sig = "MCFG";
> }
> - build_header(linker, table_data, (void *)mcfg, sig, len, 1, NULL);
> + build_header(linker, table_data, (void *)mcfg, sig, len, 1, NULL, NULL);
> }
>
> static void
> @@ -2420,7 +2420,7 @@ build_dmar_q35(GArray *table_data, GArray *linker)
> drhd->address = cpu_to_le64(Q35_HOST_BRIDGE_IOMMU_ADDR);
>
> build_header(linker, table_data, (void *)(table_data->data + dmar_start),
> - "DMAR", table_data->len - dmar_start, 1, NULL);
> + "DMAR", table_data->len - dmar_start, 1, NULL, NULL);
> }
>
> static void
> @@ -2529,7 +2529,7 @@ build_dsdt(GArray *table_data, GArray *linker,
> g_array_append_vals(table_data, dsdt->buf->data, dsdt->buf->len);
> build_header(linker, table_data,
> (void *)(table_data->data + table_data->len - dsdt->buf->len),
> - "DSDT", dsdt->buf->len, 1, NULL);
> + "DSDT", dsdt->buf->len, 1, NULL, NULL);
> free_aml_allocator();
> }
>
>
--
Shannon
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH v2 2/4] acpi: expose oem_id and oem_table_id in build_rsdt()
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 2/4] acpi: expose oem_id and oem_table_id in build_rsdt() Laszlo Ersek
@ 2016-01-19 3:29 ` Shannon Zhao
0 siblings, 0 replies; 14+ messages in thread
From: Shannon Zhao @ 2016-01-19 3:29 UTC (permalink / raw)
To: Laszlo Ersek, qemu-devel
Cc: Aleksei Kovura, Michael S. Tsirkin, Steven Newbury,
Michael Tokarev, Richard W.M. Jones, Paolo Bonzini, Igor Mammedov
On 2016/1/18 22:12, Laszlo Ersek wrote:
> Since build_rsdt() is implemented as common utility code (in
> "hw/acpi/aml-build.c"), it should expose -- and forward -- the oem_id and
> oem_table_id parameters between board code and the generic build_header()
> function.
>
> Cc: "Michael S. Tsirkin" <mst@redhat.com> (supporter:ACPI/SMBIOS)
> Cc: Igor Mammedov <imammedo@redhat.com> (supporter:ACPI/SMBIOS)
> Cc: Shannon Zhao <zhaoshenglong@huawei.com> (maintainer:ARM ACPI Subsystem)
> Cc: Paolo Bonzini <pbonzini@redhat.com> (maintainer:X86)
> Cc: Richard W.M. Jones <rjones@redhat.com>
> Cc: Aleksei Kovura <alex3kov@zoho.com>
> Cc: Michael Tokarev <mjt@tls.msk.ru>
> Cc: Steven Newbury <steve@snewbury.org.uk>
> RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1248758
> LP: https://bugs.launchpad.net/qemu/+bug/1533848
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
> ---
>
> Notes:
> v2:
> - no change
>
> include/hw/acpi/aml-build.h | 3 ++-
> hw/acpi/aml-build.c | 5 +++--
> hw/arm/virt-acpi-build.c | 2 +-
> hw/i386/acpi-build.c | 2 +-
> 4 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
> index c460bdd..aa29d30 100644
> --- a/include/hw/acpi/aml-build.h
> +++ b/include/hw/acpi/aml-build.h
> @@ -364,6 +364,7 @@ void acpi_add_table(GArray *table_offsets, GArray *table_data);
> void acpi_build_tables_init(AcpiBuildTables *tables);
> void acpi_build_tables_cleanup(AcpiBuildTables *tables, bool mfre);
> void
> -build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets);
> +build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets,
> + const char *oem_id, const char *oem_table_id);
>
> #endif
> diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
> index 05b8bd0..ce7fe81 100644
> --- a/hw/acpi/aml-build.c
> +++ b/hw/acpi/aml-build.c
> @@ -1496,7 +1496,8 @@ void acpi_build_tables_cleanup(AcpiBuildTables *tables, bool mfre)
>
> /* Build rsdt table */
> void
> -build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets)
> +build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets,
> + const char *oem_id, const char *oem_table_id)
> {
> AcpiRsdtDescriptorRev1 *rsdt;
> size_t rsdt_len;
> @@ -1515,5 +1516,5 @@ build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets)
> sizeof(uint32_t));
> }
> build_header(linker, table_data,
> - (void *)rsdt, "RSDT", rsdt_len, 1, NULL, NULL);
> + (void *)rsdt, "RSDT", rsdt_len, 1, oem_id, oem_table_id);
> }
> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> index 985fca4..2e90515 100644
> --- a/hw/arm/virt-acpi-build.c
> +++ b/hw/arm/virt-acpi-build.c
> @@ -642,7 +642,7 @@ void virt_acpi_build(VirtGuestInfo *guest_info, AcpiBuildTables *tables)
>
> /* RSDT is pointed to by RSDP */
> rsdt = tables_blob->len;
> - build_rsdt(tables_blob, tables->linker, table_offsets);
> + build_rsdt(tables_blob, tables->linker, table_offsets, NULL, NULL);
>
> /* RSDP is in FSEG memory, so allocate it separately */
> build_rsdp(tables->rsdp, tables->linker, rsdt);
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index e1ebd07..6408362 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -2705,7 +2705,7 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
>
> /* RSDT is pointed to by RSDP */
> rsdt = tables_blob->len;
> - build_rsdt(tables_blob, tables->linker, table_offsets);
> + build_rsdt(tables_blob, tables->linker, table_offsets, NULL, NULL);
>
> /* RSDP is in FSEG memory, so allocate it separately */
> build_rsdp(tables->rsdp, tables->linker, rsdt);
>
--
Shannon
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC
2016-01-18 14:12 [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC Laszlo Ersek
` (3 preceding siblings ...)
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 4/4] pc: set the OEM fields in the RSDT and the FADT from the SLIC Laszlo Ersek
@ 2016-01-19 7:35 ` Steven Newbury
2016-01-19 7:40 ` Steven Newbury
2016-01-27 18:31 ` Laszlo Ersek
5 siblings, 1 reply; 14+ messages in thread
From: Steven Newbury @ 2016-01-19 7:35 UTC (permalink / raw)
To: lersek
Cc: alex3kov, guangrong.xiao, mst, zhaoshenglong, mjt, rjones,
qemu-devel, pbonzini, imammedo
On Mon Jan 18 14:12:09 2016 GMT, Laszlo Ersek wrote:
> This is version 2 of
> <http://thread.gmane.org/gmane.comp.emulators.qemu/386728>.
>
> Changes in v2 (also annotated per patch):
> - introduce acpi_get_slic_oem() [MST],
> - drop machine property that disables the SLIC-based override [MST].
>
Series looks good to me. This is much cleaner (less hacky) than the patch I posted. I started out with a similar approach but felt I was being too invasive, so decided to keep it simple.
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Aleksei Kovura <alex3kov@zoho.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Michael Tokarev <mjt@tls.msk.ru>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Richard W.M. Jones <rjones@redhat.com>
> Cc: Shannon Zhao <zhaoshenglong@huawei.com>
> Cc: Steven Newbury <steve@snewbury.org.uk>
> Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
>
> Thanks
> Laszlo
>
> Laszlo Ersek (4):
> acpi: take oem_id in build_header(), optionally
> acpi: expose oem_id and oem_table_id in build_rsdt()
> acpi: add function to extract oem_id and oem_table_id from the user's
> SLIC
> pc: set the OEM fields in the RSDT and the FADT from the SLIC
>
> include/hw/acpi/acpi.h | 7 +++++++
> include/hw/acpi/aml-build.h | 5 +++--
> hw/acpi/aml-build.c | 14 ++++++++++----
> hw/acpi/core.c | 16 ++++++++++++++++
> hw/acpi/nvdimm.c | 4 ++--
> hw/arm/virt-acpi-build.c | 14 +++++++-------
> hw/i386/acpi-build.c | 31 ++++++++++++++++++-------------
> qemu-options.hx | 4 ++++
> 8 files changed, 67 insertions(+), 28 deletions(-)
>
> --
> 1.8.3.1
>
>
--
Sent from my Jolla
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC
2016-01-19 7:35 ` [Qemu-devel] [PATCH v2 0/4] " Steven Newbury
@ 2016-01-19 7:40 ` Steven Newbury
0 siblings, 0 replies; 14+ messages in thread
From: Steven Newbury @ 2016-01-19 7:40 UTC (permalink / raw)
To: steve
Cc: alex3kov, guangrong.xiao, mst, zhaoshenglong, mjt, rjones,
qemu-devel, pbonzini, imammedo, lersek
On Tue Jan 19 07:35:27 2016 GMT, Steven Newbury wrote:
>
>
> On Mon Jan 18 14:12:09 2016 GMT, Laszlo Ersek wrote:
> > This is version 2 of
> > <http://thread.gmane.org/gmane.comp.emulators.qemu/386728>.
> >
> > Changes in v2 (also annotated per patch):
> > - introduce acpi_get_slic_oem() [MST],
> > - drop machine property that disables the SLIC-based override [MST].
> >
> Series looks good to me. This is much cleaner (less hacky) than the patch I posted. I started out with a similar approach but felt I was being too invasive, so decided to keep it simple.
For what it's worth:
Reviewed-by: Steven Newbury <steve@snewbury.org.uk>
> > Cc: "Michael S. Tsirkin" <mst@redhat.com>
> > Cc: Aleksei Kovura <alex3kov@zoho.com>
> > Cc: Igor Mammedov <imammedo@redhat.com>
> > Cc: Michael Tokarev <mjt@tls.msk.ru>
> > Cc: Paolo Bonzini <pbonzini@redhat.com>
> > Cc: Richard W.M. Jones <rjones@redhat.com>
> > Cc: Shannon Zhao <zhaoshenglong@huawei.com>
> > Cc: Steven Newbury <steve@snewbury.org.uk>
> > Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
> >
> > Thanks
> > Laszlo
> >
> > Laszlo Ersek (4):
> > acpi: take oem_id in build_header(), optionally
> > acpi: expose oem_id and oem_table_id in build_rsdt()
> > acpi: add function to extract oem_id and oem_table_id from the user's
> > SLIC
> > pc: set the OEM fields in the RSDT and the FADT from the SLIC
> >
> > include/hw/acpi/acpi.h | 7 +++++++
> > include/hw/acpi/aml-build.h | 5 +++--
> > hw/acpi/aml-build.c | 14 ++++++++++----
> > hw/acpi/core.c | 16 ++++++++++++++++
> > hw/acpi/nvdimm.c | 4 ++--
> > hw/arm/virt-acpi-build.c | 14 +++++++-------
> > hw/i386/acpi-build.c | 31 ++++++++++++++++++-------------
> > qemu-options.hx | 4 ++++
> > 8 files changed, 67 insertions(+), 28 deletions(-)
> >
> > --
> > 1.8.3.1
> >
> >
>
> --
> Sent from my Joll
--
Sent from my Jolla
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC
2016-01-18 14:12 [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC Laszlo Ersek
` (4 preceding siblings ...)
2016-01-19 7:35 ` [Qemu-devel] [PATCH v2 0/4] " Steven Newbury
@ 2016-01-27 18:31 ` Laszlo Ersek
2016-02-03 18:51 ` Laszlo Ersek
5 siblings, 1 reply; 14+ messages in thread
From: Laszlo Ersek @ 2016-01-27 18:31 UTC (permalink / raw)
To: Michael S. Tsirkin, Igor Mammedov
Cc: Aleksei Kovura, Xiao Guangrong, Steven Newbury, Michael Tokarev,
qemu-devel, Richard W.M. Jones, Shannon Zhao, Paolo Bonzini
On 01/18/16 15:12, Laszlo Ersek wrote:
> This is version 2 of
> <http://thread.gmane.org/gmane.comp.emulators.qemu/386728>.
>
> Changes in v2 (also annotated per patch):
> - introduce acpi_get_slic_oem() [MST],
> - drop machine property that disables the SLIC-based override [MST].
>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Aleksei Kovura <alex3kov@zoho.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Michael Tokarev <mjt@tls.msk.ru>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Richard W.M. Jones <rjones@redhat.com>
> Cc: Shannon Zhao <zhaoshenglong@huawei.com>
> Cc: Steven Newbury <steve@snewbury.org.uk>
> Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
>
> Thanks
> Laszlo
>
> Laszlo Ersek (4):
> acpi: take oem_id in build_header(), optionally
> acpi: expose oem_id and oem_table_id in build_rsdt()
> acpi: add function to extract oem_id and oem_table_id from the user's
> SLIC
> pc: set the OEM fields in the RSDT and the FADT from the SLIC
>
> include/hw/acpi/acpi.h | 7 +++++++
> include/hw/acpi/aml-build.h | 5 +++--
> hw/acpi/aml-build.c | 14 ++++++++++----
> hw/acpi/core.c | 16 ++++++++++++++++
> hw/acpi/nvdimm.c | 4 ++--
> hw/arm/virt-acpi-build.c | 14 +++++++-------
> hw/i386/acpi-build.c | 31 ++++++++++++++++++-------------
> qemu-options.hx | 4 ++++
> 8 files changed, 67 insertions(+), 28 deletions(-)
>
Ping -- here's the review & testing feedback thus far:
patch 1: Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Reviewed-by: Steven Newbury <steve@snewbury.org.uk>
Tested-by: Aleksei Kovura <alex3kov@zoho.com>
patch 2: Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Reviewed-by: Steven Newbury <steve@snewbury.org.uk>
Tested-by: Aleksei Kovura <alex3kov@zoho.com>
patch 3: Reviewed-by: Steven Newbury <steve@snewbury.org.uk>
Tested-by: Aleksei Kovura <alex3kov@zoho.com>
patch 4: Reviewed-by: Steven Newbury <steve@snewbury.org.uk>
Tested-by: Aleksei Kovura <alex3kov@zoho.com>
(Tested-by inferred from
<https://bugzilla.redhat.com/show_bug.cgi?id=1248758#c28>.)
Michael, Igor, can one of you guys please pick this up?
Thanks
Laszlo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC
2016-01-27 18:31 ` Laszlo Ersek
@ 2016-02-03 18:51 ` Laszlo Ersek
2016-02-03 19:02 ` Michael Tokarev
0 siblings, 1 reply; 14+ messages in thread
From: Laszlo Ersek @ 2016-02-03 18:51 UTC (permalink / raw)
To: Michael S. Tsirkin, Igor Mammedov
Cc: Aleksei Kovura, Xiao Guangrong, Steven Newbury, Michael Tokarev,
qemu-devel, Richard W.M. Jones, Shannon Zhao, Paolo Bonzini
On 01/27/16 19:31, Laszlo Ersek wrote:
> On 01/18/16 15:12, Laszlo Ersek wrote:
>> This is version 2 of
>> <http://thread.gmane.org/gmane.comp.emulators.qemu/386728>.
>>
>> Changes in v2 (also annotated per patch):
>> - introduce acpi_get_slic_oem() [MST],
>> - drop machine property that disables the SLIC-based override [MST].
>>
>> Cc: "Michael S. Tsirkin" <mst@redhat.com>
>> Cc: Aleksei Kovura <alex3kov@zoho.com>
>> Cc: Igor Mammedov <imammedo@redhat.com>
>> Cc: Michael Tokarev <mjt@tls.msk.ru>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Cc: Richard W.M. Jones <rjones@redhat.com>
>> Cc: Shannon Zhao <zhaoshenglong@huawei.com>
>> Cc: Steven Newbury <steve@snewbury.org.uk>
>> Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
>>
>> Thanks
>> Laszlo
>>
>> Laszlo Ersek (4):
>> acpi: take oem_id in build_header(), optionally
>> acpi: expose oem_id and oem_table_id in build_rsdt()
>> acpi: add function to extract oem_id and oem_table_id from the user's
>> SLIC
>> pc: set the OEM fields in the RSDT and the FADT from the SLIC
>>
>> include/hw/acpi/acpi.h | 7 +++++++
>> include/hw/acpi/aml-build.h | 5 +++--
>> hw/acpi/aml-build.c | 14 ++++++++++----
>> hw/acpi/core.c | 16 ++++++++++++++++
>> hw/acpi/nvdimm.c | 4 ++--
>> hw/arm/virt-acpi-build.c | 14 +++++++-------
>> hw/i386/acpi-build.c | 31 ++++++++++++++++++-------------
>> qemu-options.hx | 4 ++++
>> 8 files changed, 67 insertions(+), 28 deletions(-)
>>
>
> Ping -- here's the review & testing feedback thus far:
>
> patch 1: Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
> Reviewed-by: Steven Newbury <steve@snewbury.org.uk>
> Tested-by: Aleksei Kovura <alex3kov@zoho.com>
>
> patch 2: Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
> Reviewed-by: Steven Newbury <steve@snewbury.org.uk>
> Tested-by: Aleksei Kovura <alex3kov@zoho.com>
>
> patch 3: Reviewed-by: Steven Newbury <steve@snewbury.org.uk>
> Tested-by: Aleksei Kovura <alex3kov@zoho.com>
>
> patch 4: Reviewed-by: Steven Newbury <steve@snewbury.org.uk>
> Tested-by: Aleksei Kovura <alex3kov@zoho.com>
>
> (Tested-by inferred from
> <https://bugzilla.redhat.com/show_bug.cgi?id=1248758#c28>.)
>
> Michael, Igor, can one of you guys please pick this up?
Ping #2.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC
2016-02-03 18:51 ` Laszlo Ersek
@ 2016-02-03 19:02 ` Michael Tokarev
2016-02-03 19:45 ` Laszlo Ersek
2016-02-03 20:37 ` Richard W.M. Jones
0 siblings, 2 replies; 14+ messages in thread
From: Michael Tokarev @ 2016-02-03 19:02 UTC (permalink / raw)
To: Laszlo Ersek, Michael S. Tsirkin, Igor Mammedov
Cc: Aleksei Kovura, Xiao Guangrong, Steven Newbury,
Richard W.M. Jones, qemu-devel, Shannon Zhao, Paolo Bonzini
03.02.2016 21:51, Laszlo Ersek wrote:
> Ping #2.
I think I asked this before, but somehow I don't see anyone
answered. Is this thing worth to have now, when windows7 is
2 releases away, everyone is moving to windows8 or 10 rapidly,
and these OSes don't benefit from this patch due to different
activation scheme and different licensing terms?
Is it useful for anything but win7 (or 2008) ?
It was definitely useful when I dealt with this issue back
when win7 come out, at that time it received no interest.
Now, I think, it is of very limited/questionable use...
Thanks,
/mjt
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC
2016-02-03 19:02 ` Michael Tokarev
@ 2016-02-03 19:45 ` Laszlo Ersek
2016-02-03 20:37 ` Richard W.M. Jones
1 sibling, 0 replies; 14+ messages in thread
From: Laszlo Ersek @ 2016-02-03 19:45 UTC (permalink / raw)
To: Michael Tokarev, Michael S. Tsirkin, Igor Mammedov
Cc: Aleksei Kovura, Xiao Guangrong, Steven Newbury,
Richard W.M. Jones, qemu-devel, Shannon Zhao, Paolo Bonzini
On 02/03/16 20:02, Michael Tokarev wrote:
> 03.02.2016 21:51, Laszlo Ersek wrote:
>> Ping #2.
>
> I think I asked this before, but somehow I don't see anyone
> answered. Is this thing worth to have now, when windows7 is
> 2 releases away, everyone is moving to windows8 or 10 rapidly,
> and these OSes don't benefit from this patch due to different
> activation scheme and different licensing terms?
>
> Is it useful for anything but win7 (or 2008) ?
>
> It was definitely useful when I dealt with this issue back
> when win7 come out, at that time it received no interest.
> Now, I think, it is of very limited/questionable use...
I can forward the arguments of the people who requested this functionality:
(1) Aleksei requested this fairly recently:
<https://github.com/tianocore/edk2/issues/5>.
(2) I've seen arguments about the long-term relevance of
Windows 2008 R2:
<https://bugzilla.redhat.com/show_bug.cgi?id=1248758#c15>
and of Windows 7:
<https://bugzilla.redhat.com/show_bug.cgi?id=1248758#c16>
My own arguments:
- SLIC is actually governed by a public Microsoft spec, so it doesn't
hurt to conform to it.
- We went to *much* greater lengths for enabling UEFI Windows 7 / UEFI
Windows Server 2008 R2 on top of OVMF *without* a CSM. UEFI is not
relevant at all in this thread, I'm just saying that in comparison to
what we had taken on for the Win7 family's sake, this effort is almost
negligible.
Thanks
Laszlo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC
2016-02-03 19:02 ` Michael Tokarev
2016-02-03 19:45 ` Laszlo Ersek
@ 2016-02-03 20:37 ` Richard W.M. Jones
1 sibling, 0 replies; 14+ messages in thread
From: Richard W.M. Jones @ 2016-02-03 20:37 UTC (permalink / raw)
To: Michael Tokarev
Cc: Aleksei Kovura, Xiao Guangrong, Steven Newbury,
Michael S. Tsirkin, qemu-devel, Paolo Bonzini, Shannon Zhao,
Igor Mammedov, Laszlo Ersek
On Wed, Feb 03, 2016 at 10:02:40PM +0300, Michael Tokarev wrote:
> 03.02.2016 21:51, Laszlo Ersek wrote:
> > Ping #2.
>
> I think I asked this before, but somehow I don't see anyone
> answered. Is this thing worth to have now, when windows7 is
> 2 releases away, everyone is moving to windows8 or 10 rapidly,
> and these OSes don't benefit from this patch due to different
> activation scheme and different licensing terms?
>
> Is it useful for anything but win7 (or 2008) ?
>
> It was definitely useful when I dealt with this issue back
> when win7 come out, at that time it received no interest.
> Now, I think, it is of very limited/questionable use...
Given the limitation that I cannot reproduce this, if it's a real
problem then it's certainly something we would need for virt-p2v.
The aim of virt-p2v is to virtualize existing Windows hosts, for VDI,
to extend the life of hardware, or just generally to get the usual
benefits of virtualization.
Enterprises often don't want to upgrade Windows frequently, and
Windows 7 is supported by Microsoft until 2020-01-14 -- another 4
years.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2016-02-03 20:37 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-18 14:12 [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC Laszlo Ersek
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 1/4] acpi: take oem_id in build_header(), optionally Laszlo Ersek
2016-01-19 3:27 ` Shannon Zhao
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 2/4] acpi: expose oem_id and oem_table_id in build_rsdt() Laszlo Ersek
2016-01-19 3:29 ` Shannon Zhao
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 3/4] acpi: add function to extract oem_id and oem_table_id from the user's SLIC Laszlo Ersek
2016-01-18 14:12 ` [Qemu-devel] [PATCH v2 4/4] pc: set the OEM fields in the RSDT and the FADT from the SLIC Laszlo Ersek
2016-01-19 7:35 ` [Qemu-devel] [PATCH v2 0/4] " Steven Newbury
2016-01-19 7:40 ` Steven Newbury
2016-01-27 18:31 ` Laszlo Ersek
2016-02-03 18:51 ` Laszlo Ersek
2016-02-03 19:02 ` Michael Tokarev
2016-02-03 19:45 ` Laszlo Ersek
2016-02-03 20:37 ` Richard W.M. Jones
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).