OSDN Git Service

s390x/tcg: STSI overhaul
authorDavid Hildenbrand <david@redhat.com>
Mon, 29 Jan 2018 12:56:18 +0000 (13:56 +0100)
committerCornelia Huck <cohuck@redhat.com>
Fri, 9 Feb 2018 08:37:13 +0000 (09:37 +0100)
commit799478621e28f6d3717a405821bc3c39435794f6
tree5231836c35861f581cfe47aba676932d4d98d4ec
parent4d1369efaad3b5297f164d787bda3dd24723c1e2
s390x/tcg: STSI overhaul

Current STSI implementation is a mess, so let's rewrite it.

Problems fixed by this patch:
1) The order of exceptions/when recognized is wrong.
2) We have to store to virtual address space, not absolute.
3) Alignment check of the block is missing.
3) The SMP information is not indicated.

While at it:
a) Make the code look nicer
    - get rid of nesting levels
    - use struct initialization instead of initializing to zero
    - rename a misspelled field and rename function code defines
    - use a union and have only one write statement
    - use cpu_to_beX()
b) Indicate the VM name/extended name + UUID just like KVM does
c) Indicate that all LPAR CPUs we fake are dedicated
d) Add a comment why we fake being a KVM guest
e) Give our guest as default the name "TCGguest"
f) Fake the same CPU information we have in our Guest for all layers

While at it, get rid of "potential_page_fault()" by forwarding the
retaddr properly.

The result is best verified by looking at "/proc/sysinfo" in the guest
when specifying on the qemu command line
    -uuid "74738ff5-5367-5958-9aee-98fffdcd1876" \
    -name "extra long guest name"

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20180129125623.21729-14-david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
target/s390x/cpu.h
target/s390x/misc_helper.c