[Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes

2014-06-16 Thread Gabriel L. Somlo
X vs. Linux/Windows re. auto-negotiation and LSC injection). Thanks much, Gabriel Gabriel L. Somlo (3): e1000: emulate auto-negotiation during external link status change e1000: improve auto-negotiation reporting via mii-tool e1000: signal guest on successful link auto-negotiation hw

[Qemu-devel] [PATCH v1 3/3] e1000: signal guest on successful link auto-negotiation

2014-06-16 Thread Gabriel L. Somlo
Generate a link status change interrupt once link auto-netotiation is successfully completed. This does not affect Linux and Windows (XP and 7 tested) in any way, but is needed by the stock OS X driver (AppleIntel8254XEthernet.kext), which would otherwise fail to notice the link status change

Re: [Qemu-devel] [Bug 1326986] [NEW] e1000 - no link detected by

2014-06-05 Thread Gabriel L. Somlo
Matthew Gamble mgam...@mgamble.ca wrote: I'm trying to get a VXWorks image running inside a qemu guest. I have the machine running, however, the vxworks image only has support for the 82544EI device so I had to change the device ID in e1000.c to get the device even recognized so I'm not sure

Re: [Qemu-devel] [Bug 1326986] [NEW] e1000 - no link detected by

2014-06-05 Thread Gabriel L. Somlo
a chance to dig deeper until next week (and I'm also not all that familiar with the deep voodoo of link negotiation, so it might take a while if it's down to me... :) Cheers, --Gabriel On Thu, Jun 5, 2014 at 10:44 PM, Gabriel L. Somlo gso...@gmail.com wrote: Matthew Gamble mgam...@mgamble.ca wrote

Re: [Qemu-devel] [PATCH v4 0/3, ping] SMBIOS cleanup round

2014-06-04 Thread Gabriel L. Somlo
On Wed, Jun 04, 2014 at 10:47:21PM +0300, Michael S. Tsirkin wrote: On Mon, Jun 02, 2014 at 01:13:18PM -0400, Gabriel L. Somlo wrote: Hi, On Mon, May 19, 2014 at 10:44:48PM +0300, Michael S. Tsirkin wrote: On Mon, May 19, 2014 at 10:09:52AM -0400, Gabriel L. Somlo wrote: Changelog

[Qemu-devel] [PATCH v4 1/3] e1000: allow command-line selection of card model

2014-06-02 Thread Gabriel L. Somlo
Allow selection of different card models from the qemu command line, to better accomodate a wider range of guests. Signed-off-by: Romain Dolbeau rom...@dolbeau.org Signed-off-by: Gabriel Somlo so...@cmu.edu Reviewed-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Peter Crosthwaite

[Qemu-devel] [PATCH v4 2/3] tests: e1000: test additional device IDs

2014-06-02 Thread Gabriel L. Somlo
Update e1000-test.c to check all currently supported devices. Suggested-by: Andreas Färber afaer...@suse.de Signed-off-by: Gabriel Somlo so...@cmu.edu Reviewed-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Peter Crosthwaite peter.crosthwa...@xilinx.com Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PATCH v4 0/3] e1000: allow model/device_id selection on command line

2014-06-02 Thread Gabriel L. Somlo
) - modified e1000 test to check for all supported models, as suggested by Andreas (patch 3/3). I used eepro100-test.c as an example for this change. Gabriel L. Somlo (3): e1000: allow command-line selection of card model tests: e1000: test additional device IDs e1000: remove broken support

[Qemu-devel] [PATCH v4 3/3] e1000: remove broken support for 82573L

