Re: [PATCH v2 6/8] x86: move more x86-generic functions out of PC files

2020-01-08 Thread Gerd Hoffmann
On Thu, Dec 12, 2019 at 06:29:12PM +0100, Paolo Bonzini wrote: > These are needed by microvm too, so move them outside of PC-specific files. > With this patch, microvm.c need not include pc.h anymore. > > Signed-off-by: Paolo Bonzini Current master does not work with libvirt ... $ virsh start f

Re: [PATCH v2 02/10] ppc: Remove stub of PPC970 HID4 implementation

2020-01-08 Thread Greg Kurz
On Wed, 8 Jan 2020 12:08:50 +1100 David Gibson wrote: > On Tue, Jan 07, 2020 at 06:36:38PM +0100, Greg Kurz wrote: > > On Tue, 7 Jan 2020 18:32:15 +0100 > > Greg Kurz wrote: > > > > > On Tue, 7 Jan 2020 15:48:19 +1100 > > > David Gibson wrote: > > > > > > > The PowerPC 970 CPU was a cut-down

Re: [PATCH v2 6/8] x86: move more x86-generic functions out of PC files

2020-01-08 Thread Paolo Bonzini
Yes, I am preparing a pull request now. Paolo Il mer 8 gen 2020, 09:04 Gerd Hoffmann ha scritto: > On Thu, Dec 12, 2019 at 06:29:12PM +0100, Paolo Bonzini wrote: > > These are needed by microvm too, so move them outside of PC-specific > files. > > With this patch, microvm.c need not include pc.

discuss about pvpanic

2020-01-08 Thread zhenwei pi
Hey, Paolo Currently, pvpapic only supports bit 0(PVPANIC_PANICKED). We usually expect that guest writes ioport (typical 0x505) in panic_notifier_list callback during handling panic, then we can handle pvpapic event PVPANIC_PANICKED in QEMU. On the other hand, guest wants to handle the crash b

Re: [PATCH v2 09/10] target/ppc: Correct RMLS table

2020-01-08 Thread Cédric Le Goater
On 1/7/20 5:48 AM, David Gibson wrote: > The table of RMA limits based on the LPCR[RMLS] field is slightly wrong. > We're missing the RMLS == 0 => 256 GiB RMA option, which is available on > POWER8, so add that. > > The comment that goes with the table is much more wrong. We *don't* filter > inva

Re: [PATCH v2 09/10] target/ppc: Correct RMLS table

2020-01-08 Thread Cédric Le Goater
On 1/8/20 2:06 AM, David Gibson wrote: > On Tue, Jan 07, 2020 at 03:21:42PM +0100, Cédric Le Goater wrote: >> On 1/7/20 5:48 AM, David Gibson wrote: >>> The table of RMA limits based on the LPCR[RMLS] field is slightly wrong. >>> We're missing the RMLS == 0 => 256 GiB RMA option, which is available

Re: [PATCH v2 10/10] target/ppc: Only calculate RMLS derived RMA limit on demand

2020-01-08 Thread Cédric Le Goater
On 1/7/20 5:48 AM, David Gibson wrote: > When the LPCR is written, we update the env->rmls field with the RMA limit > it implies. Simplify things by just calculating the value directly from > the LPCR value when we need it. > > It's possible this is a little slower, but it's unlikely to be signif

Re: [PATCH v2 02/10] ppc: Remove stub of PPC970 HID4 implementation

2020-01-08 Thread Thomas Huth
On 07/01/2020 19.05, BALATON Zoltan wrote: > On Tue, 7 Jan 2020, Greg Kurz wrote: >> On Tue, 7 Jan 2020 18:32:15 +0100 >> Greg Kurz wrote: >> >>> On Tue,  7 Jan 2020 15:48:19 +1100 >>> David Gibson wrote: >>> The PowerPC 970 CPU was a cut-down POWER4, which had hypervisor capability. >>

[PATCH v2] i.MX: add an emulation for RNGC

2020-01-08 Thread Martin Kaiser
Add an emulation for the RNGC random number generator and the compatible RNGB variant. These peripherals are included (at least) in imx25 and imx35 chipsets. The emulation supports the initial self test, reseeding the prng and reading random numbers. Signed-off-by: Martin Kaiser --- changes in v

Re: [PATCH] i.MX: add an emulation for RNGC

2020-01-08 Thread Martin Kaiser
Hi Peter, thanks for reviewing my patch. I just sent a v2 where I fixed the issues that you found. Thus wrote Peter Maydell (peter.mayd...@linaro.org): > > +#include "qemu/main-loop.h" > Do you really need main-loop.h ? Without main-loop.h, I get compiler errors about missing prototypes for q

[virtio-dev][RFC PATCH v1 2/2] virtio-gpu: add the ability to export resources

