All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Skip unneeded VMENTRY & VMEXIT
@ 2015-01-30  0:52 Don Slutz
  2015-01-30  0:52 ` [PATCH 1/5] DEBUG: xentrace: Add debug of HANDLE_PIO Don Slutz
                   ` (4 more replies)
  0 siblings, 5 replies; 26+ messages in thread
From: Don Slutz @ 2015-01-30  0:52 UTC (permalink / raw)
  To: xen-devel
  Cc: Keir Fraser, Ian Campbell, Stefano Stabellini, George Dunlap,
	Andrew Cooper, Ian Jackson, Don Slutz, Paul Durrant, Jan Beulich,
	Wei Liu

Using a new enough QEMU that has:

commit 7665d6ba98e20fb05c420de947c1750fd47e5c07
Author: Paul Durrant <paul.durrant@citrix.com>
Date:   Tue Jan 20 11:06:19 2015 +0000

    Xen: Use the ioreq-server API when available
    

means that hvmloader and the guest will do pci config accesses that
will not be sent to QEMU.  However hvm_complete_assist_req() (which
is the routine that does the work) returns a 1 which
hvm_send_assist_req() returns to the caller which means that the
request was sent to QEMU and need to be waited for.

This is not the case.  hvm_complete_assist_req() has called on
hvm_io_assist() which has changed the io_state from
HVMIO_awaiting_completion to HVMIO_completed if needed.  But
hvmemul_do_io() thinks that it needs to wait on the IOREQ_READ case,
and returns X86EMUL_RETRY.

[PATCH 1/5] DEBUG: xentrace: Add debug of HANDLE_PIO
  -- No need to apply

[PATCH 2/5] xentrace: Adjust IOPORT & MMIO format
  -- Simple bugfix.  xentrace_format is not converting these correctly

[PATCH 3/5] hvmemul_do_io: If the send to the ioreq server failed do
  -- Simple bugfix.  Do the same thing as when hvm_has_dm() returns
     a zero.

[PATCH 4/5] hvm_complete_assist_req: We should not be able to get
  -- This ASSERT was sugested by Paul Durrant.  Since I was in the
     file, just add it.

[PATCH 5/5] hvm_complete_assist_req: Tell caller we failed to send
  -- The real fix.  Does depend on [PATCH 3/5] hvmemul_do_io: If the send ...



Here is the before xentrace output using the "[PATCH 1/5] DEBUG:
xentrace: Add debug of HANDLE_PIO" (which I do not expect to be
applied.  It is first because that is the order you need to use to
reproduce the xentrace output):


CPU0  685992932190 (+    2292)  VMEXIT      [ exitcode = 0x0000001e, rIP  = 0x00101581 ]
CPU0  0 (+       0)  HANDLE_PIO [ port = 0x0cfe size = 2 dir = 1 io_state = 5 ret = 0 ]
CPU0  685992934938 (+    2748)  vlapic_accept_pic_intr [ i8259_target = 1, accept_pic_int = 1 ]
CPU0  685992935526 (+     588)  VMENTRY
CPU0  685992937650 (+    2124)  VMEXIT      [ exitcode = 0x0000001e, rIP  = 0x00101581 ]
CPU0  0 (+       0)  IOPORT_READ [ port = 0x0cfe, data = 0x00000000 ]
CPU0  0 (+       0)  HANDLE_PIO [ port = 0x0cfe size = 2 dir = 1 io_state = 0 ret = 1 ]
CPU0  685992940248 (+    2598)  vlapic_accept_pic_intr [ i8259_target = 1, accept_pic_int = 1 ]
CPU0  685992940968 (+     720)  VMENTRY


And after:


CPU2  1028654638584 (+    2388)  VMEXIT      [ exitcode = 0x0000001e, rIP  = 0x00101581 ]
CPU2  0 (+       0)  IOPORT_READ [ port = 0x0cfe, data = 0xffffffff ]
CPU2  0 (+       0)  HANDLE_PIO [ port = 0x0cfe size = 2 dir = 1 io_state = 0 ret = 1 ]
CPU2  1028654641932 (+    3348)  vlapic_accept_pic_intr [ i8259_target = 1, accept_pic_int = 1 ]
CPU2  1028654642586 (+     654)  VMENTRY


Don Slutz (5):
  DEBUG: xentrace: Add debug of HANDLE_PIO
  xentrace: Adjust IOPORT & MMIO format
  hvmemul_do_io: If the send to the ioreq server failed do not retry.
  hvm_complete_assist_req: We should not be able to get here on
    IOREQ_TYPE_PCI_CONFIG
  hvm_complete_assist_req: Tell caller we failed to send

 tools/xentrace/formats          | 10 ++++++----
 xen/arch/x86/hvm/emulate.c      |  4 ++++
 xen/arch/x86/hvm/hvm.c          |  3 ++-
 xen/arch/x86/hvm/io.c           |  4 ++++
 xen/include/asm-x86/hvm/trace.h |  2 +-
 xen/include/public/trace.h      |  2 ++
 6 files changed, 19 insertions(+), 6 deletions(-)

-- 
1.8.4

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

end of thread, other threads:[~2015-02-02 13:54 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30  0:52 [PATCH 0/5] Skip unneeded VMENTRY & VMEXIT Don Slutz
2015-01-30  0:52 ` [PATCH 1/5] DEBUG: xentrace: Add debug of HANDLE_PIO Don Slutz
2015-01-30  0:52 ` [PATCH 2/5] xentrace: Adjust IOPORT & MMIO format Don Slutz
2015-01-30  0:52 ` [PATCH 3/5] hvmemul_do_io: If the send to the ioreq server failed do not retry Don Slutz
2015-01-30 10:23   ` Jan Beulich
2015-01-30 18:17     ` Don Slutz
2015-01-30 19:19       ` Don Slutz
2015-02-02  8:36         ` Jan Beulich
2015-02-02 13:53           ` Don Slutz
2015-02-02  9:51         ` Paul Durrant
2015-02-02 10:04           ` Jan Beulich
2015-02-02 10:06             ` Paul Durrant
2015-02-02 10:14               ` Jan Beulich
2015-02-02 13:54                 ` Don Slutz
2015-01-30 10:37   ` Paul Durrant
2015-01-30 17:51     ` Don Slutz
2015-01-30  0:52 ` [PATCH 4/5] hvm_complete_assist_req: We should not be able to get here on IOREQ_TYPE_PCI_CONFIG Don Slutz
2015-01-30 10:24   ` Jan Beulich
2015-01-30 17:17     ` Don Slutz
2015-01-30  0:52 ` [PATCH 5/5] hvm_complete_assist_req: Tell caller we failed to send Don Slutz
2015-01-30 10:24   ` Jan Beulich
2015-01-30 17:47     ` Don Slutz
2015-01-30 10:40   ` Paul Durrant
2015-01-30 17:48     ` Don Slutz
2015-01-30 10:53   ` Paul Durrant
2015-01-30 17:49     ` Don Slutz

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.