* [PATCH v3] x86/hvm: remove default ioreq server
@ 2018-08-07 15:42 Paul Durrant
2018-08-08 10:11 ` Jan Beulich
2018-08-27 13:22 ` Jan Beulich
0 siblings, 2 replies; 9+ messages in thread
From: Paul Durrant @ 2018-08-07 15:42 UTC (permalink / raw)
To: xen-devel; +Cc: Paul Durrant, Jan Beulich
My recent patch [1] to qemu-xen-traditional removes the last use of the
'default' ioreq server in Xen. (This is a catch-all ioreq server that is
used if no explicitly registered I/O range is targetted).
This patch can be applied once that patch is committed, to remove the
(>100 lines of) redundant code in Xen.
NOTE: The removal of the special case for HVM_PARAM_DM_DOMAIN in
hvm_allow_set_param() is not directly related to removal of
default ioreq servers. It could have been cleaned up at any time
after commit 9a422c03 "x86/hvm: stop passing explicit domid to
hvm_create_ioreq_server()". It is now added to the new
deprecated sets introduced by this patch.
[1] https://lists.xenproject.org/archives/html/xen-devel/2018-08/msg00270.html
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
v3:
- Add HVM_PARAM_DM_DOMAIN to deprecated sets and #ifdef in params.h.
v2:
- Disallow reads or writes of HVM_PARAM_BUFIOREQ_EVTCHN and mark it as
deprecated in the header.
- Updated commit comment w.r.t. HVM_PARAM_DM_DOMAIN change.
---
xen/arch/x86/hvm/dm.c | 2 +-
xen/arch/x86/hvm/hvm.c | 38 +++---------
xen/arch/x86/hvm/ioreq.c | 123 +++++----------------------------------
xen/include/asm-x86/hvm/domain.h | 1 -
xen/include/asm-x86/hvm/ioreq.h | 4 +-
xen/include/public/hvm/params.h | 9 +--
6 files changed, 33 insertions(+), 144 deletions(-)
diff --git a/xen/arch/x86/hvm/dm.c b/xen/arch/x86/hvm/dm.c
index 6755f3fd96..6ace3dc7c1 100644
--- a/xen/arch/x86/hvm/dm.c
+++ b/xen/arch/x86/hvm/dm.c
@@ -411,7 +411,7 @@ static int dm_op(const struct dmop_args *op_args)
if ( data->pad[0] || data->pad[1] || data->pad[2] )
break;
- rc = hvm_create_ioreq_server(d, false, data->handle_bufioreq,
+ rc = hvm_create_ioreq_server(d, data->handle_bufioreq,
&data->id);
break;
}
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 72c51faecb..cbfd6fca88 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4093,12 +4093,16 @@ static int hvm_allow_set_param(struct domain *d,
case HVM_PARAM_CONSOLE_EVTCHN:
case HVM_PARAM_X87_FIP_WIDTH:
break;
+ /* The following parameters are deprecated. */
+ case HVM_PARAM_DM_DOMAIN:
+ case HVM_PARAM_BUFIOREQ_EVTCHN:
+ rc = -EPERM;
+ break;
/*
* The following parameters must not be set by the guest
* since the domain may need to be paused.
*/
case HVM_PARAM_IDENT_PT:
- case HVM_PARAM_DM_DOMAIN:
case HVM_PARAM_ACPI_S_STATE:
/* The remaining parameters should not be set by the guest. */
default:
@@ -4263,9 +4267,6 @@ static int hvmop_set_param(
d->arch.hvm_domain.params[HVM_PARAM_NESTEDHVM] )
rc = -EINVAL;
break;
- case HVM_PARAM_BUFIOREQ_EVTCHN:
- rc = -EINVAL;
- break;
case HVM_PARAM_TRIPLE_FAULT_REASON:
if ( a.value > SHUTDOWN_MAX )
rc = -EINVAL;
@@ -4373,13 +4374,11 @@ static int hvm_allow_get_param(struct domain *d,
case HVM_PARAM_ALTP2M:
case HVM_PARAM_X87_FIP_WIDTH:
break;
- /*
- * The following parameters must not be read by the guest
- * since the domain may need to be paused.
- */
- case HVM_PARAM_IOREQ_PFN:
- case HVM_PARAM_BUFIOREQ_PFN:
+ /* The following parameters are deprecated. */
+ case HVM_PARAM_DM_DOMAIN:
case HVM_PARAM_BUFIOREQ_EVTCHN:
+ rc = -ENODATA;
+ break;
/* The remaining parameters should not be read by the guest. */
default:
if ( d == current->domain )
@@ -4433,25 +4432,6 @@ static int hvmop_get_param(
case HVM_PARAM_X87_FIP_WIDTH:
a.value = d->arch.x87_fip_width;
break;
- case HVM_PARAM_IOREQ_PFN:
- case HVM_PARAM_BUFIOREQ_PFN:
- case HVM_PARAM_BUFIOREQ_EVTCHN:
- /*
- * It may be necessary to create a default ioreq server here,
- * because legacy versions of QEMU are not aware of the new API for
- * explicit ioreq server creation. However, if the domain is not
- * under construction then it will not be QEMU querying the
- * parameters and thus the query should not have that side-effect.
- */
- if ( !d->creation_finished )
- {
- rc = hvm_create_ioreq_server(d, true,
- HVM_IOREQSRV_BUFIOREQ_LEGACY, NULL);
- if ( rc != 0 && rc != -EEXIST )
- goto out;
- }
-
- /*FALLTHRU*/
default:
a.value = d->arch.hvm_domain.params[a.index];
break;
diff --git a/xen/arch/x86/hvm/ioreq.c b/xen/arch/x86/hvm/ioreq.c
index 7c515b3ef7..9cb3819c6b 100644
--- a/xen/arch/x86/hvm/ioreq.c
+++ b/xen/arch/x86/hvm/ioreq.c
@@ -55,9 +55,6 @@ static struct hvm_ioreq_server *get_ioreq_server(const struct domain *d,
return GET_IOREQ_SERVER(d, id);
}
-#define IS_DEFAULT(s) \
- ((s) && (s) == GET_IOREQ_SERVER((s)->target, DEFAULT_IOSERVID))
-
/*
* Iterate over all possible ioreq servers.
*
@@ -245,8 +242,6 @@ static gfn_t hvm_alloc_ioreq_gfn(struct hvm_ioreq_server *s)
struct domain *d = s->target;
unsigned int i;
- ASSERT(!IS_DEFAULT(s));
-
for ( i = 0; i < sizeof(d->arch.hvm_domain.ioreq_gfn.mask) * 8; i++ )
{
if ( test_and_clear_bit(i, &d->arch.hvm_domain.ioreq_gfn.mask) )
@@ -261,7 +256,6 @@ static void hvm_free_ioreq_gfn(struct hvm_ioreq_server *s, gfn_t gfn)
struct domain *d = s->target;
unsigned int i = gfn_x(gfn) - d->arch.hvm_domain.ioreq_gfn.base;
- ASSERT(!IS_DEFAULT(s));
ASSERT(!gfn_eq(gfn, INVALID_GFN));
set_bit(i, &d->arch.hvm_domain.ioreq_gfn.mask);
@@ -277,9 +271,7 @@ static void hvm_unmap_ioreq_gfn(struct hvm_ioreq_server *s, bool buf)
destroy_ring_for_helper(&iorp->va, iorp->page);
iorp->page = NULL;
- if ( !IS_DEFAULT(s) )
- hvm_free_ioreq_gfn(s, iorp->gfn);
-
+ hvm_free_ioreq_gfn(s, iorp->gfn);
iorp->gfn = INVALID_GFN;
}
@@ -305,13 +297,7 @@ static int hvm_map_ioreq_gfn(struct hvm_ioreq_server *s, bool buf)
if ( d->is_dying )
return -EINVAL;
- if ( IS_DEFAULT(s) )
- iorp->gfn = _gfn(buf ?
- d->arch.hvm_domain.params[HVM_PARAM_BUFIOREQ_PFN] :
- d->arch.hvm_domain.params[HVM_PARAM_IOREQ_PFN]);
- else
- iorp->gfn = hvm_alloc_ioreq_gfn(s);
-
+ iorp->gfn = hvm_alloc_ioreq_gfn(s);
if ( gfn_eq(iorp->gfn, INVALID_GFN) )
return -ENOMEM;
@@ -416,7 +402,7 @@ static void hvm_remove_ioreq_gfn(struct hvm_ioreq_server *s, bool buf)
struct domain *d = s->target;
struct hvm_ioreq_page *iorp = buf ? &s->bufioreq : &s->ioreq;
- if ( IS_DEFAULT(s) || gfn_eq(iorp->gfn, INVALID_GFN) )
+ if ( gfn_eq(iorp->gfn, INVALID_GFN) )
return;
if ( guest_physmap_remove_page(d, iorp->gfn,
@@ -431,7 +417,7 @@ static int hvm_add_ioreq_gfn(struct hvm_ioreq_server *s, bool buf)
struct hvm_ioreq_page *iorp = buf ? &s->bufioreq : &s->ioreq;
int rc;
- if ( IS_DEFAULT(s) || gfn_eq(iorp->gfn, INVALID_GFN) )
+ if ( gfn_eq(iorp->gfn, INVALID_GFN) )
return 0;
clear_page(iorp->va);
@@ -483,17 +469,12 @@ static int hvm_ioreq_server_add_vcpu(struct hvm_ioreq_server *s,
if ( v->vcpu_id == 0 && HANDLE_BUFIOREQ(s) )
{
- struct domain *d = s->target;
-
rc = alloc_unbound_xen_event_channel(v->domain, 0,
s->emulator->domain_id, NULL);
if ( rc < 0 )
goto fail3;
s->bufioreq_evtchn = rc;
- if ( IS_DEFAULT(s) )
- d->arch.hvm_domain.params[HVM_PARAM_BUFIOREQ_EVTCHN] =
- s->bufioreq_evtchn;
}
sv->vcpu = v;
@@ -617,9 +598,6 @@ static void hvm_ioreq_server_free_rangesets(struct hvm_ioreq_server *s)
{
unsigned int i;
- if ( IS_DEFAULT(s) )
- return;
-
for ( i = 0; i < NR_IO_RANGE_TYPES; i++ )
rangeset_destroy(s->range[i]);
}
@@ -630,11 +608,6 @@ static int hvm_ioreq_server_alloc_rangesets(struct hvm_ioreq_server *s,
unsigned int i;
int rc;
- if ( id == DEFAULT_IOSERVID )
- goto done;
-
- ASSERT(!IS_DEFAULT(s));
-
for ( i = 0; i < NR_IO_RANGE_TYPES; i++ )
{
char *name;
@@ -659,7 +632,6 @@ static int hvm_ioreq_server_alloc_rangesets(struct hvm_ioreq_server *s,
rangeset_limit(s->range[i], MAX_NR_IO_RANGES);
}
- done:
return 0;
fail:
@@ -733,13 +705,6 @@ static int hvm_ioreq_server_init(struct hvm_ioreq_server *s,
s->bufioreq_handling = bufioreq_handling;
- if ( id == DEFAULT_IOSERVID )
- {
- rc = hvm_ioreq_server_map_pages(s);
- if ( rc )
- goto fail_map;
- }
-
for_each_vcpu ( d, v )
{
rc = hvm_ioreq_server_add_vcpu(s, v);
@@ -753,7 +718,6 @@ static int hvm_ioreq_server_init(struct hvm_ioreq_server *s,
hvm_ioreq_server_remove_all_vcpus(s);
hvm_ioreq_server_unmap_pages(s);
- fail_map:
hvm_ioreq_server_free_rangesets(s);
put_domain(s->emulator);
@@ -782,8 +746,8 @@ static void hvm_ioreq_server_deinit(struct hvm_ioreq_server *s)
put_domain(s->emulator);
}
-int hvm_create_ioreq_server(struct domain *d, bool is_default,
- int bufioreq_handling, ioservid_t *id)
+int hvm_create_ioreq_server(struct domain *d, int bufioreq_handling,
+ ioservid_t *id)
{
struct hvm_ioreq_server *s;
unsigned int i;
@@ -799,32 +763,19 @@ int hvm_create_ioreq_server(struct domain *d, bool is_default,
domain_pause(d);
spin_lock_recursive(&d->arch.hvm_domain.ioreq_server.lock);
- if ( is_default )
+ for ( i = 0; i < MAX_NR_IOREQ_SERVERS; i++ )
{
- i = DEFAULT_IOSERVID;
-
- rc = -EEXIST;
- if ( GET_IOREQ_SERVER(d, i) )
- goto fail;
+ if ( !GET_IOREQ_SERVER(d, i) )
+ break;
}
- else
- {
- for ( i = 0; i < MAX_NR_IOREQ_SERVERS; i++ )
- {
- if ( i != DEFAULT_IOSERVID && !GET_IOREQ_SERVER(d, i) )
- break;
- }
- rc = -ENOSPC;
- if ( i >= MAX_NR_IOREQ_SERVERS )
- goto fail;
- }
+ rc = -ENOSPC;
+ if ( i >= MAX_NR_IOREQ_SERVERS )
+ goto fail;
/*
* It is safe to call set_ioreq_server() prior to
* hvm_ioreq_server_init() since the target domain is paused.
- * It is necessary for the calls to be ordered thus otherwise
- * the IS_DEFAULT() macro would not evaluate correctly.
*/
set_ioreq_server(d, i, s);
@@ -835,9 +786,6 @@ int hvm_create_ioreq_server(struct domain *d, bool is_default,
goto fail;
}
- if ( i == DEFAULT_IOSERVID )
- hvm_ioreq_server_enable(s);
-
if ( id )
*id = i;
@@ -859,9 +807,6 @@ int hvm_destroy_ioreq_server(struct domain *d, ioservid_t id)
struct hvm_ioreq_server *s;
int rc;
- if ( id == DEFAULT_IOSERVID )
- return -EPERM;
-
spin_lock_recursive(&d->arch.hvm_domain.ioreq_server.lock);
s = get_ioreq_server(d, id);
@@ -870,8 +815,6 @@ int hvm_destroy_ioreq_server(struct domain *d, ioservid_t id)
if ( !s )
goto out;
- ASSERT(!IS_DEFAULT(s));
-
rc = -EPERM;
if ( s->emulator != current->domain )
goto out;
@@ -884,9 +827,7 @@ int hvm_destroy_ioreq_server(struct domain *d, ioservid_t id)
/*
* It is safe to call hvm_ioreq_server_deinit() prior to
- * set_ioreq_server() since the target domain is paused. It is
- * necessary for the calls to be ordered thus otherwise the
- * IS_DEFAULT() macro would not evaluate correctly.
+ * set_ioreq_server() since the target domain is paused.
*/
hvm_ioreq_server_deinit(s);
set_ioreq_server(d, id, NULL);
@@ -911,9 +852,6 @@ int hvm_get_ioreq_server_info(struct domain *d, ioservid_t id,
struct hvm_ioreq_server *s;
int rc;
- if ( id == DEFAULT_IOSERVID )
- return -EOPNOTSUPP;
-
spin_lock_recursive(&d->arch.hvm_domain.ioreq_server.lock);
s = get_ioreq_server(d, id);
@@ -922,8 +860,6 @@ int hvm_get_ioreq_server_info(struct domain *d, ioservid_t id,
if ( !s )
goto out;
- ASSERT(!IS_DEFAULT(s));
-
rc = -EPERM;
if ( s->emulator != current->domain )
goto out;
@@ -961,9 +897,6 @@ int hvm_get_ioreq_server_frame(struct domain *d, ioservid_t id,
struct hvm_ioreq_server *s;
int rc;
- if ( id == DEFAULT_IOSERVID )
- return -EOPNOTSUPP;
-
if ( !is_hvm_domain(d) )
return -EINVAL;
@@ -975,8 +908,6 @@ int hvm_get_ioreq_server_frame(struct domain *d, ioservid_t id,
if ( !s )
goto out;
- ASSERT(!IS_DEFAULT(s));
-
rc = -EPERM;
if ( s->emulator != current->domain )
goto out;
@@ -1023,9 +954,6 @@ int hvm_map_io_range_to_ioreq_server(struct domain *d, ioservid_t id,
if ( start > end )
return -EINVAL;
- if ( id == DEFAULT_IOSERVID )
- return -EOPNOTSUPP;
-
spin_lock_recursive(&d->arch.hvm_domain.ioreq_server.lock);
s = get_ioreq_server(d, id);
@@ -1034,8 +962,6 @@ int hvm_map_io_range_to_ioreq_server(struct domain *d, ioservid_t id,
if ( !s )
goto out;
- ASSERT(!IS_DEFAULT(s));
-
rc = -EPERM;
if ( s->emulator != current->domain )
goto out;
@@ -1080,9 +1006,6 @@ int hvm_unmap_io_range_from_ioreq_server(struct domain *d, ioservid_t id,
if ( start > end )
return -EINVAL;
- if ( id == DEFAULT_IOSERVID )
- return -EOPNOTSUPP;
-
spin_lock_recursive(&d->arch.hvm_domain.ioreq_server.lock);
s = get_ioreq_server(d, id);
@@ -1091,8 +1014,6 @@ int hvm_unmap_io_range_from_ioreq_server(struct domain *d, ioservid_t id,
if ( !s )
goto out;
- ASSERT(!IS_DEFAULT(s));
-
rc = -EPERM;
if ( s->emulator != current->domain )
goto out;
@@ -1140,9 +1061,6 @@ int hvm_map_mem_type_to_ioreq_server(struct domain *d, ioservid_t id,
struct hvm_ioreq_server *s;
int rc;
- if ( id == DEFAULT_IOSERVID )
- return -EOPNOTSUPP;
-
if ( type != HVMMEM_ioreq_server )
return -EINVAL;
@@ -1157,8 +1075,6 @@ int hvm_map_mem_type_to_ioreq_server(struct domain *d, ioservid_t id,
if ( !s )
goto out;
- ASSERT(!IS_DEFAULT(s));
-
rc = -EPERM;
if ( s->emulator != current->domain )
goto out;
@@ -1185,9 +1101,6 @@ int hvm_set_ioreq_server_state(struct domain *d, ioservid_t id,
struct hvm_ioreq_server *s;
int rc;
- if ( id == DEFAULT_IOSERVID )
- return -EOPNOTSUPP;
-
spin_lock_recursive(&d->arch.hvm_domain.ioreq_server.lock);
s = get_ioreq_server(d, id);
@@ -1196,8 +1109,6 @@ int hvm_set_ioreq_server_state(struct domain *d, ioservid_t id,
if ( !s )
goto out;
- ASSERT(!IS_DEFAULT(s));
-
rc = -EPERM;
if ( s->emulator != current->domain )
goto out;
@@ -1282,8 +1193,6 @@ void hvm_destroy_all_ioreq_servers(struct domain *d)
/*
* It is safe to call hvm_ioreq_server_deinit() prior to
* set_ioreq_server() since the target domain is being destroyed.
- * It is necessary for the calls to be ordered thus otherwise the
- * IS_DEFAULT() macro would not evaluate correctly.
*/
hvm_ioreq_server_deinit(s);
set_ioreq_server(d, id, NULL);
@@ -1304,7 +1213,7 @@ struct hvm_ioreq_server *hvm_select_ioreq_server(struct domain *d,
unsigned int id;
if ( p->type != IOREQ_TYPE_COPY && p->type != IOREQ_TYPE_PIO )
- return GET_IOREQ_SERVER(d, DEFAULT_IOSERVID);
+ return NULL;
cf8 = d->arch.hvm_domain.pci_cf8;
@@ -1346,7 +1255,7 @@ struct hvm_ioreq_server *hvm_select_ioreq_server(struct domain *d,
{
struct rangeset *r;
- if ( IS_DEFAULT(s) || !s->enabled )
+ if ( !s->enabled )
continue;
r = s->range[type];
@@ -1379,7 +1288,7 @@ struct hvm_ioreq_server *hvm_select_ioreq_server(struct domain *d,
}
}
- return GET_IOREQ_SERVER(d, DEFAULT_IOSERVID);
+ return NULL;
}
static int hvm_send_buffered_ioreq(struct hvm_ioreq_server *s, ioreq_t *p)
diff --git a/xen/include/asm-x86/hvm/domain.h b/xen/include/asm-x86/hvm/domain.h
index 588595059d..2398858442 100644
--- a/xen/include/asm-x86/hvm/domain.h
+++ b/xen/include/asm-x86/hvm/domain.h
@@ -97,7 +97,6 @@ struct hvm_pi_ops {
};
#define MAX_NR_IOREQ_SERVERS 8
-#define DEFAULT_IOSERVID 0
struct hvm_domain {
/* Guest page range used for non-default ioreq servers */
diff --git a/xen/include/asm-x86/hvm/ioreq.h b/xen/include/asm-x86/hvm/ioreq.h
index bab473cf44..e2588e912f 100644
--- a/xen/include/asm-x86/hvm/ioreq.h
+++ b/xen/include/asm-x86/hvm/ioreq.h
@@ -23,8 +23,8 @@ bool hvm_io_pending(struct vcpu *v);
bool handle_hvm_io_completion(struct vcpu *v);
bool is_ioreq_server_page(struct domain *d, const struct page_info *page);
-int hvm_create_ioreq_server(struct domain *d, bool is_default,
- int bufioreq_handling, ioservid_t *id);
+int hvm_create_ioreq_server(struct domain *d, int bufioreq_handling,
+ ioservid_t *id);
int hvm_destroy_ioreq_server(struct domain *d, ioservid_t id);
int hvm_get_ioreq_server_info(struct domain *d, ioservid_t id,
unsigned long *ioreq_gfn,
diff --git a/xen/include/public/hvm/params.h b/xen/include/public/hvm/params.h
index 396977c2bb..a26f4c8148 100644
--- a/xen/include/public/hvm/params.h
+++ b/xen/include/public/hvm/params.h
@@ -81,9 +81,13 @@
#define HVM_PARAM_PAE_ENABLED 4
#define HVM_PARAM_IOREQ_PFN 5
-
#define HVM_PARAM_BUFIOREQ_PFN 6
+
+#ifdef __XEN__
+/* These parameters is deprecated and its meaning is undefined */
+#define HVM_PARAM_DM_DOMAIN 13
#define HVM_PARAM_BUFIOREQ_EVTCHN 26
+#endif
#if defined(__i386__) || defined(__x86_64__)
@@ -181,9 +185,6 @@
/* Identity-map page directory used by Intel EPT when CR0.PG=0. */
#define HVM_PARAM_IDENT_PT 12
-/* Device Model domain, defaults to 0. */
-#define HVM_PARAM_DM_DOMAIN 13
-
/* ACPI S state: currently support S0 and S3 on x86. */
#define HVM_PARAM_ACPI_S_STATE 14
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v3] x86/hvm: remove default ioreq server
2018-08-07 15:42 [PATCH v3] x86/hvm: remove default ioreq server Paul Durrant
@ 2018-08-08 10:11 ` Jan Beulich
2018-08-08 10:39 ` Paul Durrant
2018-08-27 13:22 ` Jan Beulich
1 sibling, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2018-08-08 10:11 UTC (permalink / raw)
To: Paul Durrant; +Cc: xen-devel
>>> On 07.08.18 at 17:42, <paul.durrant@citrix.com> wrote:
> My recent patch [1] to qemu-xen-traditional removes the last use of the
> 'default' ioreq server in Xen. (This is a catch-all ioreq server that is
> used if no explicitly registered I/O range is targetted).
>
> This patch can be applied once that patch is committed, to remove the
> (>100 lines of) redundant code in Xen.
>
> NOTE: The removal of the special case for HVM_PARAM_DM_DOMAIN in
> hvm_allow_set_param() is not directly related to removal of
> default ioreq servers. It could have been cleaned up at any time
> after commit 9a422c03 "x86/hvm: stop passing explicit domid to
> hvm_create_ioreq_server()". It is now added to the new
> deprecated sets introduced by this patch.
>
> [1] https://lists.xenproject.org/archives/html/xen-devel/2018-08/msg00270.html
>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
with one more cosmetic adjustment:
> --- a/xen/include/public/hvm/params.h
> +++ b/xen/include/public/hvm/params.h
> @@ -81,9 +81,13 @@
> #define HVM_PARAM_PAE_ENABLED 4
>
> #define HVM_PARAM_IOREQ_PFN 5
> -
> #define HVM_PARAM_BUFIOREQ_PFN 6
> +
> +#ifdef __XEN__
> +/* These parameters is deprecated and its meaning is undefined */
> +#define HVM_PARAM_DM_DOMAIN 13
> #define HVM_PARAM_BUFIOREQ_EVTCHN 26
> +#endif
The comment was only partly switched to plural.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3] x86/hvm: remove default ioreq server
2018-08-08 10:11 ` Jan Beulich
@ 2018-08-08 10:39 ` Paul Durrant
2018-08-08 10:48 ` Jan Beulich
0 siblings, 1 reply; 9+ messages in thread
From: Paul Durrant @ 2018-08-08 10:39 UTC (permalink / raw)
To: 'Jan Beulich'; +Cc: xen-devel
> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 08 August 2018 11:11
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: xen-devel <xen-devel@lists.xenproject.org>
> Subject: Re: [PATCH v3] x86/hvm: remove default ioreq server
>
> >>> On 07.08.18 at 17:42, <paul.durrant@citrix.com> wrote:
> > My recent patch [1] to qemu-xen-traditional removes the last use of the
> > 'default' ioreq server in Xen. (This is a catch-all ioreq server that is
> > used if no explicitly registered I/O range is targetted).
> >
> > This patch can be applied once that patch is committed, to remove the
> > (>100 lines of) redundant code in Xen.
> >
> > NOTE: The removal of the special case for HVM_PARAM_DM_DOMAIN in
> > hvm_allow_set_param() is not directly related to removal of
> > default ioreq servers. It could have been cleaned up at any time
> > after commit 9a422c03 "x86/hvm: stop passing explicit domid to
> > hvm_create_ioreq_server()". It is now added to the new
> > deprecated sets introduced by this patch.
> >
> > [1] https://lists.xenproject.org/archives/html/xen-devel/2018-
> 08/msg00270.html
> >
> > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> > Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
Thanks.
> with one more cosmetic adjustment:
>
> > --- a/xen/include/public/hvm/params.h
> > +++ b/xen/include/public/hvm/params.h
> > @@ -81,9 +81,13 @@
> > #define HVM_PARAM_PAE_ENABLED 4
> >
> > #define HVM_PARAM_IOREQ_PFN 5
> > -
> > #define HVM_PARAM_BUFIOREQ_PFN 6
> > +
> > +#ifdef __XEN__
> > +/* These parameters is deprecated and its meaning is undefined */
> > +#define HVM_PARAM_DM_DOMAIN 13
> > #define HVM_PARAM_BUFIOREQ_EVTCHN 26
> > +#endif
>
> The comment was only partly switched to plural.
>
Oh, so it was. I guess this can be fixed on commit unless you'd prefer I send a v4.
Paul
> Jan
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3] x86/hvm: remove default ioreq server
2018-08-08 10:39 ` Paul Durrant
@ 2018-08-08 10:48 ` Jan Beulich
2018-08-08 11:38 ` Andrew Cooper
0 siblings, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2018-08-08 10:48 UTC (permalink / raw)
To: Paul Durrant; +Cc: xen-devel
>>> On 08.08.18 at 12:39, <Paul.Durrant@citrix.com> wrote:
>> From: Jan Beulich [mailto:JBeulich@suse.com]
>> Sent: 08 August 2018 11:11
>>
>> >>> On 07.08.18 at 17:42, <paul.durrant@citrix.com> wrote:
>> > --- a/xen/include/public/hvm/params.h
>> > +++ b/xen/include/public/hvm/params.h
>> > @@ -81,9 +81,13 @@
>> > #define HVM_PARAM_PAE_ENABLED 4
>> >
>> > #define HVM_PARAM_IOREQ_PFN 5
>> > -
>> > #define HVM_PARAM_BUFIOREQ_PFN 6
>> > +
>> > +#ifdef __XEN__
>> > +/* These parameters is deprecated and its meaning is undefined */
>> > +#define HVM_PARAM_DM_DOMAIN 13
>> > #define HVM_PARAM_BUFIOREQ_EVTCHN 26
>> > +#endif
>>
>> The comment was only partly switched to plural.
>>
>
> Oh, so it was. I guess this can be fixed on commit unless you'd prefer I
> send a v4.
Oh, of course it can - I meant to say so, but then forgot.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3] x86/hvm: remove default ioreq server
2018-08-08 10:48 ` Jan Beulich
@ 2018-08-08 11:38 ` Andrew Cooper
2018-08-08 11:50 ` Jan Beulich
0 siblings, 1 reply; 9+ messages in thread
From: Andrew Cooper @ 2018-08-08 11:38 UTC (permalink / raw)
To: Jan Beulich, Paul Durrant; +Cc: xen-devel
On 08/08/18 11:48, Jan Beulich wrote:
>>>> On 08.08.18 at 12:39, <Paul.Durrant@citrix.com> wrote:
>>> From: Jan Beulich [mailto:JBeulich@suse.com]
>>> Sent: 08 August 2018 11:11
>>>
>>>>>> On 07.08.18 at 17:42, <paul.durrant@citrix.com> wrote:
>>>> --- a/xen/include/public/hvm/params.h
>>>> +++ b/xen/include/public/hvm/params.h
>>>> @@ -81,9 +81,13 @@
>>>> #define HVM_PARAM_PAE_ENABLED 4
>>>>
>>>> #define HVM_PARAM_IOREQ_PFN 5
>>>> -
>>>> #define HVM_PARAM_BUFIOREQ_PFN 6
>>>> +
>>>> +#ifdef __XEN__
>>>> +/* These parameters is deprecated and its meaning is undefined */
>>>> +#define HVM_PARAM_DM_DOMAIN 13
>>>> #define HVM_PARAM_BUFIOREQ_EVTCHN 26
>>>> +#endif
>>> The comment was only partly switched to plural.
>>>
>> Oh, so it was. I guess this can be fixed on commit unless you'd prefer I
>> send a v4.
> Oh, of course it can - I meant to say so, but then forgot.
One note however. This patch cannot be committed until the associated
patch is committed into qemu-trad, which is waiting on IanJ as the
maintainer of that tree.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3] x86/hvm: remove default ioreq server
2018-08-08 11:38 ` Andrew Cooper
@ 2018-08-08 11:50 ` Jan Beulich
0 siblings, 0 replies; 9+ messages in thread
From: Jan Beulich @ 2018-08-08 11:50 UTC (permalink / raw)
To: Andrew Cooper; +Cc: xen-devel, Paul Durrant
>>> On 08.08.18 at 13:38, <andrew.cooper3@citrix.com> wrote:
> On 08/08/18 11:48, Jan Beulich wrote:
>>>>> On 08.08.18 at 12:39, <Paul.Durrant@citrix.com> wrote:
>>>> From: Jan Beulich [mailto:JBeulich@suse.com]
>>>> Sent: 08 August 2018 11:11
>>>>
>>>>>>> On 07.08.18 at 17:42, <paul.durrant@citrix.com> wrote:
>>>>> --- a/xen/include/public/hvm/params.h
>>>>> +++ b/xen/include/public/hvm/params.h
>>>>> @@ -81,9 +81,13 @@
>>>>> #define HVM_PARAM_PAE_ENABLED 4
>>>>>
>>>>> #define HVM_PARAM_IOREQ_PFN 5
>>>>> -
>>>>> #define HVM_PARAM_BUFIOREQ_PFN 6
>>>>> +
>>>>> +#ifdef __XEN__
>>>>> +/* These parameters is deprecated and its meaning is undefined */
>>>>> +#define HVM_PARAM_DM_DOMAIN 13
>>>>> #define HVM_PARAM_BUFIOREQ_EVTCHN 26
>>>>> +#endif
>>>> The comment was only partly switched to plural.
>>>>
>>> Oh, so it was. I guess this can be fixed on commit unless you'd prefer I
>>> send a v4.
>> Oh, of course it can - I meant to say so, but then forgot.
>
> One note however. This patch cannot be committed until the associated
> patch is committed into qemu-trad, which is waiting on IanJ as the
> maintainer of that tree.
And not just committed, but also has passed that other push gate.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3] x86/hvm: remove default ioreq server
2018-08-07 15:42 [PATCH v3] x86/hvm: remove default ioreq server Paul Durrant
2018-08-08 10:11 ` Jan Beulich
@ 2018-08-27 13:22 ` Jan Beulich
2018-09-03 9:50 ` Paul Durrant
1 sibling, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2018-08-27 13:22 UTC (permalink / raw)
To: Paul Durrant; +Cc: xen-devel
>>> On 07.08.18 at 17:42, <paul.durrant@citrix.com> wrote:
> My recent patch [1] to qemu-xen-traditional removes the last use of the
> 'default' ioreq server in Xen. (This is a catch-all ioreq server that is
> used if no explicitly registered I/O range is targetted).
>
> This patch can be applied once that patch is committed, to remove the
> (>100 lines of) redundant code in Xen.
>
> NOTE: The removal of the special case for HVM_PARAM_DM_DOMAIN in
> hvm_allow_set_param() is not directly related to removal of
> default ioreq servers. It could have been cleaned up at any time
> after commit 9a422c03 "x86/hvm: stop passing explicit domid to
> hvm_create_ioreq_server()". It is now added to the new
> deprecated sets introduced by this patch.
>
> [1] https://lists.xenproject.org/archives/html/xen-devel/2018-08/msg00270.html
>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
I'm afraid this change is responsible for osstest finding
In file included from /home/osstest/build.126771.build-amd64/xen/tools/qemu-xen-dir/include/hw/xen/xen_backend.h:4:0,
from /home/osstest/build.126771.build-amd64/xen/tools/qemu-xen-dir/hw/block/xen_disk.c:28:
/home/osstest/build.126771.build-amd64/xen/tools/qemu-xen-dir/include/hw/xen/xen_common.h: In function 'xen_get_default_ioreq_server_info':
/home/osstest/build.126771.build-amd64/xen/tools/qemu-xen-dir/include/hw/xen/xen_common.h:412:40: error: 'HVM_PARAM_BUFIOREQ_EVTCHN' undeclared (first use in this function)
rc = xc_get_hvm_param(xen_xc, dom, HVM_PARAM_BUFIOREQ_EVTCHN,
^
/home/osstest/build.126771.build-amd64/xen/tools/qemu-xen-dir/include/hw/xen/xen_common.h:412:40: note: each undeclared identifier is reported only once for each function it appears in
/home/osstest/build.126771.build-amd64/xen/tools/qemu-xen-dir/rules.mak:69: recipe for target 'hw/block/xen_disk.o' failed
make: *** [hw/block/xen_disk.o] Error 1
I guess I'm going to revert it for now.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH v3] x86/hvm: remove default ioreq server
2018-08-27 13:22 ` Jan Beulich
@ 2018-09-03 9:50 ` Paul Durrant
2018-09-03 10:02 ` Paul Durrant
0 siblings, 1 reply; 9+ messages in thread
From: Paul Durrant @ 2018-09-03 9:50 UTC (permalink / raw)
To: 'Jan Beulich'; +Cc: xen-devel
> -----Original Message-----
> From: Xen-devel [mailto:xen-devel-bounces@lists.xenproject.org] On Behalf
> Of Jan Beulich
> Sent: 27 August 2018 14:22
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: xen-devel <xen-devel@lists.xenproject.org>
> Subject: Re: [Xen-devel] [PATCH v3] x86/hvm: remove default ioreq server
>
> >>> On 07.08.18 at 17:42, <paul.durrant@citrix.com> wrote:
> > My recent patch [1] to qemu-xen-traditional removes the last use of the
> > 'default' ioreq server in Xen. (This is a catch-all ioreq server that is
> > used if no explicitly registered I/O range is targetted).
> >
> > This patch can be applied once that patch is committed, to remove the
> > (>100 lines of) redundant code in Xen.
> >
> > NOTE: The removal of the special case for HVM_PARAM_DM_DOMAIN in
> > hvm_allow_set_param() is not directly related to removal of
> > default ioreq servers. It could have been cleaned up at any time
> > after commit 9a422c03 "x86/hvm: stop passing explicit domid to
> > hvm_create_ioreq_server()". It is now added to the new
> > deprecated sets introduced by this patch.
> >
> > [1] https://lists.xenproject.org/archives/html/xen-devel/2018-
> 08/msg00270.html
> >
> > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> > Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> I'm afraid this change is responsible for osstest finding
>
> In file included from /home/osstest/build.126771.build-
> amd64/xen/tools/qemu-xen-dir/include/hw/xen/xen_backend.h:4:0,
> from /home/osstest/build.126771.build-amd64/xen/tools/qemu-
> xen-dir/hw/block/xen_disk.c:28:
> /home/osstest/build.126771.build-amd64/xen/tools/qemu-xen-
> dir/include/hw/xen/xen_common.h: In function
> 'xen_get_default_ioreq_server_info':
> /home/osstest/build.126771.build-amd64/xen/tools/qemu-xen-
> dir/include/hw/xen/xen_common.h:412:40: error:
> 'HVM_PARAM_BUFIOREQ_EVTCHN' undeclared (first use in this function)
> rc = xc_get_hvm_param(xen_xc, dom,
> HVM_PARAM_BUFIOREQ_EVTCHN,
> ^
> /home/osstest/build.126771.build-amd64/xen/tools/qemu-xen-
> dir/include/hw/xen/xen_common.h:412:40: note: each undeclared identifier
> is reported only once for each function it appears in
> /home/osstest/build.126771.build-amd64/xen/tools/qemu-xen-
> dir/rules.mak:69: recipe for target 'hw/block/xen_disk.o' failed
> make: *** [hw/block/xen_disk.o] Error 1
>
> I guess I'm going to revert it for now.
>
To unblock things, fair enough, but the code in question is protected by '#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40600' so I don't understand why osstest is hitting this.
Paul
> Jan
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3] x86/hvm: remove default ioreq server
2018-09-03 9:50 ` Paul Durrant
@ 2018-09-03 10:02 ` Paul Durrant
0 siblings, 0 replies; 9+ messages in thread
From: Paul Durrant @ 2018-09-03 10:02 UTC (permalink / raw)
To: Paul Durrant, 'Jan Beulich'; +Cc: xen-devel
> -----Original Message-----
> From: Xen-devel [mailto:xen-devel-bounces@lists.xenproject.org] On Behalf
> Of Paul Durrant
> Sent: 03 September 2018 10:50
> To: 'Jan Beulich' <JBeulich@suse.com>
> Cc: xen-devel <xen-devel@lists.xenproject.org>
> Subject: Re: [Xen-devel] [PATCH v3] x86/hvm: remove default ioreq server
>
> > -----Original Message-----
> > From: Xen-devel [mailto:xen-devel-bounces@lists.xenproject.org] On
> Behalf
> > Of Jan Beulich
> > Sent: 27 August 2018 14:22
> > To: Paul Durrant <Paul.Durrant@citrix.com>
> > Cc: xen-devel <xen-devel@lists.xenproject.org>
> > Subject: Re: [Xen-devel] [PATCH v3] x86/hvm: remove default ioreq server
> >
> > >>> On 07.08.18 at 17:42, <paul.durrant@citrix.com> wrote:
> > > My recent patch [1] to qemu-xen-traditional removes the last use of the
> > > 'default' ioreq server in Xen. (This is a catch-all ioreq server that is
> > > used if no explicitly registered I/O range is targetted).
> > >
> > > This patch can be applied once that patch is committed, to remove the
> > > (>100 lines of) redundant code in Xen.
> > >
> > > NOTE: The removal of the special case for HVM_PARAM_DM_DOMAIN in
> > > hvm_allow_set_param() is not directly related to removal of
> > > default ioreq servers. It could have been cleaned up at any time
> > > after commit 9a422c03 "x86/hvm: stop passing explicit domid to
> > > hvm_create_ioreq_server()". It is now added to the new
> > > deprecated sets introduced by this patch.
> > >
> > > [1] https://lists.xenproject.org/archives/html/xen-devel/2018-
> > 08/msg00270.html
> > >
> > > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> > > Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
> >
> > I'm afraid this change is responsible for osstest finding
> >
> > In file included from /home/osstest/build.126771.build-
> > amd64/xen/tools/qemu-xen-dir/include/hw/xen/xen_backend.h:4:0,
> > from /home/osstest/build.126771.build-amd64/xen/tools/qemu-
> > xen-dir/hw/block/xen_disk.c:28:
> > /home/osstest/build.126771.build-amd64/xen/tools/qemu-xen-
> > dir/include/hw/xen/xen_common.h: In function
> > 'xen_get_default_ioreq_server_info':
> > /home/osstest/build.126771.build-amd64/xen/tools/qemu-xen-
> > dir/include/hw/xen/xen_common.h:412:40: error:
> > 'HVM_PARAM_BUFIOREQ_EVTCHN' undeclared (first use in this function)
> > rc = xc_get_hvm_param(xen_xc, dom,
> > HVM_PARAM_BUFIOREQ_EVTCHN,
> > ^
> > /home/osstest/build.126771.build-amd64/xen/tools/qemu-xen-
> > dir/include/hw/xen/xen_common.h:412:40: note: each undeclared
> identifier
> > is reported only once for each function it appears in
> > /home/osstest/build.126771.build-amd64/xen/tools/qemu-xen-
> > dir/rules.mak:69: recipe for target 'hw/block/xen_disk.o' failed
> > make: *** [hw/block/xen_disk.o] Error 1
> >
> > I guess I'm going to revert it for now.
> >
>
> To unblock things, fair enough, but the code in question is protected by '#if
> CONFIG_XEN_CTRL_INTERFACE_VERSION < 40600' so I don't understand
> why osstest is hitting this.
Nope. My misreading... there's an uncommented #endif in there. I'll add the param definitions back into the header and make sure the get calls fail instead.
Paul
Paul
>
> Paul
>
> > Jan
> >
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xenproject.org
> > https://lists.xenproject.org/mailman/listinfo/xen-devel
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-09-03 10:02 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-07 15:42 [PATCH v3] x86/hvm: remove default ioreq server Paul Durrant
2018-08-08 10:11 ` Jan Beulich
2018-08-08 10:39 ` Paul Durrant
2018-08-08 10:48 ` Jan Beulich
2018-08-08 11:38 ` Andrew Cooper
2018-08-08 11:50 ` Jan Beulich
2018-08-27 13:22 ` Jan Beulich
2018-09-03 9:50 ` Paul Durrant
2018-09-03 10:02 ` Paul Durrant
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).