2014-06-02 Thread Gabriel L. Somlo
Currently, e1000 support is based on the manual for the 8254xx model series. 82573x models are documented in a separate manual (see http://www.intel.com/content/dam/www/public/us/en/documents/manuals/pcie-gbe-controllers-open-source-manual.pdf) and the 82573L device ID no longer works correctly

Re: [Qemu-devel] [PATCH v4 1/3] e1000: allow command-line selection of card model

2014-06-02 Thread Gabriel L. Somlo
I was looking over my submission, and have one remaining question: On Mon, Jun 02, 2014 at 09:33:27AM -0400, Gabriel L. Somlo wrote: Allow selection of different card models from the qemu command line, to better accomodate a wider range of guests. Signed-off-by: Romain Dolbeau rom

Re: [Qemu-devel] [PATCH v4 0/3, ping] SMBIOS cleanup round

2014-06-02 Thread Gabriel L. Somlo
Hi, On Mon, May 19, 2014 at 10:44:48PM +0300, Michael S. Tsirkin wrote: On Mon, May 19, 2014 at 10:09:52AM -0400, Gabriel L. Somlo wrote: Changelog: new in v4: - slightly improved commit blurbs v3: - endian-ness fix (1/3) now correctly handles cpuid version and features

[Qemu-devel] [PATCH v3 2/3] tests: e1000: test additional device IDs

2014-05-31 Thread Gabriel L. Somlo
Update e1000-test.c to check all currently supported devices. Suggested-by: Andreas Färber afaer...@suse.de Signed-off-by: Gabriel Somlo so...@cmu.edu Reviewed-by: Michael S. Tsirkin m...@redhat.com --- tests/e1000-test.c | 34 +++--- 1 file changed, 27 insertions(+),

[Qemu-devel] [PATCH v3 1/3] e1000: allow command-line selection of card model

2014-05-31 Thread Gabriel L. Somlo
Allow selection of different card models from the qemu command line, to better accomodate a wider range of guests. Signed-off-by: Romain Dolbeau rom...@dolbeau.org Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/net/e1000.c | 120 +---

[Qemu-devel] [PATCH v3 3/3] e1000: remove broken support for 82573L

2014-05-31 Thread Gabriel L. Somlo
Currently, e1000 support is based on the manual for the 8254xx model series. 82573x models are documented in a separate manual (see http://www.intel.com/content/dam/www/public/us/en/documents/manuals/pcie-gbe-controllers-open-source-manual.pdf) and the 82573L device ID no longer works correctly

[Qemu-devel] [PATCH v3 0/3] e1000: allow model/device_id selection on command line

2014-05-31 Thread Gabriel L. Somlo
for this change. Gabriel L. Somlo (3): e1000: allow command-line selection of card model tests: e1000: test additional device IDs e1000: remove broken support for 82573L hw/net/e1000.c | 110 +++- hw/net/e1000_regs.h | 6 +++ tests/e1000

Re: [Qemu-devel] [PATCH v2 2/3] e1000: allow command-line selection of card model

2014-05-29 Thread Gabriel L. Somlo
Hi Peter, Thanks for the QOM crash course ! So I did s/TYPE_E1000/TYPE_E1000_BASE/ as suggested by Stefan, and also moved PCI_VENDOR_ID_INTEL back into e1000_class_init() and away from e1000_devices[] as you suggested. That's going to be part of v3, as soon as we're done talking about QOM, see

Re: [Qemu-devel] [PATCH v4 0/3] SMBIOS cleanup round

2014-05-27 Thread Gabriel L. Somlo
On Mon, May 26, 2014 at 08:30:48AM +0200, Markus Armbruster wrote: So I was about to send a patch with acpi-test.c renamed to bios-tables-test.c, but the patch is basically removing all of acpi-test.c, and creating a new file bios-tables-test.c. Err, isn't that what a rename does?

[Qemu-devel] [PATCH v1 0/2] testing SMBIOS tables

2014-05-27 Thread Gabriel L. Somlo
, separate issue ? Gabriel L. Somlo (2): tests: rename acpi-test to bios-tables-test tests: add smbios testing tests/Makefile| 4 +- tests/{acpi-test.c = bios-tables-test.c} | 126 ++ 2 files changed, 128 insertions(+), 2 deletions(-) rename

[Qemu-devel] [PATCH v1 1/2] tests: rename acpi-test to bios-tables-test

2014-05-27 Thread Gabriel L. Somlo
The test harness for acpi (generating a boot disk, starting qemu, waiting for the BIOS to finish booting before examining guest memory, etc.) is perfectly suited for testing other bios tables beside acpi, such as e.g., smbios. This patch renames acpi-test to bios-tables-test to reflect that, and

[Qemu-devel] [PATCH v1 2/2] tests: add smbios testing

2014-05-27 Thread Gabriel L. Somlo
Add tests to find and verify the smbios entry point structure, and to walk and perform checks on the actual smbios tables. Suggested-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Gabriel Somlo so...@cmu.edu --- tests/bios-tables-test.c | 126

Re: [Qemu-devel] [ping: PATCH v2 0/3] e1000: allow model/device_id selection on command line

2014-05-27 Thread Gabriel L. Somlo
ping ? On Wed, May 21, 2014 at 02:27:41PM -0400, Gabriel L. Somlo wrote: This started out as a single patch (now patch 2/3): Allow selection of different card models from the qemu command line, to better accomodate a wider range of guests. New in v2: - moved check for 8257x

Re: [Qemu-devel] [PATCH v4 0/3] SMBIOS cleanup round

2014-05-23 Thread Gabriel L. Somlo
); } -- Gabriel L. Somlo Director of Computing Services Information Networking Institute Carnegie Mellon University 4616 Henry St., Pittsburgh, PA 15213 +1.412.268.9310 www.ini.cmu.edu

Re: [Qemu-devel] [PATCH v4 0/3] SMBIOS cleanup round

2014-05-22 Thread Gabriel L. Somlo
Michael, On Mon, May 19, 2014 at 10:44:48PM +0300, Michael S. Tsirkin wrote: One question: we don't seem to have unit-test for this interface in qemu, do we? I would like to see at least a basic test along the lines of tests/acpi-test.c: run bios to load tables from QEMU, then do some basic

[Qemu-devel] [PATCH v2 2/3] e1000: allow command-line selection of card model

2014-05-21 Thread Gabriel L. Somlo
Allow selection of different card models from the qemu command line, to better accomodate a wider range of guests. Signed-off-by: Romain Dolbeau rom...@dolbeau.org Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/net/e1000.c | 95 -- 1

[Qemu-devel] [PATCH v2 0/3] e1000: allow model/device_id selection on command line

2014-05-21 Thread Gabriel L. Somlo
want me to :) Thanks again, Gabriel Gabriel L. Somlo (3): e1000: avoid relying on device id (and soon, QOM) on data path e1000: allow command-line selection of card model tests: e1000: test additional device IDs hw/net/e1000.c | 127

[Qemu-devel] [PATCH v2 1/3] e1000: avoid relying on device id (and soon, QOM) on data path

2014-05-21 Thread Gabriel L. Somlo
Introduce is_8257x boolean flag to E1000State, and set it during pci_e1000_init(), to avoid having to dynamically figure out device_id during set_interrupt_cause(). This will come in handy once we have a wider range of possible device IDs, and begin using QOM. Suggested-by: Michael S. Tsirkin

