summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-03-01pci-hotplug-old: Has been dead for five major releases, buryMarkus Armbruster10-400/+3
Commit 79ca616 (v1.6.0) accidentally disabled legacy x86-only HMP commands pci_add, pci_del: it defined CONFIG_PCI_HOTPLUG only as make variable, not as preprocessor macro, killing the code conditional on defined(CONFIG_PCI_HOTPLUG_OLD). In all this time, nobody reported the loss. I only noticed it when I tried to test some error reporting change that forced me to touch this old crap again. Fun: git-log hw/pci/pci-hotplug-old.c shows our faith in the backward compatibility god has been strong enough to sacrifice at its altar about a dozen times, but not strong enough to even once verify the legacy feature's still there, let alone works. Remove the commands along with the code backing them. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01pci: Give a few helpers internal linkageMarkus Armbruster2-14/+7
None of them should be used in new code. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01acpi: make build_*() routines static to aml-build.cIgor Mammedov2-26/+10
build_*() routines were used for composing AML structures manually in acpi-build.c but after conversion to AML API they are not used outside of aml-build.c anymore, so hide them from external users. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01pc: acpi: remove not used anymore ssdt-[misc|pcihp].hex.generated blobsIgor Mammedov2-390/+0
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01pc: acpi-build: drop template patching and create PCI bus tree dynamicallyIgor Mammedov3-256/+80
Replace AML template patching with direct composing of PCI device entries in C. It allows to simplify PCI tree generation further and saves us about 400LOC scattered through different files, confining tree generation to one C function which is much easier to deal with. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01tests: ACPI: update pc/SSDT.bridge due to new alg of PCI tree creationIgor Mammedov1-0/+0
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01pc: acpi-build: simplify PCI bus tree generationIgor Mammedov1-189/+85
it basicaly does the same as original approach, * just without bus/notify tables tracking (less obscure) which is easier to follow. * drops unnecessary loops and bitmaps, creating devices and notification method in the same loop. * saves us ~100LOC Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01tests: add ACPI blobs for qemu with bridge casesIgor Mammedov2-0/+0
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01tests: bios-tables-test: add support for testing bridgesIgor Mammedov1-5/+40
Adds alternative ACPI table blob selection for testing non default QEMU configurations. If blob file for test variant is not present, fallback to default blob. With this change implement testing with a coldplugged bridge. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01tests: ACPI test blobs update due to PCI0._CRS changesIgor Mammedov4-0/+0
PCI0._CRS was moved into SSDT and became the same for PIIX4/Q35 machines. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01pc: acpi-build: drop template patching and create Device(SMC) dynamicallyIgor Mammedov4-20/+22
patch moves SMC device into SSDT and creates it only when device is present, which makes ACPI tables smaller in default case when device is not present. Also it fixes wrong IO range in CRS if "iobase" property is set to a non default value. PS: Testing with XP shows that current default "iobase" used SMC device conflicts with floppy controller IO, but it's topic for another patch and I'd leave it to SMC device author for resolving conflict. Signed-off-by: Igor Mammedov <imammedo@redhat.com> CC: agraf@suse.de Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01pc: export applesmc IO port/lenIgor Mammedov3-6/+12
IO port and length will be used in following patch to correctly generate SMC ACPI device in SSDT. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01acpi: add acpi_irq_no_flags() termIgor Mammedov2-0/+22
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01pc: acpi-build: drop remaining ssdt_misc templateIgor Mammedov3-27/+2
It drops empty ssdt_misc templete. It also hides from user almost all pointer arithmetic when building SSDT which makes resulting code a bit cleaner and concentrating only on composing ASL construct /i.e. a task build_ssdt() should be doing/. Also it makes one binary blob less stored in QEMU source tree by removing need to keep and update hw/i386/ssdt-misc.hex.generated file here in total saving us ~430LOC. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01pc: acpi: drop manual hole punching for GPE0 resourcesIgor Mammedov1-15/+17
Drops manual hole punching in PCI0._CRS on PIIX4 machine type for GPE0 resources. Resources will be consumed by Device(GPE0) that is attached to PCI namespace. There is GPE device with HID ACPI0006 since ACPI2.0 that should be used for this purpose but none of Windows versions support it and show it as "unknown device", so reserve resource in old fashioned way with PNP0A06 device to make windows happy and actually reserve resources. Along with last hole _CRS layout of PIIX4 machine becomes the same as Q35 one, so merge them together and use the same _CRS for both machine types. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01pc: acpi: drop manual hole punching for CPU hotplug resourcesIgor Mammedov1-5/+1
Drops manual hole punching in PCI0._CRS on PIIX4 machine type for CPU hotplug resources. Resources will be consumed by Device(PRES) that is attached to PCI bus. The same way how it currently works for mem hotlpug. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01pc: acpi: drop manual hole punching for PCI hotplug resourcesIgor Mammedov1-5/+1
Drops manual hole punching in PCI0._CRS for PIIX4 machine type. Resources will be consumed by Device(PHPR) that cwis attached to PCI bus. The same way how it currently works for mem hotlpug. Manual hole in PIIX4 _CRS wasn't correct anyway since it was legacy size 0xF while current PCIHP MMIO region is of size 0x14. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01pc: acpi-build: create PCI0._CRS dynamicallyIgor Mammedov5-210/+52
Replace template patching and runtime calculation in _CRS() method with static _CRS defined in SSDT. No functional change except of as mentined above and _CRS being moved from DSDT to SSDT. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01tpm: Support for capability flags of TIS 1.3Stefan Berger1-1/+8
Provide the TIS 1.3 capability flags. The interface now looks like a TIS 1.3 interface. It's fully compatible with previous TIS 1.2 and drivers written for TIS 1.2 continue to work. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01tpm: Support for TIS selftest done flagStefan Berger4-19/+79
Extend the backend to check whether the TPM_ContinueSelfTest finished successfully and provide a flag to the TIS front-end if it successfully finished. The TIS then sets a flag in all localities in the STS register and keeps it until the next reset. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01tpm: Support for XFIFO registerStefan Berger1-0/+4
Support for the XFIFO register (range) of the TIS 1.3 specification. We support a range of 64 bytes. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01tpm: Allow 32 & 16 bit accesses to the registersStefan Berger1-13/+47
Improve the access to the registers with 32 and 16 bit reads and writes. Also enable access to a non-base register address, such as reads of the 2nd byte of a register. Map the FIFO byte access to any byte within its 4 byte register (following specs). Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01tpm: Extend sts register to 32 bitStefan Berger1-1/+1
More recent TIS specs extend the STS register to 32 bit. While we don't store the TIS interface state, yet, we can extend it without sideeffects. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-01balloon: call qdev_alias_all_properties for proxy dev in balloon class initDenis V. Lunev2-6/+4
The idea is that all other virtio devices are calling this helper to merge properties of the proxy device. This is the only difference in between this helper and code in inside virtio_instance_init_common. The patch should not cause any harm as property list in generic balloon code is empty. This also allows to avoid some dummy errors like fixed by this commit 91ba21208839643603e7f7fa5864723c3f371ebe Author: Gonglei <arei.gonglei@huawei.com> Date: Tue Sep 30 14:10:35 2014 +0800 virtio-balloon: fix virtio-balloon child refcount in transports Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Raushaniya Maksudova <rmaksudova@parallels.com> Revieved-by: Cornelia Huck <cornelia.huck@de.ibm.com> CC: Christian Borntraeger <borntraeger@de.ibm.com> CC: Anthony Liguori <aliguori@amazon.com> CC: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi-test: update expected filesMichael S. Tsirkin4-0/+0
A bunch of code moved from dsdt to ssdt, plus we got trivial changes like 0->Zero which our test dosn't recognize as identity yet. Update expected files to suppress test warning. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: drop unused generated filesMichael S. Tsirkin2-347/+0
drop ssdt-mem.hex.generated and ssdt-proc.hex.generated: dsl files have been removed previously. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: update generated hex filesMichael S. Tsirkin3-697/+25
Used for IASL builds. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26pc: acpi-build: reserve PCIHP MMIO resourcesIgor Mammedov1-0/+27
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26pc: pcihp: expose MMIO base and len as propertiesIgor Mammedov3-8/+19
it will be used later to dynamically reserve MMIO region instead of manually punching holes in PCI0._CRS Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: add aml_word_bus_number(), aml_word_io(), aml_dword_memory(), ↵Igor Mammedov2-0/+233
aml_qword_memory() terms Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26pc: acpi-build: create memory hotplug IO region dynamicallyIgor Mammedov3-31/+64
it replaces a static complied in DSDT MMIO region for memory hotplug with one created at runtime leaving only truly static memory hotplug related ASL bits in DSDT. And replaces template patching of MEMORY_SLOTS_NUMBER value with ASL API created named value. Later it also would make easier to reuse current ACPI memory hotplug on other targets. Also later it would be possible to move remaining memory hotplug ASL methods into build_ssdt() and add all memory hotplug related AML into SSDT only when memory hotplug is enabled, further reducing ACPI tables blob if memory hotplug isn't used. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26pc: acpi-build: drop template patching and memory hotplug objects dynamicallyIgor Mammedov3-144/+46
in addition it saves us ~330LOC and makes it one binary blob less stored in QEMU source tree by removing need to keep and update hw/i386/ssdt-mem.hex.generated file there. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: add aml_reserved_field() termIgor Mammedov2-0/+16
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26pc: acpi-build: create CPU hotplug IO region dynamicallyIgor Mammedov3-16/+29
it replaces a static complied in DSDT MMIO region for CPU hotplug with one created at runtime leaving only truly static CPU hotplug related ASL bits in DSDT. It also puts CPU_HOTPLUG_RESOURCE_DEVICE into PCI0 scope and reserves resources from it, preparing for dropping manual hole punching in PCI0._CRS. Later it also would make easier to reuse current ACPI CPU hotplug on other targets. Also later it would be possible to move remaining CPU hotplug ASL methods into build_ssdt() and add all CPU hotplug related AML into SSDT only when CPU hotplug is enabled, further reducing ACPI tables blob if CPU hotplug isn't used. impl. detail: Windows XP can't handle /BSODs/ OperationRegion declaration in DSDT when variable from SSDT is used for specifying its address/length and also when Field declared in DSDT with OperationRegion from SSDT if DSDT is being parsed before SSDT. But it works just fine when referencing named fields from another table. Hence OperationRegion and Field declaration are moved to SSDT to make XP based editions work. PS: Later Windows editions seem to be fine with above conditions. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26pc: acpi-build: drop template patching and CPU hotplug objects dynamicallyIgor Mammedov3-113/+45
in addition it saves us ~400LOC and makes it one binary blob less stored in QEMU source tree by removing need to keep and update hw/i386/ssdt-proc.hex.generated file there. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: add aml_eisaid() termIgor Mammedov2-0/+30
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: add aml_processor() termIgor Mammedov2-0/+17
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: add aml_equal() termIgor Mammedov2-0/+11
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: add aml_varpackage() termIgor Mammedov2-0/+9
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26pc: acpi-build: generate pvpanic device description dynamicallyIgor Mammedov2-51/+32
Drops AML template patching and allows to save some space in SSDT if pvpanic device doesn't exist by not including disabled device description into SSDT. It also makes device description smaller by replacing _STA method with named value and dropping _INI method. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: add aml_string() termIgor Mammedov2-0/+26
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: add aml_local() termIgor Mammedov2-0/+12
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: add aml_field() & aml_named_field() termsIgor Mammedov2-0/+34
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: add aml_operation_region() termIgor Mammedov2-0/+21
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: include PkgLength size only when requestedIgor Mammedov2-6/+17
Named/Reserved{Field} definition uses PkgLength [1] encoding to specify field length, however it doesn't include size of PkgLength field itself, while other block objects that have explicit length of its body account for PkgLength size while encoding it [2]. This special casing isn't mentioned in ACPI spec, but that's what 'iasl' compiles NamedField to so add extra argument to build_prepend_pkg_length() to allow it handle the case. -- 1. ACPI Spec 5.0, 20.2.5.2 Named Objects Encoding, page 822 2. ACPI Spec 5.0, 5.4 Definition Block Encoding Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: add aml_io() helperIgor Mammedov2-0/+23
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: add aml_resource_template() helperIgor Mammedov2-0/+9
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: add aml_buffer() termIgor Mammedov2-0/+8
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26pc: acpi-build: generate _S[345] packages dynamicallyIgor Mammedov2-43/+30
Replaces template patching with packages composed using AML API. Note on behavior change: If S3 or S4 is disabled, respective packages won't be created and put into SSDT. Which saves us some space in SSDT and doesn't confuse guest OS with mangled package names as it was done originally. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-02-26acpi: add aml_package() termIgor Mammedov2-0/+9
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>