xen-hvm: ignore background I/O sections
PATCH v3 1/1 xen-hvm: ignore background I/O sections
Since Xen will correctly handle accesses to unimplemented I/O ports (by returning all 1's for reads and ignoring writes) there is no need for QEMU to register backgroud I/O sections.
This patch therefore adds checks to xen_io_add/del so that sections with memory-region ops pointing at 'unassigned_io_ops' are ignored.
---
v3:
- Really add missing braces.
v2:
- Add missing braces
--- xen-hvm.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
xen-hvm.c +12 -2
@@ -510,8 +510,13 @@ static void xen_io_add(MemoryListener *listener, MemoryRegionSection *section) {XenIOState *state =container_of (listener, XenIOState, io_listener); +MemoryRegion *mr = section->mr; -memory_region_ref (section->mr); +if (mr->ops == &unassigned_io_ops) { +return ; + } + +memory_region_ref (mr);xen_map_io_section (xen_xc, xen_domid, state->ioservid, section); }
@@ -520,10 +525,15 @@ static void xen_io_del(MemoryListener *listener, MemoryRegionSection *section) {XenIOState *state =container_of (listener, XenIOState, io_listener); +MemoryRegion *mr = section->mr; + +if (mr->ops == &unassigned_io_ops) { +return ; + }xen_unmap_io_section (xen_xc, xen_domid, state->ioservid, section); -memory_region_unref (section->mr); +memory_region_unref (mr); } static void xen_device_realize(DeviceListener *listener,
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 11 lines · Paul Durrant
Since Xen will correctly handle accesses to unimplemented I/O ports (by returning all 1's for reads and ignoring writes) there is no need for QEMU to register backgroud I/O sections.
This patch therefore adds checks to xen_io_add/del so that sections with memory-region ops pointing at '
unassigned_io_ops' are ignored.Signed-off-by Paul Durrant <[email protected]>Cc Stefano Stabellini <[email protected]>Cc Anthony Perard <[email protected]>Cc Paolo Bonzini <[email protected]>
Signature · 6 lines
Anthony PERARD _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 11 lines · Paul Durrant
Since Xen will correctly handle accesses to unimplemented I/O ports (by returning all 1's for reads and ignoring writes) there is no need for QEMU to register backgroud I/O sections.
This patch therefore adds checks to xen_io_add/del so that sections with memory-region ops pointing at '
unassigned_io_ops' are ignored.Signed-off-by Paul Durrant <[email protected]>Cc Stefano Stabellini <[email protected]>Cc Anthony Perard <[email protected]>Cc Paolo Bonzini <[email protected]>
Signature · 1 line
Anthony PERARD
----- Original Message -----
Quoted 15 lines
From: "Anthony PERARD" <[email protected]>
To: "Paul Durrant" <[email protected]>
Cc: [email protected], [email protected], "Stefano Stabellini" <[email protected]>, "Paolo Bonzini" <[email protected]>
Sent: Wednesday, May 25, 2016 5:52:32 PM
Subject: Re: [PATCH v3] xen-hvm: ignore background I/O sectionsQuoted 7 lines · Paul Durrant
Since Xen will correctly handle accesses to unimplemented I/O ports (by returning all 1's for reads and ignoring writes) there is no need for QEMU to register backgroud I/O sections.
This patch therefore adds checks to xen_io_add/del so that sections with memory-region ops pointing at '
unassigned_io_ops' are ignored.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Paul Durrant <[email protected]>Cc Stefano Stabellini <[email protected]>Cc Anthony Perard <[email protected]>Cc Paolo Bonzini <[email protected]>Acked-by Anthony PERARD <[email protected]>
Do you have a signed GPG key or do I need to apply this for you?
Thanks,
Paolo
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 15 lines · Paolo Bonzini
Quoted 15 lines
From: "Anthony PERARD" <[email protected]>
To: "Paul Durrant" <[email protected]>
Cc: [email protected], [email protected], "Stefano Stabellini" <[email protected]>, "Paolo Bonzini" <[email protected]>
Sent: Wednesday, May 25, 2016 5:52:32 PM
Subject: Re: [PATCH v3] xen-hvm: ignore background I/O sectionsQuoted 7 lines · Paul Durrant
Since Xen will correctly handle accesses to unimplemented I/O ports (by returning all 1's for reads and ignoring writes) there is no need for QEMU to register backgroud I/O sections.
This patch therefore adds checks to xen_io_add/del so that sections with memory-region ops pointing at '
unassigned_io_ops' are ignored.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Signed-off-by Paul Durrant <[email protected]>Cc Stefano Stabellini <[email protected]>Cc Anthony Perard <[email protected]>Cc Paolo Bonzini <[email protected]>Acked-by Anthony PERARD <[email protected]>Do you have a signed GPG key or do I need to apply this for you?
I was going to say, I'll just queue this up in my tree, but I don't have any other commits at this time, so if you are OK with applying this, I am fine with it too.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 15 lines · Paolo Bonzini
Quoted 15 lines
From: "Anthony PERARD" <[email protected]>
To: "Paul Durrant" <[email protected]>
Cc: [email protected], [email protected], "Stefano Stabellini" <[email protected]>, "Paolo Bonzini" <[email protected]>
Sent: Wednesday, May 25, 2016 5:52:32 PM
Subject: Re: [PATCH v3] xen-hvm: ignore background I/O sectionsQuoted 7 lines · Paul Durrant
Since Xen will correctly handle accesses to unimplemented I/O ports (by returning all 1's for reads and ignoring writes) there is no need for QEMU to register backgroud I/O sections.
This patch therefore adds checks to xen_io_add/del so that sections with memory-region ops pointing at '
unassigned_io_ops' are ignored.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Signed-off-by Paul Durrant <[email protected]>Cc Stefano Stabellini <[email protected]>Cc Anthony Perard <[email protected]>Cc Paolo Bonzini <[email protected]>Acked-by Anthony PERARD <[email protected]>Do you have a signed GPG key or do I need to apply this for you?
I was going to say, I'll just queue this up in my tree, but I don't have any other commits at this time, so if you are OK with applying this, I am fine with it too.