qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] b50371: target-i386: Define structs for layou


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] b50371: target-i386: Define structs for layout of xsave ar...
Date: Tue, 24 May 2016 06:30:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: b503717d28e8f7eff39bf38624e6cf42687d951a
      
https://github.com/qemu/qemu/commit/b503717d28e8f7eff39bf38624e6cf42687d951a
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M target-i386/cpu.h
    M target-i386/kvm.c

  Log Message:
  -----------
  target-i386: Define structs for layout of xsave area

Add structs that define the layout of the xsave areas used by
Intel processors. Add some QEMU_BUILD_BUG_ON lines to ensure the
structs match the XSAVE_* macros in target-i386/kvm.c and the
offsets and sizes at target-i386/cpu.c:ext_save_areas.

Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: ee1b09f695dcd8532f470e53297473bd3bc88718
      
https://github.com/qemu/qemu/commit/ee1b09f695dcd8532f470e53297473bd3bc88718
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Use xsave structs for ext_save_area

This doesn't introduce any change in the code, as the offsets and
struct sizes match what was present in the table. This can be
validated by the QEMU_BUILD_BUG_ON lines on target-i386/cpu.h,
which ensures the struct sizes and offsets match the existing
values in ext_save_area.

Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 86cd2ea071b925d9fa231abb3e0f1ecfb5633f91
      
https://github.com/qemu/qemu/commit/86cd2ea071b925d9fa231abb3e0f1ecfb5633f91
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M target-i386/kvm.c

  Log Message:
  -----------
  target-i386: kvm: Use X86XSaveArea struct for xsave save/load

Instead of using offset macros and bit operations in a uint32_t
array, use the X86XSaveArea struct to perform the loading/saving
operations in kvm_put_xsave() and kvm_get_xsave().

Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: d494352c2f7818aeba184a8ef757569083740bb2
      
https://github.com/qemu/qemu/commit/d494352c2f7818aeba184a8ef757569083740bb2
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M include/qemu/osdep.h
    M util/osdep.c

  Log Message:
  -----------
  osdep: Move default qemu_hw_version() value to a macro

The macro will be used by code that will stop calling
qemu_hw_version() at runtime and just need a constant value.

Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: cd6c1b7057bc897675897f44d15277c3a6e7b118
      
https://github.com/qemu/qemu/commit/cd6c1b7057bc897675897f44d15277c3a6e7b118
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M hw/i386/pc_piix.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  pc: Set CPU model-id on compat_props for pc <= 2.4

Instead of relying on x86_cpudef_setup() calling
qemu_hw_version(), just make old machines set model-id explicitly
on compat_props for qemu64, qemu32, and athlon. This will allow
us to eliminate x86_cpudef_setup() later.

Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 9cf2cc3d8237732946720d78bf9aec0064026ed8
      
https://github.com/qemu/qemu/commit/9cf2cc3d8237732946720d78bf9aec0064026ed8
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Set constant model_id for qemu64/qemu32/athlon

Newer PC machines don't set hw_version, and older machines set
model-id on compat_props explicitly, so we don't need the
x86_cpudef_setup() code that sets model_id using
qemu_hw_version() anymore.

Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 3e2c0e062f0963a6b73b0cd1990fad79495463d9
      
https://github.com/qemu/qemu/commit/3e2c0e062f0963a6b73b0cd1990fad79495463d9
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M arch_init.c
    M bsd-user/main.c
    M include/sysemu/arch_init.h
    M linux-user/main.c
    M target-i386/cpu.c
    M target-i386/cpu.h
    M vl.c

  Log Message:
  -----------
  cpu: Eliminate cpudef_init(), cpudef_setup()

x86_cpudef_init() doesn't do anything anymore, cpudef_init(),
cpudef_setup(), and x86_cpudef_init() can be finally removed.

Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 4fe15cdedf8728e58b8e475f8b1a26fb16aa9caa
      
https://github.com/qemu/qemu/commit/4fe15cdedf8728e58b8e475f8b1a26fb16aa9caa
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M target-i386/cpu.c
    M target-i386/translate.c

  Log Message:
  -----------
  target-i386: Move TCG initialization check to tcg_x86_init()

Instead of requiring cpu.c to check if TCG was already initialized,
simply let the function be called multiple times.

Suggested-by: Igor Mammedov <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 57f2453ab48a771b30aeced01b329ee85853bb7b
      
https://github.com/qemu/qemu/commit/57f2453ab48a771b30aeced01b329ee85853bb7b
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Move TCG initialization to realize time

QOM instance_init functions are not supposed to have any side-effects,
as new objects may be created at any moment for querying property
information (see qmp_device_list_properties()).

Move TCG initialization to realize time so it won't be called when just
doing object_new() on a X86CPU subclass.

Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 42ecabaae16c0054dde6d8b0fdf90a8c7cce270d
      
https://github.com/qemu/qemu/commit/42ecabaae16c0054dde6d8b0fdf90a8c7cce270d
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Call cpu_exec_init() on realize

