aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-02-22add Westmere as a qemu cpu model (v2)Eduardo Habkost1-0/+14
Version 1 of this patch was: Message-Id: <1307041990-26194-11-git-send-email-ehabkost@redhat.com http://marc.info/?l=qemu-devel&m=130704415919346 This version doesn't have the duplicate feature bits on extfeature_edx, though, as they are being removed from the Intel models (as they are reserved bits on Intel CPUs). Version 1 patch description: This patch adds Westmere as a qemu cpu model. The only additional guest visible feature of a Westmere relative to Nehalem is the inclusion of AES instructions. However as other non-ABI visible modifications exist along with fabrication changes, the CPUID data of the corresponding deployed silicon was altered slightly to reflect this. We've seen isolated cases where apparently unrelated yet slightly incoherent CPUID data has caused problems, most notably during guest boot. Providing Westmere as a model separate fro Nehalem allows us to more easily address such quirks. [ehabkost: edited commit message to have a better Subject line] Signed-off-by: john cooper <john.cooper@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Changes version 1 -> version 2: - Remove the duplicate feature bits on extfeature_edx, that are reserved on Intel CPUs - Reorder feature flags - Remove x2apic from the definition because x2apic requires some fixes that have to be resubmitted Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22cpu defs: remove replicated flags from Intel (v2)Eduardo Habkost1-3/+3
This patch removes the replicated feature flags from cpuid 8000_0001:edx (extfeature_edx) from Intel models, as the duplicated feature flags are present only on AMD CPUs. On Intel models, only the i64, syscall, and xd flags are kept on extfeature_edx. This is based on a previous patch from John Cooper where this was introduced with many other changes at the same time. Original John's patch submission is at Message-ID: <4DDAD5E7.2020002@redhat.com>, <http://marc.info/?l=qemu-devel&m=130618871926030>. Original John's patch description was: cpu model bug fixes and definition corrections This patch was intended to address the replicated feature flags in cpuid 8000_0001:edx from cpuid 0000_0001:edx. This is due to AMD's definition where these flags are mostly cloned in the 8000_0001:edx cpuid function. qemu64 attempted to glue together the respective Intel and AMD nearly disjoint features and this propagated to the new Intel models as doing so was believed conservative at the time. However after further soak and test lugging around this cruft doesn't provide any value, could conceivably confuse a guest, and has confused users trying to maintain/add cpu definitions. This also caused issues for libvirt attempting to track this mis-encoding. So we've here tossed out the AMD replicated definitions from the Intel models, added a few replications into AMD definitions which were missing according to AMD's latest CPUID document, and reordered the config file flags to follow intuitive sequential bit ordering. Also two flag name aliases were added for clarity to Intel models. The end result being the models definitions now conform to their respective cpuid specifications sans x2apic which is emulated by kvm. This was tested with the following combinations: [Conroe, Penryn, Nehalem] x [F12-64, win64, win32] -- Intel host [Opteron_G1, Opteron_G2, Opteron_G3] x [F12-64, win64, win32] -- AMD host Yielding successful boots in all cases. Signed-off-by: john cooper <john.cooper@redhat.com> Changes v1 -> v2: - Rebase against latest Qemu git tree Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22cpu defs: add pse36, mca, mtrr to AMD CPU definitions (v2)Eduardo Habkost1-3/+3
This patch adds some missing flags to extfeature_edx, that were missing according to AMD's latest CPUID document. This is based on a previous patch from John Cooper where this was introduced with many other changes at the same time. Original John's patch submission is at Message-ID: <4DDAD5E7.2020002@redhat.com>, <http://marc.info/?l=qemu-devel&m=130618871926030>. Original John's patch description was: cpu model bug fixes and definition corrections This patch was intended to address the replicated feature flags in cpuid 8000_0001:edx from cpuid 0000_0001:edx. This is due to AMD's definition where these flags are mostly cloned in the 8000_0001:edx cpuid function. qemu64 attempted to glue together the respective Intel and AMD nearly disjoint features and this propagated to the new Intel models as doing so was believed conservative at the time. However after further soak and test lugging around this cruft doesn't provide any value, could conceivably confuse a guest, and has confused users trying to maintain/add cpu definitions. This also caused issues for libvirt attempting to track this mis-encoding. So we've here tossed out the AMD replicated definitions from the Intel models, added a few replications into AMD definitions which were missing according to AMD's latest CPUID document, and reordered the config file flags to follow intuitive sequential bit ordering. Also two flag name aliases were added for clarity to Intel models. The end result being the models definitions now conform to their respective cpuid specifications sans x2apic which is emulated by kvm. This was tested with the following combinations: [Conroe, Penryn, Nehalem] x [F12-64, win64, win32] -- Intel host [Opteron_G1, Opteron_G2, Opteron_G3] x [F12-64, win64, win32] -- AMD host Yielding successful boots in all cases. Signed-off-by: john cooper <john.cooper@redhat.com> Changes v1 -> v2: - Rebase against latest Qemu git tree Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22cpu defs: use Intel flag names for Intel models (v2)Eduardo Habkost2-5/+5
Use 'i64' instead of 'lm' and 'xd' instead of 'nx' on Intel models. The flags have different names on Intel docs, so use those names for clarity. This is based on a previous patch from John Cooper where this was introduced with many other changes at the same time. Original John's patch submission is at Message-ID: <4DDAD5E7.2020002@redhat.com>, <http://marc.info/?l=qemu-devel&m=130618871926030>. Changes v1 -> v2: - Rebase patch against latest Qemu git tree Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22cpu flags: aliases: pclmuldq|pclmulqdq and ffxsr|fxsr_optEduardo Habkost1-2/+2
pclmulqdq: /proc/cpuinfo on Linux and all documentation I have seen uses pclmulqdq as the flag name. As the only document using pclmuldq seems to be the Intel CPUID documentation (Application Note 485), it looks like a typo and not the correct name for the flag. ffxsr: AMD docs refer to fxsr_opt as ffxsr, so allow this named to be used too. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22cpu models: reorder flag list to match bit orderEduardo Habkost1-18/+18
This will make it easier to review and change the flag list in the future. No behaviour change should be introduced by this, as it is just changing the flag order on the config file. To make sure the flag sets are really not changed by this patch, I have used the following stupid script to compare the flag values in the config files: https://gist.github.com/1004885 Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22split SCSI and LSI, add myself as SCSI maintainerPaolo Bonzini1-2/+7
This has been the de facto situation for a while now. Add a tree, too. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22qmp: add DEVICE_TRAY_MOVED eventLuiz Capitulino4-0/+46
It's emitted whenever the tray is moved by the guest or by HMP/QMP commands. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22ide: drop ide_tray_state_post_load()Luiz Capitulino1-10/+0
This is used to sync the physical tray state after migration when using CD-ROM passthrough. However, migrating when using passthrough is broken anyway and shouldn't be supported... So, drop this function as it causes a problem with the DEVICE_TRAY_MOVED event, which is going to be introduced by the next commit. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22block: Don't call bdrv_eject() if the tray state didn't changeLuiz Capitulino2-4/+10
It's not needed. Besides we can then assume that bdrv_eject() is only called when there's a tray state change, which is useful to the DEVICE_TRAY_MOVED event (going to be added in a future commit). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22block: bdrv_eject(): Make eject_flag a real boolLuiz Capitulino5-7/+7
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22block: Rename bdrv_mon_event() & BlockMonEventActionLuiz Capitulino5-41/+41
They are QMP events, not monitor events. Rename them accordingly. Also, move bdrv_emit_qmp_error_event() up in the file. A new event will be added soon and it's good to have them next each other. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22qom: add test toolsAnthony Liguori3-0/+195
Tested-by: Andreas F=E4rber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22qmp: make qmp.py easier to useAnthony Liguori1-0/+6
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22qemu-iotests: fix 019 golden outputKevin Wolf1-15/+562
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: update expected results after qemu-img changesKevin Wolf1-30/+90
The error message for leaked clusters has changed. qemu-iotests needs to be updated to pass 026 again. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: add read/write from smaller backing image testStefan Hajnoczi3-0/+560
Some image formats support backing images that are smaller than the image file. This patch adds a test that verifies that reads and writes beyond the end of backing image work. Unallocated reads beyond the end of the backing file should produce zeroes. Writes beyond the end of the backing file should copy-on-write using zeroes. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: add sub-cluster allocating write test for sparse image formatsStefan Hajnoczi3-0/+101
Image formats that grow the image file on demand and are organized into clusters must handle sub-cluster allocating writes. Such writes touch a portion of a previously unallocated data cluster. After the image file is grown with the written data, reads of that cluster should work as expected: 1. Sectors before the written region are zero. 2. The written region is present and the data is uncorrupted. 3. Sectors after the written region are zero. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: improve test for qemu-img convert with backing fileKevin Wolf1-23/+36
Additionally to testing the qemu-img convert -B option, also test -o backing_file. Also, the old test acidentlly used a pattern of zeros for most of the writes, so that the allocation test didn't really work out. This is fixed by using an explicit pattern. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: consider more cases in parsing qemu-io outputKevin Wolf1-1/+1
I got a bug report with test output diffs like this: -4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +4 KiB, 1 ops; 0.0000 sec (inf EiB/sec and inf ops/sec) This patch extends the regular expression to consider terabytes, petabytes and exabytes, and to allow inf as value for the throughput. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: qcow2 error path testsKevin Wolf3-0/+751
This adds test cases for qcow2 error paths (using blkdebug) Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: improve rebase testKevin Wolf2-2/+85
The old test didn't consider cases in which the COW files contains some unallocated clusters and after them allocated ones again. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test bdrv_truncateStefan Hajnoczi3-0/+105
This patch adds an image resize grow test to ensure that existing data is not lost during grow and new space is zeroed. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: explicitly use bash interpreterStefan Hajnoczi30-30/+30
The tests use bash language features like 'let', which aren't supported by /bin/sh on systems that use a conservative shell like dash. This patch changes the interpreter to /bin/bash. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test qemu-img rebaseKevin Wolf3-0/+186
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test larger clusters sizes on qcow2Kevin Wolf7-818/+26645
This patch adds test case 023 which tests some more cluster sizes. For anythinger larger than 4k clusters we can't use requests that are l2_size or more (128k for 1k clusters, 2 MB for 4k clusters, 512 MB for 64k clusters). Therefore one of the common.pattern cases is changed and needs new expected results for some old test cases. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: 019: Make cluster size dynamicKevin Wolf2-6/+6
Change the offsets for test requests according to CLUSTER_SIZE. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: align test requests according to cluster sizeKevin Wolf10-42/+59
Change the io_test and io_test2 functions to take the cluster size of the image and the number of test requests to issue. Tests are changed to specify a cluster size (usually 4k), but expected test results stay the same for now (apart from qemu-img printing the cluster size now). Based on a patch written by Christoph Hellwig. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: add support for vdi format "static" optionStefan Weil1-2/+2
VDI supports an image option 'static'. Ignore "static=off" from qemu-img output. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: fix expected result for 019 after qemu-io changeKevin Wolf1-2/+2
The output of the alloc command in qemu-io has changed. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test bdrv_load/save_vmstateKevin Wolf3-0/+8867
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: common.pattern: allow spaces in io() operationKevin Wolf1-9/+9
We need to be able to pass "write -b" as an operation to the pattern testing functions. Unfortunately, this contains a space character... Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test invalid pattern argument handling in qemu-ioChristoph Hellwig3-0/+156
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22qemu-iotests: replace FSF postal addresses with www.gnu.org linksChristoph Hellwig26-74/+26
Blue Swirl notices that we were using the old FSF post address in the license boilerplates. Replace both the old and new address with links to the gnu.org licenses homepage as suggested by Ben Pfaff. Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test commiting changes to backing fileKevin Wolf3-0/+1186
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test qemu-img convert with backing file for the output imageKevin Wolf4-0/+1213
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test merge of backing file when convertingKevin Wolf3-0/+1183
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: simple backing file testKevin Wolf4-0/+1181
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test I/O after EOF for growable filesChristoph Hellwig3-0/+96
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviwed-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22qemu-iotests: fix pattern for write testStefan Weil1-1/+1
The write pattern value 0axb is invalid and evaluates to 0, so the read check (which uses a correct value of 0xab) will fail. This failure will only be detected with a separate patch for qemu-io. Without it, qemu-io cannot interpret hex values and always uses a pattern value of 0. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: make a few more tests genericChristoph Hellwig8-9/+10
Pretend that a non-implemented check is always successful and thus allow various tests that were qcow2-specific before to be generic. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22qemu-iotests: remove test image after 015 is doneChristoph Hellwig1-1/+1
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: add support for the vdi image formatChristoph Hellwig1-0/+6
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: add test for refcount table growth and snapshotsKevin Wolf3-0/+106
015: Combined test to grow the refcount table and test snapshots. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: skip test 005 for vpc format imagesChristoph Hellwig1-1/+4
The vpc format doesn't support large enough image size for this test. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22qemu-iotests: Initial import into the public repository.Christoph Hellwig39-0/+110986
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22Makefile: Add dependency to fix linux-user-only buildPeter Maydell1-0/+1
Make qemu-bridge-helper explicitly depend on $(GENERATED_HEADERS) so that it doesn't fail to build when we configured for linux-user targets only. (Build breakage introduced in commit 7b93fad.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22Make kernel, initrd and append be machine_optsPeter Maydell2-8/+28
Make kernel, initrd, append be machine opts (ie -machine kernel=foo) with the old plain command line arguments as legacy/convenience equivalents. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22jazz-led: compile it only twiceHervé Poussineau6-1/+5
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22jazz-led: convert to QOMHervé Poussineau3-93/+71
Some simplifications in I/O functions are possible because Jazz LED only registers one byte of I/O. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>