[Qemu-devel] [PATCH v2 3/3] tests: e1000: test additional device IDs

2014-05-21 Thread Gabriel L. Somlo
Update e1000-test.c to check all currently supported devices. Suggested-by: Andreas Färber afaer...@suse.de Signed-off-by: Gabriel Somlo so...@cmu.edu --- tests/e1000-test.c | 33 ++--- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/tests/e1000-test.c

[Qemu-devel] [PATCH] e1000: allow command-line selection of card model

2014-05-20 Thread Gabriel L. Somlo
Allow selection of different card models from the qemu command line, to better accomodate a wider range of guests. Based-on-patch-by: Romain Dolbeau rom...@dolbeau.org Signed-off-by: Gabriel Somlo so...@cmu.edu --- Based on the conversation in [2,3,4], and given that I would still like OS X to

Re: [Qemu-devel] [PATCH v4 0/3] SMBIOS cleanup round

2014-05-20 Thread Gabriel L. Somlo
... Is there anything I can RTFM that I could use to (more or less gently) teach myself how to write a sane QEMU unit test? Thanks much, --Gabriel Gabriel L. Somlo (3): SMBIOS: Fix endian-ness when populating multi-byte fields SMBIOS: Update Type 0 struct generator for machines = 2.1 SMBIOS

[Qemu-devel] [PATCH v4 0/3] SMBIOS cleanup round

2014-05-19 Thread Gabriel L. Somlo
-ness for *all* larger-than-8bit fields (patch 1/2) - resubmit type0 update (2/2) with appropriate endian-ness fix for 64-bit field. Gabriel L. Somlo (3): SMBIOS: Fix endian-ness when populating multi-byte fields SMBIOS: Update Type 0 struct generator for machines = 2.1 SMBIOS: Fix type

[Qemu-devel] [PATCH v4 1/3] SMBIOS: Fix endian-ness when populating multi-byte fields

2014-05-19 Thread Gabriel L. Somlo
When i386 guests are emulated on big endian hosts, make sure multi-byte fields are populated safely via cpu_to_le*(). Signed-off-by: Gabriel Somlo so...@cmu.edu Reviewed-by: Laszlo Ersek ler...@redhat.com Reviewed-by: Michael S. Tsirkin m...@redhat.com --- hw/i386/smbios.c | 92

[Qemu-devel] [PATCH v4 3/3] SMBIOS: Fix type 17 field sizes

2014-05-19 Thread Gabriel L. Somlo
Fields for configured_clock_speed and various voltage values introduced in spec v2.7+ should be word, i.e. 16 bits. Reported-by: Laszlo Ersek ler...@redhat.com Signed-off-by: Gabriel Somlo so...@cmu.edu Reviewed-by: Laszlo Ersek ler...@redhat.com Reviewed-by: Michael S. Tsirkin m...@redhat.com

[Qemu-devel] [PATCH v4 2/3] SMBIOS: Update Type 0 struct generator for machines = 2.1

2014-05-19 Thread Gabriel L. Somlo
Update how type 0 (bios info) structures are generated, as follows: - convert bios_characteristics field to uin64_t (instead of uint8_t[8]), as described in the current smbios spec (v2.8) - enable virtual machine bit in bios_characteristics_extension_bits - add command line option to

[Qemu-devel] [PATCH] SMBIOS: Update Type 0 struct generator for machines = 2.1

2014-05-13 Thread Gabriel L. Somlo
A type 0 (bios info) smbios structure is only generated if explicitly requested on the command line. This patch updates the mechanism for generating this type of structure as follows: - convert bios_characteristics field to uin64_t (instead of uint8_t[8]) as described in the current smbios

Re: [Qemu-devel] [PATCH] SMBIOS: Update Type 0 struct generator for machines = 2.1

2014-05-13 Thread Gabriel L. Somlo
On Tue, May 13, 2014 at 05:16:24PM +0200, Laszlo Ersek wrote: The idea and the implementation in this patch seems fine to me (and thanks for it!), except I object to the conversion of bios_characteristics to uint64_t. I think that will break when you emulate eg. an x86_64 target (ie. an

[Qemu-devel] [PATCH v2 2/2] SMBIOS: Update Type 0 struct generator for machines = 2.1

2014-05-13 Thread Gabriel L. Somlo
A type 0 (bios info) smbios structure is only generated if explicitly requested on the command line. This patch updates the mechanism for generating this type of structure as follows: - convert bios_characteristics field to uin64_t (instead of uint8_t[8]) as described in the current smbios

[Qemu-devel] [PATCH v2 0/2] SMBIOS cleanup round

2014-05-13 Thread Gabriel L. Somlo
New since version 1: - fix endian-ness for *all* larger-than-8bit fields (patch 1/2) - resubmit type0 update (2/2) with appropriate endian-ness fix for 64-bit field. Thanks, Gabriel Gabriel L. Somlo (2): SMBIOS: Fix endian-ness when populating fields wider than 8-bit SMBIOS

[Qemu-devel] [PATCH v2 1/2] SMBIOS: Fix endian-ness when populating fields wider than 8-bit

2014-05-13 Thread Gabriel L. Somlo
When i386 guests are emulated on big endian hosts, make sure fields wider than 8 bits are populated safely via cpu_to_le*(). Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/smbios.c | 91 1 file changed, 46 insertions(+), 45

Re: [Qemu-devel] [PATCH v2 1/2] SMBIOS: Fix endian-ness when populating fields wider than 8-bit

2014-05-13 Thread Gabriel L. Somlo
On Tue, May 13, 2014 at 10:09:45PM +0200, Paolo Bonzini wrote: Il 13/05/2014 20:17, Gabriel L. Somlo ha scritto: -t-processor_id[0] = smbios_cpuid_version; -t-processor_id[1] = smbios_cpuid_features; +t-processor_id[0] = smbios_cpuid_version; /* opaque, no cpu_to_le16 */ +t

Re: [Qemu-devel] [PATCH v2 1/2] SMBIOS: Fix endian-ness when populating fields wider than 8-bit

2014-05-13 Thread Gabriel L. Somlo
On Tue, May 13, 2014 at 10:33:35PM +0200, Paolo Bonzini wrote: Il 13/05/2014 22:21, Gabriel L. Somlo ha scritto: -t-processor_id[0] = smbios_cpuid_version; -t-processor_id[1] = smbios_cpuid_features; +t-processor_id[0] = smbios_cpuid_version; /* opaque, no cpu_to_le16

[Qemu-devel] [PATCH v3 1/3] SMBIOS: Fix endian-ness when populating fields wider than 8-bit

2014-05-13 Thread Gabriel L. Somlo
When i386 guests are emulated on big endian hosts, make sure fields wider than 8 bits are populated safely via cpu_to_le*(). Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/smbios.c | 92 +--- 1 file changed, 47 insertions(+), 45

[Qemu-devel] [PATCH v3 3/3] SMBIOS: Fix type 17 v2.7+ field sizes

2014-05-13 Thread Gabriel L. Somlo
Fields for configured_clock_speed and various voltage values introduced in v2.7 and v2.8 should be word, i.e. 16 bits. Reported-by: Laszlo Ersek ler...@redhat.com Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/smbios.c | 8 include/hw/i386/smbios.h | 8 2 files

[Qemu-devel] [PATCH v3 0/3] SMBIOS cleanup round

2014-05-13 Thread Gabriel L. Somlo
) - resubmit type0 update (2/2) with appropriate endian-ness fix for 64-bit field. Gabriel L. Somlo (3): SMBIOS: Fix endian-ness when populating fields wider than 8-bit SMBIOS: Update Type 0 struct generator for machines = 2.1 SMBIOS: Fix type 17 v2.7+ field sizes hw/i386/smbios.c

[Qemu-devel] [PATCH v3 2/3] SMBIOS: Update Type 0 struct generator for machines = 2.1

2014-05-13 Thread Gabriel L. Somlo
A type 0 (bios info) smbios structure is only generated if explicitly requested on the command line. This patch updates the mechanism for generating this type of structure as follows: - convert bios_characteristics field to uin64_t (instead of uint8_t[8]) as described in the current smbios

Re: [Qemu-devel] [PATCH v6 0/2] apic: bump emulated lapic version to 0x14

2014-05-07 Thread Gabriel L. Somlo
On Wed, May 07, 2014 at 12:37:43PM +0200, Paolo Bonzini wrote: So Gabriel what's left for OS X guests to run out of the box (with the right key for -device applesmc of course)? Once Gerd imports a new SeaBIOS blob, QEMU should be able to boot OS X out of the box. Of course, there are stil some

Re: [Qemu-devel] [PATCH v6 0/2] apic: bump emulated lapic version to 0x14

2014-05-07 Thread Gabriel L. Somlo
On Wed, May 07, 2014 at 05:02:42PM +0300, Michael S. Tsirkin wrote: 2. e1000 flakiness: - link negotiation is flaky (I have a patch, but was told and agree that it morally belongs in the BIOS layer) Could you remind me what the issue and the patch are? See:

[Qemu-devel] [PATCH v6 1/2] pc: add compat_props placeholder for 2.0 machine type

2014-05-06 Thread Gabriel L. Somlo
Add the boilerplate necessary for subsequent patches to simply drop in compat_props for pc machines 2.0 and older. This patch contains no functional changes. Signed-off-by: Gabriel Somlo so...@cmu.edu Acked-by: Alexander Graf ag...@suse.de Acked-by: Michael S. Tsirkin m...@redhat.com

[Qemu-devel] [PATCH v6 2/2] pic: use emulated lapic version 0x14 on pc machines = 2.1

2014-05-06 Thread Gabriel L. Somlo
Add version property to local apic, and have it default to 0x14 for pc machines starting at 2.1. For compatibility with previous releases, pc machines up to 2.0 will have their local apic version set to 0x11. Signed-off-by: Gabriel L. Somlo so...@cmu.edu Acked-by: Alexander Graf ag...@suse.de

[Qemu-devel] [PATCH v6 0/2] apic: bump emulated lapic version to 0x14

2014-05-06 Thread Gabriel L. Somlo
contributor netiquette, I'm just about done submitting all the changes I set out to contribute... :) Gabriel L. Somlo (2): pc: add compat_props placeholder for 2.0 machine type pic: use emulated lapic version 0x14 on pc machines = 2.1 hw/i386/pc_piix.c | 4 hw/i386/pc_q35.c

Re: [Qemu-devel] [PATCH v6 2/2] pic: use emulated lapic version 0x14 on pc machines = 2.1

2014-05-06 Thread Gabriel L. Somlo
, Gabriel L. Somlo wrote: Add version property to local apic, and have it default to 0x14 for pc machines starting at 2.1. For compatibility with previous releases, pc machines up to 2.0 will have their local apic version set to 0x11. Signed-off-by: Gabriel L. Somlo so...@cmu.edu Acked

[Qemu-devel] [v5 PATCH 2/2] apic: use emulated lapic version 0x14 on pc machines = 2.1

2014-05-05 Thread Gabriel L. Somlo
Add version property to local apic, and have it default to 0x14 for pc machines starting at 2.1. For compatibility with previous releases, pc machines up to 2.0 will have their local apic version set to 0x11. Signed-off-by: Gabriel L. Somlo so...@cmu.edu --- hw/intc/apic.c | 2

[Qemu-devel] [v5 PATCH 0/2] apic: bump emulated lapic version to 0x14

2014-05-05 Thread Gabriel L. Somlo
with only 8 bits dedicated to the implementation version, as specified in the documentation for the apic version register. Cheers, Gabriel Gabriel L. Somlo (2): pc: add compat_props placeholder for 2.0 machine type apic: use emulated lapic version 0x14 on pc machines = 2.1 hw/i386/pc_piix.c

[Qemu-devel] [v5 PATCH 1/2] pc: add compat_props placeholder for 2.0 machine type

2014-05-05 Thread Gabriel L. Somlo
Add the boilerplate necessary for subsequent patches to simply drop in compat_props for pc machines 2.0 and older. This patch contains no functional changes. Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/pc_piix.c| 4 hw/i386/pc_q35.c | 4 include/hw/i386/pc.h | 9

Re: [Qemu-devel] [v5 PATCH 0/2] apic: bump emulated lapic version to 0x14

2014-05-05 Thread Gabriel L. Somlo
Andreas, On Mon, May 05, 2014 at 06:00:22PM +0200, Andreas F?rber wrote: Objection! .compat_props are being added to the current pc and q35 machines rather than introducing pc-i440fx-2.1 and pc-q35-2.1 machines and adding the compat_props for the 2.0 versions only. If 2.1 machines without

Re: [Qemu-devel] [v5 PATCH 0/2] apic: bump emulated lapic version to 0x14

2014-05-05 Thread Gabriel L. Somlo
On Mon, May 05, 2014 at 07:38:58PM +0200, Andreas F?rber wrote: Yes, with that patch it's okay, you just forgot to mention that dependency in your cover letter - also a change log from v1 is missing. Instead of quoting Alex in the cover letter, you should've placed his Acked-by before your

Re: [Qemu-devel] [PATCH v3] apic: bump emulated lapic version to 0x14 on pc machines = 2.1

2014-05-02 Thread Gabriel L. Somlo
On Thu, May 01, 2014 at 05:43:23PM -0400, Don Slutz wrote: On 05/01/14 14:52, Alexander Graf wrote: With qdev we basically had an array of constructor parameters in the qdev definition. You could set these from the outside between create and init, basically: dev = dev_create()

Re: [Qemu-devel] [PATCH v3] apic: bump emulated lapic version to 0x14 on pc machines = 2.1

2014-05-02 Thread Gabriel L. Somlo
On Fri, May 02, 2014 at 04:26:41PM +0200, Paolo Bonzini wrote: Il 02/05/2014 16:23, Gabriel L. Somlo ha scritto: Did I miss anything ? Is there a way to override the default for all apics, which I set in DEFINE_PROP_UINT32, *before* anything gets initialized/realized/constructed/whatever

[Qemu-devel] [v4 PATCH 0/2] apic: bump emulated lapic version to 0x14

2014-05-02 Thread Gabriel L. Somlo
.html, Please let me know what you all think. Thanks, Gabriel Gabriel L. Somlo (2): pc: add compat_props placeholder for 2.0 machine type apic: use emulated lapic version 0x14 on pc machines = 2.1 hw/i386/pc_piix.c | 4 hw/i386/pc_q35.c| 4 hw

[Qemu-devel] [v4 PATCH 2/2] apic: use emulated lapic version 0x14 on pc machines = 2.1

2014-05-02 Thread Gabriel L. Somlo
Add version property to local apic, and have it default to 0x14 for pc machines starting at 2.1. For compatibility with previous releases, pc machines up to 2.0 will have their local apic version set to 0x11. Signed-off-by: Gabriel L. Somlo so...@cmu.edu --- hw/intc/apic.c | 2

[Qemu-devel] [v4 PATCH 1/2] pc: add compat_props placeholder for 2.0 machine type

2014-05-02 Thread Gabriel L. Somlo
Add the boilerplate necessary for subsequent patches to simply drop in compat_props for pc machines 2.0 and older. This patch contains no functional changes. Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/pc_piix.c| 4 hw/i386/pc_q35.c | 4 include/hw/i386/pc.h | 9

Re: [Qemu-devel] [v4 PATCH 0/2] apic: bump emulated lapic version to 0x14

2014-05-02 Thread Gabriel L. Somlo
On Fri, May 02, 2014 at 02:02:11PM -0400, Gabriel L. Somlo wrote: I decided to split the patch into the boilerplate compat_props for v2.0 and older (1/2) and the actual lapic-version payload (2/2). BTW, I plan on using uint8_t instead of uint32_t for version in a future (v5) revision, since

Re: [Qemu-devel] [PATCH v3] apic: bump emulated lapic version to 0x14 on pc machines = 2.1

2014-05-01 Thread Gabriel L. Somlo
On Wed, Apr 30, 2014 at 09:44:32PM +0200, Alexander Graf wrote: diff --git a/hw/intc/apic.c b/hw/intc/apic.c index 2f40cba..4480bc4 100644 --- a/hw/intc/apic.c +++ b/hw/intc/apic.c @@ -32,6 +32,8 @@ #define SYNC_TO_VAPIC 0x2 #define SYNC_ISR_IRR_TO_VAPIC 0x4

[Qemu-devel] [PATCH v2] apic: bump emulated lapic version to 0x14 on pc machines = 2.1

2014-04-30 Thread Gabriel L. Somlo
Some guests (e.g. 0S X) more or less arbitrarily insist on a minimum lapic version of 0x14 in order to successfully boot. This patch bumps the emulated apic version on piix and q35 machine types = 2.1. Signed-off-by: Gabriel L. Somlo so...@cmu.edu --- On Thu, Mar 06, 2014 at 09:50:48AM +0200

[Qemu-devel] [PATCH v3] apic: bump emulated lapic version to 0x14 on pc machines = 2.1

2014-04-30 Thread Gabriel L. Somlo
Some guests (e.g. 0S X) more or less arbitrarily insist on a minimum lapic version of 0x14 in order to successfully boot. This patch bumps the emulated apic version on piix and q35 machine types = 2.1. Signed-off-by: Gabriel L. Somlo so...@cmu.edu --- On Wed, Apr 30, 2014 at 09:20:18PM +0200

[Qemu-devel] [QEMU v8 PATCH 0/7] SMBIOS: build full tables in QEMU

2014-04-23 Thread Gabriel L. Somlo
this: http://www.seabios.org/pipermail/seabios/2014-April/007856.html to SeaBIOS and then pull a new blob from there around the same time (or before ?) this patch set is applied to QEMU ? Thanks much, Gabriel Gabriel L. Somlo (7): E820: Add interface for accessing e820 table PC: Add

[Qemu-devel] [QEMU v8 PATCH 1/7] E820: Add interface for accessing e820 table

2014-04-23 Thread Gabriel L. Somlo
Add the following two functions: - e820_get_num_entries() - query the size of the e820 table - e820_get_entry() - grab an entry matching a given set of criteria This interface is currently necessary for creating type 19 (memory array mapped address) structures in smbios. Signed-off-by:

[Qemu-devel] [QEMU v8 PATCH 7/7] SMBIOS: Build aggregate smbios tables and entry point

2014-04-23 Thread Gabriel L. Somlo
Build an aggregate set of smbios tables and an entry point structure. Insert tables and entry point into fw_cfg respectively under etc/smbios/smbios-tables and etc/smbios/smbios-anchor. Machine types = 2.0 will for now continue using field-by-field overrides to SeaBIOS defaults, but for machine

[Qemu-devel] [QEMU v8 PATCH 5/7] SMBIOS: Use macro to set smbios defaults

2014-04-23 Thread Gabriel L. Somlo
The function smbios_set_defaults() uses a repeating code pattern for each field. This patch replaces that pattern with a macro. This patch contains no functional changes. Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/smbios.c | 27 +-- 1 file changed, 13

[Qemu-devel] [QEMU v8 PATCH 3/7] SMBIOS: Rename symbols to better reflect future use

2014-04-23 Thread Gabriel L. Somlo
Rename the following symbols: - smbios_set_type1_defaults() to the more general smbios_set_defaults(); - bool smbios_type1_defaults to the more general smbios_defaults; - smbios_get_table() to smbios_get_table_legacy(); This patch contains no functional changes. Signed-off-by: Gabriel

[Qemu-devel] [QEMU v8 PATCH 6/7] SMBIOS: Use bitmaps to prevent incompatible comand line options

2014-04-23 Thread Gabriel L. Somlo
Replace existing smbios_check_collision() functionality with a pair of bitmaps: have_binfile_bitmap and have_fields_bitmap. Bits corresponding to each smbios type are set by smbios_entry_add(), which also uses the bitmaps to ensure that binary blobs and field values are never accepted for the same

[Qemu-devel] [QEMU v8 PATCH 4/7] SMBIOS: Update header file definitions

2014-04-23 Thread Gabriel L. Somlo
Add definitions for smbios entry point (anchor), and for type 2 (base board) structure which is required by some versions of OS X. Remove definition for type 20 (memory device mapped address) structure, which is no longer required as of smbios spec v2.5. Update all other structure definitions to

[Qemu-devel] [QEMU v8 PATCH 2/7] PC: Add machine version 2.1 for piix and q35

2014-04-23 Thread Gabriel L. Somlo
Add v2.1 machine types and (empty) compat functions for v2.0, to both piix and q35. For now, the new machines will behave identically to their 2.0 counterparts. Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/pc_piix.c | 27 --- hw/i386/pc_q35.c | 25

[Qemu-devel] [SeaBIOS v4 PATCH] SMBIOS: Check for aggregate tables entry point in fw_cfg

2014-04-23 Thread Gabriel L. Somlo
it locally if necessary, which is expected to be the common case. Signed-off-by: Gabriel L. Somlo so...@cmu.edu --- Only difference in this version (aside from the slightly reworded commit blurb) is a modified comment: -/* Enable targeted content distribution (needed for SVVP, per SeaBIOS

Re: [Qemu-devel] [QEMU v6 PATCH 00/17] SMBIOS: build full tables in QEMU

2014-04-22 Thread Gabriel L. Somlo
On Tue, Apr 22, 2014 at 08:42:29AM +0200, Gerd Hoffmann wrote: acpi is pretty much in the same boat ... /me looks ... Ah, there is a notifier where you (hopefully) can hook in easily: pc_guest_info_machine_done (see hw/i386/pc.c). Not sure this can help me though. The order in which

Re: [Qemu-devel] [QEMU v6 PATCH 00/17] SMBIOS: build full tables in QEMU

2014-04-22 Thread Gabriel L. Somlo
On Tue, Apr 22, 2014 at 06:16:53PM +0200, Markus Armbruster wrote: 1. smbios_entry_add() gets called for every -smbios file=... and -smbios type=... command line argument a. type=... is OK, we just remember the values for later b. file=... less so, because we

[Qemu-devel] [QEMU v7 PATCH 6/7] PC: Add (empty) compat functions for machine version 2.0

2014-04-21 Thread Gabriel L. Somlo
This patch contains no functional changes. Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/pc_piix.c | 13 - hw/i386/pc_q35.c | 13 - 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index cca310b..3d3f4b7

[Qemu-devel] [QEMU v7 PATCH 3/7] SMBIOS: Use macro to set smbios defaults

2014-04-21 Thread Gabriel L. Somlo
The function smbios_set_defaults() uses a repeating code pattern for each field. This patch replaces that pattern with a macro. This patch contains no functional changes. Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/smbios.c | 27 +-- 1 file changed, 13

[Qemu-devel] [QEMU v7 PATCH 2/7] SMBIOS: Update header file definitions

2014-04-21 Thread Gabriel L. Somlo
Add definitions for smbios entry point (anchor), and for type 2 (base board) structure which is required by some versions of OS X. Remove definition for type 20 (memory device mapped address) structure, which is no longer required as of smbios spec v2.5. Update all other structure definitions to

[Qemu-devel] [QEMU v7 PATCH 1/7] SMBIOS: Rename symbols to better reflect future use

2014-04-21 Thread Gabriel L. Somlo
Rename the following symbols: - smbios_set_type1_defaults() to the more general smbios_set_defaults(); - bool smbios_type1_defaults to the more general smbios_defaults; - smbios_get_table() to smbios_get_table_legacy(); This patch contains no functional changes. Signed-off-by: Gabriel

[Qemu-devel] [QEMU v7 PATCH 5/7] E820: Add interface for accessing e820 table

2014-04-21 Thread Gabriel L. Somlo
Add the following two functions: - e820_get_num_entries() - query the size of the e820 table - e820_get_entry() - grab an entry matching a given set of criteria This interface is currently necessary for creating type 19 (memory array mapped address) structures in smbios. Signed-off-by:

[Qemu-devel] [QEMU v7 PATCH 7/7] SMBIOS: Build aggregate smbios tables and entry point

2014-04-21 Thread Gabriel L. Somlo
Build an aggregate set of smbios tables and an entry point structure. Insert tables and entry point into fw_cfg respectively under etc/smbios/smbios-tables and etc/smbios/smbios-anchor. Machine types = 2.0 will for now continue using field-by-field overrides to SeaBIOS defaults, but for machine

[Qemu-devel] [QEMU v7 PATCH 0/7] SMBIOS: build full tables in QEMU

2014-04-21 Thread Gabriel L. Somlo
the patch) ! Gabriel Gabriel L. Somlo (7): SMBIOS: Rename symbols to better reflect future use SMBIOS: Update header file definitions SMBIOS: Use macro to set smbios defaults SMBIOS: Use bitmaps to prevent incompatible comand line options E820: Add interface for accessing e820 table PC: Add

[Qemu-devel] [QEMU v7 PATCH 4/7] SMBIOS: Use bitmaps to prevent incompatible comand line options

2014-04-21 Thread Gabriel L. Somlo
Replace existing smbios_check_collision() functionality with a pair of bitmaps: have_binfile_bitmap and have_fields_bitmap. Bits corresponding to each smbios type are set by smbios_entry_add(), which also uses the bitmaps to ensure that binary blobs and field values are never accepted for the same

Re: [Qemu-devel] [QEMU v6 PATCH 00/17] SMBIOS: build full tables in QEMU

2014-04-17 Thread Gabriel L. Somlo
On Thu, Apr 17, 2014 at 10:31:15AM +0200, Gerd Hoffmann wrote: OK, so right now I'm parsing the version argument to what is currently smbios_set_type1_defaults() (and will become smbios_set_defaults() after patching). No, don't parse stuff please. Have a look at pc_piix.c, how

Re: [Qemu-devel] [QEMU v6 PATCH 00/17] SMBIOS: build full tables in QEMU

2014-04-16 Thread Gabriel L. Somlo
OK, so I have the legacy (field-by-field, types 0 and 1 only) code back in, right next to the new aggregate-smbios-table-plus-entrypoint code, tested and apparently working fine. Before I get carried away with git rebase, do we still want to go through the whole patch sequence of generating

Re: [Qemu-devel] [QEMU v6 PATCH 00/17] SMBIOS: build full tables in QEMU

2014-04-15 Thread Gabriel L. Somlo
On Tue, Apr 15, 2014 at 10:29:26AM +0200, Gerd Hoffmann wrote: So, how about this plan: Leave the old interface code basically as-is. type0 and type1 individual fields are passed like they are passed today. We don't change to to pass full tables, and we don't extend that to new table

[Qemu-devel] [SeaBIOS v3 PATCH] SMBIOS: Check for full tables entry point in fw_cfg

2014-04-14 Thread Gabriel L. Somlo
one locally if necessary, which is expected to be the common case. Signed-off-by: Gabriel L. Somlo so...@cmu.edu --- This now goes on top of Kevin's patch factoring out smbios table walking into smbios_next(). On Sat, Apr 12, 2014 at 11:56:08AM -0400, Kevin O'Connor wrote: I'd prefer to add

[Qemu-devel] [QEMU v6 PATCH 01/17] SMBIOS: Rename smbios_set_type1_defaults() for more general use

2014-04-14 Thread Gabriel L. Somlo
Subsequent patches will utilize this function to set defaults for more smbios types than just type 1, so the function name should reflect this. Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/pc_piix.c| 12 ++-- hw/i386/pc_q35.c | 8 hw/i386/smbios.c

[Qemu-devel] [QEMU v6 PATCH 02/17] SMBIOS: Use macro to set smbios defaults

2014-04-14 Thread Gabriel L. Somlo
The function smbios_set_defaults() uses a repeating code pattern for each field. This patch replaces that pattern with a macro. Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/smbios.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/hw/i386/smbios.c

[Qemu-devel] [QEMU v6 PATCH 04/17] SMBIOS: Add code to build full smbios tables; build type 2 table

2014-04-14 Thread Gabriel L. Somlo
This patch adds a set of macros which build full smbios tables of a given type, including the logic to decide whether a given table type should be built or not. To illustrate this new functionality, we introduce and optionally build a table of type 2 (base board), which is required by some

[Qemu-devel] [QEMU v6 PATCH 06/17] SMBIOS: Remove unused code for passing individual fields to bios

2014-04-14 Thread Gabriel L. Somlo
This patch removes smbios_add_field() and the old code to insert individual fields for types 0 and 1 into fw_cfg. Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/smbios.c | 80 1 file changed, 80 deletions(-) diff --git

[Qemu-devel] [QEMU v6 PATCH 03/17] SMBIOS: Use bitmaps to check for smbios table collisions

2014-04-14 Thread Gabriel L. Somlo
Replace existing smbios_check_collision() functionality with a pair of bitmaps: have_binfile_bitmap and have_fields_bitmap. Bits corresponding to each smbios type are set by smbios_entry_add(), which also uses the bitmaps to ensure that binary blobs and field values are never accepted for the same

[Qemu-devel] [QEMU v6 PATCH 09/17] SMBIOS: Build full smbios memory tables (type 16, 17, 19, and 20)

2014-04-14 Thread Gabriel L. Somlo
Build full smbios tables representing the system RAM: - type 16 (physical memory array): represents the entire system RAM; - type 17 (memory device) tables: one per virtual DIMM; - type 19 (memory array mapped address): represent major RAM areas (currently one for below-4G memory, and,

[Qemu-devel] [QEMU v6 PATCH 00/17] SMBIOS: build full tables in QEMU

2014-04-14 Thread Gabriel L. Somlo
want to scratch my eyes out :) Thanks, Gabriel Gabriel L. Somlo (17): SMBIOS: Rename smbios_set_type1_defaults() for more general use SMBIOS: Use macro to set smbios defaults SMBIOS: Use bitmaps to check for smbios table collisions SMBIOS: Add code to build full smbios tables; build type

[Qemu-devel] [QEMU v6 PATCH 11/17] SMBIOS: Generate aggregate smbios tables, including entry point

2014-04-14 Thread Gabriel L. Somlo
Build a complete set of smbios tables as a monolithic blob; Also, build an entry point structure, and insert both the set of tables and the entry point into distinct fw_cfg files. This patch expects a SeaBIOS version equal or later than commit insert-seabios-commit-no-hereX. An earlier

[Qemu-devel] [QEMU v6 PATCH 05/17] SMBIOS: Build full tables for types 0 and 1

2014-04-14 Thread Gabriel L. Somlo
Build full tables for types 0 (bios information) and 1 (system information). Type 0 is optional, and a table will only be built if requested via the command line; the default is to leave type 0 tables up to the bios itself. Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/smbios.c | 63

[Qemu-devel] [QEMU v6 PATCH 08/17] SMBIOS: Build full type 4 tables

2014-04-14 Thread Gabriel L. Somlo
Build full smbios type 4 (processor information) tables, and make them available to the bios via fw_cfg. For initial compatibility with SeaBIOS, use Bochs as the default manufacturer string, and leave version unset. Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/pc.c | 3 ++

[Qemu-devel] [QEMU v6 PATCH 12/17] SMBIOS: Remove SeaBIOS compatibility quirks

2014-04-14 Thread Gabriel L. Somlo
- Replace some arbitrarily hardcoded fields with proper n/a or unknown values; - Use QEMU-supplied default manufacturer and version strings; - Count CPUs starting with 0 instead of 1, to maintain uniformity with other multiple-instance items. Signed-off-by: Gabriel Somlo

[Qemu-devel] [QEMU v6 PATCH 10/17] SMBIOS: Build full tables for type 32 and 127

2014-04-14 Thread Gabriel L. Somlo
Build full smbios type 32 (system boot info) and 127 (end-of-table) tables, and make them available via fw_cfg. Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/smbios.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c index

[Qemu-devel] [QEMU v6 PATCH 07/17] SMBIOS: Build full type 3 table

2014-04-14 Thread Gabriel L. Somlo
Build smbios type 3 (system enclosure) table, and make it available to the bios via fw_cfg. For initial compatibility with SeaBIOS, use Bochs as the default manufacturer string, and leave version unset. Signed-off-by: Gabriel Somlo so...@cmu.edu --- hw/i386/smbios.c | 67

<    1   2   3   4   5   6   7   8   >