All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergej Proskurin <proskurin@sec.in.tum.de>
To: xen-devel@lists.xenproject.org
Cc: Sergej Proskurin <proskurin@sec.in.tum.de>,
	Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: [PATCH v4 19/39] arm/p2m: Make p2m_restore_state ready for altp2m
Date: Wed, 30 Aug 2017 20:32:38 +0200	[thread overview]
Message-ID: <20170830183258.14612-20-proskurin@sec.in.tum.de> (raw)
In-Reply-To: <20170830183258.14612-1-proskurin@sec.in.tum.de>

This commit adapts the function "p2m_restore_state" in a way that the
currently active altp2m table is considered during state restoration.

Signed-off-by: Sergej Proskurin <proskurin@sec.in.tum.de>
Acked-by: Julien Grall <julien.grall@arm.com>
---
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Julien Grall <julien.grall@arm.com>
---
v3: Moved declaration of "altp2m_switch_domain_altp2m_by_id" out of this
    patch.

v4: Moved the variable "p2m", as to satisfy compiler warnings, prohibiting
    mixing declarations and code.
---
 xen/arch/arm/p2m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index e017e2972e..16c7585ffa 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -112,8 +112,8 @@ void p2m_save_state(struct vcpu *p)
 
 void p2m_restore_state(struct vcpu *n)
 {
-    struct p2m_domain *p2m = p2m_get_hostp2m(n->domain);
     uint8_t *last_vcpu_ran;
+    struct p2m_domain *p2m = p2m_get_active_p2m(n);
 
     if ( is_idle_vcpu(n) )
         return;
-- 
2.13.3


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-08-30 18:33 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30 18:32 [PATCH v4 00/39] arm/altp2m: Introducing altp2m to ARM Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 01/39] arm/p2m: Introduce p2m_(switch|restore)_vttbr_and_(g|s)et_flags Sergej Proskurin
2017-10-09 16:25   ` Julien Grall
2018-01-10 12:45     ` Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 02/39] arm/p2m: Add first altp2m HVMOP stubs Sergej Proskurin
2017-10-09 16:43   ` Julien Grall
2018-01-10 17:16     ` Sergej Proskurin
2018-01-10 17:20       ` Julien Grall
2017-08-30 18:32 ` [PATCH v4 03/39] arm/p2m: Add hvm_allow_(set|get)_param Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 04/39] arm/p2m: Add HVMOP_altp2m_get_domain_state Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 05/39] arm/p2m: Introduce p2m_is_(hostp2m|altp2m) Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 06/39] arm/p2m: Cosmetic fix - substitute _gfn(ULONG_MAX) for INVALID_GFN Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 07/39] arm/p2m: Move hostp2m init/teardown to individual functions Sergej Proskurin
2017-10-09 17:15   ` Julien Grall
2018-01-10 17:06     ` Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 08/39] arm/p2m: Cosmetic fix - function prototype of p2m_alloc_table Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 09/39] arm/p2m: Rename parameter in p2m_alloc_vmid Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 10/39] arm/p2m: Change func prototype and impl of p2m_(alloc|free)_vmid Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 11/39] altp2m: Move (MAX|INVALID)_ALTP2M to xen/p2m-common.h Sergej Proskurin
2017-08-31  8:04   ` Jan Beulich
2017-08-31  9:49     ` Sergej Proskurin
2017-08-31 10:19       ` Jan Beulich
2017-08-31 14:03         ` Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 12/39] arm/p2m: Add altp2m init/teardown routines Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 13/39] arm/p2m: Add altp2m table flushing routine Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 14/39] arm/p2m: Add HVMOP_altp2m_set_domain_state Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 15/39] arm/p2m: Add HVMOP_altp2m_create_p2m Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 16/39] arm/p2m: Add HVMOP_altp2m_destroy_p2m Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 17/39] arm/p2m: Add HVMOP_altp2m_switch_p2m Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 18/39] arm/p2m: Add p2m_get_active_p2m macro Sergej Proskurin
2017-08-30 18:32 ` Sergej Proskurin [this message]
2017-08-30 18:32 ` [PATCH v4 20/39] arm/p2m: Make get_page_from_gva ready for altp2m Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 21/39] arm/p2m: Cosmetic fix - __p2m_get_mem_access Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 22/39] arm/p2m: Make p2m_mem_access_check ready for altp2m Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 23/39] arm/p2m: Cosmetic fix - function prototypes Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 24/39] arm/p2m: Make p2m_put_l3_page ready for altp2m Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 25/39] arm/p2m: Modify reference count only if hostp2m active Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 26/39] arm/p2m: Add HVMOP_altp2m_set_mem_access Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 27/39] arm/p2m: Add altp2m_propagate_change Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 28/39] altp2m: Rename p2m_altp2m_check to altp2m_check Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 29/39] x86/altp2m: Move altp2m_check to altp2m.c Sergej Proskurin
2017-08-30 18:42   ` Razvan Cojocaru
2017-08-30 19:02     ` Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 30/39] arm/altp2m: Move altp2m_check to altp2m.h Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 31/39] arm/altp2m: Introduce altp2m_switch_vcpu_altp2m_by_id Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 32/39] arm/altp2m: Make altp2m_vcpu_idx ready for altp2m Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 33/39] arm/p2m: Add altp2m paging mechanism Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 34/39] arm/p2m: Add HVMOP_altp2m_change_gfn Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 35/39] arm/p2m: Adjust debug information to altp2m Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 36/39] altp2m: Document external-only use on ARM Sergej Proskurin
2017-09-01 15:32   ` Wei Liu
2017-08-30 18:32 ` [PATCH v4 37/39] altp2m: Allow activating altp2m on ARM domains Sergej Proskurin
2017-09-01 15:35   ` Wei Liu
2017-08-30 18:32 ` [PATCH v4 38/39] arm/xen-access: Extend xen-access for altp2m on ARM Sergej Proskurin
2017-08-30 18:32 ` [PATCH v4 39/39] arm/xen-access: Add test of xc_altp2m_change_gfn Sergej Proskurin
2017-08-30 18:52   ` Razvan Cojocaru
2017-08-30 19:07     ` Sergej Proskurin
2017-10-07 10:18 ` [PATCH v4 00/39] arm/altp2m: Introducing altp2m to ARM Sergej Proskurin
2017-10-07 10:29   ` Julien Grall
2017-10-07 10:54     ` Sergej Proskurin
2017-10-09 17:21       ` Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170830183258.14612-20-proskurin@sec.in.tum.de \
    --to=proskurin@sec.in.tum.de \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.