[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/io: rename misleading dpci_ prefixed functions to g2m_
commit f47364e5007216f55c8df7403015a6ea2fec4c29 Author: Roger Pau Monné <roger.pau@xxxxxxxxxx> AuthorDate: Fri Apr 7 12:02:22 2017 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Apr 7 12:02:22 2017 +0200 x86/io: rename misleading dpci_ prefixed functions to g2m_ The dpci_ prefix used on those IO handlers is misleading, there's nothing PCI specific in them, they simply map a guest IO port into a machine (physical) IO port. They don't specifically trap the PCI IO port range in any way (0xcf8/0xcfc). Rename them to use the g2m_ prefix in order to avoid this confusion. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx> --- xen/arch/x86/hvm/hvm.c | 2 +- xen/arch/x86/hvm/io.c | 28 ++++++++++++---------------- xen/include/asm-x86/hvm/io.h | 6 +++++- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 9257072..6c59c32 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -651,7 +651,7 @@ int hvm_domain_initialise(struct domain *d) else d->arch.hvm_domain.io_bitmap = hvm_io_bitmap; - register_dpci_portio_handler(d); + register_g2m_portio_handler(d); hvm_ioreq_init(d); diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c index 2770ff4..3b3a600 100644 --- a/xen/arch/x86/hvm/io.c +++ b/xen/arch/x86/hvm/io.c @@ -167,8 +167,8 @@ bool handle_pio(uint16_t port, unsigned int size, int dir) return true; } -static bool_t dpci_portio_accept(const struct hvm_io_handler *handler, - const ioreq_t *p) +static bool_t g2m_portio_accept(const struct hvm_io_handler *handler, + const ioreq_t *p) { struct vcpu *curr = current; const struct domain_iommu *dio = dom_iommu(curr->domain); @@ -190,10 +190,8 @@ static bool_t dpci_portio_accept(const struct hvm_io_handler *handler, return 0; } -static int dpci_portio_read(const struct hvm_io_handler *handler, - uint64_t addr, - uint32_t size, - uint64_t *data) +static int g2m_portio_read(const struct hvm_io_handler *handler, + uint64_t addr, uint32_t size, uint64_t *data) { struct hvm_vcpu_io *vio = ¤t->arch.hvm_vcpu.hvm_io; const struct g2m_ioport *g2m_ioport = vio->g2m_ioport; @@ -217,10 +215,8 @@ static int dpci_portio_read(const struct hvm_io_handler *handler, return X86EMUL_OKAY; } -static int dpci_portio_write(const struct hvm_io_handler *handler, - uint64_t addr, - uint32_t size, - uint64_t data) +static int g2m_portio_write(const struct hvm_io_handler *handler, + uint64_t addr, uint32_t size, uint64_t data) { struct hvm_vcpu_io *vio = ¤t->arch.hvm_vcpu.hvm_io; const struct g2m_ioport *g2m_ioport = vio->g2m_ioport; @@ -244,13 +240,13 @@ static int dpci_portio_write(const struct hvm_io_handler *handler, return X86EMUL_OKAY; } -static const struct hvm_io_ops dpci_portio_ops = { - .accept = dpci_portio_accept, - .read = dpci_portio_read, - .write = dpci_portio_write +static const struct hvm_io_ops g2m_portio_ops = { + .accept = g2m_portio_accept, + .read = g2m_portio_read, + .write = g2m_portio_write }; -void register_dpci_portio_handler(struct domain *d) +void register_g2m_portio_handler(struct domain *d) { struct hvm_io_handler *handler = hvm_next_io_handler(d); @@ -258,7 +254,7 @@ void register_dpci_portio_handler(struct domain *d) return; handler->type = IOREQ_TYPE_PIO; - handler->ops = &dpci_portio_ops; + handler->ops = &g2m_portio_ops; } /* diff --git a/xen/include/asm-x86/hvm/io.h b/xen/include/asm-x86/hvm/io.h index d6801c1..5ae9225 100644 --- a/xen/include/asm-x86/hvm/io.h +++ b/xen/include/asm-x86/hvm/io.h @@ -148,7 +148,11 @@ void stdvga_deinit(struct domain *d); extern void hvm_dpci_msi_eoi(struct domain *d, int vector); -void register_dpci_portio_handler(struct domain *d); +/* + * HVM port IO handler that performs forwarding of guest IO ports into machine + * IO ports. + */ +void register_g2m_portio_handler(struct domain *d); #endif /* __ASM_X86_HVM_IO_H__ */ -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |