Implements MMIO emulation for lvx/stvx instructions
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest1 patch 0 repliesNew
- v51 patch 3 repliesSuperseded
- v41 patch 0 repliesSuperseded
Earlier versions · 5
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 1 patch | 0 replies | Superseded | |
| v2 | 1 patch | 0 replies | Superseded | |
| v1 posting 3/3 | 1 patch | 2 replies | Superseded | |
| v1 posting 2/3 | 1 patch | 1 reply | Superseded | |
| v1 posting 1/3 | 1 patch | 0 replies | Superseded |
Changes in v6 from the cover letter
- Applied Paul's code suggestion to fix endianess
- Moved kvmppc_get_vsr_dword_offset() back to #ifdef CONFIG_VSX
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | KVM: PPC: Book3S: Add MMIO emulation for VMX instructionsarch/ arch/ arch/ +2 more | +196 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.
Cover letter [PATCH v6 0/1] Implements MMIO emulation for lvx/stvx instructions
v6:
- Applied Paul's code suggestion to fix endianess
- Moved kvmppc_get_vsr_dword_offset() back to #ifdef CONFIG_VSX
v5:
- Fixed the mask off of the effective address
v4:
- Changed KVM_MMIO_REG_VMX to 0xc0 because there are 64 VSX registers
v3:
- Added Reported-by in the commit message
v2:
- kvmppc_get_vsr_word_offset() moved back to its original place
- EA AND ~0xF, following ISA.
- fixed BE/LE cases
TESTS:
For testing purposes I wrote a small program that performs stvx/lvx using the program's virtual memory and using MMIO. Load/Store into virtual memory is the model I use to check if MMIO results are correct (because only MMIO is emulated by KVM).
Results:
HOST LE - GUEST BE
address: 0x100348500100x21436587bbbbaaaa4444555578563412io_address: 0x3fff89a200000x21436587bbbbaaaa4444555578563412
HOST LE - GUEST LE
address: 0x10033a200100x1234567855554444aaaabbbb87654321io_address: 0x3fffb53800000x1234567855554444aaaabbbb87654321
HOST BE - GUEST BE
address: 0x1002c4a00100x21436587bbbbaaaa4444555578563412io_address: 0x3ffface400000x21436587bbbbaaaa4444555578563412
HOST BR - GUEST LE
address: 0x100225e00100x1234567855554444aaaabbbb87654321io_address: 0x3fff7fcb00000x1234567855554444aaaabbbb87654321
This patch implements MMIO emulation for two instructions: lvx and stvx.
Jose Ricardo Ziviani (1):
KVM: PPC: Book3S: Add MMIO emulation for VMX instructions
arch/powerpc/include/asm/kvm_host.h | 2 + arch/powerpc/include/asm/kvm_ppc.h | 4 + arch/powerpc/include/asm/ppc-opcode.h | 6 ++ arch/powerpc/kvm/emulate_loadstore.c | 34 ++++++++ arch/powerpc/kvm/powerpc.c | 150 ++++++++++++++++++++++++++++++++++ 5 files changed, 196 insertions(+)
Signature · 1 line
2.14.3