Re: [PULL 04/12] hmp: Simplify qom-set

2020-06-01 Thread Markus Armbruster
"Dr. David Alan Gilbert (git)" writes: > From: "Dr. David Alan Gilbert" > > Simplify qom_set by making it use qmp_qom_set and the JSON parser. > > (qemu) qom-get /machine smm > "auto" > (qemu) qom-set /machine smm "auto" > > Signed-off-by: Dr. David Alan Gilbert > Message-Id: <20200520151108.16

RE: [PATCH 2/3] migration/colo: Update checkpoint time lately

2020-06-01 Thread Zhanghailiang
Reviewed-by: zhanghailiang Hmm, How much time it spends on preparing before COLO process ? > -Original Message- > From: Zhang Chen [mailto:chen.zh...@intel.com] > Sent: Friday, May 15, 2020 12:28 PM > To: Dr . David Alan Gilbert ; Juan Quintela > ; Zhanghailiang ; > qemu-dev > Cc: Zhang

Re: [PATCH v3 0/3] account for NVDIMM nodes during SRAT generation

2020-06-01 Thread Michael S. Tsirkin
On Thu, May 28, 2020 at 04:03:51PM -0700, no-re...@patchew.org wrote: > Patchew URL: > https://patchew.org/QEMU/20200528162011.16258-1-vishal.l.ve...@intel.com/ > > > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Message-id: 20200

[PATCH] checkpatch: reversed logic with acpi test checks

2020-06-01 Thread Michael S. Tsirkin
Logic reversed: allowed list should just be ignored. Instead we only take that into account :( Fixes: e11b06a880ca ("checkpatch: ignore allowed diff list") Signed-off-by: Michael S. Tsirkin --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/chec

Re: [PATCH v3 0/4] microvm: memory config tweaks

2020-06-01 Thread Michael S. Tsirkin
On Fri, May 29, 2020 at 09:39:53AM +0200, Gerd Hoffmann wrote: > With more microvm memory config tweaks split this into its owns series, > the microvm acpi patch series is already big enough ... Okay. We might want to add pci to microvm and maybe we'll need more space then, but let's leave this f

Re: [RFC v2 16/18] guest memory protection: Add Error ** to GuestMemoryProtection::kvm_init

2020-06-01 Thread Richard Henderson
On 5/20/20 8:43 PM, David Gibson wrote: > This allows failures to be reported richly and idiomatically. > > Signed-off-by: David Gibson > --- > accel/kvm/kvm-all.c| 4 +++- > include/exec/guest-memory-protection.h | 2 +- > target/i386/sev.c | 31 ++

Re: [RFC v2 15/18] guest memory protection: Decouple kvm_memcrypt_*() helpers from KVM

2020-06-01 Thread Richard Henderson
On 5/20/20 8:43 PM, David Gibson wrote: > The kvm_memcrypt_enabled() and kvm_memcrypt_encrypt_data() helper functions > don't conceptually have any connection to KVM (although it's not possible > in practice to use them without it). Yet? I would expect TCG implementations of these interfaces even

Re: [PATCH] hw/pci/pcie: Move hot plug capability check to pre_plug callback

2020-06-01 Thread Michael S. Tsirkin
On Mon, Jun 01, 2020 at 06:29:34PM +0200, Julia Suvorova wrote: > Check for hot plug capability earlier to avoid removing devices attached > during the initialization process. > > Run qemu with an unattached drive: > -drive file=$FILE,if=none,id=drive0 \ > -device pcie-root-port,id=rp0,slot=3,

Re: [RFC v2 14/18] guest memory protection: Rework the "memory-encryption" property

2020-06-01 Thread Richard Henderson
On 5/20/20 8:43 PM, David Gibson wrote: > +++ b/include/hw/boards.h > @@ -12,6 +12,8 @@ > #include "qom/object.h" > #include "hw/core/cpu.h" > > +typedef struct GuestMemoryProtection GuestMemoryProtection; > + I think this needs to be in include/qemu/typedefs.h, and the other typedef in patch

Re: [PATCH v2 0/8] hw: Fix some incomplete memory region size

2020-06-01 Thread Michael S. Tsirkin
On Mon, Jun 01, 2020 at 04:29:22PM +0200, Philippe Mathieu-Daudé wrote: > Series fully reviewed. > > Since v1: > - Add parenthesis on the Xen patch (Paul Durrant) > - Add Peter's R-b tags PCI things: Reviewed-by: Michael S. Tsirkin I'll queue pci patches in my tree. > memory_region_set_size

Re: [RFC v2 12/18] guest memory protection: Perform KVM init via interface

