... so make its return type reflect this.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: George Dunlap <george.dunlap@citrix.com>
switch ( (bmap_ptr = flags & ~UVMF_FLUSHTYPE_MASK) )
{
case UVMF_LOCAL:
- if ( !paging_mode_enabled(d) ||
- (paging_invlpg(v, va) != 0) )
+ if ( !paging_mode_enabled(d) || paging_invlpg(v, va) )
flush_tlb_one_local(va);
break;
case UVMF_ALL:
* HAP guests can handle invlpg without needing any action from Xen, so
* should not be intercepting it.
*/
-static int hap_invlpg(struct vcpu *v, unsigned long va)
+static bool_t hap_invlpg(struct vcpu *v, unsigned long va)
{
if (nestedhvm_enabled(v->domain)) {
/* Emulate INVLPGA:
}
-static int
-sh_invlpg(struct vcpu *v, unsigned long va)
-/* Called when the guest requests an invlpg. Returns 1 if the invlpg
+/*
+ * Called when the guest requests an invlpg. Returns 1 if the invlpg
* instruction should be issued on the hardware, or 0 if it's safe not
- * to do so. */
+ * to do so.
+ */
+static bool_t sh_invlpg(struct vcpu *v, unsigned long va)
{
mfn_t sl1mfn;
shadow_l2e_t sl2e;
return 0;
}
-static int _invlpg(struct vcpu *v, unsigned long va)
+static bool_t _invlpg(struct vcpu *v, unsigned long va)
{
ASSERT_UNREACHABLE();
- return -EOPNOTSUPP;
+ return 1;
}
static unsigned long _gva_to_gfn(struct vcpu *v, struct p2m_domain *p2m,
struct paging_mode {
int (*page_fault )(struct vcpu *v, unsigned long va,
struct cpu_user_regs *regs);
- int (*invlpg )(struct vcpu *v, unsigned long va);
+ bool_t (*invlpg )(struct vcpu *v, unsigned long va);
unsigned long (*gva_to_gfn )(struct vcpu *v,
struct p2m_domain *p2m,
unsigned long va,
/* Handle invlpg requests on vcpus.
* Returns 1 if the invlpg instruction should be issued on the hardware,
* or 0 if it's safe not to do so. */
-static inline int paging_invlpg(struct vcpu *v, unsigned long va)
+static inline bool_t paging_invlpg(struct vcpu *v, unsigned long va)
{
return (paging_mode_external(v->domain) ? is_canonical_address(va)
: __addr_ok(va)) &&