* [PATCH v2] xen/vm_event: fix rc check for uninitialized ring
@ 2019-05-24 15:23 ` Juergen Gross
0 siblings, 0 replies; 6+ messages in thread
From: Juergen Gross @ 2019-05-24 15:23 UTC (permalink / raw)
To: xen-devel
Cc: Juergen Gross, Tamas K Lengyel, Wei Liu, Razvan Cojocaru,
George Dunlap, Andrew Cooper, Jan Beulich, Roger Pau Monné
vm_event_claim_slot() returns -EOPNOTSUPP for an uninitialized ring
since commit 15e4dd5e866b43bbc ("common/vm_event: Initialize vm_event
lists on domain creation"), but the callers test for -ENOSYS.
Correct the callers.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
V2: add blank line (Jan Beulich)
replace two further ENOSYS returns with EOPNOTSUPP (Razvan Cojocaru)
---
xen/arch/x86/mm/p2m.c | 3 ++-
xen/common/monitor.c | 2 +-
xen/common/vm_event.c | 6 +++---
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 57c5eeda91..8fd3c9d996 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -1705,7 +1705,8 @@ void p2m_mem_paging_populate(struct domain *d, unsigned long gfn_l)
/* We're paging. There should be a ring */
int rc = vm_event_claim_slot(d, d->vm_event_paging);
- if ( rc == -ENOSYS )
+
+ if ( rc == -EOPNOTSUPP )
{
gdprintk(XENLOG_ERR, "Domain %hu paging gfn %lx yet no ring "
"in place\n", d->domain_id, gfn_l);
diff --git a/xen/common/monitor.c b/xen/common/monitor.c
index cb5f37fdb2..d5c9ff1cbf 100644
--- a/xen/common/monitor.c
+++ b/xen/common/monitor.c
@@ -98,7 +98,7 @@ int monitor_traps(struct vcpu *v, bool sync, vm_event_request_t *req)
{
case 0:
break;
- case -ENOSYS:
+ case -EOPNOTSUPP:
/*
* If there was no ring to handle the event, then
* simply continue executing normally.
diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c
index 6e68be47bc..6833c21544 100644
--- a/xen/common/vm_event.c
+++ b/xen/common/vm_event.c
@@ -64,7 +64,7 @@ static int vm_event_enable(
/* The parameter defaults to zero, and it should be
* set to something */
if ( ring_gfn == 0 )
- return -ENOSYS;
+ return -EOPNOTSUPP;
vm_event_ring_lock_init(*ved);
vm_event_ring_lock(*ved);
@@ -465,7 +465,7 @@ static int vm_event_grab_slot(struct vm_event_domain *ved, int foreign)
unsigned int avail_req;
if ( !ved->ring_page )
- return -ENOSYS;
+ return -EOPNOTSUPP;
vm_event_ring_lock(ved);
@@ -513,7 +513,7 @@ bool vm_event_check_ring(struct vm_event_domain *ved)
* this function will always return 0 for a guest. For a non-guest, we check
* for space and return -EBUSY if the ring is not available.
*
- * Return codes: -ENOSYS: the ring is not yet configured
+ * Return codes: -EOPNOTSUPP: the ring is not yet configured
* -EBUSY: the ring is busy
* 0: a spot has been reserved
*
--
2.16.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Xen-devel] [PATCH v2] xen/vm_event: fix rc check for uninitialized ring
@ 2019-05-24 15:23 ` Juergen Gross
0 siblings, 0 replies; 6+ messages in thread
From: Juergen Gross @ 2019-05-24 15:23 UTC (permalink / raw)
To: xen-devel
Cc: Juergen Gross, Tamas K Lengyel, Wei Liu, Razvan Cojocaru,
George Dunlap, Andrew Cooper, Jan Beulich, Roger Pau Monné
vm_event_claim_slot() returns -EOPNOTSUPP for an uninitialized ring
since commit 15e4dd5e866b43bbc ("common/vm_event: Initialize vm_event
lists on domain creation"), but the callers test for -ENOSYS.
Correct the callers.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
V2: add blank line (Jan Beulich)
replace two further ENOSYS returns with EOPNOTSUPP (Razvan Cojocaru)
---
xen/arch/x86/mm/p2m.c | 3 ++-
xen/common/monitor.c | 2 +-
xen/common/vm_event.c | 6 +++---
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 57c5eeda91..8fd3c9d996 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -1705,7 +1705,8 @@ void p2m_mem_paging_populate(struct domain *d, unsigned long gfn_l)
/* We're paging. There should be a ring */
int rc = vm_event_claim_slot(d, d->vm_event_paging);
- if ( rc == -ENOSYS )
+
+ if ( rc == -EOPNOTSUPP )
{
gdprintk(XENLOG_ERR, "Domain %hu paging gfn %lx yet no ring "
"in place\n", d->domain_id, gfn_l);
diff --git a/xen/common/monitor.c b/xen/common/monitor.c
index cb5f37fdb2..d5c9ff1cbf 100644
--- a/xen/common/monitor.c
+++ b/xen/common/monitor.c
@@ -98,7 +98,7 @@ int monitor_traps(struct vcpu *v, bool sync, vm_event_request_t *req)
{
case 0:
break;
- case -ENOSYS:
+ case -EOPNOTSUPP:
/*
* If there was no ring to handle the event, then
* simply continue executing normally.
diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c
index 6e68be47bc..6833c21544 100644
--- a/xen/common/vm_event.c
+++ b/xen/common/vm_event.c
@@ -64,7 +64,7 @@ static int vm_event_enable(
/* The parameter defaults to zero, and it should be
* set to something */
if ( ring_gfn == 0 )
- return -ENOSYS;
+ return -EOPNOTSUPP;
vm_event_ring_lock_init(*ved);
vm_event_ring_lock(*ved);
@@ -465,7 +465,7 @@ static int vm_event_grab_slot(struct vm_event_domain *ved, int foreign)
unsigned int avail_req;
if ( !ved->ring_page )
- return -ENOSYS;
+ return -EOPNOTSUPP;
vm_event_ring_lock(ved);
@@ -513,7 +513,7 @@ bool vm_event_check_ring(struct vm_event_domain *ved)
* this function will always return 0 for a guest. For a non-guest, we check
* for space and return -EBUSY if the ring is not available.
*
- * Return codes: -ENOSYS: the ring is not yet configured
+ * Return codes: -EOPNOTSUPP: the ring is not yet configured
* -EBUSY: the ring is busy
* 0: a spot has been reserved
*
--
2.16.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] xen/vm_event: fix rc check for uninitialized ring
@ 2019-05-24 16:18 ` Razvan Cojocaru
0 siblings, 0 replies; 6+ messages in thread
From: Razvan Cojocaru @ 2019-05-24 16:18 UTC (permalink / raw)
To: Juergen Gross, xen-devel
Cc: Tamas K Lengyel, Wei Liu, George Dunlap, Andrew Cooper,
Jan Beulich, Roger Pau Monné
On 5/24/19 6:23 PM, Juergen Gross wrote:
> vm_event_claim_slot() returns -EOPNOTSUPP for an uninitialized ring
> since commit 15e4dd5e866b43bbc ("common/vm_event: Initialize vm_event
> lists on domain creation"), but the callers test for -ENOSYS.
>
> Correct the callers.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> V2: add blank line (Jan Beulich)
> replace two further ENOSYS returns with EOPNOTSUPP (Razvan Cojocaru)
Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Thanks,
Razvan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xen-devel] [PATCH v2] xen/vm_event: fix rc check for uninitialized ring
@ 2019-05-24 16:18 ` Razvan Cojocaru
0 siblings, 0 replies; 6+ messages in thread
From: Razvan Cojocaru @ 2019-05-24 16:18 UTC (permalink / raw)
To: Juergen Gross, xen-devel
Cc: Tamas K Lengyel, Wei Liu, George Dunlap, Andrew Cooper,
Jan Beulich, Roger Pau Monné
On 5/24/19 6:23 PM, Juergen Gross wrote:
> vm_event_claim_slot() returns -EOPNOTSUPP for an uninitialized ring
> since commit 15e4dd5e866b43bbc ("common/vm_event: Initialize vm_event
> lists on domain creation"), but the callers test for -ENOSYS.
>
> Correct the callers.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> V2: add blank line (Jan Beulich)
> replace two further ENOSYS returns with EOPNOTSUPP (Razvan Cojocaru)
Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Thanks,
Razvan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] xen/vm_event: fix rc check for uninitialized ring
@ 2019-05-27 16:32 ` George Dunlap
0 siblings, 0 replies; 6+ messages in thread
From: George Dunlap @ 2019-05-27 16:32 UTC (permalink / raw)
To: Juergen Gross, xen-devel
Cc: Tamas K Lengyel, Wei Liu, Razvan Cojocaru, George Dunlap,
Andrew Cooper, Jan Beulich, Roger Pau Monné
On 5/24/19 4:23 PM, Juergen Gross wrote:
> vm_event_claim_slot() returns -EOPNOTSUPP for an uninitialized ring
> since commit 15e4dd5e866b43bbc ("common/vm_event: Initialize vm_event
> lists on domain creation"), but the callers test for -ENOSYS.
>
> Correct the callers.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xen-devel] [PATCH v2] xen/vm_event: fix rc check for uninitialized ring
@ 2019-05-27 16:32 ` George Dunlap
0 siblings, 0 replies; 6+ messages in thread
From: George Dunlap @ 2019-05-27 16:32 UTC (permalink / raw)
To: Juergen Gross, xen-devel
Cc: Tamas K Lengyel, Wei Liu, Razvan Cojocaru, George Dunlap,
Andrew Cooper, Jan Beulich, Roger Pau Monné
On 5/24/19 4:23 PM, Juergen Gross wrote:
> vm_event_claim_slot() returns -EOPNOTSUPP for an uninitialized ring
> since commit 15e4dd5e866b43bbc ("common/vm_event: Initialize vm_event
> lists on domain creation"), but the callers test for -ENOSYS.
>
> Correct the callers.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-05-27 16:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 15:23 [PATCH v2] xen/vm_event: fix rc check for uninitialized ring Juergen Gross
2019-05-24 15:23 ` [Xen-devel] " Juergen Gross
2019-05-24 16:18 ` Razvan Cojocaru
2019-05-24 16:18 ` [Xen-devel] " Razvan Cojocaru
2019-05-27 16:32 ` George Dunlap
2019-05-27 16:32 ` [Xen-devel] " George Dunlap
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.