2020-06-01 Thread Richard Henderson
On 6/1/20 8:39 PM, Richard Henderson wrote: > On 5/20/20 8:42 PM, David Gibson wrote: >> +if (object_dynamic_cast(obj, TYPE_GUEST_MEMORY_PROTECTION)) { >> +GuestMemoryProtection *gmpo = GUEST_MEMORY_PROTECTION(obj); > > This duplicates the interface check. You should use > >

Re: [RFC v2 13/18] guest memory protection: Move side effect out of machine_set_memory_encryption()

2020-06-01 Thread Richard Henderson
On 5/20/20 8:42 PM, David Gibson wrote: > When the "memory-encryption" property is set, we also disable KSM > merging for the guest, since it won't accomplish anything. > > We want that, but doing it in the property set function itself is > thereoretically incorrect, in the unlikely event of some

Re: [RFC v2 12/18] guest memory protection: Perform KVM init via interface

2020-06-01 Thread Richard Henderson
On 5/20/20 8:42 PM, David Gibson wrote: > +if (object_dynamic_cast(obj, TYPE_GUEST_MEMORY_PROTECTION)) { > +GuestMemoryProtection *gmpo = GUEST_MEMORY_PROTECTION(obj); This duplicates the interface check. You should use gmpo = (GuestMemoryProtection *) object_dynamic_ca

RE: [PATCH 1/3] migration/colo: Optimize COLO boot code path

2020-06-01 Thread Zhanghailiang
Reviewed-by: zhanghailiang > -Original Message- > From: Zhang Chen [mailto:chen.zh...@intel.com] > Sent: Friday, May 15, 2020 12:28 PM > To: Dr . David Alan Gilbert ; Juan Quintela > ; Zhanghailiang ; > qemu-dev > Cc: Zhang Chen ; Jason Wang > ; Zhang Chen > Subject: [PATCH 1/3] migrati

Re: [RFC v2 11/18] guest memory protection: Handle memory encrption via interface

2020-06-01 Thread Richard Henderson
On 5/20/20 8:42 PM, David Gibson wrote: > At the moment AMD SEV sets a special function pointer, plus an opaque > handle in KVMState to let things know how to encrypt guest memory. > > Now that we have a QOM interface for handling things related to guest > memory protection, use a QOM method on th

Re: [RFC v2 09/18] target/i386: sev: Unify SEVState and SevGuestState

2020-06-01 Thread Richard Henderson
On 5/20/20 8:42 PM, David Gibson wrote: > SEVState is contained with SevGuestState. We've now fixed redundancies > and name conflicts, so there's no real point to the nested structure. Just > move all the fields of SEVState into SevGuestState. > > This eliminates the SEVState structure, which as

Re: [PATCH v4 2/2] vhost-user-blk: delay vhost_user_blk_disconnect

2020-06-01 Thread Li Feng
Hi Raphael, I'm sorry. I just end my journey today. Yes, pls sign off me here. this patch is nearly the same as my previous patch. Thanks, Feng Li Raphael Norwitz 于2020年5月31日周日 上午8:55写道: > > On Thu, May 28, 2020 at 5:13 AM Dima Stepanov wrote: > > > > A socket write during vhost-user communica

Re: [RFC v2 08/18] target/i386: sev: Remove redundant handle field

2020-06-01 Thread Richard Henderson
On 5/20/20 8:42 PM, David Gibson wrote: > The user can explicitly specify a handle via the "handle" property wired > to SevGuestState::handle. That gets passed to the KVM_SEV_LAUNCH_START > ioctl() which may update it, the final value being copied back to both > SevGuestState::handle and SEVState:

Re: [RFC v2 07/18] target/i386: sev: Remove redundant policy field

2020-06-01 Thread Richard Henderson
On 5/20/20 8:42 PM, David Gibson wrote: > SEVState::policy is set from the final value of the policy field in the > parameter structure for the KVM_SEV_LAUNCH_START ioctl(). But, AFAICT > that ioctl() won't ever change it from the original supplied value which > comes from SevGuestState::policy. >

Re: [RFC v2 06/18] target/i386: sev: Remove redundant cbitpos and reduced_phys_bits fields

2020-06-01 Thread Richard Henderson
On 5/20/20 8:42 PM, David Gibson wrote: > The SEVState structure has cbitpos and reduced_phys_bits fields which are > simply copied from the SevGuestState structure and never changed. Now that > SEVState is embedded in SevGuestState we can just access the original copy > directly. > > Signed-off-

Re: [RFC v2 05/18] target/i386: sev: Partial cleanup to sev_state global

2020-06-01 Thread Richard Henderson
On 5/20/20 8:42 PM, David Gibson wrote: > The SEV code uses a pretty ugly global to access its internal state. Now > that SEVState is embedded in SevGuestState, we can avoid accessing it via > the global in some cases. In the remaining cases use a new global > referencing the containing SevGuestS

Re: [RFC v2 04/18] target/i386: sev: Embed SEVState in SevGuestState

2020-06-01 Thread Richard Henderson
On 5/20/20 8:42 PM, David Gibson wrote: > Currently SevGuestState contains only configuration information. For > runtime state another non-QOM struct SEVState is allocated separately. > > Simplify things by instead embedding the SEVState structure in > SevGuestState. > > Signed-off-by: David Gib

Re: [RFC v2 03/18] target/i386: sev: Rename QSevGuestInfo

2020-06-01 Thread Richard Henderson
On 5/20/20 8:42 PM, David Gibson wrote: > At the moment this is a purely passive object which is just a container for > information used elsewhere, hence the name. I'm going to change that > though, so as a preliminary rename it to SevGuestState. > > That name risks confusion with both SEVState a

Re: [RFC v2 02/18] target/i386: sev: Move local structure definitions into .c file

2020-06-01 Thread Richard Henderson
On 5/20/20 8:42 PM, David Gibson wrote: > Neither QSevGuestInfo nor SEVState (not to be confused with SevState) is > used anywhere outside target/i386/sev.c, so they might as well live in > there rather than in a (somewhat) exposed header. > > Signed-off-by: David Gibson > --- > target/i386/sev.

Re: [RFC v2 01/18] target/i386: sev: Remove unused QSevGuestInfoClass

2020-06-01 Thread Richard Henderson
On 5/20/20 8:42 PM, David Gibson wrote: > This structure is nothing but an empty wrapper around the parent class, > which by QOM conventions means we don't need it at all. > > Signed-off-by: David Gibson > --- > target/i386/sev.c | 1 - > target/i386/sev_i386.h | 5 - > 2 files changed,

[PATCH for-5.1 V4 4/4] MAINTAINERS: Add myself as Loongson-3 maintainer

2020-06-01 Thread Huacai Chen
Signed-off-by: Huacai Chen Co-developed-by: Jiaxun Yang --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0944d9c..c42a218 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1092,6 +1092,11 @@ F: hw/isa/vt82c686.c F: hw/pci-host/bonito.c F: in

[PATCH for-5.1 V4 3/4] hw/mips: Add Loongson-3 machine support (with KVM)

2020-06-01 Thread Huacai Chen
Add Loongson-3 based machine support, it use i8259 as the interrupt controler and use GPEX as the pci controller. Currently it can only work with KVM, but we will add TCG support in future. We already have a full functional Linux kernel (based on Linux-5.4.x LTS but not upstream yet) here: https:

[PATCH for-5.1 V4 2/4] target/mips: Add Loongson-3 CPU definition

2020-06-01 Thread Huacai Chen
Loongson-3 CPU family include Loongson-3A R1/R2/R3/R4 and Loongson-3B R1/R2. Loongson-3A R1 is the oldest and its ISA is the smallest, while Loongson-3A R4 is the newest and its ISA is almost the superset of all others. To reduce complexity, we just define two CPU types: 1, "Loongson-3A1000" CPU wh

[PATCH for-5.1 V4 1/4] hw/mips: Implement the kvm_type() hook in MachineClass

2020-06-01 Thread Huacai Chen
MIPS has two types of KVM: TE & VZ, and TE is the default type. Now we can't create a VZ guest in QEMU because it lacks the kvm_type() hook in MachineClass. Besides, libvirt uses a null-machine to detect the kvm capability, so by default it will return "KVM not supported" on a VZ platform. Thus, nu

[PATCH for-5.1 V4 0/7] mips: Add Loongson-3 machine support (with KVM)

2020-06-01 Thread Huacai Chen
Loongson-3 CPU family include Loongson-3A R1/R2/R3/R4 and Loongson-3B R1/R2. Loongson-3A R1 is the oldest and its ISA is the smallest, while Loongson-3A R4 is the newest and its ISA is almost the superset of all others. To reduce complexity, in QEMU we just define two CPU types: 1, "Loongson-3A100

Re: [PATCH 1/1] e1000e: Added ICR clearing by corresponding IMS bit.

2020-06-01 Thread Jason Wang
On 2020/6/2 上午12:47, Andrew Melnichenko wrote: As I understand it, the e1000e.c was implemented by 82574L spec(https://www.intel.com/content/dam/doc/datasheet/82574l-gbe-controller-datasheet.pdf). In the same spec there is 10.2.4 paragraph which provides more details when ICR should be cleared

Re: [RFC v2 10/18] guest memory protection: Add guest memory protection interface

2020-06-01 Thread Richard Henderson
On 5/20/20 8:42 PM, David Gibson wrote: > @@ -0,0 +1,29 @@ > +#/* Two extraneous # at the beginning of the new files. r~

RE: [PATCH 1/5] block/quorum.c: stable children names

2020-06-01 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Monday, May 11, 2020 8:27 PM > To: qemu-devel > Cc: Alberto Garcia ; Dr. David Alan Gilbert > ; Zhang, Chen > Subject: [PATCH 1/5] block/quorum.c: stable children names > > If we remove the child with the highest index from the quorum

RE: [PATCH] block/quorum.c: Decrease child index when del_child

2020-06-01 Thread Zhang, Chen
Oh, I missed the patch detail. I just reviewed overall view on your series. Looks your patch is good for me. Thanks Zhang Chen > -Original Message- > From: Lukas Straub > Sent: Tuesday, June 2, 2020 2:12 AM > To: Alberto Garcia > Cc: Zhang, Chen ; Kevin Wolf ; > Max Reitz ; qemu-dev ; >

Re: [PATCH v1 3/3] tests/tcg: add simple commpage test case

2020-06-01 Thread Richard Henderson
On 5/27/20 3:05 AM, Alex Bennée wrote: > The COMMPAGE are a number of kernel provided user-space routines for > 32 bit ARM systems. Add a basic series of smoke tests to ensure it is > working as it should. > > Signed-off-by: Alex Bennée > --- > tests/tcg/arm/commpage.c | 61

Re: [PATCH v1 1/3] linux-user: provide fallback pgd_find_hole for bare chroots

2020-06-01 Thread Richard Henderson
On 5/27/20 3:05 AM, Alex Bennée wrote: > +static uintptr_t pgd_find_hole_fallback(uintptr_t guest_size, uintptr_t brk, > long align) > +{ > +uintptr_t base; > + > +/* Start at the bottom and work our way up */ > +base = mmap_min_addr; > + > +while (true) { > +uintptr_t alig

Re: [PATCH v1 2/3] linux-user: deal with address wrap for ARM_COMMPAGE on 32 bit

2020-06-01 Thread Richard Henderson
On 5/27/20 3:05 AM, Alex Bennée wrote: > @@ -2145,7 +2145,7 @@ static uintptr_t pgd_find_hole_fallback(uintptr_t > guest_size, uintptr_t brk, lon > > /* Return value for guest_base, or -1 if no hole found. */ > static uintptr_t pgb_find_hole(uintptr_t guest_loaddr, uintptr_t guest_size, > -

Re: [PATCH v2 3/3] exec/cpu-common: Move MUSB specific typedefs to 'hw/usb/hcd-musb.h'

2020-06-01 Thread Richard Henderson
On 6/1/20 7:15 AM, Philippe Mathieu-Daudé wrote: > The CPUReadMemoryFunc/CPUWriteMemoryFunc typedefs are legacy > remnant from before the conversion to MemoryRegions. > Since they are now only used in tusb6010.c and hcd-musb.c, > move them to "hw/usb/musb.h" and rename them appropriately. > > Sugg

Re: [PATCH v2 2/3] hw/usb: Move device-specific declarations to new 'hcd-musb.h' header

2020-06-01 Thread Richard Henderson
On 6/1/20 7:15 AM, Philippe Mathieu-Daudé wrote: > Move the declarations for the MUSB-HDRC USB2.0 OTG compliant core > into a separate header. > > Reviewed-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/usb.h | 30 - > include/hw/us

Re: [PATCH v2 1/3] exec/memory: Remove unused MemoryRegionMmio type

2020-06-01 Thread Richard Henderson
On 6/1/20 7:15 AM, Philippe Mathieu-Daudé wrote: > Since commit 62a0db942dec ('memory: Remove old_mmio accessors') > this structure is unused. Remove it. > > Suggested-by: Peter Maydell > Reviewed-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé > --- > include/exec/memory.h | 6 -

Re: [PATCH 5/6] exec: Restrict 32-bit CPUs to 32-bit address space

2020-06-01 Thread Richard Henderson
On 6/1/20 1:09 AM, Philippe Mathieu-Daudé wrote: > On 5/31/20 9:09 PM, Peter Maydell wrote: >> On Sun, 31 May 2020 at 18:54, Philippe Mathieu-Daudé wrote: >>> >>> It is pointless to have 32-bit CPUs see a 64-bit address >>> space, when they can only address the 32 lower bits. >>> >>> Only create C

Re: [PATCH v2 8/8] target/i386/cpu: Use the IEC binary prefix definitions

2020-06-01 Thread Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote: > IEC binary prefixes ease code review: the unit is explicit. > > Reviewed-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé > --- > target/i386/cpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson

Re: [PATCH v2 7/8] hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions

2020-06-01 Thread Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote: > IEC binary prefixes ease code review: the unit is explicit. > > Reviewed-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/i386/xen/xen-hvm.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Richard Hen

Re: [PATCH v2 6/8] hw/hppa/dino: Use the IEC binary prefix definitions

2020-06-01 Thread Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote: > IEC binary prefixes ease code review: the unit is explicit. > > Reviewed-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/hppa/dino.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderso

Re: [PATCH v2 5/8] hw/pci-host: Use the IEC binary prefix definitions

2020-06-01 Thread Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote: > IEC binary prefixes ease code review: the unit is explicit. > > Reviewed-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/pci-host/i440fx.c| 3 ++- > hw/pci-host/q35.c | 2 +- > hw/pci-host/versatile.c | 5 +++-- >

Re: [PATCH v2 4/8] hw/pci/pci_bridge: Use the IEC binary prefix definitions

2020-06-01 Thread Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote: > IEC binary prefixes ease code review: the unit is explicit. > > Reviewed-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/pci/pci_bridge.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Hen

Re: [PATCH v2 3/8] hw/pci/pci_bridge: Correct pci_bridge_io memory region size

2020-06-01 Thread Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote: > memory_region_set_size() handle the 16 Exabytes limit by > special-casing the UINT64_MAX value. This is not a problem > for the 32-bit maximum, 4 GiB. > By using the UINT32_MAX value, the pci_bridge_io MemoryRegion > ends up missing 1 byte: > >

Re: [PATCH v2 2/8] hw/pci-host/prep: Correct RAVEN bus bridge memory region size

2020-06-01 Thread Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote: > memory_region_set_size() handle the 16 Exabytes limit by > special-casing the UINT64_MAX value. This is not a problem > for the 32-bit maximum, 4 GiB. > By using the UINT32_MAX value, the bm-raven MemoryRegion > ends up missing 1 byte: > > $ qem

Re: [PATCH v2 1/8] hw/arm/aspeed: Correct DRAM container region size

2020-06-01 Thread Richard Henderson
On 6/1/20 7:29 AM, Philippe Mathieu-Daudé wrote: > memory_region_set_size() handle the 16 Exabytes limit by > special-casing the UINT64_MAX value. This is not a problem > for the 32-bit maximum, 4 GiB. > By using the UINT32_MAX value, the aspeed-ram-container > MemoryRegion ends up missing 1 byte:

Re: [PATCH v2 9/9] target/arm: Convert Neon one-register-and-immediate insns to decodetree

2020-06-01 Thread Richard Henderson
On 5/22/20 7:55 AM, Peter Maydell wrote: > Convert the insns in the one-register-and-immediate group to decodetree. > > In the new decode, our asimd_imm_const() function returns a 64-bit value > rather than a 32-bit one, which means we don't need to treat cmode=14 op=1 > as a special case in the d

Re: [PATCH v2 5/9] target/arm: Convert Neon narrowing shifts with op==8 to decodetree

2020-06-01 Thread Richard Henderson
On 5/22/20 7:55 AM, Peter Maydell wrote: > Convert the Neon narrowing shifts where op==8 to decodetree: > * VSHRN > * VRSHRN > * VQSHRUN > * VQRSHRUN > > Signed-off-by: Peter Maydell > --- > target/arm/neon-dp.decode | 27 + > target/arm/translate-neon.inc.c | 168

Re: [PATCH v2 4/9] target/arm: Convert VQSHLU, VQSHL 2-reg-shift insns to decodetree

2020-06-01 Thread Richard Henderson
On 5/22/20 7:55 AM, Peter Maydell wrote: > Convert the VQSHLU and QVSHL 2-reg-shift insns to decodetree. > These are the last of the simple shift-by-immediate insns. > > Signed-off-by: Peter Maydell > --- > target/arm/neon-dp.decode | 15 + > target/arm/translate-neon.inc.c | 108

Re: [PATCH v2 1/9] target/arm: Convert Neon VSHL and VSLI 2-reg-shift insn to decodetree

2020-06-01 Thread Richard Henderson
On 5/22/20 7:55 AM, Peter Maydell wrote: > Convert the VSHL and VSLI insns from the Neon 2-registers-and-a-shift > group to decodetree. > > Signed-off-by: Peter Maydell > --- > target/arm/neon-dp.decode | 25 ++ > target/arm/translate-neon.inc.c | 38 +++

Re: [PATCH v4 13/13] stubs: Restrict ui/win32-kbd-hook to system-mode

2020-06-01 Thread Richard Henderson
On 5/22/20 10:25 AM, Philippe Mathieu-Daudé wrote: > In Makefile.objs, the ui/ directory is restricted to system-mode: > > 43 ifeq ($(CONFIG_SOFTMMU),y) > ... > 65 common-obj-y += ui/ > 66 common-obj-m += ui/ > ... > 82 endif # CONFIG_SOFTMMU > > Restrict the ui/ stub added in commit 2df9f5

Re: [PATCH v2 1/1] target/rx: Check for page crossings in use_goto_tb()

2020-06-01 Thread Richard Henderson
On 5/31/20 6:45 AM, Ahmed Karaman wrote: > Add the page crossings check in use_goto_tb(). If this check is not > applied, a number of bugs may occasionally occur during target rx > system mode emulation. > Also, this check is needed in user mode related to emulation of system > call mmap(). rx targ

Re: [PATCH] target/m68k: implement opcode fetoxm1

2020-06-01 Thread Richard Henderson
On 5/31/20 6:19 AM, Laurent Vivier wrote: > Example provided in the launchpad bug fails with: > >qemu: uncaught target signal 4 (Illegal instruction) - core dumped >Illegal instruction (core dumped) > > It appears fetoxm1 is not implemented: > >IN: expm1f >0x85cc: fetoxm1x %f

Re: [PATCH] target/m68k: implement fmove.l #,FPCR

2020-06-01 Thread Richard Henderson
On 5/31/20 4:02 AM, Laurent Vivier wrote: > The immediate value mode was ignored and instruction execution > ends to an invalid access mode. > > This was found running 'R' that set FPSR to 0 at startup with > a 'fmove.l #0,FPSR' in qemu-system-m68k emulation and triggers a > kernel crash: > > [

Re: [PATCH v3 0/6] iotests: Dump QCOW2 dirty bitmaps metadata

2020-06-01 Thread Eric Blake
On 6/1/20 8:48 AM, Andrey Shinkevich wrote: Add dirty bitmap information to QCOW2 metadata dump in qcow2.py script. v3: 01: JSON format output possibility added. Also, you split it into a series. Thanks; this makes it easier to review each step :) v2: 01: Refactoring of the Python

Re: [PATCH] MAINTAINERS: Volunteer for maintaining the Renesas hardware

2020-06-01 Thread Aurelien Jarno
On 2020-06-01 11:20, Philippe Mathieu-Daudé wrote: > I don't have much clue about the Renesas hardware, but at least > I know now the source files a little bit, so I volunteer to pick > up patches and send pull-requests for them during my scarce > hobbyist time, until someone else with more knowled

Re: [PATCH] block/quorum.c: Decrease child index when del_child

2020-06-01 Thread Alberto Garcia
On Mon 01 Jun 2020 08:12:00 PM CEST, Lukas Straub wrote: >> As I explained a few weeks ago this patch is not correct. >> quorum_del_child() allows you to remove any child from the Quorum >> device, so nothing guarantees that next_child_index-1 is free. >> >> https://lists.gnu.org/archive/html/qemu

Re: [PATCH v5 07/11] hw/char: Initial commit of Ibex UART

2020-06-01 Thread Alistair Francis
On Thu, May 28, 2020 at 3:23 PM Alistair Francis wrote: > > This is the initial commit of the Ibex UART device. Serial TX is > working, while RX has been implemeneted but untested. > > This is based on the documentation from: > https://docs.opentitan.org/hw/ip/uart/doc/ > > Signed-off-by: Alistair

Re: [PATCH v4 2/4] target/riscv: Remove the deprecated CPUs

2020-06-01 Thread Alistair Francis
On Sun, May 31, 2020 at 9:51 PM Bin Meng wrote: > > On Fri, May 29, 2020 at 6:24 AM Alistair Francis > wrote: > > > > Signed-off-by: Alistair Francis > > Reviewed-by: Bin Meng > > --- > > docs/system/deprecated.rst | 33 ++--- > > target/riscv/cpu.h

[PATCH v9 9/9] tests/vm: Add workaround to consume console

2020-06-01 Thread Robert Foley
This adds support to basevm.py so that we always drain the console chars. This makes use of support added in an earlier commit that allows QEMUMachine to use the ConsoleSocket. This is a workaround we found was needed since there is a known issue where QEMU will hang waiting for console character

Re: [PATCH v2 4/5] target/tricore: Implement tricore_cpu_get_phys_page_debug

2020-06-01 Thread Richard Henderson
On 5/29/20 12:21 AM, Bastian Koppelmann wrote: > this also removes tricore_cpu_get_phys_page_attrs_debug() as it was a > temporary fix from b190f477e29c7cd03a8fee49c96d27f160e3f5b0. > > Signed-off-by: Bastian Koppelmann > --- > target/tricore/cpu.c| 10 +- > target/tricore/helper.c |

[PATCH v9 6/9] tests/vm: Added a new script for centos.aarch64.

2020-06-01 Thread Robert Foley
centos.aarch64 creates a CentOS 8 image. Also added a new kickstart script used to build the centos.aarch64 image. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov Reviewed-by: Alex Bennée --- tests/vm/Makefile.include| 3 +- tests/vm/centos-8-aarch64.ks | 51 tests/vm/cent

[PATCH v9 8/9] python/qemu: Add ConsoleSocket for optional use in QEMUMachine

2020-06-01 Thread Robert Foley
We add the ConsoleSocket object, which has a socket interface and which will consume all arriving characters on the socket, placing them into an in memory buffer. This will also provide those chars via recv() as would a regular socket. ConsoleSocket also has the option of dumping the console bytes

[PATCH v9 3/9] tests/vm: Added configuration file support

2020-06-01 Thread Robert Foley
Changes to tests/vm/basevm.py to allow accepting a configuration file as a parameter. Allows for specifying VM options such as cpu, machine, memory, and arbitrary qemu arguments for specifying options such as NUMA configuration. Also added an example conf_example_aarch64.yml and conf_example_x86.ym

[PATCH v9 7/9] tests/vm: change scripts to use self._config

2020-06-01 Thread Robert Foley
This change converts existing scripts to using for example self.ROOT_PASS, to self._config['root_pass']. We made similar changes for GUEST_USER, and GUEST_PASS. This allows us also to remove the change in basevm.py, which adds __getattr__ for backwards compatibility. Signed-off-by: Robert Foley R

[PATCH v9 4/9] tests/vm: Add common Ubuntu python module

2020-06-01 Thread Robert Foley
Add a common Ubuntu python module and make use of it with the ubuntu.i386 script. This is preparation for adding an Ubuntu script ubuntu.aarch64. Splitting out the common logic such as build_image() will reduce duplication. Signed-off-by: Robert Foley Tested-by: Philippe Mathieu-Daudé --- test

[PATCH v9 5/9] tests/vm: Added a new script for ubuntu.aarch64.

2020-06-01 Thread Robert Foley
ubuntu.aarch64 provides a script to create an Ubuntu 18.04 VM. Another new file is also added aarch64vm.py, which is a module with common methods used by aarch64 VMs, such as how to create the flash images. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- configure | 20

[PATCH v9 2/9] tests/vm: Add configuration to basevm.py

2020-06-01 Thread Robert Foley
Added use of a configuration to tests/vm/basevm.py. The configuration provides parameters used to configure a VM. This allows for providing alternate configurations to the VM being created/launched. cpu, machine, memory, and NUMA configuration are all examples of configuration which we might want t

[PATCH v9 1/9] tests/vm: pass args through to BaseVM's __init__

2020-06-01 Thread Robert Foley
Adding the args parameter to BaseVM's __init__. We will shortly need to pass more parameters to the class so let's just pass args rather than growing the parameter list. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé -

[PATCH v9 0/9] tests/vm: Add support for aarch64 VMs

2020-06-01 Thread Robert Foley
This is version 9 of the patch series to add support for aarch64 VMs in the vm-build infrastructure. - Ubuntu 18.04 aarch64 VM - CentOS 8 aarch64 VM v8: https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg08458.html Changes in v9: - Fixed one bug/typo in configure for efi-aarch64. - Fixed

Re: [PATCH v2 3/5] target/tricore: Raise EXCP_DEBUG in gen_goto_tb() for singlestep

2020-06-01 Thread Richard Henderson
On 5/29/20 12:21 AM, Bastian Koppelmann wrote: > if (ctx->base.singlestep_enabled) { > -/* raise exception debug */ > +generate_qemu_excp(ctx, EXCP_DEBUG); > } > tcg_gen_exit_tb(NULL, 0); For preference, put an else here: if (singlestep) {

Re: [PULL 0/5] tricore queue

2020-06-01 Thread Peter Maydell
> > are available in the Git repository at: > > https://github.com/bkoppelmann/qemu.git tags/pull-tricore-20200601 > > for you to fetch changes up to d127de3baa64d1cabc8e1994e658688abb577ba9: > > target/t

[PATCH] sparc: implement addr function

2020-06-01 Thread Jason A. Donenfeld
The sparc firmware provides an addr function, which is used by operating systems like OpenBSD to query and work with framebuffer information, addressing the cells directly. Without it, QEMU cannot start OpenBSD at all, while with it, QEMU boots out of the box. Suggested-by: Mark Cave-Ayland Signe

Re: [Libguestfs] Provide NBD via Browser over Websockets

2020-06-01 Thread Eric Wheeler
On Sat, 30 May 2020, Richard W.M. Jones wrote: > On Fri, May 29, 2020 at 09:08:29PM +, Eric Wheeler wrote: > > On Fri, 29 May 2020, Richard W.M. Jones wrote: > > > On Fri, May 29, 2020 at 08:58:06AM -0500, Eric Blake wrote: > > > > On 5/29/20 8:50 AM, Daniel P. Berrang�© wrote: > > > > > > >

Re: [PATCH v2 2/5] target/tricore: Move translate feature check to ctx

2020-06-01 Thread Richard Henderson
On 5/29/20 12:21 AM, Bastian Koppelmann wrote: > this allows us to remove the references to env from ctx. This also fixes > a segfault that was due to the unititalized ctx->env ptr. > > Reported-by: Andreas Konopik > Signed-off-by: Bastian Koppelmann > --- > target/tricore/translate.c | 60

Re: [PATCH v2 1/5] target/tricore: Don't save pc in generate_qemu_excp

2020-06-01 Thread Richard Henderson
On 5/29/20 12:21 AM, Bastian Koppelmann wrote: > EXCP_DEBUG is the only user. If we encounter a jump in tricore-gdb it's > target was overwritten by generate_qemu_excp() and we would never leave. > > Signed-off-by: Bastian Koppelmann > --- > target/tricore/translate.c | 1 - > 1 file changed, 1

Re: [PATCH v2 00/20] backup performance: block_status + async

2020-06-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200601181118.579-1-vsement...@virtuozzo.com/ Hi, This series failed the asan 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 === #!/bin/bash

[Bug 1881648] [NEW] `qemu-img info` reports an incorrect actual-size when the underlying posix filesystem has transparent compression

2020-06-01 Thread Graham Christensen
Public bug reported: qemu-img info reports the same thing as `du`*1024: $ qemu-img info --output json ./my.qcow2 | jq '."actual-size"' 558619648 $ du ./my.qcow2 545527 ./my.qcow2 $ echo $((558619648 / 545527)) 1024 and this is correct in terms of bytes on disk, but due to transparent compres

[Bug 1881645] [NEW] qemu-system-x86_64 --help (or --version) gives no output

2020-06-01 Thread Adriano Pinaffo
Public bug reported: I have Arch Linux with qemu 5.0.0-6 (seen with pacman). Running VMs work just fine, but when I run qemu-system-x86_64 --version or qemu-system-x86_64 --help, there is no feedback on the screen. This behavior messes up other applications (GNS3 in my case that cannot recogniz

Re: [PATCH v2 00/20] backup performance: block_status + async

2020-06-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200601181118.579-1-vsement...@virtuozzo.com/ Hi, This series failed the docker-quick@centos7 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

Re: [PATCH] msix: add valid.accepts methods to check address

2020-06-01 Thread P J P
+-- On Mon, 1 Jun 2020, Philippe Mathieu-Daudé wrote --+ | Fixes: CVE-2020-x 'CVE-2020-13754' assigned to this issue by Mitre. -> https://bugzilla.redhat.com/show_bug.cgi?id=1842363 Thank you. -- Prasad J Pandit / Red Hat Product Security Team 8685 545E B54C 486B C6EB 271E E285 8B5A F050 D

Re: [PATCH 0/2] Add support for SEV Launch Secret Injection

2020-06-01 Thread Dr. David Alan Gilbert
cc'ing in Brijesh for SEV stuff, and also Paolo. * Tobin Feldman-Fitzthum (to...@linux.vnet.ibm.com) wrote: > This patchset contains two patches. The first enables QEMU > to facilitate the injection of a secret blob into the guest > memory. > > The second enables QEMU to parse the guest ROM to de

[PULL 12/12] migration/migration.c: Fix hang in ram_save_host_page

2020-06-01 Thread Dr. David Alan Gilbert (git)
From: Lukas Straub migration_rate_limit will erroneously ratelimit a shutdown socket, which causes the migration thread to hang in ram_save_host_page if the socket is shutdown. Fix this by explicitly testing if the socket has errors or was shutdown in migration_rate_limit. Signed-off-by: Lukas

[PULL 10/12] migration/colo.c: Relaunch failover even if there was an error

2020-06-01 Thread Dr. David Alan Gilbert (git)
From: Lukas Straub If vmstate_loading is true, secondary_vm_do_failover will set failover status to FAILOVER_STATUS_RELAUNCH and return success without initiating failover. However, if there is an error during the vmstate_loading section, failover isn't relaunched. Instead we then wait for failov

[PULL 07/12] migration/colo.c: Use event instead of semaphore

2020-06-01 Thread Dr. David Alan Gilbert (git)
From: Lukas Straub If multiple packets miscompare in a short timeframe, the semaphore value will be increased multiple times. This causes multiple checkpoints even if one would be sufficient. Fix this by using a event instead of a semaphore for triggering checkpoints. Now, checkpoint requests wi

[PULL 03/12] hmp: Implement qom-get HMP command

2020-06-01 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This started off as Andreas Färber's implementation from March 2015, but after feedback from Paolo and Markus it morphed into using the json output which handles structs reasonably. Use with qom-list to find the members of an object. (qemu) qom-get /backend/consol

[PULL 11/12] migration/colo.c: Move colo_notify_compares_event to the right place

2020-06-01 Thread Dr. David Alan Gilbert (git)
From: Lukas Straub If the secondary has to failover during checkpointing, it still is in the old state (i.e. different state than primary). Thus we can't expose the primary state until after the checkpoint is sent. This fixes sporadic connection reset of client connections during failover. Sign

[PULL 05/12] virtiofsd: remove symlink fallbacks

2020-06-01 Thread Dr. David Alan Gilbert (git)
From: Miklos Szeredi Path lookup in the kernel has special rules for looking up magic symlinks under /proc. If a filesystem operation is instructed to follow symlinks (e.g. via AT_SYMLINK_FOLLOW or lack of AT_SYMLINK_NOFOLLOW), and the final component is such a proc symlink, then the target of t

[PULL 09/12] migration/colo.c: Flush ram cache only after receiving device state

2020-06-01 Thread Dr. David Alan Gilbert (git)
From: Lukas Straub If we suceed in receiving ram state, but fail receiving the device state, there will be a mismatch between the two. Fix this by flushing the ram cache only after the vmstate has been received. Signed-off-by: Lukas Straub Message-Id: <3289d007d494cb0e2f05b1cf4ae6a78d300fede3

[PULL 01/12] migration/rdma: fix potential nullptr access in rdma_start_incoming_migration

2020-06-01 Thread Dr. David Alan Gilbert (git)
From: Pan Nengyuan 'rdma' is NULL when taking the first error branch in rdma_start_incoming_migration. And it will cause a null pointer access in label 'err'. Fix that. Fixes: 59c59c67ee6b0327ae932deb303caa47919aeb1e Signed-off-by: Pan Nengyuan Message-Id: <20200508100755.7875-2-pannengy...@hu

[PULL 00/12] migration/virtiofs/hmp queue

2020-06-01 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 7ea32024c6b3ad9c88d6200e73dbf76c8e160024: Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-june-01-2020' into staging (2020-06-01 13:43:59 +0100) are available in the Git repository at: git://github.com/dagrh

[PULL 06/12] migration/vmstate: Remove unnecessary MemoryRegion forward declaration

2020-06-01 Thread Dr. David Alan Gilbert (git)
From: Philippe Mathieu-Daudé "migration/vmstate.h" only uses pointer to MemoryRegion, which is already forward declared in "qemu/typedefs.h". Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200530165512.15225-1-f4...@amsat.org> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David

[PULL 08/12] migration/colo.c: Use cpu_synchronize_all_states()

2020-06-01 Thread Dr. David Alan Gilbert (git)
From: Lukas Straub cpu_synchronize_all_pre_loadvm() marks all vcpus as dirty, so the registers are loaded from CPUState before we continue running the vm. However if we failover during checkpoint, CPUState is not initialized and the registers are loaded with garbage. This causes guest hangs and c

[PULL 04/12] hmp: Simplify qom-set

2020-06-01 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Simplify qom_set by making it use qmp_qom_set and the JSON parser. (qemu) qom-get /machine smm "auto" (qemu) qom-set /machine smm "auto" Signed-off-by: Dr. David Alan Gilbert Message-Id: <20200520151108.160598-3-dgilb...@redhat.com> Reviewed-by: Philippe Mathieu-

[PULL 02/12] migration/rdma: cleanup rdma context before g_free to avoid memleaks

2020-06-01 Thread Dr. David Alan Gilbert (git)
From: Pan Nengyuan When error happen in initializing 'rdma_return_path', we should cleanup rdma context before g_free(rdma) to avoid some memleaks. This patch fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Message-Id: <20200508100755.7875-3-pannengy...@huawei.com> Reviewed-by:

[Bug 1880332] Re: Possible regression in QEMU 5.0.0 after CVE-2020-10702 (segmentation fault)

2020-06-01 Thread Richard Henderson
This is a compiler bug affecting (at least) libcrypto.so.1.1: 179d90: d503233fpaciasp 179d94: a9bb7bfdstp x29, x30, [sp, #-80]! ... 17a400: d50323bfautiasp 17a404: f84507fdldr x29, [sp], #80 17a408: d65f03c0ret

Re: [PATCH v2 00/20] backup performance: block_status + async

2020-06-01 Thread Vladimir Sementsov-Ogievskiy
01.06.2020 21:10, Vladimir Sementsov-Ogievskiy wrote: Hi all! This a last part of original "[RFC 00/24] backup performance: block_status + async", prepartions are already merged. The series turn backup into series of block_copy_async calls, covering the whole disk, so we get block-status based

  1   2   3   >