* Xen Grant table frames for granting access permissions
@ 2017-08-10 13:47 Waseem, Amna
2017-11-06 9:57 ` Confused about mapped pages "struct page" updates Waseem, Amna
0 siblings, 1 reply; 4+ messages in thread
From: Waseem, Amna @ 2017-08-10 13:47 UTC (permalink / raw)
To: Julien Grall; +Cc: xen-devel, xen-devel@lists.xen.org
Hello All,
I am struggling with fixing the allocation of pages to some known physical pages used for mapping and granting access between guests.
I want to fix the allocation of pages i.e. their frame numbers to be be mapped to fixed physical pages. I only want to do this for pages shared between guests for mapping,c opying and transferring data.
Is there any way in linux to change mapping of already allocated pages to some fixed physical pages?
I want to change the mapping of pages allocated in kernel used by xen frontend and backend drivers to some fixed phsical address range.
I have looked into mremap functionality but it is used by user space applications, not by kernel drivers. ioremap maps a physcial address to a kernel virtual address space. But I want already allocated virtual address of page to a fixed physical page. I want to update its page table entry to point to fixed physical page.
Thanks
Amna
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Confused about mapped pages "struct page" updates
2017-08-10 13:47 Xen Grant table frames for granting access permissions Waseem, Amna
@ 2017-11-06 9:57 ` Waseem, Amna
2017-11-06 10:24 ` Juergen Gross
0 siblings, 1 reply; 4+ messages in thread
From: Waseem, Amna @ 2017-11-06 9:57 UTC (permalink / raw)
To: Julien Grall; +Cc: xen-devel, xen-devel@lists.xen.org
Hello All,
I am a little confused about mapping mechanism in Xen for page from DomU to Dom0.
When Dom0 maps DomU page to its applied host_addr, Page table entries are created by Xen hypervisor for mapping applied host_addr vritual address of Dom0 to DomU physical page. The result is host_addr maps to DomU phsyical page.
Now in network backend driver, virt_to_page macro is called on this mapped host_addr. How does Dom0 gets struct page for the mapped DomU page in its domain? Is Xen also updates mem_map array of Dom0 to create struct page for the mapped page? Or Dom0 creates struct page for all the physical memory including provided to DomU during its creation ?
Can anybody tell me how struct page for mapped pages from another domain gets updated or created in DOm0?
Any help will be appreciated
Thanks
Amna
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Confused about mapped pages "struct page" updates
2017-11-06 9:57 ` Confused about mapped pages "struct page" updates Waseem, Amna
@ 2017-11-06 10:24 ` Juergen Gross
2017-11-06 10:29 ` Waseem, Amna
0 siblings, 1 reply; 4+ messages in thread
From: Juergen Gross @ 2017-11-06 10:24 UTC (permalink / raw)
To: Waseem, Amna, Julien Grall; +Cc: xen-devel, xen-devel@lists.xen.org
On 06/11/17 10:57, Waseem, Amna wrote:
> Hello All,
>
> I am a little confused about mapping mechanism in Xen for page from DomU to Dom0.
>
> When Dom0 maps DomU page to its applied host_addr, Page table entries are created by Xen hypervisor for mapping applied host_addr vritual address of Dom0 to DomU physical page. The result is host_addr maps to DomU phsyical page.
>
> Now in network backend driver, virt_to_page macro is called on this mapped host_addr. How does Dom0 gets struct page for the mapped DomU page in its domain? Is Xen also updates mem_map array of Dom0 to create struct page for the mapped page? Or Dom0 creates struct page for all the physical memory including provided to DomU during its creation ?
>
> Can anybody tell me how struct page for mapped pages from another domain gets updated or created in DOm0?
Dom0 requests the mapping for a specific Dom0 physical address
(normally this is a page from the balloon driver, but in case no
ballooned page is available a kernel page is being allocated for
that purpose). So there always is a struct page available in Dom0.
host_addr above is part of Dom0 physical addresses. And the hypervisor
either modifies the Dom0 page table entry (in case of a PV Dom0 on
X86) or it just modifies the p2m mapping of the Dom0 physical address
(in case of ARM).
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Confused about mapped pages "struct page" updates
2017-11-06 10:24 ` Juergen Gross
@ 2017-11-06 10:29 ` Waseem, Amna
0 siblings, 0 replies; 4+ messages in thread
From: Waseem, Amna @ 2017-11-06 10:29 UTC (permalink / raw)
To: Juergen Gross, Julien Grall; +Cc: xen-devel, xen-devel@lists.xen.org
Thanks a lot
I understood it now
________________________________________
From: Juergen Gross <jgross@suse.com>
Sent: Monday, November 6, 2017 11:24 AM
To: Waseem, Amna; Julien Grall
Cc: xen-devel; xen-devel@lists.xen.org
Subject: Re: [Xen-devel] Confused about mapped pages "struct page" updates
On 06/11/17 10:57, Waseem, Amna wrote:
> Hello All,
>
> I am a little confused about mapping mechanism in Xen for page from DomU to Dom0.
>
> When Dom0 maps DomU page to its applied host_addr, Page table entries are created by Xen hypervisor for mapping applied host_addr vritual address of Dom0 to DomU physical page. The result is host_addr maps to DomU phsyical page.
>
> Now in network backend driver, virt_to_page macro is called on this mapped host_addr. How does Dom0 gets struct page for the mapped DomU page in its domain? Is Xen also updates mem_map array of Dom0 to create struct page for the mapped page? Or Dom0 creates struct page for all the physical memory including provided to DomU during its creation ?
>
> Can anybody tell me how struct page for mapped pages from another domain gets updated or created in DOm0?
Dom0 requests the mapping for a specific Dom0 physical address
(normally this is a page from the balloon driver, but in case no
ballooned page is available a kernel page is being allocated for
that purpose). So there always is a struct page available in Dom0.
host_addr above is part of Dom0 physical addresses. And the hypervisor
either modifies the Dom0 page table entry (in case of a PV Dom0 on
X86) or it just modifies the p2m mapping of the Dom0 physical address
(in case of ARM).
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-06 10:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-10 13:47 Xen Grant table frames for granting access permissions Waseem, Amna
2017-11-06 9:57 ` Confused about mapped pages "struct page" updates Waseem, Amna
2017-11-06 10:24 ` Juergen Gross
2017-11-06 10:29 ` Waseem, Amna
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).