Re: [PATCH 09/20] spapr: Clarify and fix handling of nr_irqs

2019-09-26 Thread Cédric Le Goater
On 26/09/2019 03:03, David Gibson wrote: > On Wed, Sep 25, 2019 at 09:05:34AM +0200, Cédric Le Goater wrote: >> On 25/09/2019 08:45, David Gibson wrote: >>> Both the XICS and XIVE interrupt backends have a "nr-irqs" property, but >>> it means slightly different things. For XICS (or, strictly, the

Re: [PATCH 20/20] spapr: Eliminate SpaprIrq::init hook

2019-09-26 Thread Cédric Le Goater
>>> +if (spapr->irq->xive) { >>> +uint32_t nr_servers = spapr_max_server_number(spapr); >>> +DeviceState *dev; >>> +int i; >>> + >>> +dev = qdev_create(NULL, TYPE_SPAPR_XIVE); >>> +qdev_prop_set_uint32(dev, "nr-irqs", >>> + spa

Re: [PATCH v4 9/9] target/arm/kvm: host cpu: Add support for sve properties

2019-09-26 Thread Auger Eric
Hi Drew, On 9/24/19 1:31 PM, Andrew Jones wrote: > Allow cpu 'host' to enable SVE when it's available, unless the > user chooses to disable it with the added 'sve=off' cpu property. > Also give the user the ability to select vector lengths with the > sve properties. We don't adopt 'max' cpu's othe

Re: [PATCH 08/20] spapr: Replace spapr_vio_qirq() helper with spapr_vio_irq_pulse() helper

2019-09-26 Thread Philippe Mathieu-Daudé
On 9/25/19 8:45 AM, David Gibson wrote: > Every caller of spapr_vio_qirq() immediately calls qemu_irq_pulse() with > the result, so we might as well just fold that into the helper. > > Signed-off-by: David Gibson > --- > hw/char/spapr_vty.c| 3 +-- > hw/net/spapr_llan.c| 3 +-- >

Re: [PATCH 07/20] spapr: Fold spapr_phb_lsi_qirq() into its single caller

2019-09-26 Thread Philippe Mathieu-Daudé
On 9/25/19 8:45 AM, David Gibson wrote: > No point having a two-line helper that's used exactly once, and not likely > to be used anywhere else in future. > > Signed-off-by: David Gibson > --- > hw/ppc/spapr_pci.c | 3 ++- > include/hw/pci-host/spapr.h | 7 --- > 2 files changed, 2

Re: [PATCH 06/20] xics: Create sPAPR specific ICS subtype

2019-09-26 Thread Cédric Le Goater
On 26/09/2019 02:56, David Gibson wrote: > On Wed, Sep 25, 2019 at 10:55:35AM +0200, Cédric Le Goater wrote: >> On 25/09/2019 10:40, Greg Kurz wrote: >>> On Wed, 25 Sep 2019 16:45:20 +1000 >>> David Gibson wrote: >>> We create a subtype of TYPE_ICS specifically for sPAPR. For now all this >>

Re: [PATCH 13/20] spapr: Eliminate SpaprIrq:get_nodename method

2019-09-26 Thread Philippe Mathieu-Daudé
On 9/25/19 8:45 AM, David Gibson wrote: > This method is used to determine the name of the irq backend's node in the > device tree, so that we can find its phandle (after SLOF may have modified > it from the phandle we initially gave it). > > But, in the two cases the only difference between the n

Re: [PATCH 12/20] spapr: Simplify spapr_qirq() handling

2019-09-26 Thread Philippe Mathieu-Daudé
On 9/25/19 8:45 AM, David Gibson wrote: > Currently spapr_qirq() used to find the qemu_irq for an spapr global irq > number, redirects through the SpaprIrq::qirq method. But the array of > qemu_irqs is allocated in the PAPR layer, not the backends, and so the > method implementations all return th

Re: [PATCH 14/20] spapr: Remove unhelpful tracepoints from spapr_irq_free_xics()

2019-09-26 Thread Philippe Mathieu-Daudé
On 9/25/19 8:45 AM, David Gibson wrote: > These traces contain some useless information (the always-0 source#) and > have no equivalents for XIVE mode. For now just remove them, and we can > put back something more sensible if and when we need it. > > Signed-off-by: David Gibson > --- > hw/ppc/

Re: [PATCH 17/20] spapr: Remove unused return value in claim path

2019-09-26 Thread Philippe Mathieu-Daudé
On 9/25/19 8:45 AM, David Gibson wrote: > spapr_irq_claim() and the hooks it is based on return an integer error code > as well as taking an Error ** parameter. But none of the callers check the > integer, so we can remove it and just use the richer Error **. > > Signed-off-by: David Gibson > --

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

2019-09-26 Thread Marc-André Lureau
Hi On Thu, Sep 26, 2019 at 1:01 AM 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 Vi

Re: hw/s390x: why watchdog device diag288 is resetted twice?

2019-09-26 Thread David Hildenbrand
On 26.09.19 08:22, Philippe Mathieu-Daudé wrote: > Hi, > > hw/watchdog/wdt_diag288.c use 2 different resets: > > 1/ registered handler: > > qemu_register_reset(diag288_reset, diag288); > > 2/ DeviceClass reset: > > dc->reset = wdt_diag288_reset; > > diag288_reset() simply calls wdt_di

Re: [PATCH 11/20] spapr: Fix indexing of XICS irqs

2019-09-26 Thread Greg Kurz
On Thu, 26 Sep 2019 11:31:48 +1000 David Gibson wrote: > On Wed, Sep 25, 2019 at 10:17:46PM +0200, Greg Kurz wrote: > > On Wed, 25 Sep 2019 16:45:25 +1000 > > David Gibson wrote: > > > > > spapr global irq numbers are different from the source numbers on the ICS > > > when using XICS - they're

Re: [RFC PATCH] configure: deprecate 32 bit build hosts

2019-09-26 Thread Philippe Mathieu-Daudé
On 9/26/19 1:30 AM, Alex Bennée wrote: > The 32 bit hosts are already a second class citizen especially with > support for running 64 bit guests under TCG. We are also limited by > testing as actual working 32 bit machines are getting quite rare in > developers personal menageries. For TCG supporti

Re: [PATCH v2 6/7] s390x/mmu: DAT table definition overhaul

2019-09-26 Thread Thomas Huth
On 25/09/2019 14.52, David Hildenbrand wrote: > Let's use consitent names for the region/section/page table entries and > for the macros to extract relevant parts from virtual address. Make them > match the definitions in the PoP - e.g., how the televant bits are actually s/televant/relevant/ > c

Re: [PATCH v2 6/7] s390x/mmu: DAT table definition overhaul

2019-09-26 Thread David Hildenbrand
On 26.09.19 09:35, Thomas Huth wrote: > On 25/09/2019 14.52, David Hildenbrand wrote: >> Let's use consitent names for the region/section/page table entries and >> for the macros to extract relevant parts from virtual address. Make them >> match the definitions in the PoP - e.g., how the televant b

Re: [PATCH 13/20] spapr: Eliminate SpaprIrq:get_nodename method

2019-09-26 Thread Greg Kurz
On Wed, 25 Sep 2019 16:45:27 +1000 David Gibson wrote: > This method is used to determine the name of the irq backend's node in the > device tree, so that we can find its phandle (after SLOF may have modified > it from the phandle we initially gave it). > > But, in the two cases the only differe

Re: [PATCH v4 0/8] Introduce the microvm machine type

2019-09-26 Thread Christian Borntraeger
On 24.09.19 14:44, Sergio Lopez wrote: > Microvm is a machine type inspired by both NEMU and Firecracker, and > constructed after the machine model implemented by the latter. > > It's main purpose is providing users a minimalist machine type free > from the burden of legacy compatibility, servi

Re: [PATCH 14/20] spapr: Remove unhelpful tracepoints from spapr_irq_free_xics()

2019-09-26 Thread Greg Kurz
On Wed, 25 Sep 2019 16:45:28 +1000 David Gibson wrote: > These traces contain some useless information (the always-0 source#) and > have no equivalents for XIVE mode. For now just remove them, and we can > put back something more sensible if and when we need it. > > Signed-off-by: David Gibson

Re: [RFC PATCH] configure: deprecate 32 bit build hosts

2019-09-26 Thread Peter Maydell
On Thu, 26 Sep 2019 at 00:31, Alex Bennée wrote: > > The 32 bit hosts are already a second class citizen especially with > support for running 64 bit guests under TCG. We are also limited by > testing as actual working 32 bit machines are getting quite rare in > developers personal menageries. For

Re: [PATCH 15/20] spapr: Handle freeing of multiple irqs in frontend only

2019-09-26 Thread Greg Kurz
On Wed, 25 Sep 2019 16:45:29 +1000 David Gibson wrote: > spapr_irq_free() can be used to free multiple irqs at once. That's useful > for its callers, but there's no need to make the individual backend hooks > handle this. We can loop across the irqs in spapr_irq_free() itself and > have the hook

Re: [PATCH v2 6/7] s390x/mmu: DAT table definition overhaul

2019-09-26 Thread Thomas Huth
On 26/09/2019 09.38, David Hildenbrand wrote: > On 26.09.19 09:35, Thomas Huth wrote: >> On 25/09/2019 14.52, David Hildenbrand wrote: >>> Let's use consitent names for the region/section/page table entries and >>> for the macros to extract relevant parts from virtual address. Make them >>> match t

Questions about the real mode in kvm/qemu

2019-09-26 Thread Li Qiang
Hi Paolo and all, There are some question about the emulation for real mode in kvm/qemu. For all the question I suppose the 'unstrict guest' is not enabled. 1. how the protected mode CPU emulate the real mode? It seems it uses vm86, however, vm86 is not available in x86_64 CPU? So what's the 'to_

Re: [RFC PATCH] configure: deprecate 32 bit build hosts

2019-09-26 Thread Thomas Huth
On 26/09/2019 01.30, Alex Bennée wrote: > The 32 bit hosts are already a second class citizen especially with > support for running 64 bit guests under TCG. We are also limited by > testing as actual working 32 bit machines are getting quite rare in > developers personal menageries. For TCG support

Re: [PATCH v2 6/7] s390x/mmu: DAT table definition overhaul

2019-09-26 Thread David Hildenbrand
On 26.09.19 09:52, Thomas Huth wrote: > On 26/09/2019 09.38, David Hildenbrand wrote: >> On 26.09.19 09:35, Thomas Huth wrote: >>> On 25/09/2019 14.52, David Hildenbrand wrote: Let's use consitent names for the region/section/page table entries and for the macros to extract relevant parts

Re: [PATCH v2 6/7] s390x/mmu: DAT table definition overhaul

2019-09-26 Thread Thomas Huth
On 26/09/2019 09.59, David Hildenbrand wrote: > On 26.09.19 09:52, Thomas Huth wrote: >> On 26/09/2019 09.38, David Hildenbrand wrote: >>> On 26.09.19 09:35, Thomas Huth wrote: On 25/09/2019 14.52, David Hildenbrand wrote: > Let's use consitent names for the region/section/page table entri

Re: [PATCH 16/20] spapr, xics, xive: Better use of assert()s on irq claim/free paths

2019-09-26 Thread Greg Kurz
On Wed, 25 Sep 2019 16:45:30 +1000 David Gibson wrote: > The irq claim and free paths for both XICS and XIVE check for some > validity conditions. Some of these represent genuine runtime failures, > however others - particularly checking that the basic irq number is in a > sane range - could onl

Re: [PATCH] spapr/irq: Fix migration of older machine types with XIVE

2019-09-26 Thread Greg Kurz
On Thu, 26 Sep 2019 11:38:08 +1000 David Gibson wrote: > On Wed, Sep 25, 2019 at 06:07:40PM +0200, Greg Kurz wrote: > > Recent patch "spapr/irq: Only claim VALID interrupts at the KVM level" > > broke migration of older machine types started with ic-mode=xive: > > > > qemu-system-ppc64: KVM_SET_

Re: [PATCH v4 0/8] Introduce the microvm machine type

2019-09-26 Thread Sergio Lopez
Christian Borntraeger writes: > On 24.09.19 14:44, Sergio Lopez wrote: >> Microvm is a machine type inspired by both NEMU and Firecracker, and >> constructed after the machine model implemented by the latter. >> >> It's main purpose is providing users a minimalist machine type free >> from the

Re: [PATCH v4 4/9] target/arm/cpu64: max cpu: Introduce sve properties

2019-09-26 Thread Andrew Jones
On Wed, Sep 25, 2019 at 03:53:42PM +0200, Auger Eric wrote: > Hi Drew, > > On 9/24/19 1:31 PM, Andrew Jones wrote: > > Introduce cpu properties to give fine control over SVE vector lengths. > > We introduce a property for each valid length up to the current > > maximum supported, which is 2048-bit

Re: [PATCH v2 12/23] aspeed/smc: Introduce segment operations

2019-09-26 Thread Joel Stanley
On Wed, 25 Sep 2019 at 14:34, Cédric Le Goater wrote: > > AST2600 will use a different encoding for the addresses defined in the > Segment Register. > > Signed-off-by: Cédric Le Goater Acked-by: Joel Stanley

Re: [PATCH v2 19/23] m25p80: Add support for w25q512jv

2019-09-26 Thread Joel Stanley
On Wed, 25 Sep 2019 at 14:35, Cédric Le Goater wrote: > > Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley

Re: [PATCH v2 13/23] aspeed/smc: Add AST2600 support

2019-09-26 Thread Joel Stanley
On Wed, 25 Sep 2019 at 14:34, Cédric Le Goater wrote: > > The AST2600 SoC SMC controller is a SPI only controller now and has a > few extensions which we will need to take into account when SW > requires it. This is enough to support u-boot and Linux. > > Signed-off-by: Cédric Le Goater Acked-by

Re: [PATCH v2 02/23] hw/sd/aspeed_sdhci: New device

2019-09-26 Thread Joel Stanley
On Wed, 25 Sep 2019 at 14:33, Cédric Le Goater wrote: > > From: Eddie James > > The Aspeed SOCs have two SD/MMC controllers. Add a device that > encapsulates both of these controllers and models the Aspeed-specific > registers and behavior. > > Tested by reading from mmcblk0 in Linux: > qemu-syst

Re: [PATCH v2 04/23] aspeed/timer: Introduce an object class per SoC

2019-09-26 Thread Joel Stanley
On Wed, 25 Sep 2019 at 14:33, Cédric Le Goater wrote: > > The most important changes will be on the register range 0x34 - 0x3C > memops. Introduce class read/write operations to handle the > differences between SoCs. > > Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley

Re: Questions about the real mode in kvm/qemu

2019-09-26 Thread Maxim Levitsky
On Thu, 2019-09-26 at 15:52 +0800, Li Qiang wrote: > Hi Paolo and all, > > There are some question about the emulation for real mode in kvm/qemu. For > all the > question I suppose the 'unstrict guest' is not enabled. > > 1. how the protected mode CPU emulate the real mode? It seems it uses vm

Re: [PATCH v2 14/23] hw/gpio: Add in AST2600 specific implementation

2019-09-26 Thread Joel Stanley
On Wed, 25 Sep 2019 at 14:34, Cédric Le Goater wrote: > > From: Rashmica Gupta > > The AST2600 has the same sets of 3.6v gpios as the AST2400 plus an > addtional two sets of 1.8V gpios. > > Signed-off-by: Rashmica Gupta > Reviewed-by: Cédric Le Goater > Signed-off-by: Cédric Le Goater Acked-b

Re: [PATCH 17/20] spapr: Remove unused return value in claim path

2019-09-26 Thread Greg Kurz
On Wed, 25 Sep 2019 16:45:31 +1000 David Gibson wrote: > spapr_irq_claim() and the hooks it is based on return an integer error code > as well as taking an Error ** parameter. But none of the callers check the > integer, so we can remove it and just use the richer Error **. > > Signed-off-by: D

Re: [PATCH v2 05/23] aspeed/timer: Add support for control register 3

2019-09-26 Thread Joel Stanley
On Wed, 25 Sep 2019 at 14:33, Cédric Le Goater wrote: > > The AST2500 timer has a third control register that is used to > implement a set-to-clear feature for the main control register. > > This models the behaviour expected by the AST2500 while maintaining > the same behaviour for the AST2400. >

Re: [PATCH v4 8/9] target/arm/cpu64: max cpu: Support sve properties with KVM

2019-09-26 Thread Andrew Jones
On Thu, Sep 26, 2019 at 08:52:55AM +0200, Auger Eric wrote: > Hi Drew, > > On 9/24/19 1:31 PM, Andrew Jones wrote: > > Extend the SVE vq map initialization and validation with KVM's > > supported vector lengths when KVM is enabled. In order to determine > > and select supported lengths we add two

Re: [PATCH] intel_iommu: TM field should not be in reserved bits

2019-09-26 Thread Michael S. Tsirkin
On Thu, Sep 26, 2019 at 01:49:22PM +0800, qi1.zh...@intel.com wrote: > From: "Zhang, Qi" > > When dt is supported, TM field should not be Reserved(0). > > Refer to VT-d Spec 9.8 > > Signed-off-by: Zhang, Qi > Signed-off-by: Qi, Yadong > --- > hw/i386/intel_iommu.c | 7 +++ > 1 file chang

Re: [PATCH v4 9/9] target/arm/kvm: host cpu: Add support for sve properties

2019-09-26 Thread Andrew Jones
On Thu, Sep 26, 2019 at 09:07:36AM +0200, Auger Eric wrote: > Hi Drew, > > On 9/24/19 1:31 PM, Andrew Jones wrote: > > Allow cpu 'host' to enable SVE when it's available, unless the > > user chooses to disable it with the added 'sve=off' cpu property. > > Also give the user the ability to select v

Re: Questions about the real mode in kvm/qemu

2019-09-26 Thread Li Qiang
Maxim Levitsky 于2019年9月26日周四 下午4:31写道: > On Thu, 2019-09-26 at 15:52 +0800, Li Qiang wrote: > > Hi Paolo and all, > > > > There are some question about the emulation for real mode in kvm/qemu. > For all the > > question I suppose the 'unstrict guest' is not enabled. > > > > 1. how the protected m

Re: [PATCH v4 7/8] docs/microvm.txt: document the new microvm machine type

2019-09-26 Thread Paolo Bonzini
On 26/09/19 08:23, Sergio Lopez wrote: > > There's still one problem. If the Guest doesn't have TSC_DEADLINE_TIME, > Linux hangs on APIC timer calibration. I'm looking for a way to work > around this. Worst case scenario, we can check for that feature and add > both PIC and PIT if is missing. >

Re: Questions about the real mode in kvm/qemu

2019-09-26 Thread Maxim Levitsky
On Thu, 2019-09-26 at 16:52 +0800, Li Qiang wrote: > > > Maxim Levitsky 于2019年9月26日周四 下午4:31写道: > > On Thu, 2019-09-26 at 15:52 +0800, Li Qiang wrote: > > > Hi Paolo and all, > > > > > > There are some question about the emulation for real mode in kvm/qemu. > > > For all the > > > question I

Re: [PATCH v4 8/8] hw/i386: Introduce the microvm machine type

2019-09-26 Thread Paolo Bonzini
On 26/09/19 08:34, Sergio Lopez wrote: >> Isn't this inherited from TYPE_X86_MACHINE? > Good question. Should we assume all x86 based machines have NMI, or just > leave it to each board? NMI is hardcoded to exception 2 in the processor so it is there in all x86 machines. Paolo signature.asc De

Re: [PULL 00/37] QAPI patches for 2019-09-24

2019-09-26 Thread Peter Maydell
On Tue, 24 Sep 2019 at 13:42, Markus Armbruster wrote: > > The following changes since commit 2f93a3ecdd3bb060bd04f698ccafe66efd98563a: > > Merge remote-tracking branch > 'remotes/davidhildenbrand/tags/s390x-tcg-2019-09-23' into staging (2019-09-23 > 15:44:52 +0100) > > are available in the Gi

Re: Questions about the real mode in kvm/qemu

2019-09-26 Thread Paolo Bonzini
On 26/09/19 09:52, Li Qiang wrote: > Hi Paolo and all, > > There are some question about the emulation for real mode in kvm/qemu. > For all the  > question I suppose the 'unstrict guest' is not enabled.  > > 1. how the protected mode CPU emulate the real mode? It seems it uses > vm86, however, vm

Re: [PATCH 19/20] spapr: Use less cryptic representation of which irq backends are supported

2019-09-26 Thread Greg Kurz
On Wed, 25 Sep 2019 16:45:33 +1000 David Gibson wrote: > SpaprIrq::ov5 stores the value for a particular byte in PAPR option vector > 5 which indicates whether XICS, XIVE or both interrupt controllers are > available. As usual for PAPR, the encoding is kind of overly complicated > and confusing

Re: Questions about the real mode in kvm/qemu

2019-09-26 Thread Paolo Bonzini
On 26/09/19 10:59, Maxim Levitsky wrote: > If you mean to ask if there is a way to let guest access use no > paging at all, that is access host physical addresses directly, then > indeed there is no way, since regular non 'unrestricted guest' mode > required both protected mode and paging, and 'unr

Re: Questions about the real mode in kvm/qemu

2019-09-26 Thread Maxim Levitsky
On Thu, 2019-09-26 at 11:18 +0200, Paolo Bonzini wrote: > On 26/09/19 10:59, Maxim Levitsky wrote: > > If you mean to ask if there is a way to let guest access use no > > paging at all, that is access host physical addresses directly, then > > indeed there is no way, since regular non 'unrestricted

Re: Questions about the real mode in kvm/qemu

2019-09-26 Thread Paolo Bonzini
On 26/09/19 11:24, Maxim Levitsky wrote: > On Thu, 2019-09-26 at 11:18 +0200, Paolo Bonzini wrote: >> On 26/09/19 10:59, Maxim Levitsky wrote: >>> If you mean to ask if there is a way to let guest access use no >>> paging at all, that is access host physical addresses directly, then >>> indeed ther

Re: [PATCH v4 4/9] target/arm/cpu64: max cpu: Introduce sve properties

2019-09-26 Thread Auger Eric
On 9/26/19 10:21 AM, Andrew Jones wrote: > On Wed, Sep 25, 2019 at 03:53:42PM +0200, Auger Eric wrote: >> Hi Drew, >> >> On 9/24/19 1:31 PM, Andrew Jones wrote: >>> Introduce cpu properties to give fine control over SVE vector lengths. >>> We introduce a property for each valid length up to the

Re: Questions about the real mode in kvm/qemu

2019-09-26 Thread Maxim Levitsky
On Thu, 2019-09-26 at 11:15 +0200, Paolo Bonzini wrote: > On 26/09/19 09:52, Li Qiang wrote: > > Hi Paolo and all, > > > > There are some question about the emulation for real mode in kvm/qemu. > > For all the > > question I suppose the 'unstrict guest' is not enabled. > > > > 1. how the protec

Re: Questions about the real mode in kvm/qemu

2019-09-26 Thread Li Qiang
Paolo Bonzini 于2019年9月26日周四 下午5:15写道: > On 26/09/19 09:52, Li Qiang wrote: > > Hi Paolo and all, > > > > There are some question about the emulation for real mode in kvm/qemu. > > For all the > > question I suppose the 'unstrict guest' is not enabled. > > > > 1. how the protected mode CPU emulate

Re: [SeaBIOS] [PATCH v7 1/8] block: Refactor macros - fix tabbing

2019-09-26 Thread Philippe Mathieu-Daudé
On 9/25/19 1:06 PM, Sam Eiderman wrote: > From: Sam Eiderman > > Fixing tabbing in block related macros. > > Reviewed-by: Karl Heubaum > Reviewed-by: Arbel Moshe > Signed-off-by: Sam Eiderman Reviewed-by: Philippe Mathieu-Daudé > --- > hw/ide/qdev.c| 2 +- > include/hw/block/

Re: [SeaBIOS] [PATCH v7 4/8] scsi: Propagate unrealize() callback to scsi-hd

2019-09-26 Thread Philippe Mathieu-Daudé
On 9/25/19 1:06 PM, Sam Eiderman wrote: > From: Sam Eiderman > > We will need to add LCHS removal logic to scsi-hd's unrealize() in the > next commit. > > Signed-off-by: Sam Eiderman > Reviewed-by: Karl Heubaum > Reviewed-by: Arbel Moshe > Signed-off-by: Sam Eiderman Reviewed-by: Philippe M

Re: Questions about the real mode in kvm/qemu

2019-09-26 Thread Maxim Levitsky
On Thu, 2019-09-26 at 11:33 +0200, Paolo Bonzini wrote: > On 26/09/19 11:24, Maxim Levitsky wrote: > > On Thu, 2019-09-26 at 11:18 +0200, Paolo Bonzini wrote: > > > On 26/09/19 10:59, Maxim Levitsky wrote: > > > > If you mean to ask if there is a way to let guest access use no > > > > paging at all

Re: [SeaBIOS] [PATCH v7 6/8] bootdevice: Refactor get_boot_devices_list

2019-09-26 Thread Philippe Mathieu-Daudé
On 9/25/19 1:06 PM, Sam Eiderman wrote: > From: Sam Eiderman > > Move device name construction to a separate function. > > We will reuse this function in the following commit to pass logical CHS > parameters through fw_cfg much like we currently pass bootindex. > > Reviewed-by: Karl Heubaum >

Re: Questions about the real mode in kvm/qemu

2019-09-26 Thread Paolo Bonzini
On 26/09/19 11:35, Li Qiang wrote: > So without unrestrict guest the mainline is this: KVM set guest's > rflag bit X86_EFLAGS_VM, so when the guest enter guest mode, it is in > vm86 mode. In this mode, the CPU will access the address like in > real mode(seg*4+offset), this address is linear address

Re: [SeaBIOS] [PATCH v7 7/8] bootdevice: FW_CFG interface for LCHS values

2019-09-26 Thread Philippe Mathieu-Daudé
Hi Sam, On 9/25/19 1:06 PM, Sam Eiderman wrote: > From: Sam Eiderman > > Using fw_cfg, supply logical CHS values directly from QEMU to the BIOS. > > Non-standard logical geometries break under QEMU. > > A virtual disk which contains an operating system which depends on > logical geometries (co

Re: Questions about the real mode in kvm/qemu

2019-09-26 Thread Paolo Bonzini
On 26/09/19 11:41, Maxim Levitsky wrote: >> Thinking more about it, I suppose that saves memory (the same EPT page >> tables can now be used independent of guest CR0.PG), at the cost of >> making TLB misses a little slower. > Don't really understand what you mean. > Isn't this always the case that

Re: [SeaBIOS] [PATCH v7 8/8] hd-geo-test: Add tests for lchs override

2019-09-26 Thread Philippe Mathieu-Daudé
On 9/25/19 1:06 PM, Sam Eiderman wrote: > From: Sam Eiderman > > Add QTest tests to check the logical geometry override option. > > The tests in hd-geo-test are out of date - they only test IDE and do not > test interesting MBRs. > > I added a few helper functions which will make adding more te

Re: [PATCH v4 8/9] target/arm/cpu64: max cpu: Support sve properties with KVM

2019-09-26 Thread Auger Eric
On 9/26/19 10:41 AM, Andrew Jones wrote: > On Thu, Sep 26, 2019 at 08:52:55AM +0200, Auger Eric wrote: >> Hi Drew, >> >> On 9/24/19 1:31 PM, Andrew Jones wrote: >>> Extend the SVE vq map initialization and validation with KVM's >>> supported vector lengths when KVM is enabled. In order to determ

Re: Questions about the real mode in kvm/qemu

2019-09-26 Thread Maxim Levitsky
On Thu, 2019-09-26 at 12:00 +0200, Paolo Bonzini wrote: > On 26/09/19 11:41, Maxim Levitsky wrote: > > > Thinking more about it, I suppose that saves memory (the same EPT page > > > tables can now be used independent of guest CR0.PG), at the cost of > > > making TLB misses a little slower. > > > >

[PATCH v1 2/5] s390x/mmu: Implement ESOP-2 and access-exception-fetch/store-indication facility

2019-09-26 Thread David Hildenbrand
We already implement ESOP-1. For ESOP-2, we only have to indicate all protection exceptions properly. Due to EDAT-1, we already indicate DAT exceptions properly. We don't trigger KCP/ALCP/IEP exceptions yet. So all we have to do is set the TEID (TEC) to the right values (bit 56, 60, 61) in case of

[PATCH v1 0/5] s390x/mmu: Implement more facilities

2019-09-26 Thread David Hildenbrand
This is the follow up of: [PATCH-for-4.2 v1 0/9] s390x: MMU changes and extensions Without the general MMU rework. It's based on: [PATCH v2 0/7] s390x/mmu: DAT translation rewrite This series adds adds EDAT2 MMU support, and implements/indicates related facilities (ESOP-1, ESOP-2, IEP, ...

[PATCH v1 3/5] s390x/mmu: Implement Instruction-Execution-Protection Facility

2019-09-26 Thread David Hildenbrand
IEP support in the mmu is fairly easy. Set the right permissions for TLB entries and properly report an exception. Make sure to handle EDAT-2 by setting bit 56/60/61 of the TEID (TEC) to the right values. Let's keep s390_cpu_get_phys_page_debug() working even if IEP is active. Switch MMU_DATA_LOA

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

2019-09-26 Thread Tomáš Golembiovský
On Thu, Sep 26, 2019 at 11:13:32AM +0400, Marc-André Lureau wrote: > Hi > > On Thu, Sep 26, 2019 at 1:01 AM 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 > > ver

[PATCH v1 4/5] s390x/cpumodel: Prepare for changes of QEMU model

2019-09-26 Thread David Hildenbrand
Setup the 4.1 compatibility model so we can add new features to the LATEST model. Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 2 ++ target/s390x/gen-features.c | 6 +- 2 files changed, 7 insertions(+), 1 deletion(-)

[PATCH v1 1/5] s390x/mmu: Add EDAT2 translation support

2019-09-26 Thread David Hildenbrand
This only adds basic support to the DAT translation, but no EDAT2 support for TCG. E.g., the gdbstub under kvm uses this function, too, to translate virtual addresses. Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- target/s390x/mmu_helper.c | 9 + 1 file changed, 9 insert

Re: [PATCH v1 1/5] s390x/mmu: Add EDAT2 translation support

2019-09-26 Thread David Hildenbrand
On 26.09.19 12:16, David Hildenbrand wrote: > This only adds basic support to the DAT translation, but no EDAT2 support > for TCG. E.g., the gdbstub under kvm uses this function, too, to > translate virtual addresses. > > Reviewed-by: Thomas Huth > Signed-off-by: David Hildenbrand > --- > targe

Re: [PATCH v4 7/8] docs/microvm.txt: document the new microvm machine type

2019-09-26 Thread Sergio Lopez
Paolo Bonzini writes: > On 26/09/19 08:23, Sergio Lopez wrote: >> >> There's still one problem. If the Guest doesn't have TSC_DEADLINE_TIME, >> Linux hangs on APIC timer calibration. I'm looking for a way to work >> around this. Worst case scenario, we can check for that feature and add >> both

Re: [PATCH v4 7/8] docs/microvm.txt: document the new microvm machine type

2019-09-26 Thread Paolo Bonzini
On 26/09/19 12:16, Sergio Lopez wrote: >> If KVM is in use, the >> LAPIC timer frequency is known to be 1 GHz. >> >> arch/x86/kernel/kvm.c can just set >> >> lapic_timer_period = 10 / HZ; >> >> and that should disabled LAPIC calibration if TSC deadline is absent. > Given that they can

[PATCH v1 5/5] s390x/cpumodel: Add new TCG features to QEMU cpu model

2019-09-26 Thread David Hildenbrand
We now implement a bunch of new facilities we can properly indicate. ESOP-1/ESOP-2 handling is discussed in the PoP Chafter 3-15 ("Suppression on Protection"). The "Basic suppression-on-protection (SOP) facility" is a core part of z/Architecture without a facility indication. ESOP-2 is indicated b

[PATCH v14 00/14] backup-top filter driver for backup

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
Hi all! These series introduce backup-top driver. It's a filter-node, which do copy-before-write operation. Mirror uses filter-node for handling guest writes, let's move to filter-node (from write-notifiers) for backup too. v13 is queued in Max's branch, but I understand that new range locks don'

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

2019-09-26 Thread Tomáš Golembiovský
On Thu, Sep 26, 2019 at 12:16:38PM +0200, Tomáš Golembiovský wrote: > On Thu, Sep 26, 2019 at 11:13:32AM +0400, Marc-André Lureau wrote: > > Hi > > > > On Thu, Sep 26, 2019 at 1:01 AM Tomáš Golembiovský > > wrote: > > > > > > Add command for reporting devices on Windows guest. The intent is not

[PATCH v14 07/14] block: move block_copy from block/backup.c to separate file

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
Split block_copy to separate file, to be cleanly shared with backup-top filter driver in further commits. It's a clean movement, the only change is drop "static" from interface functions. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/block-copy.h | 76 ++

[PATCH v14 04/14] block/backup: improve comment about image fleecing

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/backup.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/block/backup.c b/block/backup.c index 98d7f7a905..ae28849660 100644 --- a/block/backup.c +++ b/block/backup.c @@ -747,9 +747,

[PATCH v14 01/14] block/backup: fix max_transfer handling for copy_range

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
Of course, QEMU_ALIGN_UP is a typo, it should be QEMU_ALIGN_DOWN, as we are trying to find aligned size which satisfy both source and target. Also, don't ignore too small max_transfer. In this case seems safer to disable copy_range. Fixes: 9ded4a0114968e Signed-off-by: Vladimir Sementsov-Ogievskiy

[PATCH v14 09/14] iotests: prepare 124 and 257 bitmap querying for backup-top filter

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
After backup-top filter appearing it's not possible to see dirty bitmaps in top node, so use node-name instead. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/124| 83 tests/qemu-iotests/257| 49 ++--- tests/qemu-iotests/257.

[PATCH v14 06/14] block/backup: fix block-comment style

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
We need to fix comment style around block-copy functions before further moving them to separate file to satisfy checkpatch. But do more: fix all comments style. Also, seems like doubled first asterisk is not forbidden, but drop it too for consistency. Signed-off-by: Vladimir Sementsov-Ogievskiy R

[PATCH v14 11/14] iotests: 257: drop device_add

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
SCSI devices are unused in test, drop them. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/257 | 8 --- tests/qemu-iotests/257.out | 44 -- 2 files changed, 52 deletions(-) diff --git a/tests/qemu-iotests/2

[PATCH v14 10/14] iotests: 257: drop unused Drive.device field

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
After previous commit Drive.device is actually unused. Drop it together with .name property. While being here reuse .node in qmp commands instead of writing 'drive0' twice. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/257 | 37 +++---

[PATCH v14 12/14] block: move in-flight requests handling from backup to block-copy

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
Move synchronization mechanism to block-copy, to be able to use one block-copy instance from backup job and backup-top filter in parallel. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 8 ++ block/backup.c | 52 -

[PATCH v14 05/14] block/backup: introduce BlockCopyState

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
Split copying code part from backup to "block-copy", including separate state structure and function renaming. This is needed to share it with backup-top filter driver in further commits. Notes: 1. As BlockCopyState keeps own BlockBackend objects, remaining job->common.blk users only use it to ge

[PATCH v14 03/14] block/backup: split shareable copying part from backup_do_cow

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
Split copying logic which will be shared with backup-top filter. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/backup.c | 47 --- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/block/backup.c b/block/bac

[PATCH v14 02/14] block/backup: fix backup_cow_with_offload for last cluster

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
We shouldn't try to copy bytes beyond EOF. Fix it. Fixes: 9ded4a0114968e Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/backup.c b/block/backup.c index db2024

[PATCH v14 08/14] block: teach bdrv_debug_breakpoint skip filters with backing

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
Teach bdrv_debug_breakpoint and bdrv_debug_remove_breakpoint skip filters with backing. This is needed to implement and use in backup job it's own backup_top filter driver (like mirror already has one), and without this improvement, breakpoint removal will fail at least in 55 iotest. Signed-off-by

[PATCH v14 14/14] block/backup: use backup-top instead of write notifiers

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
Drop write notifiers and use filter node instead. = Changes = 1. Add filter-node-name argument for backup qmp api. We have to do it in this commit, as 257 needs to be fixed. 2. There are no more write notifiers here, so is_write_notifier parameter is dropped from block-copy paths. 3. To sync wi

[PATCH v14 13/14] block: introduce backup-top filter driver

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
Backup-top filter caches write operations and does copy-before-write operations. The driver will be used in backup instead of write-notifiers. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/backup-top.h | 37 +++ block/backup-top.c | 244 +++

Re: [PATCH v14 14/14] block/backup: use backup-top instead of write notifiers

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
26.09.2019 13:26, Vladimir Sementsov-Ogievskiy wrote: > Drop write notifiers and use filter node instead. > > = Changes = > > 1. Add filter-node-name argument for backup qmp api. We have to do it > in this commit, as 257 needs to be fixed. > [..] > > 257: The test wants to emulate guest write

Minor regression with ramfb+gvt-g+edk2 with qemu 4.1

2019-09-26 Thread Maxim Levitsky
Hi! I noticed that with qemu 4.1, when I try to open the UEFI bios screen, the screen output is garbaged. Basicaly what happens is this: ramfb driver inside the uefi bios is hardcoded to initialize the resolution to 800x600 Then when you enter the BIOS screen, it switches the resolution to the

Re: [PULL 1/2] util/ioc.c: try to reassure Coverity about qemu_iovec_init_extended

2019-09-26 Thread Vladimir Sementsov-Ogievskiy
25.09.2019 20:43, Stefan Hajnoczi wrote: > From: Vladimir Sementsov-Ogievskiy > > Make it more obvious, that filling qiov corresponds to qiov allocation, > which in turn corresponds to total_niov calculation, based on mid_niov > (not mid_len). Still add an assertion to show that there should be n

Re: [PATCH 2/3] iotests: Disable 125 on broken XFS versions

2019-09-26 Thread Max Reitz
On 25.09.19 23:28, Eric Blake wrote: > On 9/25/19 1:32 PM, Max Reitz wrote: >> And by that I mean all XFS versions, as far as I can tell.  All details >> are in the comment below. >> >> We never noticed this problem because we only read the first number from >> qemu-img info's "disk size" output --

Re: [PATCH v2 2/4] blkdebug: Allow taking/unsharing permissions

2019-09-26 Thread Max Reitz
On 25.09.19 12:12, Vladimir Sementsov-Ogievskiy wrote: > 23.09.2019 14:57, Max Reitz wrote: >> Sometimes it is useful to be able to add a node to the block graph that >> takes or unshare a certain set of permissions for debugging purposes. >> This patch adds this capability to blkdebug. >> >> (Note

Re: [PATCH 05/22] quorum: Fix child permissions

2019-09-26 Thread Max Reitz
On 25.09.19 13:56, Vladimir Sementsov-Ogievskiy wrote: > 20.09.2019 18:27, Max Reitz wrote: >> Quorum is not actually a filter. It cannot share WRITE or RESIZE on its >> children. > > Hmm, backup-top don't want to share WRITE or RESIZE too, but it's a filter > still.. > May it be just "Quorum ca

Re: [PATCH 06/22] block: Add bdrv_recurse_can_replace()

2019-09-26 Thread Max Reitz
On 25.09.19 14:39, Vladimir Sementsov-Ogievskiy wrote: > 20.09.2019 18:27, Max Reitz wrote: >> After a couple of follow-up patches, this function will replace >> bdrv_recurse_is_first_non_filter() in check_to_replace_node(). >> >> bdrv_recurse_is_first_non_filter() is both not sufficiently specific

Re: [PATCH] i386: Add CPUID bit for CLZERO and XSAVEERPTR

2019-09-26 Thread Paolo Bonzini
On 25/09/19 23:49, Sebastian Andrzej Siewior wrote: > The CPUID bits CLZERO and XSAVEERPTR are availble on AMD's ZEN platform > and could be passed to the guest. > > Signed-off-by: Sebastian Andrzej Siewior > --- > > I tweaked the kernel to expose these flags and figured out that this is > also

Re: [PATCH 07/22] blkverify: Implement .bdrv_recurse_can_replace()

2019-09-26 Thread Max Reitz
On 25.09.19 14:56, Vladimir Sementsov-Ogievskiy wrote: > 20.09.2019 18:27, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >> block/blkverify.c | 15 +++ >> 1 file changed, 15 insertions(+) >> >> diff --git a/block/blkverify.c b/block/blkverify.c >> index 304b0a1368..0add3ab483

  1   2   3   4   >