2020-01-08 Thread David Stevens
Signed-off-by: David Stevens --- virtio-gpu.tex | 29 + 1 file changed, 29 insertions(+) diff --git a/virtio-gpu.tex b/virtio-gpu.tex index af4ca61..522f478 100644 --- a/virtio-gpu.tex +++ b/virtio-gpu.tex @@ -186,12 +186,16 @@ \subsubsection{Device Operation: Request

[virtio-dev][RFC PATCH v1 0/2] Cross-device resource sharing

2020-01-08 Thread David Stevens
This RFC comes from the recent discussion on buffer sharing [1], specifically about the need to share resources between different virtio devices. For a concrete use case, this can be used to share virtio-gpu allocated buffers with the recently proposed virtio video device [2], without the need to m

[virtio-dev][RFC PATCH v1 1/2] content: define what exporting a resource is

2020-01-08 Thread David Stevens
Define a mechanism for sharing resources between different virtio devices. Signed-off-by: David Stevens --- content.tex | 18 ++ 1 file changed, 18 insertions(+) diff --git a/content.tex b/content.tex index b1ea9b9..73bd28e 100644 --- a/content.tex +++ b/content.tex @@ -373,6 +3

[PATCH 0/2] ppc/pnv: PNOR cleanups

2020-01-08 Thread Cédric Le Goater
Hello, Here are small cleanups of the PnvPNOR model. Thanks, C. Cédric Le Goater (2): ppc/pnv: use QEMU unit definition MiB ppc/pnv: improve error logging when a PNOR update fails hw/ppc/pnv_pnor.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.21.1

[PATCH 2/2] ppc/pnv: improve error logging when a PNOR update fails

2020-01-08 Thread Cédric Le Goater
Print out the offset at which the error occured. Signed-off-by: Cédric Le Goater --- hw/ppc/pnv_pnor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/pnv_pnor.c b/hw/ppc/pnv_pnor.c index 08ea3e381f2b..2ab35b797b58 100644 --- a/hw/ppc/pnv_pnor.c +++ b/hw/ppc/pnv_pnor

[PATCH 1/2] ppc/pnv: use QEMU unit definition MiB

2020-01-08 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ppc/pnv_pnor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/pnv_pnor.c b/hw/ppc/pnv_pnor.c index b061106d1c0c..08ea3e381f2b 100644 --- a/hw/ppc/pnv_pnor.c +++ b/hw/ppc/pnv_pnor.c @@ -11,6 +11,7 @@ #include "qapi/error.h" #in

[PATCH v3 2/2] usb-redir: remove 'remote wakeup' flag from configuration descriptor

2020-01-08 Thread Yuri Benditovich
If the redirected device has this capability, Windows guest may place the device into D2 and expect it to wake when the device becomes active, but this will never happen. For example, when internal Bluetooth adapter is redirected, keyboards and mice connected to it do not work. Current commit remov

[PATCH v3 0/2] Remove 'remote wakeup' flag from USB config descriptor

2020-01-08 Thread Yuri Benditovich
This series of patches addresses possible functional problem of USB devices with 'remote wakeup' capability, redirected to Windows VM (local redirection using libusb or spice redirection using usbredir). Yuri Benditovich (2): usb-host: remove 'remote wakeup' flag from configuration descriptor

[PATCH v3 1/2] usb-host: remove 'remote wakeup' flag from configuration descriptor

2020-01-08 Thread Yuri Benditovich
If the redirected device has this capability, Windows guest may place the device into D2 and expect it to wake when the device becomes active, but this will never happen. For example, when internal Bluetooth adapter is redirected, keyboards and mice connected to it do not work. Current commit remov

riscv: How to debug a wrong pc after executing ret instruction?

2020-01-08 Thread Ian Jiang
Problem == The next instruction after executing "ret" (i.e. jalr x0, 0(x1)) is not at 0x856c (x1/ra) as expected, but at 0x856c. How to debug this issue? Any suggestion is appreciated. QEMU command = qemu-system-riscv64 -nographic -machine virt -kernel my-

Re: [PATCH v3 2/2] tests/ide-test: Create a single unit-test covering more PRDT cases

2020-01-08 Thread Kevin Wolf
Am 07.01.2020 um 23:39 hat Alexander Popov geschrieben: > > Did you have a look why this happens? I suppose we might be running out > > of some resources in the qtest framework becasue each send_dma_request() > > calls get_pci_device() again? > > I've spent some time on investigating, but didn't s

Re: [PATCH 0/2] ppc/pnv: PNOR cleanups

2020-01-08 Thread Philippe Mathieu-Daudé
On 1/8/20 10:03 AM, Cédric Le Goater wrote: Hello, Here are small cleanups of the PnvPNOR model. Thanks, C. Cédric Le Goater (2): ppc/pnv: use QEMU unit definition MiB ppc/pnv: improve error logging when a PNOR update fails hw/ppc/pnv_pnor.c | 6 -- 1 file changed, 4 insertions(

Re: discuss about pvpanic

2020-01-08 Thread Paolo Bonzini
On 08/01/20 09:25, zhenwei pi wrote: > Hey, Paolo > > Currently, pvpapic only supports bit 0(PVPANIC_PANICKED). > We usually expect that guest writes ioport (typical 0x505) in > panic_notifier_list callback > during handling panic, then we can handle pvpapic event PVPANIC_PANICKED in > QEMU. >

Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option)

2020-01-08 Thread Kevin Wolf
Am 07.01.2020 um 18:43 hat Christophe de Dinechin geschrieben: > > It would break backwards compatibility for "-machine accel=tcg:kvm", > > which so far meant "use TCG if compiled in, otherwise use KVM". This is > > not something I would have a problem with... except that "tcg:kvm" is > > the defa

Re: [PATCH 1/4] qemu-file: Don't do IO after shutdown

2020-01-08 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Juan Quintela (quint...@redhat.com) wrote: > > Be sure that we are not doing neither read/write after shutdown of the > > QEMUFile. > > > > Signed-off-by: Juan Quintela > > --- > > migration/qemu-file.c | 13 + > > 1 file chan

Re: discuss about pvpanic

2020-01-08 Thread Michal Privoznik
On 1/8/20 10:36 AM, Paolo Bonzini wrote: On 08/01/20 09:25, zhenwei pi wrote: Hey, Paolo Currently, pvpapic only supports bit 0(PVPANIC_PANICKED). We usually expect that guest writes ioport (typical 0x505) in panic_notifier_list callback during handling panic, then we can handle pvpapic event

Re: discuss about pvpanic

2020-01-08 Thread Paolo Bonzini
On 08/01/20 10:58, Michal Privoznik wrote: >> the kernel-side patch certainly makes sense.  I assume that you want the >> event to propagate up from QEMU to Libvirt and so on?  The QEMU patch >> would need to declare a new event (qapi/misc.json) and send it in >> handle_event (hw/misc/pvpanic.c). 

Re: [PATCH v2] accel/kvm: Make "kernel_irqchip" default on

2020-01-08 Thread Cornelia Huck
On Tue, 7 Jan 2020 11:32:42 +0100 Paolo Bonzini wrote: > On 28/12/19 11:43, Xiaoyao Li wrote: > > Commit 11bc4a13d1f4 ("kvm: convert "-machine kernel_irqchip" to an > > accelerator property") moves kernel_irqchip property from "-machine" to > > "-accel kvm", but it forgets to set the default valu

Re: [PATCH v2] arm/translate-a64: fix uninitialized variable warning

2020-01-08 Thread Philippe Mathieu-Daudé
On 1/8/20 3:39 AM, pannengy...@huawei.com wrote: From: Pan Nengyuan Fixes: target/arm/translate-a64.c: In function 'disas_crypto_three_reg_sha512': target/arm/translate-a64.c:13625:9: error: 'genfn' may be used uninitialized in this function [-Werror=maybe-uninitialized] genfn(tcg_rd_ptr,

Re: [RFC PATCH 0/1] Removing RAMBlocks during migration

2020-01-08 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Fri, Jan 03, 2020 at 11:44:27AM +, Dr. David Alan Gilbert wrote: > > > 1) Guest: writes to slot's pci config > > > 2) QEMU: pcie_cap_slot_write_config -> pcie_unplug_device > > > > > > So, it's only guest driven action and qdev_unplug doesn't

Re: [PATCH RFC] i386/kvm: fix enlightened VMCS with fine-grained VMX feature enablement

2020-01-08 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES >> >> the problem with it is that we don't have 'apic_access_addr' field in >> eVMCS ('virtual_apic_page_addr' is there). By running the same setup >> with eVMCS disabled I figured out which address can be hardcoded to make >> it boo

Re: [External] Re: discuss about pvpanic

2020-01-08 Thread zhenwei pi
On 1/8/20 6:05 PM, Paolo Bonzini wrote: On 08/01/20 10:58, Michal Privoznik wrote: the kernel-side patch certainly makes sense.  I assume that you want the event to propagate up from QEMU to Libvirt and so on?  The QEMU patch would need to declare a new event (qapi/misc.json) and send it in han

Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option)

2020-01-08 Thread Alex Bennée
Thomas Huth writes: > On 07/01/2020 13.54, Daniel P. Berrangé wrote: >> On Tue, Jan 07, 2020 at 01:23:18PM +0100, Paolo Bonzini wrote: >>> On 07/01/20 13:18, Thomas Huth wrote: I don't think we need a separate priority parameter here. But IMHO it's really rather common practice to pr

Re: [virtio-dev][RFC PATCH v1 1/2] content: define what exporting a resource is

2020-01-08 Thread Gerd Hoffmann
On Wed, Jan 08, 2020 at 06:01:58PM +0900, David Stevens wrote: > Define a mechanism for sharing resources between different virtio > devices. > > Signed-off-by: David Stevens > --- > content.tex | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/content.tex b/content.t

Re: Making QEMU easier for management tools and applications

2020-01-08 Thread Kevin Wolf
Am 07.01.2020 um 18:11 hat Christophe de Dinechin geschrieben: > So I think that it might help, in the long run, to start defining the > language in question in some abstract way, and then to have rules > for how to transform that abstract language into concrete bindings. I think this abstract lan

Re: [virtio-dev][RFC PATCH v1 2/2] virtio-gpu: add the ability to export resources

2020-01-08 Thread Gerd Hoffmann
> +\begin{lstlisting} > +struct virtio_gpu_export_resource { > +struct virtio_gpu_ctrl_hdr hdr; > +le32 resource_id; > +le32 padding; > +}; > + > +struct virtio_gpu_resp_export_resource { > +struct virtio_gpu_ctrl_hdr hdr; > +le64 uuid_low; > +le64 uu

Re: [PATCH v1 6/6] travis: install homebrew python for OS X

2020-01-08 Thread Philippe Mathieu-Daudé
On 1/8/20 8:00 AM, Alex Bennée wrote: Philippe Mathieu-Daudé writes: On 1/7/20 2:53 PM, Alex Bennée wrote: Our python3 requirements now outstrip those of the build. Signed-off-by: Alex Bennée --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml ind

Re: [PATCH v2 1/1] block/rbd: Add support for ceph namespaces

2020-01-08 Thread Stefano Garzarella
Hi Florian, the patch LGTM but there are few style issues to fix: On Tue, Jan 07, 2020 at 12:13:40PM +0100, Florian Florensa wrote: > Starting from ceph Nautilus, RBD has support for namespaces, allowing > for finer grain ACLs on images inside a pool, and tenant isolation. > > In the rbd cli tool

Re: [RFC PATCH 1/1] target/arm: kvm: Handle DABT with no valid ISS

2020-01-08 Thread Peter Maydell
On Tue, 7 Jan 2020 at 21:37, Beata Michalska wrote: > > On Tue, 7 Jan 2020 at 14:28, Peter Maydell wrote: > > Another thing that occurred to me last night -- why do we need > > to do this adjustment of the PC/r15 ? If this is the kernel > > handing control to userspace to say "this is not an inst

Re: [PATCH v1 6/6] travis: install homebrew python for OS X

2020-01-08 Thread Daniel P . Berrangé
On Wed, Jan 08, 2020 at 07:00:17AM +, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > > > On 1/7/20 2:53 PM, Alex Bennée wrote: > >> Our python3 requirements now outstrip those of the build. > >> Signed-off-by: Alex Bennée > >> --- > >> .travis.yml | 1 + > >> 1 file changed, 1 i

Re: [PATCH 2/2] pnv/psi: Consolidate some duplicated code in pnv_psi_realize()

2020-01-08 Thread Greg Kurz
On Wed, 8 Jan 2020 11:54:53 +1100 David Gibson wrote: > On Tue, Jan 07, 2020 at 07:32:03PM +0100, Philippe Mathieu-Daudé wrote: > > Hi Greg, > > > > On 1/7/20 5:32 PM, Greg Kurz wrote: > > > The proper way to do that would be to use > > > device_class_set_parent_realize(), > > > but defining a

Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option)

2020-01-08 Thread Thomas Huth
On 08/01/2020 11.39, Alex Bennée wrote: > > Thomas Huth writes: > >> On 07/01/2020 13.54, Daniel P. Berrangé wrote: >>> On Tue, Jan 07, 2020 at 01:23:18PM +0100, Paolo Bonzini wrote: On 07/01/20 13:18, Thomas Huth wrote: > I don't think we need a separate priority parameter here. But IM

Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option)

2020-01-08 Thread Peter Maydell
On Wed, 8 Jan 2020 at 10:40, Alex Bennée wrote: > Thomas Huth writes: > > What about "-accel any" or "-accel fastest" or something similar? > > "any" is just ambiguous, "fastest" is just begging for me to find a > micro-benchmark that TCG outperforms on ;-) > > "-accel default" could be considere

Re: [PATCH v2] 9p: init_in_iov_from_pdu can truncate the size

2020-01-08 Thread Greg Kurz
On Mon, 6 Jan 2020 11:38:09 -0800 Stefano Stabellini wrote: > From: Stefano Stabellini > > init_in_iov_from_pdu might not be able to allocate the full buffer size > requested, which comes from the client and could be larger than the > transport has available at the time of the request. Specifi

Re: [virtio-dev][RFC PATCH v1 2/2] virtio-gpu: add the ability to export resources

2020-01-08 Thread David Stevens
> Is there a specific reason why you want the host pick the uuid? I would > let the guest define the uuid, i.e. move the uuid fields to > virtio_gpu_export_resource and scratch virtio_gpu_resp_export_resource. Sending the uuid in the original request doesn't really buy us anything, at least in te

[PATCH v4] display/gtk: get proper refreshrate

