[PATCH 0/3] Fix alignment of FACS in guests

2021-09-09 Thread Kevin Stefanov
several bugs in the toolstack whilst writing ACPI tables. Kevin Stefanov (3): tools/libacpi: Use 64-byte alignment for FACS tools/libxl: Correctly aligned buffer for ACPI tables tools/libxl: Only allocate 64 bytes for RSDP tools/libacpi/build.c | 2 +- tools/libs/light

[PATCH 1/3] tools/libacpi: Use 64-byte alignment for FACS

2021-09-09 Thread Kevin Stefanov
The spec requires 64-byte alignment, not 16. Signed-off-by: Kevin Stefanov --- CC: Jan Beulich CC: Andrew Cooper Note: This does not fix the FACS alignment inside guests yet. See next patch. --- tools/libacpi/build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools

[PATCH 2/3] tools/libxl: Correctly aligned buffer for ACPI tables

2021-09-09 Thread Kevin Stefanov
are copied into guest memory. Align the ACPI tables buffer to a page, to match the alignment inside guest memory. The buffer is already one page too large, presumably intended for this purpose originally. Fixes: 14c0d328da2b ("libxl/acpi: Build ACPI tables for HVMlite guests") Signed-off

[PATCH 3/3] tools/libxl: Only allocate 64 bytes for RSDP

2021-09-09 Thread Kevin Stefanov
RSDP's size is 64 bytes and later in the function, its buffer is hardcoded to be 64 bytes long. Don't bother to allocate a whole page. Signed-off-by: Kevin Stefanov --- CC: Andrew Cooper CC: Ian Jackson CC: Wei Liu CC: Anthony PERARD --- tools/libs/light/libxl_x86_acpi.c | 2

[PATCH v2] tools/libxl: Correctly align the ACPI tables

2021-09-14 Thread Kevin Stefanov
gn in guest physical address space instead of libxl's virtual memory and improve the calculation, drop errant extra page in allocated buffer for ACPI tables, and give some of the variables better names/types. Fixes: 14c0d328da2b ("libxl/acpi: Build ACPI tables for HVMlite guests")

[PATCH v3] tools/libxl: Correctly align the ACPI tables

2021-09-15 Thread Kevin Stefanov
gn in guest physical address space instead of libxl's virtual memory and improve the calculation, drop errant extra page in allocated buffer for ACPI tables, and give some of the variables better names/types. Fixes: 14c0d328da2b ("libxl/acpi: Build ACPI tables for HVMlite guests")

[PATCH] tools/libxl: Remove page_size and page_shift from struct libxl_acpi_ctxt

2021-09-24 Thread Kevin Stefanov
As a result of recent work, two members of struct libxl_acpi_ctxt were left with only one user. Thus, it becomes illogical for them to be members of the struct at all. Drop the two struct members and instead let the only function using them have them as local variables. Signed-off-by: Kevin

[PATCH] tools/tests: Make E2BIG non-fatal to xenstore unit test

2021-10-13 Thread Kevin Stefanov
Xenstore's unit test fails on read and write of big numbers if quota-maxsize is set to a lower number than those test cases use. Output a special warning instead of a failure message in such cases and make the error non-fatal to the unit test. Signed-off-by: Kevin Stefanov --- CC: Ian Ja

[PATCH v2] tools/tests: Make E2BIG non-fatal to xenstore unit test

2021-10-15 Thread Kevin Stefanov
Xenstore's unit test fails on read and write of big numbers if quota-maxsize is set to a lower number than those test cases use. Output a special warning instead of a failure message in such cases and make the error non-fatal to the unit test. Signed-off-by: Kevin Stefanov --- CC: Ian Ja

[PATCH 1/2] xen/kexec: Remove use of TRUE/FALSE

2021-08-10 Thread Kevin Stefanov
Whilst fixing this, also changed bool_t to bool. Suggested-by: Andrew Cooper Signed-off-by: Kevin Stefanov --- CC: Andrew Cooper --- xen/common/kexec.c | 6 +++--- xen/include/xen/kexec.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/common/kexec.c b/xen

[PATCH 0/2] xen: Remove use of TRUE/FALSE

2021-08-10 Thread Kevin Stefanov
Kevin Stefanov (2): xen/kexec: Remove use of TRUE/FALSE x86/ioapic: Remove use of TRUE/FALSE xen/arch/x86/io_apic.c | 12 ++-- xen/common/kexec.c | 6 +++--- xen/drivers/passthrough/vtd/utils.c | 2 +- xen/include/xen/kexec.h | 2 +- 4

[PATCH 2/2] x86/ioapic: Remove use of TRUE/FALSE

2021-08-10 Thread Kevin Stefanov
Also fix stray usage in VT-d. Suggested-by: Andrew Cooper Signed-off-by: Kevin Stefanov --- CC: Jan Beulich CC: Andrew Cooper CC: "Roger Pau Monné" CC: Wei Liu CC: Kevin Tian --- xen/arch/x86/io_apic.c | 12 ++-- xen/drivers/passthrough/vtd/utils.c | 2 +

[PATCH v2 2/2] x86/ioapic: Remove use of TRUE/FALSE/1/0

2021-08-11 Thread Kevin Stefanov
Also fix stray usage in VT-d. Suggested-by: Andrew Cooper Signed-off-by: Kevin Stefanov --- CC: Jan Beulich CC: Andrew Cooper CC: "Roger Pau Monné" CC: Wei Liu CC: Kevin Tian v2: * Also replace literal 1/0 --- xen/arch/x86/io_apic.c | 38 +

[PATCH v2 0/2] xen: Replace uses of TRUE/FALSE

2021-08-11 Thread Kevin Stefanov
Kevin Stefanov (2): xen/kexec: Remove use of TRUE/FALSE x86/ioapic: Remove use of TRUE/FALSE/1/0 xen/arch/x86/io_apic.c | 38 +- xen/common/kexec.c | 6 ++-- xen/drivers/passthrough/vtd/intremap.c | 6 ++-- xen/drivers/passthrough

[PATCH v2 1/2] xen/kexec: Remove use of TRUE/FALSE

2021-08-11 Thread Kevin Stefanov
Whilst fixing this, also changed bool_t to bool, and use __read_mostly. Suggested-by: Andrew Cooper Signed-off-by: Kevin Stefanov Acked-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Andrew Cooper CC: Jan Beulich v2: *Use __read_mostly --- xen/common/kexec.c | 6 +++--- xen

[PATCH v3] x86/ioapic: Remove use of TRUE/FALSE/1/0

2021-08-16 Thread Kevin Stefanov
Also fix stray usage in VT-d. Suggested-by: Andrew Cooper Signed-off-by: Kevin Stefanov --- CC: Jan Beulich CC: Andrew Cooper CC: "Roger Pau Monné" CC: Wei Liu CC: Kevin Tian v2: * Also replace literal 1/0 v3: * Fix 1->false conversion error --- xen/arch/