Minor ACPI fixes for PVHv2 DomU
v2 cover Minor ACPI fixes for PVHv2 DomU
This series includes two patches to fix some minor issues with PVHv2 and ACPI.
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH v2 1/2 libxc: properly account for the page offset when copying ACPI data
Or else ACPI data is always copied at the start of the page pointed by guest_addr_out, ignoring the page offset.
---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
---
Changes since v1:
- Also fix the calculation of the required number of pages so that the offset is taken into account.
--- tools/libxc/xc_dom_core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
tools/libxc/xc_dom_core.c +6 -2
@@ -1090,8 +1090,9 @@ static int xc_dom_load_acpi(struct xc_dom_image *dom) dom->acpi_modules[i].length, dom->acpi_modules[i].guest_addr_out); - num_pages = (dom->acpi_modules[i].length + (XC_PAGE_SIZE -1 )) >> -XC_PAGE_SHIFT ; + num_pages = (dom->acpi_modules[i].length + + (dom->acpi_modules[i].guest_addr_out & ~XC_PAGE_MASK ) + + (XC_PAGE_SIZE -1 )) >>XC_PAGE_SHIFT ; extents =malloc (num_pages *sizeof (*extents));if ( !extents ) {
@@ -1118,6 +1119,9 @@ static int xc_dom_load_acpi(struct xc_dom_image *dom) goto err; } + ptr = (uint8_t *)ptr + + (dom->acpi_modules[i].guest_addr_out & ~XC_PAGE_MASK ); +memcpy (ptr, dom->acpi_modules[i].data, dom->acpi_modules[i].length);munmap (ptr,XC_PAGE_SIZE * num_pages);
Signature · 7 lines
2.7.4 (Apple Git-66) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.8 1/2] libxc: properly account for the page offset when copying ACPI data
Quoted 9 lines · Roger Pau Monne
Or else ACPI data is always copied at the start of the page pointed by
guest_addr_out, ignoring the page offset.Signed-off-by Roger Pau Monné <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.8 1/2] libxc: properly account for the page offset when copying ACPI data
In reply to Roger Pau MonneQuoted 9 lines · Roger Pau Monne
Or else ACPI data is always copied at the start of the page pointed by
guest_addr_out, ignoring the page offset.Signed-off-by Roger Pau Monné <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH v2 2/2 libxc: set rsdp pointer for PVHv2 guests
In reply to Roger Pau MonneSet the address of the RSDP in the HVM start info structure for PVHv2 DomUs that have ACPI tables.
---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
---
Changes since v1:
- Reword code comment.
--- tools/libxc/xc_dom_x86.c | 3 +++ 1 file changed, 3 insertions(+)
tools/libxc/xc_dom_x86.c +3 -0
@@ -1797,6 +1797,9 @@ static int bootlate_hvm(struct xc_dom_image *dom) modlist[0 ].size = dom->ramdisk_seg.vend - dom->ramdisk_seg.vstart; start_info->nr_modules =1 ; } + +/* ACPI module 0 is the RSDP */ + start_info->rsdp_paddr = dom->acpi_modules[0 ].guest_addr_out ? :0 ; }else {
Signature · 7 lines
2.7.4 (Apple Git-66) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.8 2/2] libxc: set rsdp pointer for PVHv2 guests
Quoted 9 lines · Roger Pau Monne
Set the address of the RSDP in the HVM start info structure for PVHv2 DomUs that have ACPI tables.
Signed-off-by Roger Pau Monné <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v2 for-4.8 2/2] libxc: set rsdp pointer for PVHv2 guests
In reply to Roger Pau MonneQuoted 9 lines · Roger Pau Monne
Set the address of the RSDP in the HVM start info structure for PVHv2 DomUs that have ACPI tables.
Signed-off-by Roger Pau Monné <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 5 lines · Roger Pau Monne
This series includes two patches to fix some minor issues with PVHv2 and ACPI.
Thanks, Roger.
Both patches applied.
Quoted 5 lines
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel