[XEN][PATCH] x86/hvm: vpt: make hvm_set_guest_time() static

Grygorii Strashko posted 1 patch 6 days, 4 hours ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20251023150541.556368-1-grygorii._5Fstrashko@epam.com
xen/arch/x86/hvm/vpt.c             | 2 +-
xen/arch/x86/include/asm/hvm/hvm.h | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
[XEN][PATCH] x86/hvm: vpt: make hvm_set_guest_time() static
Posted by Grygorii Strashko 6 days, 4 hours ago
From: Grygorii Strashko <grygorii_strashko@epam.com>

The hvm_set_guest_time() is used only inside vpt.c, so make it static.

Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
---
 xen/arch/x86/hvm/vpt.c             | 2 +-
 xen/arch/x86/include/asm/hvm/hvm.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c
index 4d8683064479..50ed7389985a 100644
--- a/xen/arch/x86/hvm/vpt.c
+++ b/xen/arch/x86/hvm/vpt.c
@@ -48,7 +48,7 @@ uint64_t hvm_get_guest_time_fixed(const struct vcpu *v, uint64_t at_tsc)
     return now + v->arch.hvm.stime_offset;
 }
 
-void hvm_set_guest_time(struct vcpu *v, u64 guest_time)
+static void hvm_set_guest_time(struct vcpu *v, u64 guest_time)
 {
     u64 offset = guest_time - hvm_get_guest_time(v);
 
diff --git a/xen/arch/x86/include/asm/hvm/hvm.h b/xen/arch/x86/include/asm/hvm/hvm.h
index f02183691ea6..838ad5b59eb0 100644
--- a/xen/arch/x86/include/asm/hvm/hvm.h
+++ b/xen/arch/x86/include/asm/hvm/hvm.h
@@ -287,7 +287,6 @@ u64 hvm_scale_tsc(const struct domain *d, u64 tsc);
 u64 hvm_get_tsc_scaling_ratio(u32 gtsc_khz);
 
 void hvm_init_guest_time(struct domain *d);
-void hvm_set_guest_time(struct vcpu *v, u64 guest_time);
 uint64_t hvm_get_guest_time_fixed(const struct vcpu *v, uint64_t at_tsc);
 
 int vmsi_deliver(
-- 
2.34.1
Re: [XEN][PATCH] x86/hvm: vpt: make hvm_set_guest_time() static
Posted by Jason Andryuk 5 days ago
On 2025-10-23 11:05, Grygorii Strashko wrote:
> From: Grygorii Strashko <grygorii_strashko@epam.com>
> 
> The hvm_set_guest_time() is used only inside vpt.c, so make it static.
> 
> Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>

Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
Re: [XEN][PATCH] x86/hvm: vpt: make hvm_set_guest_time() static
Posted by Andrew Cooper 5 days ago
On 24/10/2025 7:40 pm, Jason Andryuk wrote:
> On 2025-10-23 11:05, Grygorii Strashko wrote:
>> From: Grygorii Strashko <grygorii_strashko@epam.com>
>>
>> The hvm_set_guest_time() is used only inside vpt.c, so make it static.
>>
>> Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
>
> Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

Queued for 4.22.

~Andrew