qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] a3c2ca: target-i386: Simplify listflags() fun


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] a3c2ca: target-i386: Simplify listflags() function
Date: Mon, 02 Mar 2015 07:30:06 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a3c2ca7d29ff39cd5b06e48fa1e42c91d05ebd36
      
https://github.com/qemu/qemu/commit/a3c2ca7d29ff39cd5b06e48fa1e42c91d05ebd36
  Author: Eduardo Habkost <address@hidden>
  Date:   2015-02-25 (Wed, 25 Feb 2015)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Simplify listflags() function

listflags() had lots of unnecessary complexity. Instead of printing to a
buffer that will be immediately printed, simply call the printing
function directly. Also, remove the fbits and flags arguments that were
always set to the same value. Also, there's no need to list the flags in
reverse order.

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


  Commit: 08e1a1e5a175ecbfdb761db5a62090498f736969
      
https://github.com/qemu/qemu/commit/08e1a1e5a175ecbfdb761db5a62090498f736969
  Author: Eduardo Habkost <address@hidden>
  Date:   2015-02-25 (Wed, 25 Feb 2015)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Eliminate unnecessary get_cpuid_vendor() function

The function was used in only two places. In one of them, the function
made the code less readable by requiring temporary te[bcd]x variables.
In the other one we can simply inline the existing code.

Reviewed-by: Andreas Färber <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 8a3f75b39db7d2c891d1e91dde5180d3ff9e10f7
      
https://github.com/qemu/qemu/commit/8a3f75b39db7d2c891d1e91dde5180d3ff9e10f7
  Author: Eduardo Habkost <address@hidden>
  Date:   2015-02-25 (Wed, 25 Feb 2015)

  Changed paths:
    A include/hw/i386/topology.h
    M target-i386/cpu.c
    R target-i386/topology.h
    M tests/Makefile
    M tests/test-x86-cpuid.c

  Log Message:
  -----------
  target-i386: Move topology.h to include/hw/i386

This will allow the PC code to use the header, and lets us eliminate the
QEMU_INCLUDES hack inside tests/Makefile.

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


  Commit: 644dba250a3ed04079792f0d6cc918fb1483e6a5
      
https://github.com/qemu/qemu/commit/644dba250a3ed04079792f0d6cc918fb1483e6a5
  Author: Eduardo Habkost <address@hidden>
  Date:   2015-02-25 (Wed, 25 Feb 2015)

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

  Log Message:
  -----------
  target-i386: Rename cpu_x86_init() to cpu_x86_init_user()

The function is used only for CONFIG_USER, so make its purpose clear.

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


  Commit: 15258d46baef5f8265ad5f1002905664cf58f051
      
https://github.com/qemu/qemu/commit/15258d46baef5f8265ad5f1002905664cf58f051
  Author: Eduardo Habkost <address@hidden>
  Date:   2015-02-25 (Wed, 25 Feb 2015)

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

  Log Message:
  -----------
  target-i386: Eliminate cpu_init() function

Instead of putting extra logic inside cpu.h, just do everything inside
cpu_x86_init_user().

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


  Commit: 18b0e4e77142ace948497a053bd5b56c1b849592
      
https://github.com/qemu/qemu/commit/18b0e4e77142ace948497a053bd5b56c1b849592
  Author: Eduardo Habkost <address@hidden>
  Date:   2015-02-25 (Wed, 25 Feb 2015)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Simplify error handling on cpu_x86_init_user()

Isolate error handling path from the "if (error)" checks.

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


  Commit: 9e9d3863adcbd1ffeca30f240f49805b00ba0d87
      
https://github.com/qemu/qemu/commit/9e9d3863adcbd1ffeca30f240f49805b00ba0d87
  Author: Eduardo Habkost <address@hidden>
  Date:   2015-02-25 (Wed, 25 Feb 2015)

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

  Log Message:
  -----------
  target-i386: Move CPUX86State.cpuid_apic_id to X86CPU.apic_id

