|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/HVM: remove identical relationship between ioreq type and rangeset type
commit e2b84f09ec8d0602d90cc437b4accea31c6d69ca
Author: Yu Zhang <yu.c.zhang@xxxxxxxxxxxxxxx>
AuthorDate: Mon Dec 21 17:07:55 2015 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Dec 21 17:07:55 2015 +0100
x86/HVM: remove identical relationship between ioreq type and rangeset type
This patch uses HVMOP_IO_RANGE_XXX values rather than the raw ioreq
type to select the ioreq server, therefore the identical relationship
between ioreq type and rangeset type is no longer necessary.
Signed-off-by: Yu Zhang <yu.c.zhang@xxxxxxxxxxxxxxx>
Signed-off-by: Shuai Ruan <shuai.ruan@xxxxxxxxxxxxxxx>
Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
---
xen/arch/x86/hvm/hvm.c | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 637d9a9..8c10d8e 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2571,7 +2571,7 @@ struct hvm_ioreq_server *hvm_select_ioreq_server(struct
domain *d,
PCI_SLOT(CF8_BDF(cf8)),
PCI_FUNC(CF8_BDF(cf8)));
- type = IOREQ_TYPE_PCI_CONFIG;
+ type = HVMOP_IO_RANGE_PCI;
addr = ((uint64_t)sbdf << 32) |
CF8_ADDR_LO(cf8) |
(p->addr & 3);
@@ -2589,7 +2589,8 @@ struct hvm_ioreq_server *hvm_select_ioreq_server(struct
domain *d,
}
else
{
- type = p->type;
+ type = (p->type == IOREQ_TYPE_PIO) ?
+ HVMOP_IO_RANGE_PORT : HVMOP_IO_RANGE_MEMORY;
addr = p->addr;
}
@@ -2605,31 +2606,28 @@ struct hvm_ioreq_server *hvm_select_ioreq_server(struct
domain *d,
if ( !s->enabled )
continue;
- BUILD_BUG_ON(IOREQ_TYPE_PIO != HVMOP_IO_RANGE_PORT);
- BUILD_BUG_ON(IOREQ_TYPE_COPY != HVMOP_IO_RANGE_MEMORY);
- BUILD_BUG_ON(IOREQ_TYPE_PCI_CONFIG != HVMOP_IO_RANGE_PCI);
r = s->range[type];
switch ( type )
{
unsigned long end;
- case IOREQ_TYPE_PIO:
+ case HVMOP_IO_RANGE_PORT:
end = addr + p->size - 1;
if ( rangeset_contains_range(r, addr, end) )
return s;
break;
- case IOREQ_TYPE_COPY:
+ case HVMOP_IO_RANGE_MEMORY:
end = addr + (p->size * p->count) - 1;
if ( rangeset_contains_range(r, addr, end) )
return s;
break;
- case IOREQ_TYPE_PCI_CONFIG:
+ case HVMOP_IO_RANGE_PCI:
if ( rangeset_contains_singleton(r, addr >> 32) )
{
- p->type = type;
+ p->type = IOREQ_TYPE_PCI_CONFIG;
p->addr = addr;
return s;
}
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |