Skip to content

i386/hvf: x2apic support and some small fixes

Phil Dennis-Jordan qemu-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4i386/hvf: Integrates x2APIC support with hvf acceltarget/i386/hvf/x86_cpuid.c target/i386/hvf/x86_emu.c+33 -20 replies
2/4i386/hvf: Fixes startup memory leak (vmcs caps)target/i386/hvf/hvf.c+3 -10 replies
3/4i386/hvf: Raise exception on error setting APICBASEtarget/i386/hvf/x86_emu.c+9 -20 replies
4/4i386/hvf: Removes duplicate/shadowed variables in hvf_vcpu_exectarget/i386/hvf/hvf.c+0 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] i386/hvf: x2apic support and some small fixes

This is a loose collection of patches against the x86 hvf accel. They can be applied/pulled independently from one another.

Patch 1 is a repost of a patch I've submitted a bunch of times already. It wires up and enables x2APIC mode in conjunction with HVF - the software APIC implementation in QEMU gained the feature earlier this year but hvf wasn't included.
The change typically improves performance with modern SMP guest OSes by a 2-digit percentage. (Exact values depend on workload.)

Patch 2 fixes a minor one-off memory leak during hvf startup.

Patch 3 ever so slightly improves APIC correctness under hvf: when setting the APICBASE MSR, if the APIC deems the new value invalid, we raise an exception (as per spec) rather than silently doing nothing. This fixes a failing kvm-unit-tests test case.

Patch 4 removes some unnecessary duplication and type-rechecking in HVF's inner loop. (No need to cast the cpu state pointer to X86CPU within, the hvf_vcp_exec function already does that once at the top.)

This work has been sponsored by Sauce Labs Inc.

Phil Dennis-Jordan (4):
i386/hvf: Integrates x2APIC support with hvf accel i386/hvf: Fixes startup memory leak (vmcs caps) i386/hvf: Raise exception on error setting APICBASE i386/hvf: Removes duplicate/shadowed variables in hvf_vcpu_exec

 target/i386/hvf/hvf.c       |  7 +++----
 target/i386/hvf/x86_cpuid.c |  4 ++--
 target/i386/hvf/x86_emu.c   | 42 +++++++++++++++++++++++++++++++++++--
 3 files changed, 45 insertions(+), 8 deletions(-)
Signature · 1 line
2.39.3 (Apple Git-145)