History | View | Annotate | Download (31.7 kB)
pc_memory_init: Move memory calculation to the caller.
This patch moves above_4g_mem_size and below_4g_mem_size calculation inthe caller of pc_memory_init (pc_init1). And the prototype ofpc_memory_init is changed because there is no need anymore to have...
pc, Disable vmport initialisation with Xen.
This is because there is not synchronisation of the vcpu registerbetween Xen and QEMU, so vmport can't work properly.
This patch introduces no_vmport parameter to pc_basic_device_init.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>...
vmmouse: Fix initialization
Latest refactorings left vmmouse nonfunctional behind. Fix it by addingthe required device initialization.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
pc: fix wrong CMOS values for floppy drives
Before commit 63ffb564dca94f8bda01ed6d209784104630a4d2, states forfloppy drives were calculated in fdc.c:fd_revalidate(). There it isalso considered whether a disk is inserted or not. The commit didn't copythe logic completely to pc.c, which caused a regression....
pc: remove test on TARGET_PHYS_ADDR_BITS == 32
Both i386 and x86_64 targets are now using target_phys_bits=64. Removeuseless code.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
i8254: convert to qdev
Convert to qdev. Don't expose PITState.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
fdc: refactor device creation
Turn fdc_init_isa into an inline function.
Get floppy geometry directly from the drives.
Don't expose FDCtrl.
fdc: use FDriveType for floppy drive type
hpet: make optional
Ignore failure with hpet device creation.
x86: make vmmouse optional
Compile vmmouse in hwlib. Ignore failure if vmmouse device can't becreated.
vmmouse: convert to qdev
Convert to qdev, also add a proper reset function.
vmport: convert to qdev
x86,MIPS: make vmware_vga optional
Allow failure with vmware_vga device creation and use standardVGA instead.
audio: consolidate audio_init()
consolidate audio_init() and remove references to shoundhw.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
pc: move port 92 stuff back to pc.c from pckbd.c
956a3e6bb7386de48b642d4fee11f7f86a2fcf9a introduced a bug concerningreset bit for port 92.
Since the keyboard output port and port 92 are not compatible anyway,let's separate them.
Reported-by: Peter Lieven <pl@dlh.net>...
Merge branch 'spice.v23.pull' of git://anongit.freedesktop.org/spice/qemu
Add bootindex for option roms.
Extend -option-rom command to have additional parameter ,bootindex=.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
spice: add qxl device
qxl is a paravirtual graphics card. The qxl device is the bridgebetween the guest and the spice server (aka libspice-server). Thespice server will send the rendering commands to the spice client, whichwill actually render them....
pc: disable the BOCHS BIOS panic port
We have an OS which writes to port 0x400 when probing for special hardware.This causes an exit of the VM. With SeaBIOS this port isn't used anyway.
Signed-off-by: Alexander Graf <agraf@suse.de>Reviewed-By: Paolo Bonzini <pbonzini@redhat.com>...
pc: e820 qemu_cfg tables need to be packed
We can't let the compiler define the alignment for qemu_cfg data.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc: Fix e820 fw_cfg for big endian
more stdvga cleanups.
video.x is gone now. It was the only user of thevga bios_offset + bios_size logic. Zap it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Rearrange block headers
Changing block.h or blockdev.h resulted in recompiling most objects.
Move DriveInfo typedef and BlockInterfaceType enum definitionsto qemu-common.h and rearrange blockdev.h use to decrease churn.
pc: Avoid registering zero sized memory
No need to call cpu_register_physical_memory() for a zero sized area.
qemu_ram_alloc: Add DeviceState and name parameters
These will be used to generate unique id strings for ramblocks. The namefield is required, the device pointer is optional as most callers don'thave a device. When there's no device or the device isn't a child of...
pc: Allocate all ram in a single qemu_ram_alloc()
This will benefit us when we migrate based on ramblock name sincewe won't be bouncing between separate blocks.
pc: Fix CMOS info for drives defined with -device
Drives defined with drive if=ide get get created along with the IDEcontroller, inside machine>init(). That's before cmos_init().Drives defined with -device get created during generic device init.That's after cmos_init(). Because of that, CMOS has no information on...
x86: Clean up CPU reset
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Remove useless device dependency of HAS_AUDIO
System architecture dictates whether HAS_AUDIO is defined. It's thenuseless to check for HAS_AUDIO in files which are only used on thosearchitectures which always have audio.
apic: qdev conversion cleanup
Make APICState completely private to apic.c by using DeviceStatein external APIs.
Move apic_init() to pc.c.
apic: avoid using CPUState internals
Move the actual CPUState contents handling to cpu.h and cpuid.c.
Handle CPU reset and set env->halted in pc.c.
Add a function to get the local APIC state of the currentCPU for the MMIO.
apic: avoid passing CPUState from devices
Pass only APICState from pc.c.
pass info about hpets to seabios.]
Currently HPET ACPI table is created regardless of whether qemu actuallycreated hpet device. This may confuse some guests that don't check thathpet is functional before using it. Solve this by passing info abouthpets in qemu to seabios via fw config interface. Additional benefit is...
Merge remote branch 'kwolf/for-anthony' into staging
Conflicts: hw/pc.c
hpet/rtc: Rework RTC IRQ replacement by HPET
Allow the intercept the RTC IRQ for the HPET legacy mode. Then pushrouting to IRQ8 completely into the HPET. This allows to turnhpet_in_legacy_mode() into a private function. Furthermore, this stopsthe RTC from clearing IRQ8 even if the HPET is in control....
hpet: Convert to qdev
Register the HPET as a sysbus device and create it that way. As it canroute its IRQs to any ISA IRQ, we need to connect it to all 24 of them.Once converted to qdev, we can move reset handler and vmstateregistration into its hands as well....
blockdev: Collect block device code in new blockdev.c
Anything that moves hundreds of lines out of vl.c can't be all bad.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
pc: improve debugging
Add a DPRINTF macro and use it for ISA and PIC interrupts.
Compile dma only once
Use a qemu_irq to request CPU exit.
7 compilations less for the full build.
Compile pckbd only once
Use a qemu_irq to indicate A20 line changes. Move I/O port 92to pckbd.c.
pc: fix segfault introduced by 3d53f5c36ff6
Commit 3d53f5c36ff6 introduced a segfault by erroneously making fw_cfg a'void **' and passing it around in different ways.
Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
rtc: make rtc_xxx accept/return ISADevice instead of RTCState.
To match rtc_xxx with qdev, make rtc_xxx accept and return ISADeviceinstead of RTCState.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pc: split out piix specific part from pc.c into pc_piix.c
Finally, we can safely split out the piix specific part from pc.cinto pc_piix.c.
pc: split out pci device init from pc_init1() into pc_pci_device_init()
Split out pci device initialization from pc_init1() into pc_pci_device_init().and removed unnecessary braces.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Gerd Hoffmann <kraxel@redhat.com>...
pc: split out basic device init from pc_init1() into pc_basic_device_init()
Split out basic device, i.e. legacy devices like floppy, initializationfrom pc_init1() into pc_basic_device_init().Later it will be used.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
pc: split out vga initialization from pc_init1() into pc_vga_init().
Split out vga initialization which is independent of piixfrom pc_init1() as pc_vga_init().Later it will be used.
pc: split out memory allocation from pc_init1() into pc_memory_init()
Split out memory allocation and rom/bios loading which doesn't dependon piix from pc_init1() into pc_memory_init().Later it will be used.
pc: split out cpu initialization from pc_init1() into pc_cpus_init().
split out cpu initialization which is piix independent from pc_init1()into pc_cpus_init(). Later it will be used.
pc: make pc_init1() not refer ferr_irq directly.
By introducing a registering function, make pc_init1() not refer toferr_irq directly in order to make ferr_irq piix independent.Later pc_init1() will be split out into another file keeping ferr_irqstatic....
pc: introduce a function to allocate cpu irq.
Introduce a function, pc_allocate_cpu_irq(), to allocate cpu irqin order to make pic_irq_request() piix independent.Later piix code will be split out to another file keeping pic_irq_request()static.
pc: remove global variable rtc_state by using qemu_irq.
Remove the reference to the global variable, rtc_state, by passingfunction argument to cmos_init_hd(), cmos_init().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Cc: Paolo Bonzini <bonzini@gnu.org>...
pc: remove a global variable, floppy_controller.
Remove a global variable, floppy_controller.Since it is unnecessarily global, make it local and pass it asa function argument.
pc: make an unnecessary global variable, pit, local.
remove unnecessary global static variables, pit.Make it local.
pc, i440fx: Make smm enable/disable function i440fx independent.
make cpu_smm_update() generic to be independent on i440fx byregistering a callback.
pc: initialize ioapic before use.
The changeset of 2c8d9340203c7f19265fd4cb2341f568217a3af6prevents isa_irq_handler() from NULL refering of IsaIrqState::ioapic.However it would be better to initialize the member before reference.
hw: better i440 emulation
updated version of an old patchhttp://xenon.stanford.edu/~eswierk/misc/qemu-linuxbios/qemu-piix-ram-size.patchthat together withhttp://www.mail-archive.com/linuxbios@linuxbios.org/msg02390.html(which is already in coreboot trunk) allows coreboot to autodetect the amount of RAM within qemu/kvm from a register in i440 northbridge....
x86: remove dead assignments, spotted by clang analyzer
Value stored is never read.
Check for invalid initrd file
When qemu is invoked with an invalid initrd file, it crashes. Followingpatch prints a error message and exits if an invalid initrd isspecified. Includes changes suggested by JV.
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>...
Compile acpi only once
Use qemu_irqs to trigger CMOS S3 and SMI events.
Avoid using kvm.h, which uses CPUState.
Move x86 specific PC declarations to a separate file
x86 definitions (especially CPUState uses) prevent many files frombeing compiled within libhw.
Move x86 specific declarations (APIC stuff) to a separate file.
error: Replace qemu_error() by error_report()
error_report() terminates the message with a newline. Strip it itfrom its arguments.
This fixes a few error messages lacking a newline:net_handle_fd_param()'s "No file descriptor named %s found", andtap_open()'s "vnet_hdr=1 requested, but no kernel support for...
pc: Fix error reporting for -boot once
Commit 0ecdffbb created pc_boot_set() for use from monitor command"boot_set", via qemu_boot_set(). pc_boot_set() reports errors tocur_mon, which works fine for monitor code.
Commit e0f084bf reused the function int reset handler...
pc: Factor common code out of pc_boot_set() and cmos_init()
Code duplicated in commit 0ecdffbb. The two versions are similar, butnot identical:
x86: Extend validity of bsp_to_cpu
As we hard-wire the BSP to CPU 0 anyway and cpuid_apic_id equalscpu_index, bsp_to_cpu can also be based on the latter directly. Thiswill help an early user of it: KVM while initializing mp_state.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Allocate memory below 4GB as one chunk
Instead of allocating a separate chunk for the first 640KB and anotherfor 1MB+, allocate one large chunk. This plays well in terms of alignmentand size with large pages.
Signed-off-by: Avi Kivity <avi@redhat.com>...
QEMU e820 reservation patch
Hi,
Kevin and I have agreed on the approach for this one now. So here isthe latest version of the patch for QEMU, submitting e820 reservationentries via fw_cfg.
Cheers,Jes
Use qemu-cfg to provide the BIOS with an optional table of e820 entries....
pc: Bump up pc version to 0.13 and add a 0.12 compat version
The version 0.13 will be the new default and compatibility options willbe added to the 0.12 version.
Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc: Add backward compatibility options for virtio-serial
virtio-serial-pci can support multiple ports in the current developmentversion that will become 0.13. Add compatibility options for the 0.12and 0.11 pc machine types.
Signed-off-by: Amit Shah <amit.shah@redhat.com>...
Remove conditional rom loading support
Commit c2039bd0ffce8807e0eaac55254fde790825fa92 made rom loadingautomatic for non-PC architectures. Remove now mostly unusedconditional rom loading support.
fdc: don't use reserved _t suffix
virtio-console: qdev conversion, new virtio-serial-bus
This commit converts the virtio-console device to create a newvirtio-serial bus that can host console and generic serial ports. Thefile hosting this code is now called virtio-serial-bus.c.
The virtio console is now a very simple qdev device that sits on the...
pc: add driver version compat properties
This patch adds compat property entries for ide-disk.ver andscsi-disk.ver to pc-0.10 and pc-0.11. With this patch appliedthe scsi and ide disks report "0.10" and "0.11" as version whenyou start qemu with "-M pc-0.10" or "-M pc-0.11"....
pc: add machine type for 0.12
Add a new machine type for qemu 0.12.
Also fixup the 0.11 machine type: msi for virtio-blk-pci was enabledafter the 0.11 release, so turn it off in the 0.11 machine type.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
roms: rework rom loading via fw
This patch changes the way rom loading via fw_cfg is handled.Instead of having pc_init1() call a function which passed allroms to the firmware config we simply pass a pointer to fw_cfgto the rom loader.
Advantage: loading roms via firmware works also for devices which...
pc: add rombar to compat properties for pc-0.10 and pc-0.11
So '-M pc-0.10' and '-M pc-0.11' will use the fw_cfg rom load methodby default.
multiboot: Support arbitrary number of modules.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
multiboot: Separate multiboot loading into separate file
Move multiboot loading code into separate files as suggested by Alex Graf.
hw/pc.c: fix warnings with _FORTIFY_SOURCE
CC i386-softmmu/pc.occ1: warnings being treated as errors/usr/src/RPM/BUILD/qemu-0.11.92/hw/pc.c: In function 'load_multiboot':/usr/src/RPM/BUILD/qemu-0.11.92/hw/pc.c:614: error: ignoring return value of 'fread', declared with attribute warn_unused_result...
roms: use new fw_cfg file xfer support.
roms: use fw_cfg for vgabios and option rom loading, additionally todeploying them the traditional way (copy to 0xc0000 -> 0xe0000 range).
Fix loading of ELF multiboot kernels
The multiboot implementation assumed that there is only one program header(which contains the entry point) and that the entry point is at the start ofthe code. This doesn't hold true generally and caused too little data to be...
qdev: make compat stuff more generic
This patch renames the compat properties into global properties andmakes them more generic. The compatibility stuff is only one ofmultiple possible users now.
multiboot: Use signed type for negative error numbers
In mb_mod_length a return value is stored that is negative in error case. Withan unsigned type the check goes wrong.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
multiboot: Fix module loading and setting of mmap.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Acked-by: Alexander Graf <agraf@suse.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: pci.h cleanup: move out stuff not in pci.c
pci.h declares some functions which aren'tdefined in pci.h. Clean up moving thingsto appropriate headers, and update all users.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Convert linux bootrom to external rom and fw_cfg
We already have a working multiboot implementation that uses fw_cfg to getits kernel module etc. data in int19 runtime now.
So what's missing is a working linux boot option rom. While at it I figured itwould be a good idea to take the opcode generator out of pc.c and instead use...
Convert multiboot to fw_cfg backed data storage
Right now we load the guest kernel to RAM, fire off the BIOS, hope itdoesn't clobber memory and run an option rom that jumps into the kernel.
That breaks with SeaBIOS, as that clears memory. So let's read all...
Remove e1000 rom loading hack
The gPXE rom supports BEV properly.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
rom loader: make vga+rom loading configurable.
The rom_add_vga() and rom_add_option() macros are transformed intofunctions. They look at the new rom_enable_driver_roms variableand only do something if it is set to non-zero, making vga+option romloading runtime option. pc_init() sets rom_enable_driver_roms to 1....
vga roms: move loading from pc.c to vga drivers.
use rom loader for pc bios.
The pc bios shows up in 'info roms' now.
Note that the BIOS is mapped to two places: The complete rom at the topof the memory, and the first 128k at 0xe0000. Only the first place islisted in 'info roms'.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
pc.c: only load e1000 rom.
The other pxe roms are loaded by the drivers individual drivers now.
multiboot: Fix cmdline of modules
Fix address specified for cmdline value of module in multiboot structure.
Patchworks-ID: 35699Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
multiboot: Limit number of multiboot modules
Add size checks to avoid overwriting the multiboot structurewhen too many modules are loaded.
Patchworks-ID: 35700Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
rom loader: fix sparc -kernel boot.
Changes:(1) register pstrcpy_targphys() in rom list, it is used for kernelcommand lines by a number of architectures.(2) add rom_ptr() function to get a pointer for applying changesto loaded images. Needed for example to tell the linux kernel...
New qdev_init_nofail()
Like qdev_init(), but terminate program via hw_error() instead ofreturning an error value.
Use it instead of qdev_init() where terminating the program on failureis okay, either because it's during machine construction, or because...
Reorganize option rom (+linux kernel) loading.
This patch adds infrastructure to maintain memory regions which must berestored on reset. That includes roms (vga bios and option roms on pc),but is also used when loading linux kernels directly. Features:...
Improve error reporting on file access
By making the error reporting include strerror(errno), it gives the usera bit more indication as to why qemu failed. This is particularlyimportant for people running qemu as a non root user.
Signed-off-by: Justin M. Forbes <jforbes@redhat.com>...
Fix pci_add nic not to exit on bad model
Monitor command "pci_add ADDR nic model=MODEL" uses pci_nic_init() tocreate the NIC. When MODEL is unknown or "?", this prints to stderrand terminates the program.
Change pci_nic_init() not to treat "?" specially, and to return NULL...
serial: convert isa to qdev
Everything using standard isa I/O ports and IRQ windup is considerdbeing an actual isa device. That are all serial_init() users exceptmips_mipssim() which seems to have a non-standard IRQ windup.
baud rate is fixed at 115200 now as no caller passed in something else....
floppy: add drive properties.