- 29 6月, 2018 40 次提交
-
-
由 Daniel Henrique Barboza 提交于
To add support for the emulation of Block Limits VPD page for passthrough devices, a few adjustments in the current code base is required to avoid repetition and improve clarity. In scsi-generic.c, detach the Inquiry handling from scsi_read_complete and put it into a new function called scsi_handle_inquiry_reply. This change aims to avoid cluttering of scsi_read_complete when we more logic in the Inquiry response handling is added in the next patches, centralizing the changes in the new function. In scsi-disk.c, take the build of all emulated VPD pages from scsi_disk_emulate_inquiry and make it available to other files into a non-static function called scsi_disk_emulate_vpd_page. Making it public will allow the future VPD BL emulation code for passthrough devices to use it from scsi-generic.c, avoiding copy/pasting this code solely for that purpose. It also has the advantage of providing emulation of all VPD pages in case we need to emulate other pages in other scenarios. As a bonus, scsi_disk_emulate_inquiry got tidier. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20180627172432.11120-2-danielhb413@gmail.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Viktor Prutyanov 提交于
Unlike dying Windows, live system memory doesn't contain correct register contexts. But they can be populated with QEMU register values. After this patch, QEMU will be able to produce guest Windows live system dump. Signed-off-by: NViktor Prutyanov <viktor.prutyanov@virtuozzo.com> Message-Id: <20180517162342.4330-5-viktor.prutyanov@virtuozzo.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Viktor Prutyanov 提交于
KdDebuggerDataBlock may be encrypted in guest memory and dump will be useless in this case. But guest driver can obtain decrypted KDBG and expose its address through BugcheckParameter1 field in raw header. After this patch, QEMU will be able to use fallback KdDebuggerDataBlock. Signed-off-by: NViktor Prutyanov <viktor.prutyanov@virtuozzo.com> Message-Id: <20180517162342.4330-4-viktor.prutyanov@virtuozzo.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Viktor Prutyanov 提交于
We use CPU #0 to access guest virtual memory, but it can execute user thread at that moment. So, switch CR3 to PageDirectoryBase from header and restore original value at the end. Signed-off-by: NViktor Prutyanov <viktor.prutyanov@virtuozzo.com> Message-Id: <20180517162342.4330-3-viktor.prutyanov@virtuozzo.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Viktor Prutyanov 提交于
This patch adds Windows crashdumping feature. Now QEMU can produce ELF-dump containing Windows crashdump header, which can help to convert to a valid WinDbg-understandable crashdump file, or immediately create such file. The crashdump will be obtained by joining physical memory dump and 8K header exposed through vmcoreinfo/fw_cfg device by guest driver at BSOD time. Option '-w' was added to dump-guest-memory command. At the moment, only x64 configuration is supported. Suitable driver can be found at https://github.com/virtio-win/kvm-guest-drivers-windows/tree/master/fwcfg64Signed-off-by: NViktor Prutyanov <viktor.prutyanov@virtuozzo.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180517162342.4330-2-viktor.prutyanov@virtuozzo.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Michael S. Tsirkin 提交于
When guest CPU PM is enabled, and with -cpu host, expose the host CPU MWAIT leaf in the CPUID so guest can make good PM decisions. Note: the result is 100% CPU utilization reported by host as host no longer knows that the CPU is halted. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Message-Id: <20180622192148.178309-3-mst@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Michael S. Tsirkin 提交于
With this flag, kvm allows guest to control host CPU power state. This increases latency for other processes using same host CPU in an unpredictable way, but if decreases idle entry/exit times for the running VCPU, so to use it QEMU needs a hint about whether host CPU is overcommitted, hence the flag name. Follow-up patches will expose this capability to guest (using mwait leaf). Based on a patch by Wanpeng Li <kernellwp@gmail.com> . Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Message-Id: <20180622192148.178309-2-mst@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Peter Xu 提交于
Let's start to use "info pic" just like other platforms. For now we keep the command for a while so that old users can know what is the new command to use. Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <20171229073104.3810-6-peterx@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Peter Xu 提交于
This include both userspace and in-kernel ioapic. Note that the numbers can be inaccurate for kvm-ioapic. One reason is the same with kvm-i8259, that when irqfd is used, irqs can be delivered all inside kernel without our notice. Meanwhile, kvm-ioapic is specially treated when irq numbers <ISA_NUM_IRQS, those irqs will be delivered in kernel too via kvm-i8259 (please refer to kvm_pc_gsi_handler). Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <20171229073104.3810-5-peterx@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Peter Xu 提交于
So that now it looks better when with other irqchips. Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <20171229073104.3810-4-peterx@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Peter Xu 提交于
People start to use "info pic" for all kinds of irqchip dumps. Let x86 ioapic join the family. It dumps the same thing as "info ioapic". Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <20171229073104.3810-3-peterx@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Peter Xu 提交于
Something that commit 254316fa ("intc: make HMP 'info irq' and 'info pic' commands available on all targets", 2016-10-04) forgot to touch up. Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <20171229073104.3810-2-peterx@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Jan Kiszka 提交于
It calls cpu_loop_exit in system emulation mode (and should never be called in user emulation mode). Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Message-Id: <6f4d44ffde55d074cbceb48309c1678600abad2f.1522769774.git.jan.kiszka@web.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Jan Kiszka 提交于
We need to terminate the translation block after STGI so that pending interrupts can be injected. This fixes pending NMI injection for Jailhouse which uses "stgi; clgi" to open a brief injection window. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Message-Id: <37939b244dda0e9cccf96ce50f2b15df1e48315d.1522769774.git.jan.kiszka@web.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Jan Kiszka 提交于
Check for SVM interception prior to injecting an NMI. Tested via the Jailhouse hypervisor. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Message-Id: <c65877e9a011ee4962931287e59f502c482b8d0b.1522769774.git.jan.kiszka@web.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Alexey Kardashevskiy 提交于
This adds owners/parents (which are the same, just occasionally owner==NULL) printing for memory regions; a new '-o' flag enabled new output. Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru> Message-Id: <20180604032511.6980-1-aik@ozlabs.ru> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Justin Terry (VM) 提交于
Some variations of Linux kernels end up accessing MSR's that the Windows Hypervisor doesn't implement which causes a GP to be returned to the guest. This fix registers QEMU for unimplemented MSR access and globally returns 0 on reads and ignores writes. This behavior is allows the Linux kernel to probe the MSR with a write/read/check sequence it does often without failing the access. Signed-off-by: NJustin Terry (VM) <juterry@microsoft.com> Message-Id: <20180605221500.21674-2-juterry@microsoft.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Justin Terry (VM) 提交于
Adds a workaround to an incorrect value setting CPUID Fn8000_0001_ECX[bit 9 OSVW] = 1. This can cause a guest linux kernel to panic when an issue to rdmsr C001_0140h returns 0. Disabling this feature correctly allows the guest to boot without accessing the osv workarounds. Signed-off-by: NJustin Terry (VM) <juterry@microsoft.com> Message-Id: <20180605221500.21674-1-juterry@microsoft.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Mark Cave-Ayland 提交于
Remove the legacy esp_init() function now that there are no more remaining users. Signed-off-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20180613094727.11326-3-mark.cave-ayland@ilande.co.uk> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Tested-by: NHervé Poussineau <hpoussin@reactos.org>
-
由 Mark Cave-Ayland 提交于
MIPS jazz is the last user of the legacy esp_init() function so move creation of the ESP device over to use qdev. Note that the esp_reset and dma_enable qemu_irqs are currently unused and so we do not wire these up and instead remove the variables to prevent the compiler emitting unused variable warnings. Signed-off-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20180613094727.11326-2-mark.cave-ayland@ilande.co.uk> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Tested-by: NHervé Poussineau <hpoussin@reactos.org>
-
由 Paolo Bonzini 提交于
Let management know if there were any problems communicating with qemu-pr-helper. The event is edge-triggered, and is sent every time the connection status of the pr-manager-helper object changes. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This command lets you query the connection status of each pr-manager-helper object. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
When writing to the qemu-pr-helper socket failed, the persistent reservation manager was correctly disconnecting the socket, but it did not clear pr_mgr->ioc. So the rest of the code did not know that the socket had been disconnected, accessed pr_mgr->ioc and happily caused a crash. To reproduce, it is enough to stop qemu-pr-helper between QEMU startup and executing e.g. sg_persist -k /dev/sdb. Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
The response size is expected to be zero if the SCSI status is not "GOOD", but nothing was resetting it. This can be reproduced simply by "sg_persist -s /dev/sdb" where /dev/sdb in the guest is a scsi-block device corresponding to a multipath device on the host. Before: PR in (Read full status): Aborted command and on the host: prh_write_response: Assertion `resp->sz == 0' failed. After: PR in (Read full status): bad field in cdb or parameter list (perhaps unsupported service action) Reported-by: NJiri Belka <jbelka@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
-
由 Paolo Bonzini 提交于
Currently --help shows "(default '(null)')" for the -k/--socket-path option. Fix it by getting the default path in /var/run. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
-
由 Thomas Huth 提交于
We currently have got three ways of turning on the HAX accelerator: "-machine accel=hax", "-accel hax" and "-enable-hax". That's really confusing and overloaded. Since "-accel" is our preferred way to enable an accelerator nowadays, and "-accel hax" is even less to type than "-enable-hax", let's deprecate the "-enable-hax" option now. Note: While "-enable-kvm" is available since a long time and can hardly be removed since it is used in a lot of upper layer tools and scripts, the "-enable-hax" option is still rather new and not very widespread yet, so I think that it should be OK if we remove this in a couple of releases again (we'll see whether someone complains after seeing the deprecation message - then we could still reconsider to keep it if there a well-founded reasons). Signed-off-by: NThomas Huth <thuth@redhat.com> Message-Id: <1529950933-28347-1-git-send-email-thuth@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Coverity does not like the new _Float* types that are used by recent glibc, and croaks on every single file that includes stdlib.h. Add dummy typedefs to please it. Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 David Hildenbrand 提交于
Right now, there is some inconsistency between hotplugged and coldplugged memory. DIMMs added via "-device" result in different stats than DIMMs added using "device_add". E.g. [...] -numa node,nodeid=0,cpus=0-1 -numa node,nodeid=1,cpus=2-3 \ -m 4G,maxmem=20G,slots=2 \ -object memory-backend-ram,id=mem0,size=8G \ -device pc-dimm,id=dimm0,memdev=mem0 \ -object memory-backend-ram,id=mem1,size=8G \ -device nvdimm,id=dimm1,memdev=mem1,node=1 Results in NUMA info (qemu) info numa info numa 2 nodes node 0 cpus: 0 1 node 0 size: 10240 MB node 0 plugged: 0 MB node 1 cpus: 2 3 node 1 size: 10240 MB node 1 plugged: 0 MB But in memory size summary: (qemu) info memory_size_summary info memory_size_summary base memory: 4294967296 plugged memory: 17179869184 Make this consistent by reporting all hot and coldplugged memory a.k.a. DIMM and NVDIMM as "plugged". Fixes: 31959e82 ("hmp: extend "info numa" with hotplugged memory information") Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20180622144045.737-1-david@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 David Hildenbrand 提交于
Let's try to reduce error handling a bit. In the plug/unplug case, the device was realized and therefore we can assume that getting access to the memory region will not fail. For get_vmstate_memory_region() this is already handled that way. Document both cases. Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20180619134141.29478-13-david@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 David Hildenbrand 提交于
We might get a call to get_memory_region() before the device has been realized. We should return a consistent value, as the return value will e.g. later on be used in the pre_plug handler. To avoid duplicating too much code, factor the initialization and checks out into a helper function. Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20180619134141.29478-12-david@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 David Hildenbrand 提交于
This way we can easily check if the region has already been inititalized without having to rely on the size of an uninitialized region being 0. Free the region in nvdimm_finalize() and not in unrealize() as we will allow to create the region before realization in following patches. Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20180619134141.29478-11-david@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 David Hildenbrand 提交于
We don't allow to modify it after realization. So we can simply turn it into a static property. Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20180619134141.29478-10-david@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 David Hildenbrand 提交于
Importantly, get_vmstate_memory_region() should also fail with a proper error if called before the device is realized. For a PCDIMM, both functions are to return the same thing, so share the implementation. All current users are called after the device has been realized, so we can expect the calls to succeed. Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20180619134141.29478-9-david@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 David Hildenbrand 提交于
Unused, so let's remove it. Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20180619134141.29478-8-david@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 David Hildenbrand 提交于
Our parent class (PC_DIMM) provides exactly the same function. Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20180619134141.29478-7-david@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 David Hildenbrand 提交于
We can perform these checks before the device is actually realized. Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20180619134141.29478-6-david@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 David Hildenbrand 提交于
Not used outside of pc-dimm.c and there shouldn't be other users. If other devices (e.g. memory devices) ever have to also use slots, then we will have to factor this out. Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20180619134141.29478-5-david@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 David Hildenbrand 提交于
Let's rename it to make it look more consistent. Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20180619134141.29478-4-david@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 David Hildenbrand 提交于
Use a similar naming scheme as spapr. This way, we can go ahead and rename e.g. pc_dimm_memory_plug to pc_dimm_plug, which avoids confusion. Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NDavid Hildenbrand <david@redhat.com> Message-Id: <20180619134141.29478-3-david@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-