All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/13] i386: hvf: Remove HVFX86EmulatorState
@ 2020-05-28 19:37 Roman Bolshakov
  2020-05-28 19:37 ` [PATCH 01/13] i386: hvf: Move HVFState definition into hvf Roman Bolshakov
                   ` (14 more replies)
  0 siblings, 15 replies; 32+ messages in thread
From: Roman Bolshakov @ 2020-05-28 19:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: Roman Bolshakov, Cameron Esfahani

Hi,

This is a cleanup series for HVF accel.

HVF is using two emulator states CPUX86State and HVFX86EmulatorState
simultaneously. HVFX86EmulatorState is used for instruction emulation.
CPUX86State is used in all other places. Sometimes the states are in
sync, sometimes they're not. It complicates reasoning about emulator
behaviour given that there's a third state - VMCS.

The series tries to leverage CPUX86State for instruction decoding and
removes HVFX86EmulatorState. I had to add two new hvf-specific fields to
CPUX86State: lazy_flags and mmio_buf. It's likely that cc_op, cc_dst,
etc could be reused for lazy_flags but it'd require major rework of flag
processing during instruction emulation. Hopefully that'll happen too in
the future.

I tried to include sysemu/hvf.h into target/i386/cpu.h to add definition
of hvf lazy flags but couldn't do that at first it because it introduced
circular dependency between existing sysemu/hvf.h and cpu.h. The first
three patches untangle and prune sysemu/hvf.h to the bare minimum to
allow inclusion of sysemu/hvf.h into target/i386/cpu.h.

This might conflict with [1], but merge/rebase should be trivial.

1. https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg07449.html

Thanks,
Roman

Roman Bolshakov (13):
  i386: hvf: Move HVFState definition into hvf
  i386: hvf: Drop useless declarations in sysemu
  i386: hvf: Clean stray includes in sysemu
  i386: hvf: Drop unused variable
  i386: hvf: Use ins_len to advance IP
  i386: hvf: Use IP from CPUX86State
  i386: hvf: Drop fetch_rip from HVFX86EmulatorState
  i386: hvf: Drop rflags from HVFX86EmulatorState
  i386: hvf: Drop copy of RFLAGS defines
  i386: hvf: Drop regs in HVFX86EmulatorState
  i386: hvf: Move lazy_flags into CPUX86State
  i386: hvf: Move mmio_buf into CPUX86State
  i386: hvf: Drop HVFX86EmulatorState

 include/qemu/typedefs.h      |   1 -
 include/sysemu/hvf.h         |  73 ++-------------------
 target/i386/cpu.h            |   4 +-
 target/i386/hvf/hvf-i386.h   |  35 ++++++++++
 target/i386/hvf/hvf.c        |  30 ++++-----
 target/i386/hvf/x86.c        |   2 +-
 target/i386/hvf/x86.h        |  89 ++-----------------------
 target/i386/hvf/x86_decode.c |  25 ++++---
 target/i386/hvf/x86_emu.c    | 122 +++++++++++++++++------------------
 target/i386/hvf/x86_flags.c  |  81 ++++++++++++-----------
 target/i386/hvf/x86_task.c   |  10 +--
 target/i386/hvf/x86hvf.c     |   6 +-
 12 files changed, 186 insertions(+), 292 deletions(-)

-- 
2.26.1



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

end of thread, other threads:[~2020-06-11 15:06 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 19:37 [PATCH 00/13] i386: hvf: Remove HVFX86EmulatorState Roman Bolshakov
2020-05-28 19:37 ` [PATCH 01/13] i386: hvf: Move HVFState definition into hvf Roman Bolshakov
2020-06-05 14:19   ` Claudio Fontana
2020-05-28 19:37 ` [PATCH 02/13] i386: hvf: Drop useless declarations in sysemu Roman Bolshakov
2020-06-04  6:35   ` Philippe Mathieu-Daudé
2020-06-04  9:53   ` Claudio Fontana
2020-06-05 16:30     ` Roman Bolshakov
2020-05-28 19:37 ` [PATCH 03/13] i386: hvf: Clean stray includes " Roman Bolshakov
2020-06-05 14:20   ` Claudio Fontana
2020-05-28 19:37 ` [PATCH 04/13] i386: hvf: Drop unused variable Roman Bolshakov
2020-06-04  6:35   ` Philippe Mathieu-Daudé
2020-05-28 19:37 ` [PATCH 05/13] i386: hvf: Use ins_len to advance IP Roman Bolshakov
2020-06-04  6:39   ` Philippe Mathieu-Daudé
2020-06-04 18:15     ` Paolo Bonzini
2020-06-05 14:29       ` Philippe Mathieu-Daudé
2020-05-28 19:37 ` [PATCH 06/13] i386: hvf: Use IP from CPUX86State Roman Bolshakov
2020-06-04  6:47   ` Philippe Mathieu-Daudé
2020-06-04  9:06   ` Claudio Fontana
2020-05-28 19:37 ` [PATCH 07/13] i386: hvf: Drop fetch_rip from HVFX86EmulatorState Roman Bolshakov
2020-05-28 19:37 ` [PATCH 08/13] i386: hvf: Drop rflags " Roman Bolshakov
2020-05-28 19:37 ` [PATCH 09/13] i386: hvf: Drop copy of RFLAGS defines Roman Bolshakov
2020-05-28 19:37 ` [PATCH 10/13] i386: hvf: Drop regs in HVFX86EmulatorState Roman Bolshakov
2020-05-28 19:37 ` [PATCH 11/13] i386: hvf: Move lazy_flags into CPUX86State Roman Bolshakov
2020-06-04  6:43   ` Philippe Mathieu-Daudé
2020-05-28 19:37 ` [PATCH 12/13] i386: hvf: Move mmio_buf " Roman Bolshakov
2020-06-04 18:27   ` Paolo Bonzini
2020-06-05 17:24     ` Roman Bolshakov
2020-06-11 13:24     ` Claudio Fontana
2020-06-11 15:02       ` Roman Bolshakov
2020-05-28 19:37 ` [PATCH 13/13] i386: hvf: Drop HVFX86EmulatorState Roman Bolshakov
2020-05-29  2:57 ` [PATCH 00/13] i386: hvf: Remove HVFX86EmulatorState no-reply
2020-06-04  1:53 ` Cameron Esfahani

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.