All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ioreq-server: handle IOREQ_TYPE_PCI_CONFIG in assist function
@ 2015-01-27 19:06 Wei Liu
  2015-01-27 19:34 ` Andrew Cooper
  2015-01-28  9:22 ` Paul Durrant
  0 siblings, 2 replies; 7+ messages in thread
From: Wei Liu @ 2015-01-27 19:06 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Paul Durrant, Wei Liu, Jan Beulich

QEMU stubdom will read PCI config space when enumerating PCI devices.
Xen should return ~0 when there is no suitable ioreq server to dispatch
the request.

Without this patch, QEMU stubdom will fail to start because hvmloader
fails following assertion:

118         ASSERT((devfn != PCI_ISA_DEVFN) ||
119                ((vendor_id == 0x8086) && (device_id == 0x7000)));

because vendor_id and device_id are 0.

This fixes a regression for QEMU stubdom. It should be backported to 4.5
as well.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Paul Durrant <paul.durrant@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/hvm/hvm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index c7984d1..c826ac5 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2577,6 +2577,7 @@ static bool_t hvm_complete_assist_req(ioreq_t *p)
     {
     case IOREQ_TYPE_COPY:
     case IOREQ_TYPE_PIO:
+    case IOREQ_TYPE_PCI_CONFIG:
         if ( p->dir == IOREQ_READ )
         {
             if ( !p->data_is_ptr )
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-01-29 10:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-27 19:06 [PATCH] ioreq-server: handle IOREQ_TYPE_PCI_CONFIG in assist function Wei Liu
2015-01-27 19:34 ` Andrew Cooper
2015-01-28  9:26   ` Jan Beulich
2015-01-28 20:03     ` Don Slutz
2015-01-28  9:22 ` Paul Durrant
2015-01-29  0:27   ` Don Slutz
2015-01-29 10:52     ` Wei Liu

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.