QOM instance_init functions are not supposed to have any side-effects,
as new objects may be created at any moment for querying property
information (see qmp_device_list_properties()).

Calling cpu_exec_init() also affects QEMU's ability to handle errors
during CPU creation, as some actions done by cpu_exec_init() can't be
reverted.

Move cpu_exec_init() call to realize so a simple object_new() won't
trigger it, and so that it is called after some basic validation of CPU
parameters.

Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: d71b62a165b6af463f376bd398cfc1aec4e2f213
      
https://github.com/qemu/qemu/commit/d71b62a165b6af463f376bd398cfc1aec4e2f213
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M target-i386/cpu.h
    M target-i386/kvm.c

  Log Message:
  -----------
  target-i386: kvm: Allocate kvm_msrs struct once per VCPU

Instead of using 2400 bytes in the stack for 150 MSR entries in
kvm_get_msrs() and kvm_put_msrs(), allocate a buffer once for
each VCPU.

Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: d1138251bf712cc076cdbbfd68aae3c8792bfcf9
      
https://github.com/qemu/qemu/commit/d1138251bf712cc076cdbbfd68aae3c8792bfcf9
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M target-i386/kvm.c

  Log Message:
  -----------
  target-i386: kvm: Increase MSR_BUF_SIZE

We are dangerously close to the array limits in kvm_put_msrs()
and kvm_get_msrs(): with the default mcg_cap configuration, we
can set up to 148 MSRs in kvm_put_msrs(), and if we allow mcg_cap
to be changed, we can write up to 236 MSRs.

Use 4096 bytes for the buffer, that can hold 255 kvm_msr_entry
structs.

Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 9c600a84544dfedff238f6e0cfac0d88c58654c0
      
https://github.com/qemu/qemu/commit/9c600a84544dfedff238f6e0cfac0d88c58654c0
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M target-i386/kvm.c

  Log Message:
  -----------
  target-i386: kvm: Simplify MSR array construction

Add a helper function that appends new entries to the MSR buffer
and checks for the buffer size limit.

Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: e25ffda7bd9e8b10d4d08f944ad87c7523096de5
      
https://github.com/qemu/qemu/commit/e25ffda7bd9e8b10d4d08f944ad87c7523096de5
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M target-i386/kvm.c

  Log Message:
  -----------
  target-i386: kvm: Simplify MSR setting functions

Simplify kvm_put_tscdeadline_msr() and
kvm_put_msr_feature_control() using kvm_msr_buf and the
kvm_msr_entry_add() helper.

Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 1abc2cae46b77ed345fd3eff88a49fe8f4b24abe
      
https://github.com/qemu/qemu/commit/1abc2cae46b77ed345fd3eff88a49fe8f4b24abe
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M target-i386/kvm.c

  Log Message:
  -----------
  target-i386: kvm: Eliminate kvm_msr_entry_set()

Inline the function inside kvm_msr_entry_add().

Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 287db79df8af8e31f18e262feb5e05103a09e4d4
      
https://github.com/qemu/qemu/commit/287db79df8af8e31f18e262feb5e05103a09e4d4
  Author: Peter Maydell <address@hidden>
  Date:   2016-05-24 (Tue, 24 May 2016)

  Changed paths:
    M arch_init.c
    M bsd-user/main.c
    M hw/i386/pc_piix.c
    M include/hw/i386/pc.h
    M include/qemu/osdep.h
    M include/sysemu/arch_init.h
    M linux-user/main.c
    M target-i386/cpu.c
    M target-i386/cpu.h
    M target-i386/kvm.c
    M target-i386/translate.c
    M util/osdep.c
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into 
staging

X86 queue, 2016-05-23

# gpg: Signature made Mon 23 May 2016 23:48:27 BST using RSA key ID 984DC5A6
# gpg: Good signature from "Eduardo Habkost <address@hidden>"

* remotes/ehabkost/tags/x86-pull-request:
  target-i386: kvm: Eliminate kvm_msr_entry_set()
  target-i386: kvm: Simplify MSR setting functions
  target-i386: kvm: Simplify MSR array construction
  target-i386: kvm: Increase MSR_BUF_SIZE
  target-i386: kvm: Allocate kvm_msrs struct once per VCPU
  target-i386: Call cpu_exec_init() on realize
  target-i386: Move TCG initialization to realize time
  target-i386: Move TCG initialization check to tcg_x86_init()
  cpu: Eliminate cpudef_init(), cpudef_setup()
  target-i386: Set constant model_id for qemu64/qemu32/athlon
  pc: Set CPU model-id on compat_props for pc <= 2.4
  osdep: Move default qemu_hw_version() value to a macro
  target-i386: kvm: Use X86XSaveArea struct for xsave save/load
  target-i386: Use xsave structs for ext_save_area
  target-i386: Define structs for layout of xsave area

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/99694362ee56...287db79df8af

reply via email to

[Prev in Thread] Current Thread [Next in Thread]