On 10/29/2018 03:53 PM, Alexandru Stefan ISAILA wrote: > Signed-off-by: Alexandru Isaila <aisa...@bitdefender.com> > Acked-by: Tamas K Lengyel <ta...@tklengyel.com> > Acked-by: Jan Beulich <jbeul...@suse.com> > > --- > Changes since V1: > - Made style corrections suggested by Jan. > --- > xen/arch/x86/hvm/hvm.c | 3 ++- > xen/arch/x86/mm/mem_sharing.c | 2 +- > xen/arch/x86/mm/p2m.c | 5 ++--- > xen/common/memory.c | 2 +- > xen/common/vm_event.c | 4 ++-- > xen/include/asm-x86/mem_sharing.h | 2 +- > xen/include/xen/vm_event.h | 8 ++++---- > 7 files changed, 13 insertions(+), 13 deletions(-) > > diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c > index a140e60c9c..a8566fb87c 100644 > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -1905,7 +1905,8 @@ int hvm_hap_nested_page_fault(paddr_t gpa, unsigned > long gla, > if ( sharing_enomem ) > { > int rv; > - if ( (rv = mem_sharing_notify_enomem(currd, gfn, 1)) < 0 ) > + > + if ( (rv = mem_sharing_notify_enomem(currd, gfn, true)) < 0 ) > { > gdprintk(XENLOG_ERR, "Domain %hu attempt to unshare " > "gfn %lx, ENOMEM and no helper (rc %d)\n", > diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c > index 1dab2c8cc3..be09c8871a 100644 > --- a/xen/arch/x86/mm/mem_sharing.c > +++ b/xen/arch/x86/mm/mem_sharing.c > @@ -546,7 +546,7 @@ static int audit(void) > } > > int mem_sharing_notify_enomem(struct domain *d, unsigned long gfn, > - bool_t allow_sleep) > + bool allow_sleep) > { > struct vcpu *v = current; > int rc; > diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c > index a00a3c1bff..4bdc5e34e0 100644 > --- a/xen/arch/x86/mm/p2m.c > +++ b/xen/arch/x86/mm/p2m.c > @@ -448,7 +448,7 @@ mfn_t __get_gfn_type_access(struct p2m_domain *p2m, > unsigned long gfn_l, > /* Try to unshare. If we fail, communicate ENOMEM without > * sleeping. */ > if ( mem_sharing_unshare_page(p2m->domain, gfn_l, 0) < 0 ) > - (void)mem_sharing_notify_enomem(p2m->domain, gfn_l, 0); > + mem_sharing_notify_enomem(p2m->domain, gfn_l, false);
Why do you remove the (void) cast here... > mfn = p2m->get_entry(p2m, gfn, t, a, q, page_order, NULL); > } > > @@ -839,8 +839,7 @@ guest_physmap_add_entry(struct domain *d, gfn_t gfn, > mfn_t mfn, > * Foreign domains are okay to place an event as they > * won't go to sleep. */ > (void)mem_sharing_notify_enomem(p2m->domain, > - gfn_x(gfn_add(gfn, i)), > - 0); > + gfn_x(gfn_add(gfn, i)), > false); ...but not here? -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel