* [PATCH for-4.8 0/2] Minor ACPI fixes for PVHv2 DomU
@ 2016-11-07 11:55 Roger Pau Monne
2016-11-07 11:55 ` [PATCH for-4.8 1/2] libxc: properly account for the page offset when copying ACPI data Roger Pau Monne
2016-11-07 11:55 ` [PATCH for-4.8 2/2] libxc: set rsdp pointer for PVHv2 guests Roger Pau Monne
0 siblings, 2 replies; 5+ messages in thread
From: Roger Pau Monne @ 2016-11-07 11:55 UTC (permalink / raw)
To: xen-devel
This series includes two patches to fix some minor issues with PVHv2 and
ACPI.
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH for-4.8 1/2] libxc: properly account for the page offset when copying ACPI data
2016-11-07 11:55 [PATCH for-4.8 0/2] Minor ACPI fixes for PVHv2 DomU Roger Pau Monne
@ 2016-11-07 11:55 ` Roger Pau Monne
2016-11-07 12:59 ` Andrew Cooper
2016-11-07 11:55 ` [PATCH for-4.8 2/2] libxc: set rsdp pointer for PVHv2 guests Roger Pau Monne
1 sibling, 1 reply; 5+ messages in thread
From: Roger Pau Monne @ 2016-11-07 11:55 UTC (permalink / raw)
To: xen-devel; +Cc: Wei Liu, Boris Ostrovsky, Ian Jackson, 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é <roger.pau@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
tools/libxc/xc_dom_core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
index e177667..cbc1a43 100644
--- a/tools/libxc/xc_dom_core.c
+++ b/tools/libxc/xc_dom_core.c
@@ -1118,6 +1118,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);
--
2.7.4 (Apple Git-66)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH for-4.8 2/2] libxc: set rsdp pointer for PVHv2 guests
2016-11-07 11:55 [PATCH for-4.8 0/2] Minor ACPI fixes for PVHv2 DomU Roger Pau Monne
2016-11-07 11:55 ` [PATCH for-4.8 1/2] libxc: properly account for the page offset when copying ACPI data Roger Pau Monne
@ 2016-11-07 11:55 ` Roger Pau Monne
2016-11-07 14:40 ` Boris Ostrovsky
1 sibling, 1 reply; 5+ messages in thread
From: Roger Pau Monne @ 2016-11-07 11:55 UTC (permalink / raw)
To: xen-devel; +Cc: Wei Liu, Boris Ostrovsky, Ian Jackson, 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é <roger.pau@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
tools/libxc/xc_dom_x86.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c
index 0eab8a7..0f52520 100644
--- a/tools/libxc/xc_dom_x86.c
+++ b/tools/libxc/xc_dom_x86.c
@@ -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;
}
+
+ /* Module 0 is the RSDP */
+ start_info->rsdp_paddr = dom->acpi_modules[0].guest_addr_out ? : 0;
}
else
{
--
2.7.4 (Apple Git-66)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH for-4.8 1/2] libxc: properly account for the page offset when copying ACPI data
2016-11-07 11:55 ` [PATCH for-4.8 1/2] libxc: properly account for the page offset when copying ACPI data Roger Pau Monne
@ 2016-11-07 12:59 ` Andrew Cooper
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cooper @ 2016-11-07 12:59 UTC (permalink / raw)
To: Roger Pau Monne, xen-devel; +Cc: Ian Jackson, Boris Ostrovsky, Wei Liu
On 07/11/16 11:55, Roger Pau Monne wrote:
> 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é <roger.pau@citrix.com>
> ---
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> tools/libxc/xc_dom_core.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
> index e177667..cbc1a43 100644
> --- a/tools/libxc/xc_dom_core.c
> +++ b/tools/libxc/xc_dom_core.c
> @@ -1118,6 +1118,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);
You also need to adjust the num_pages calculation, or you risk
memcpy()'ing off the end of the foreign mapping.
~Andrew
> +
> memcpy(ptr, dom->acpi_modules[i].data, dom->acpi_modules[i].length);
> munmap(ptr, XC_PAGE_SIZE * num_pages);
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH for-4.8 2/2] libxc: set rsdp pointer for PVHv2 guests
2016-11-07 11:55 ` [PATCH for-4.8 2/2] libxc: set rsdp pointer for PVHv2 guests Roger Pau Monne
@ 2016-11-07 14:40 ` Boris Ostrovsky
0 siblings, 0 replies; 5+ messages in thread
From: Boris Ostrovsky @ 2016-11-07 14:40 UTC (permalink / raw)
To: Roger Pau Monne, xen-devel; +Cc: Wei Liu, Ian Jackson
On 11/07/2016 06:55 AM, Roger Pau Monne wrote:
> 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é <roger.pau@citrix.com>
> ---
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> tools/libxc/xc_dom_x86.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c
> index 0eab8a7..0f52520 100644
> --- a/tools/libxc/xc_dom_x86.c
> +++ b/tools/libxc/xc_dom_x86.c
> @@ -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;
> }
> +
> + /* Module 0 is the RSDP */
I'd say "ACPI module 0" because modlist (right above the comment) also
operates on modules and that may confuse people (it did for me).
-boris
> + start_info->rsdp_paddr = dom->acpi_modules[0].guest_addr_out ? : 0;
> }
> else
> {
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-11-07 14:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-07 11:55 [PATCH for-4.8 0/2] Minor ACPI fixes for PVHv2 DomU Roger Pau Monne
2016-11-07 11:55 ` [PATCH for-4.8 1/2] libxc: properly account for the page offset when copying ACPI data Roger Pau Monne
2016-11-07 12:59 ` Andrew Cooper
2016-11-07 11:55 ` [PATCH for-4.8 2/2] libxc: set rsdp pointer for PVHv2 guests Roger Pau Monne
2016-11-07 14:40 ` Boris Ostrovsky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.