The field doesn't need to be inside CPUState, and it is not specific for
the CPUID instruction, so move and rename it.

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


  Commit: 696da41b1b741f6056e52c572e05abd790637be1
      
https://github.com/qemu/qemu/commit/696da41b1b741f6056e52c572e05abd790637be1
  Author: Eduardo Habkost <address@hidden>
  Date:   2015-02-25 (Wed, 25 Feb 2015)

  Changed paths:
    M linux-user/main.c

  Log Message:
  -----------
  linux-user: Check for cpu_init() errors

This was the only caller of cpu_init() that was not checking for NULL
yet.

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


  Commit: 9c235e83f1c3437be6ca45755909efb745c10deb
      
https://github.com/qemu/qemu/commit/9c235e83f1c3437be6ca45755909efb745c10deb
  Author: Eduardo Habkost <address@hidden>
  Date:   2015-02-25 (Wed, 25 Feb 2015)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Set APIC ID using cpu_index on CONFIG_USER

The PC CPU initialization code already sets apic-id based on the CPU
topology, and CONFIG_USER doesn't need the topology-based APIC ID
calculation code.

Make CONFIG_USER set apic-id before realizing the CPU (just like PC
already does), so we can simplify x86_cpu_initfn later. As there is no
CPU topology configuration in CONFIG_USER, just use cpu_index as the
APIC ID.

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


  Commit: e1356dd70aef11425883dd4d2885f1d208eb9d57
      
https://github.com/qemu/qemu/commit/e1356dd70aef11425883dd4d2885f1d208eb9d57
  Author: Eduardo Habkost <address@hidden>
  Date:   2015-02-25 (Wed, 25 Feb 2015)

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

  Log Message:
  -----------
  target-i386: Require APIC ID to be explicitly set before CPU realize

Instead of setting APIC ID automatically when creating a X86CPU, require
the property to be set before realizing the object (which all callers of
cpu_x86_create() already do).

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


  Commit: de13197a38cf45c990802661a057f64a05426cbc
      
https://github.com/qemu/qemu/commit/de13197a38cf45c990802661a057f64a05426cbc
  Author: Eduardo Habkost <address@hidden>
  Date:   2015-02-25 (Wed, 25 Feb 2015)

  Changed paths:
    M hw/i386/pc.c
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Move APIC ID compatibility code to pc.c

The APIC ID compatibility code is required only for PC, and now that
x86_cpu_initfn() doesn't use x86_cpu_apic_id_from_index() anymore, that
code can be moved to pc.c.

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


  Commit: b8a173b25c887a606681fc35a46702c164d5b2d0
      
https://github.com/qemu/qemu/commit/b8a173b25c887a606681fc35a46702c164d5b2d0
  Author: Peter Maydell <address@hidden>
  Date:   2015-03-02 (Mon, 02 Mar 2015)

  Changed paths:
    M hw/i386/pc.c
    A include/hw/i386/topology.h
    M linux-user/main.c
    M target-i386/cpu-qom.h
    M target-i386/cpu.c
    M target-i386/cpu.h
    M target-i386/kvm.c
    R target-i386/topology.h
    M tests/Makefile
    M tests/test-x86-cpuid.c

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

* remotes/ehabkost/tags/x86-pull-request:
  target-i386: Move APIC ID compatibility code to pc.c
  target-i386: Require APIC ID to be explicitly set before CPU realize
  target-i386: Set APIC ID using cpu_index on CONFIG_USER
  linux-user: Check for cpu_init() errors
  target-i386: Move CPUX86State.cpuid_apic_id to X86CPU.apic_id
  target-i386: Simplify error handling on cpu_x86_init_user()
  target-i386: Eliminate cpu_init() function
  target-i386: Rename cpu_x86_init() to cpu_x86_init_user()
  target-i386: Move topology.h to include/hw/i386
  target-i386: Eliminate unnecessary get_cpuid_vendor() function
  target-i386: Simplify listflags() function

Conflicts:
        target-i386/cpu.c

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


Compare: https://github.com/qemu/qemu/compare/5de090464f1e...b8a173b25c88

reply via email to

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