x86/nestedhvm: Inline nestedhvm_vcpu_in_guestmode()

This function just returns vcpu_nestedhvm(v).nv_guestmode and would
be better inlined to improve codegen.

Signed-off-by: Teddy Astie <teddy.astie@vates.tech>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Teddy Astie authored and Jan Beulich committed 2026-10-27 09:00:21 +01:00
1 parent 8a9a4bcd7c
commit 4f4fc9afc5
2 files changed
+5 -9

No files matched your search

-7
View File
@@ -15,13 +15,6 @@
static unsigned long *shadow_io_bitmap[3]; static unsigned long *shadow_io_bitmap[3];
/* Nested VCPU */
bool
nestedhvm_vcpu_in_guestmode(struct vcpu *v)
{
return vcpu_nestedhvm(v).nv_guestmode;
}
void void
nestedhvm_vcpu_reset(struct vcpu *v) nestedhvm_vcpu_reset(struct vcpu *v)
{ {
+5 -2
View File
@@ -28,11 +28,14 @@ static inline bool nestedhvm_enabled(const struct domain *d)
return IS_ENABLED(CONFIG_HVM) && (d->options & XEN_DOMCTL_CDF_nested_virt); return IS_ENABLED(CONFIG_HVM) && (d->options & XEN_DOMCTL_CDF_nested_virt);
} }
/* Nested VCPU */ static inline bool nestedhvm_vcpu_in_guestmode(const struct vcpu *v)
{
return vcpu_nestedhvm(v).nv_guestmode;
}
int nestedhvm_vcpu_initialise(struct vcpu *v); int nestedhvm_vcpu_initialise(struct vcpu *v);
void nestedhvm_vcpu_destroy(struct vcpu *v); void nestedhvm_vcpu_destroy(struct vcpu *v);
void nestedhvm_vcpu_reset(struct vcpu *v); void nestedhvm_vcpu_reset(struct vcpu *v);
bool nestedhvm_vcpu_in_guestmode(struct vcpu *v);
#define nestedhvm_vcpu_enter_guestmode(v) \ #define nestedhvm_vcpu_enter_guestmode(v) \
vcpu_nestedhvm(v).nv_guestmode = 1 vcpu_nestedhvm(v).nv_guestmode = 1
#define nestedhvm_vcpu_exit_guestmode(v) \ #define nestedhvm_vcpu_exit_guestmode(v) \
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.