2020-01-08 Thread pavlica . nikola
From: Nikola Pavlica Hi, QEMU mailing list. This is the fourth revision of the patch involving the GTK display output getting the proper refresh rate for your particular display output. Because some VMs in QEMU can get GPU virtualization (using technologies such as iGVT-g, as mentioned previous

[PATCH 2/4] luks: implement .bdrv_measure()

2020-01-08 Thread Stefan Hajnoczi
Add qemu-img measure support in the "luks" block driver. Signed-off-by: Stefan Hajnoczi --- block/crypto.c | 82 ++ 1 file changed, 82 insertions(+) diff --git a/block/crypto.c b/block/crypto.c index ed32202fa2..94a24210ab 100644 --- a/block/crypt

[PATCH 1/4] luks: extract block_crypto_calculate_payload_offset()

2020-01-08 Thread Stefan Hajnoczi
The qcow2 .bdrv_measure() code calculates the crypto payload offset. This logic really belongs in block/crypto.c where it can be reused by other image formats. The "luks" block driver will need this same logic in order to implement .bdrv_measure(), so extract the block_crypto_calculate_payload_off

[PATCH 0/4] luks: add qemu-img measure support

2020-01-08 Thread Stefan Hajnoczi
This patch series adds qemu-img measure support to the "luks" block driver. We just need to take into account the LUKS header when sizing the image. Stefan Hajnoczi (4): luks: extract block_crypto_calculate_payload_offset() luks: implement .bdrv_measure() qemu-img: allow qemu-img measure --

[PATCH 3/4] qemu-img: allow qemu-img measure --object without a filename

2020-01-08 Thread Stefan Hajnoczi
In most qemu-img sub-commands the --object option only makes sense when there is a filename. qemu-img measure is an exception because objects may be referenced from the image creation options instead of an existing image file. Allow --object without a filename. Signed-off-by: Stefan Hajnoczi --

[PATCH 4/4] iotests: add 282 luks qemu-img measure test

2020-01-08 Thread Stefan Hajnoczi
This test exercises the block/crypto.c "luks" block driver .bdrv_measure() code. Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/282 | 93 ++ tests/qemu-iotests/282.out | 30 tests/qemu-iotests/group | 1 + 3 files changed, 124 insert

Re: [PATCH v2 2/3] tpm-ppi: page-align PPI RAM

2020-01-08 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > > post-copy migration fails on destination with error such as: > > 2019-12-26T10:22:44.714644Z qemu-kvm: ram_block_discard_range: > > Unaligned start address: 0x559d2afae9a0 > > Ah go

[PATCH v7] qga: add command guest-get-devices for reporting VirtIO devices

2020-01-08 Thread Tomáš Golembiovský
Add command for reporting devices on Windows guest. The intent is not so much to report the devices but more importantly the driver (and its version) that is assigned to the device. This gives caller the information whether VirtIO drivers are installed and/or whether inadequate driver is used on a

[PATCH v4] display/gtk: get proper refreshrate

2020-01-08 Thread pavlica . nikola
From: Nikola Pavlica Hi, QEMU mailing list. This is the fourth revision of the patch involving the GTK display output getting the proper refresh rate for your particular display output. Because some VMs in QEMU can get GPU virtualization (using technologies such as iGVT-g, as mentioned previous

[PATCH v22 6/9] KVM: Move hwpoison page related functions into kvm-all.c

2020-01-08 Thread Dongjiu Geng
kvm_hwpoison_page_add() and kvm_unpoison_all() will both be used by X86 and ARM platforms, so moving them into "accel/kvm/kvm-all.c" to avoid duplicate code. For architectures that don't use the poison-list functionality the reset handler will harmlessly do nothing, so let's register the kvm_unpoi

[PATCH v22 1/9] hw/arm/virt: Introduce a RAS machine option

2020-01-08 Thread Dongjiu Geng
RAS Virtualization feature is not supported now, so add a RAS machine option and disable it by default. Reviewed-by: Peter Maydell Signed-off-by: Dongjiu Geng Signed-off-by: Xiang Zheng Acked-by: Xiang Zheng --- hw/arm/virt.c | 23 +++ include/hw/arm/virt.h | 1 +

[PATCH v22 8/9] target-arm: kvm64: handle SIGBUS signal from kernel or KVM

2020-01-08 Thread Dongjiu Geng
Add a SIGBUS signal handler. In this handler, it checks the SIGBUS type, translates the host VA delivered by host to guest PA, then fills this PA to guest APEI GHES memory, then notifies guest according to the SIGBUS type. When guest accesses the poisoned memory, it will generate a Synchronous Ext

[PATCH v22 2/9] docs: APEI GHES generation and CPER record description

2020-01-08 Thread Dongjiu Geng
Add APEI/GHES detailed design document Signed-off-by: Dongjiu Geng Signed-off-by: Xiang Zheng Reviewed-by: Michael S. Tsirkin --- docs/specs/acpi_hest_ghes.rst | 110 ++ docs/specs/index.rst | 1 + 2 files changed, 111 insertions(+) create mo

[PATCH v22 4/9] ACPI: Build Hardware Error Source Table

2020-01-08 Thread Dongjiu Geng
This patch builds Hardware Error Source Table(HEST) via fw_cfg blobs. Now it only supports ARMv8 SEA, a type of Generic Hardware Error Source version 2(GHESv2) error source. Afterwards, we can extend the supported types if needed. For the CPER section, currently it is memory section because kernel

[PATCH v22 5/9] ACPI: Record the Generic Error Status Block address

2020-01-08 Thread Dongjiu Geng
Record the GHEB address via fw_cfg file, when recording a error to CPER, it will use this address to find out Generic Error Data Entries and write the error. Make the HEST GHES to a GED device. Signed-off-by: Dongjiu Geng Signed-off-by: Xiang Zheng --- hw/acpi/generic_event_device.c |

[PATCH v22 9/9] MAINTAINERS: Add ACPI/HEST/GHES entries

2020-01-08 Thread Dongjiu Geng
I and Xiang are willing to review the APEI-related patches and volunteer as the reviewers for the HEST/GHES part. Signed-off-by: Dongjiu Geng Signed-off-by: Xiang Zheng --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 387879a..5af70a5

[PATCH v22 7/9] ACPI: Record Generic Error Status Block(GESB) table

2020-01-08 Thread Dongjiu Geng
kvm_arch_on_sigbus_vcpu() error injection uses source_id as index in etc/hardware_errors to find out Error Status Data Block entry corresponding to error source. So supported source_id values should be assigned here and not be changed afterwards to make sure that guest will write error into expecte

[PATCH v22 3/9] ACPI: Build related register address fields via hardware error fw_cfg blob

2020-01-08 Thread Dongjiu Geng
This patch builds error_block_address and read_ack_register fields in hardware errors table , the error_block_address points to Generic Error Status Block(GESB) via bios_linker. The max size for one GESB is 0x1000 in bytes, For more detailed information, please refer to document: docs/specs/acpi_he

[PATCH v22 0/9] Add ARMv8 RAS virtualization support in QEMU

2020-01-08 Thread Dongjiu Geng
In the ARMv8 platform, the CPU error types are synchronous external abort(SEA) and SError Interrupt (SEI). If exception happens in guest, sometimes it's better for guest to perform the recovery, because host does not know the detailed information of guest. For example, if an exception happens in a

Re: Making QEMU easier for management tools and applications

2020-01-08 Thread Christophe de Dinechin
> On 8 Jan 2020, at 11:43, Kevin Wolf wrote: > > Am 07.01.2020 um 18:11 hat Christophe de Dinechin geschrieben: >> So I think that it might help, in the long run, to start defining the >> language in question in some abstract way, and then to have rules >> for how to transform that abstract la

Re: [PATCH v2] accel/kvm: Make "kernel_irqchip" default on

2020-01-08 Thread Xiaoyao Li
On Tue, 2020-01-07 at 11:32 +0100, Paolo Bonzini wrote: > On 28/12/19 11:43, Xiaoyao Li wrote: > > Commit 11bc4a13d1f4 ("kvm: convert "-machine kernel_irqchip" to an > > accelerator property") moves kernel_irqchip property from "-machine" to > > "-accel kvm", but it forgets to set the default value

Re: [PATCH v4] display/gtk: get proper refreshrate

2020-01-08 Thread Philippe Mathieu-Daudé
On 1/8/20 12:20 PM, pavlica.nik...@gmail.com wrote: From: Nikola Pavlica Assuming Gerd can [cut this ... Hi, QEMU mailing list. This is the fourth revision of the patch involving the GTK display output getting the proper refresh rate for your particular display output. ... until here]

[PATCH v5] display/gtk: get proper refreshrate

2020-01-08 Thread pavlica . nikola
From: Nikola Pavlica Because some VMs in QEMU can get GPU virtualization (using technologies such as iGVT-g, as mentioned previously), they could produce a video output that had a higher display refresh rate than of what the GTK display was displaying. (fxp. Playing a video game inside of a Windo

Re: [External] Re: discuss about pvpanic

2020-01-08 Thread Paolo Bonzini
On 08/01/20 11:33, zhenwei pi wrote: > In previous patch(https://lkml.org/lkml/2019/12/14/265), I defined a new bit > (bit 1) > PVPANIC_CRASH_LOADED for guest crash loaded event. And suggested by KH Greg, > I moved > the bit definition to an uapi header file. > Then QEMU could include the header

Re: [PATCH 0/4] luks: add qemu-img measure support

2020-01-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200108112220.499180-1-stefa...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ==

[PULL 02/38] accel/kvm: Make "kernel_irqchip" default on

2020-01-08 Thread Paolo Bonzini
From: Xiaoyao Li Commit 11bc4a13d1f4 ("kvm: convert "-machine kernel_irqchip" to an accelerator property") moves kernel_irqchip property from "-machine" to "-accel kvm", but it forgets to set the default value of kernel_irqchip_allowed and kernel_irqchip_split. Also cleaning up the three useless

[PULL 08/38] hw/timer/Kconfig: Intel 8254 PIT depends of ISA bus

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Since i8254_common.c calls isa_register_ioport() from "hw/isa/isa.h" we can not select it when ISA_BUS is disabled. Add a 'depends on' clause. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200106171912.16523-1-phi...@redhat.com> Signed-off-by: Paolo Bonzini

[PULL 03/38] hw: fix using 4.2 compat in 5.0 machine types for i440fx/q35

2020-01-08 Thread Paolo Bonzini
From: Denis Plotnikov 5.0 machine type uses 4.2 compats. This seems to be incorrect, since the latests machine type by now is 5.0 and it should use its own compat or shouldn't use any relying on the defaults. Seems, like this appeared because of some problems on merge/rebase. Signed-off-by: Deni

[PULL 01/38] x86: Check for machine state object class before typecasting it

2020-01-08 Thread Paolo Bonzini
From: Michal Privoznik In ed9e923c3c ("x86: move SMM property to X86MachineState", 2019-12-17) In v4.2.0-246-ged9e923c3c the SMM property was moved from PC machine class to x86 machine class. Makes sense, but the change was too aggressive: in target/i386/kvm.c:kvm_arch_init() it altered check whi

[PULL 04/38] replay: check other timers for icount limit

2020-01-08 Thread Paolo Bonzini
From: Pavel Dovgalyuk Record/replay can stall when there are no virtual devices that generate events - it just uses all the time for vCPU thread. Therefore main loop has to wait too much for the vCPU thread, because they are synchronized in rr mode. This patch does not let creating too long vCPU

[PULL 00/38] Misc patches for 2020-01-08

2020-01-08 Thread Paolo Bonzini
The following changes since commit c4d1069c2563f70a5271af6e9e000add64e593be: Merge remote-tracking branch 'remotes/elmarco/tags/dbus-vmstate7-pull-request' into staging (2020-01-06 18:22:42 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream

[PULL 11/38] hw/i386/Kconfig: Let the MicroVM machine select the SERIAL_ISA config

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé When configured with --without-default-devices, the build fails: LINKx86_64-softmmu/qemu-system-x86_64 /usr/bin/ld: hw/i386/microvm.o: in function `microvm_devices_init': hw/i386/microvm.c:157: undefined reference to `serial_hds_isa_init' collect2: err

[PULL 09/38] hw/usb/redirect: Do not link 'usb-redir' device when USB not enabled

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The 'usb-redir' device requires the USB core code to work. Do not link it when there is no USB support. This fixes: $ qemu-system-tricore -M tricore_testboard -device usb-redir qemu-system-tricore: -device usb-redir: No 'usb-bus' bus found for device 'usb-redir'

[PULL 13/38] hw/ppc/Kconfig: Let the Sam460ex board use the PowerPC 405 devices

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé When configured with --without-default-devices, the build fails: LINKppc-softmmu/qemu-system-ppc /usr/bin/ld: hw/ppc/sam460ex.o: in function `sam460ex_init': hw/ppc/sam460ex.c:313: undefined reference to `ppc4xx_plb_init' /usr/bin/ld: hw/ppc/sam460ex.c:

[PULL 06/38] hw/i386/x86-iommu: Add missing stubs

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé In commit 6c730e4af9 we introduced a stub to build the MicroVM machine without Intel IOMMU. This stub is incomplete for the other PC machines. Add the missing stubs. Fixes: 6c730e4af9 ("pc: stubify x86 iommu", 2019-12-17) Reported-by: Travis-CI Signed-off-by: Philipp

[PULL 12/38] hw/ppc/Kconfig: Restrict the MPC I2C controller to e500-based platforms

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Only the PowerPC e500-based platforms use the MPC I2C controller. Do not build it for the other machines. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191231183216.6781-7-phi...@redhat.com> Acked-by: David Gibson Signed-off-by: Paolo Bonzini --- default-c

[PULL 10/38] hw/intc/i8259: Fix Kconfig dependency on ISA bus

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The 8259 Interrupt Controller sits on a ISA bus. Add the missing dependency to fix: LINKx86_64-softmmu/qemu-system-x86_64 /usr/bin/ld: ../hw/intc/i8259_common.o: in function `pic_common_realize': hw/intc/i8259_common.c:84: undefined reference to `isa_regi

[PULL 05/38] replay: record and replay random number sources

2020-01-08 Thread Paolo Bonzini
From: Pavel Dovgalyuk Record/replay feature of icount allows deterministic running of execution scenarios. Some CPUs and peripheral devices read random numbers from external sources making deterministic execution impossible. This patch adds recording and replaying of random read operations into g

[PULL 17/38] hw/ppc/Kconfig: Only select FDT helper for machines using it

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Not all machines use the ppc_create_page_sizes_prop() helper. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191231183216.6781-12-phi...@redhat.com> Acked-by: David Gibson Signed-off-by: Paolo Bonzini --- hw/ppc/Kconfig | 10 ++ hw/ppc/Makefil

[PULL 14/38] hw/ppc/Kconfig: Let the Xilinx Virtex5 ML507 use the PPC-440 devices

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé When configured with --without-default-devices, the build fails: LINKppc-softmmu/qemu-system-ppc /usr/bin/ld: hw/ppc/virtex_ml507.o: in function `ppc440_init_xilinx': hw/ppc/virtex_ml507.c:112: undefined reference to `ppcuic_init' collect2: error: ld re

[PULL 16/38] hw/ppc/Kconfig: Only select fw_cfg with machines using OpenBIOS

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The fw_cfg helpers are only used by machines using OpenBIOS. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191231183216.6781-11-phi...@redhat.com> Acked-by: David Gibson Signed-off-by: Paolo Bonzini --- hw/ppc/Kconfig | 6 ++ hw/ppc/Makefile.objs

[PULL 07/38] hw/i386/pc: fix regression in parsing vga cmdline parameter

2020-01-08 Thread Paolo Bonzini
From: Peter Wu When the 'vga=' parameter is succeeded by another parameter, QEMU 4.2.0 would refuse to start with a rather cryptic message: $ qemu-system-x86_64 -kernel /boot/vmlinuz-linux -append 'vga=792 quiet' qemu: can't parse 'vga' parameter: Invalid argument It was not clear wheth

[PULL 19/38] hw/nvram/Kconfig: Restrict CHRP NVRAM to machines using OpenBIOS or SLOF

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Only the OpenBIOS and SLOF firmwares use the CHRP NVRAM layout. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191231183216.6781-14-phi...@redhat.com> Acked-by: David Gibson Signed-off-by: Paolo Bonzini --- hw/nvram/Kconfig | 4 hw/nvram/Makefile

[PULL 18/38] hw/nvram/Kconfig: Add an entry for the NMC93xx EEPROM

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The NMC93xx EEPROM is only used by few NIC cards and the Am53C974 SCSI controller. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191231183216.6781-13-phi...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/net/Kconfig | 2 ++ hw/nvram/Kconfig |

[PULL 32/38] vhost-user-blk: Explicit we ignore few QEMUChrEvent in IOEventHandler

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: CC s390x-softmmu/hw/block/vhost-user-blk.o

[PULL 21/38] target/i386: Fix handling of k_gs_base register in 32-bit mode in gdbstub

2020-01-08 Thread Paolo Bonzini
From: "mkdol...@us.ibm.com" gdb-xml/i386-32bit.xml includes the k_gs_base register too, so we have to handle it even if TARGET_X86_64 is not defined. This is already done in x86_cpu_gdb_read_register, but not in x86_cpu_gdb_write_register where the incorrect return value causes all registers aft

[PULL 20/38] hw/rtc/mc146818: Add missing dependency on ISA Bus

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The MC146818 sits on an ISA bus. Since it can not be used without it, select ISA in the Kconfig. Fixes: 82f5181777 ("kconfig: introduce kconfig files", 2019-03-07) Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191224111628.3551-1-phi...@redhat.com> Reviewed-b

[PULL 15/38] hw/ppc/Makefile: Simplify the sPAPR PCI objects rule

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The CONFIG_PSERIES already selects CONFIG_PCI. Simplify the Makefile rules. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191231183216.6781-10-phi...@redhat.com> Acked-by: David Gibson Signed-off-by: Paolo Bonzini --- hw/ppc/Makefile.objs | 5 + 1 file

Re: [PATCH v7] qga: add command guest-get-devices for reporting VirtIO devices

2020-01-08 Thread Marc-André Lureau
Hi On Wed, Jan 8, 2020 at 3:30 PM Tomáš Golembiovský wrote: > > Add command for reporting devices on Windows guest. The intent is not so > much to report the devices but more importantly the driver (and its > version) that is assigned to the device. This gives caller the > information whether Vir

[PULL 22/38] target/i386: Add new bit definitions of MSR_IA32_ARCH_CAPABILITIES

2020-01-08 Thread Paolo Bonzini
From: Xiaoyao Li The bit 6, 7 and 8 of MSR_IA32_ARCH_CAPABILITIES are recently disclosed for some security issues. Add the definitions for them to be used by named CPU models. Signed-off-by: Xiaoyao Li Message-Id: <20191225063018.20038-2-xiaoyao...@intel.com> Signed-off-by: Paolo Bonzini ---

[PULL 26/38] hw/char/terminal3270: Explicit ignored QEMUChrEvent in IOEventHandler

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: CC s390x-softmmu/hw/char/terminal3270.o hw/

[PULL 24/38] hw/ipmi: Remove unnecessary declarations

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Since we don't use these methods before defining them, no need to forward-declare them. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Corey Minyard Reviewed-by: Marc-André Lureau Message-Id: <20191218172009.8868-2-phi...@redhat.com> Signed-off-by: Paolo Bonzini

[PULL 23/38] target/i386: Add missed features to Cooperlake CPU model

2020-01-08 Thread Paolo Bonzini
From: Xiaoyao Li It lacks VMX features and two security feature bits (disclosed recently) in MSR_IA32_ARCH_CAPABILITIES in current Cooperlake CPU model, so add them. Fixes: 22a866b6166d ("i386: Add new CPU model Cooperlake") Signed-off-by: Xiaoyao Li Message-Id: <20191225063018.20038-3-xiaoyao.

[PULL 29/38] ccid-card-passthru: Explicit we ignore QEMUChrEvent in IOEventHandler

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: hw/usb/ccid-card-passthru.c: In function ‘ccid_card_

[PULL 33/38] virtio-console: Explicit we ignore some QEMUChrEvent in IOEventHandler

2020-01-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: CC hw/char/virtio-console.o hw/char/virtio-

  1   2   3   4   >