[Qemu-devel] [PATCH 09/29] vmsvga: Account for length of command word when parsing commands

2018-08-09 Thread Liran Alon
From: Leonid Shatz While we continue to ignore SVGA_CMD_RECT_ROP_FILL, SVGA_CMD_RECT_ROP_COPY and SVGA_CMD_FENCE commands, we should account for command length, not only arguments following command code. Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw

[Qemu-devel] [PATCH 05/29] vmsvga: Show registers and commands on debug output as decimals

2018-08-09 Thread Liran Alon
From: Leonid Shatz For better readability of debug output, show these values in decimal notation, as they are defined in source by decimal integers. Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 6 +++--- 1 file changed, 3

[Qemu-devel] [PATCH 12/29] vmsvga: Add definitions of FIFO registers and report their number

2018-08-09 Thread Liran Alon
From: Leonid Shatz Import FIFO register definitions from VMware SVGA Device Developer Kit. Report number of available registers so that guest device driver can reserve enough space for registers before command FIFO. Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran

[Qemu-devel] [PATCH 08/29] vmsvga: Parse SVGA_CMD_FENCE command to avoid FIFO desync

2018-08-09 Thread Liran Alon
Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index fab6443a87e2..675c8755ab48 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display

[Qemu-devel] [PATCH 03/29] vmsvga: Explictly mark deprecated commands

2018-08-09 Thread Liran Alon
-by: Liran Alon --- hw/display/vmware_vga.c | 56 - 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index f8c5b64cfd7c..a244f43a866f 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display

[Qemu-devel] [PATCH 27/29] vmsvga: Add support for pitchlock register (a display line stride)

2018-08-09 Thread Liran Alon
-off-by: Liran Alon --- hw/display/vmware_vga.c | 43 --- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index edd336e65005..bd7202833081 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display

[Qemu-devel] [PATCH 25/29] vmsvga: Add basic support for GMR registers and FIFO commands

2018-08-09 Thread Liran Alon
We don't support GMR regions while reporting caps, but some guests may try to send us some GMR queries and we do our best to ignore them while avoiding FIFO command crash. Reported-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 55

[Qemu-devel] [PATCH 20/29] vmsvga: Use standard names for params defining hardware cursor image

2018-08-09 Thread Liran Alon
From: Leonid Shatz AND/XOR mask is a standard method for defining hardware cursor images. These are also the names suggested by VMware SVGA DevKit. Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 22 +++--- 1 file

[Qemu-devel] [PATCH 28/29] vmsvga: Introduce new function for reporting device capabilities

2018-08-09 Thread Liran Alon
From: Leonid Shatz This in only code refactoring without change in semantics. Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 45 + 1 file changed, 25 insertions(+), 20 deletions

[Qemu-devel] [PATCH 14/29] vmsvga: Setup interrupt pin

2018-08-09 Thread Liran Alon
From: Leonid Shatz This is necessary in order for device to raise interrupts. Future patches will add functionality to device which will need this ability. Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 1 + 1 file changed, 1

[Qemu-devel] [PATCH 29/29] vmsvga: Don't allow setting screen size with zero width or height

2018-08-09 Thread Liran Alon
From: Leonid Shatz Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index 389248b4badf..1803a565fa07 100644 --- a/hw/display

[Qemu-devel] [PATCH 21/29] vmsvga: Use AND mask bpp parameter in SVGA_CMD_DEFINE_CURSOR

2018-08-09 Thread Liran Alon
From: Leonid Shatz Prefer variable names of cursor structure from VMware SVGA DevKit. In addition, make sure to use the AND mask bpp parameter in SVGA_CMD_DEFINE_CURSOR. Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 26

[Qemu-devel] [PATCH 10/29] vmsvga: Remove treatment of deprecated commands as Nop

2018-08-09 Thread Liran Alon
Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index b32a625ae9c2..c30ae9b4b204 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -780,8

[Qemu-devel] [PATCH 02/29] vmsvga: Group together commands by their handling

2018-08-09 Thread Liran Alon
From: Leonid Shatz Should not change semantics. Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 60 - 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/hw/display

[Qemu-devel] [PATCH 23/29] vmsvga: Implement initial support for rgb-alpha cursors

2018-08-09 Thread Liran Alon
or no hint of visible mouse cursor. Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 85 + 1 file changed, 72 insertions(+), 13 deletions(-) diff --git a/hw/display/vmware_vga.c b/hw

[Qemu-devel] [PATCH 04/29] vmsvga: Do not print error message for ignored commands

2018-08-09 Thread Liran Alon
Future patches will add handling of commands that are parsed but deliberately ignored. This change adds required framework for avoiding printing parsing error messages for these commands, when we encounter them in the FIFO. Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display

[Qemu-devel] [PATCH 16/29] vmsvga: Add framework code for SVGA command to raise interrupt

2018-08-09 Thread Liran Alon
From: Leonid Shatz Should not change semantics. This is done as a preparation for future patches. Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/display/vmware_vga.c b

[Qemu-devel] [PATCH 11/29] vmsvga: Remove handler of SVGA_CMD_INVALID_CMD

2018-08-09 Thread Liran Alon
Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index c30ae9b4b204..f0e6b4bc74ba 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c

[Qemu-devel] [PATCH 15/29] vmsvga: Add interrupt mask and status registers

2018-08-09 Thread Liran Alon
From: Leonid Shatz Add missing functionality of interrupt mask and status registers. Writing to interrupt status register clears interrupt request. Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 52

[Qemu-devel] [PATCH 17/29] vmsvga: Define interrupt source flags for interrupt status and mask registers

2018-08-09 Thread Liran Alon
From: Leonid Shatz Based on Linux kernel drivers/gpu/drm/vmwgfx/device_include/svga_reg.h. Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/display/vmware_vga.c b

[Qemu-devel] [PATCH 00/29]: vmsvga: Various fixes and enhancements

2018-08-09 Thread Liran Alon
FIFO desync. Patches 26-27 add vmware-svga capabilities required by Linux kernel vmware-svga driver. Patch 28 is a small code refactoring change. Patch 29 disallows setting screen size to zero width/height to avoid VNC window surprisingly disappearing. Regards, -Liran Alon

[Qemu-devel] [PATCH 01/29] vmsvga: Stop using redundant fifo pointer variable

2018-08-09 Thread Liran Alon
From: Leonid Shatz Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index 0bbb78b9a6fd..60a672530840 100644

[Qemu-devel] [PATCH 06/29] vmsvga: Fix parse of SVGA_CMD_UPDATE_VERBOSE to consider additional opaque cookie

2018-08-09 Thread Liran Alon
paque cookie which is used by internal debugging tools. Third party drivers should not use this command." Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/

[Qemu-devel] [PATCH 22/29] vmsvga: Increase size of cursor AND bitmask

2018-08-09 Thread Liran Alon
From: Leonid Shatz Some guests are using 64x64 32bpp cursor pixel array, the old size of 1024 integers was not sufficient to store such large masks. Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 2 +- 1 file changed, 1

[Qemu-devel] [PATCH 13/29] vmsvga: Add support for extended FIFO registers

2018-08-09 Thread Liran Alon
requires to support the following registers: SVGA_FIFO_CAPABILITIES, SVGA_FIFO_FLAGS and SVGA_FIFO_3D_HWVERSION. For more information on how SVGA_FIFO_3D_HWVERSION is negoitated, see SVGA3D_Init() in VMware SVGA development kit. Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display

[Qemu-devel] [PATCH 07/29] vmsvga: Handle SVGA_CMD_FRONT_ROP_FILL command

2018-08-09 Thread Liran Alon
ust be SVGA_ROP_COPY */ } SVGAFifoCmdFrontRopFill; Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c in

[Qemu-devel] [PATCH 18/29] vmsvga: Add support for SVGA_IRQFLAG_FIFO_PROGRESS

2018-08-09 Thread Liran Alon
by guest in VMware SVGA development kit SVGAFIFOFull(). Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index 597051ec5c92..dc5f4681f0d3 100644

[Qemu-devel] [PATCH 19/29] vmsvga: Handle SVGA_CMD_FENCE command

2018-08-09 Thread Liran Alon
. */ Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 33 + 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index dc5f4681f0d3..73e373665bdb

[Qemu-devel] [PATCH 24/29] vmsvga: Add support for SVGA_FIFO_CAP_CURSOR_BYPASS_3

2018-08-09 Thread Liran Alon
From: Leonid Shatz This adds tracking of guest cursor position with the help of FIFO registers reporting pointing device coordindates. Signed-off-by: Leonid Shatz Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 38 +- 1

[Qemu-devel] [PATCH 26/29] vmsvga: Add basic support for display topology

2018-08-09 Thread Liran Alon
Reviewed-by: Darren Kenny Signed-off-by: Liran Alon --- hw/display/vmware_vga.c | 66 + 1 file changed, 66 insertions(+) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index b2f3456357bd..edd336e65005 100644 --- a/hw/display

Re: [Qemu-devel] [PATCH 00/29]: vmsvga: Various fixes and enhancements

2018-08-10 Thread Liran Alon
> On 10 Aug 2018, at 13:14, Gerd Hoffmann wrote: > > On Thu, Aug 09, 2018 at 02:46:13PM +0300, Liran Alon wrote: >> Hi, >> >> This patch series aim to fix many issues in vmware-svga emulation >> which have prevented it from being fully functional in a wide-va

Re: [Qemu-devel] [PATCH 06/29] vmsvga: Fix parse of SVGA_CMD_UPDATE_VERBOSE to consider additional opaque cookie

2018-08-10 Thread Liran Alon
> On 10 Aug 2018, at 13:00, Gerd Hoffmann wrote: > > Hi, > >> +if (cmd == SVGA_CMD_UPDATE_VERBOSE) >> +vmsvga_fifo_read(s); > > Code style. qemu wants braces unconditionally. There might be more of > this in following patches. You can use

Re: [Qemu-devel] [PATCH 26/29] vmsvga: Add basic support for display topology

2018-08-10 Thread Liran Alon
> On 10 Aug 2018, at 12:56, Gerd Hoffmann wrote: > > Hi, > >> +case SVGA_REG_DISPLAY_WIDTH: >> +if ((s->display_id == 0) || (s->display_id == SVGA_ID_INVALID)) >> +ret = s->new_width ? s->new_width : surface_width(surface); >> +else >> +ret = 0;

Re: [Qemu-devel] [PATCH 00/29]: vmsvga: Various fixes and enhancements

2018-08-13 Thread Liran Alon
- kra...@redhat.com wrote: > Hi, > > > > But gdm doesn't start, neither with X11 nor with wayland. Which > is a > > > regression, because the xorg vmware driver manages to handle the > current > > > qemu emulation just fine so gnome @ X11 works. > > > > Interesting. Thanks for finding

Re: [Qemu-devel] [PATCH V4 4/4] target-i386: add i440fx 0xcf8 port as coalesced_pio

2018-08-25 Thread Liran Alon
> On 25 Aug 2018, at 15:19, Peng Hao wrote: > > diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c > index 0e60834..da73743 100644 > --- a/hw/pci-host/piix.c > +++ b/hw/pci-host/piix.c > @@ -327,6 +327,10 @@ static void i440fx_pcihost_realize(DeviceState *dev, > Error **errp) > >

[Qemu-devel] [PATCH] KVM: x86: Add support for save/load MSR_SMI_COUNT

2018-02-27 Thread Liran Alon
This MSR returns the number of #SMIs that occurred on CPU since boot. KVM commit 52797bf9a875 ("KVM: x86: Add emulation of MSR_SMI_COUNT") introduced support for emulating this MSR. This commit adds support for QEMU to save/load this MSR for migration purposes. Signed-off-by:

Re: [Qemu-devel] [PATCH] KVM: x86: Add support for save/load MSR_SMI_COUNT

2018-03-12 Thread Liran Alon
gt; > CPU since boot. > > > > KVM commit 52797bf9a875 ("KVM: x86: Add emulation of > MSR_SMI_COUNT") > > introduced support for emulating this MSR. > > > > This commit adds support for QEMU to save/load this > > MSR for migration purposes. > &

Re: [Qemu-devel] [PATCH] KVM: x86: Add support for save/load MSR_SMI_COUNT

2018-03-06 Thread Liran Alon
rt for emulating this MSR. > > This commit adds support for QEMU to save/load this > MSR for migration purposes. > > Signed-off-by: Liran Alon <liran.a...@oracle.com> > Reviewed-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> > Signed-off-by: Konrad Rzeszutek Wilk &l

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-10-08 Thread Liran Alon
Gentle ping on v2 of this series. (I noticed 1st patch of series was already applied) Thanks, -Liran > On 16 Sep 2018, at 15:46, Liran Alon wrote: > > Hi, > > This series aims to add support for QEMU to be able to migrate VMs that > are running nested hypervisors.

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-10-15 Thread Liran Alon
Another gentle ping on v2 of this series? Patch was submitted a month ago. Thanks, -Liran > On 8 Oct 2018, at 20:21, Liran Alon wrote: > > Gentle ping on v2 of this series. > (I noticed 1st patch of series was already applied) > > Thanks, > -Liran > >> On 16

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-01 Thread Liran Alon
> On 1 Nov 2018, at 15:10, Dr. David Alan Gilbert wrote: > > * Liran Alon (liran.a...@oracle.com) wrote: >> >> >>> On 31 Oct 2018, at 20:59, Dr. David Alan Gilbert >>> wrote: >>> >>> * Liran Alon (liran.a...@oracle.com) wrote:

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-10-31 Thread Liran Alon
> On 31 Oct 2018, at 20:19, Paolo Bonzini wrote: > > On 31/10/2018 19:17, Eduardo Habkost wrote: >> On Wed, Oct 31, 2018 at 03:03:34AM +0200, Liran Alon wrote: >>> Ping. >>> Patch was submitted almost two months ago and I haven’t seen any respond >&g

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-10-31 Thread Liran Alon
> On 31 Oct 2018, at 20:59, Dr. David Alan Gilbert wrote: > > * Liran Alon (liran.a...@oracle.com) wrote: >> >> >>> On 31 Oct 2018, at 20:19, Paolo Bonzini wrote: >>> >>> On 31/10/2018 19:17, Eduardo Habkost wrote: >>>>

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-10-30 Thread Liran Alon
Ping. Patch was submitted almost two months ago and I haven’t seen any respond for the v2 of this series. Thanks, -Liran > On 15 Oct 2018, at 21:10, Liran Alon wrote: > > Another gentle ping on v2 of this series? > Patch was submitted a month ago. > > Thanks, > -Lira

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-02 Thread Liran Alon
> On 2 Nov 2018, at 18:39, Jim Mattson wrote: > > On Thu, Nov 1, 2018 at 8:46 PM, Liran Alon wrote: > >> Hmm this makes sense. >> >> This means though that the patch I have submitted here isn't good enough. >> My patch currently assumes that when

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-01 Thread Liran Alon
> On 1 Nov 2018, at 17:56, Dr. David Alan Gilbert wrote: > > * Liran Alon (liran.a...@oracle.com) wrote: >> >> >>> On 1 Nov 2018, at 15:10, Dr. David Alan Gilbert wrote: >>> >>> * Liran Alon (liran.a...@oracle.com) wrote: >>>>

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-02 Thread Liran Alon
> On 2 Nov 2018, at 11:40, Paolo Bonzini wrote: > > On 02/11/2018 04:46, Liran Alon wrote: >>> On Thu, Nov1, 2018 at 09:45 AM, Jim Mattson wrote: >> >>>> On Thu, Nov 1, 2018 at 8:56 AM, Dr. David Alan Gilbert >>>> wrote: >> >>

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-01 Thread Liran Alon
> On Thu, Nov1, 2018 at 09:45 AM, Jim Mattson wrote: >> On Thu, Nov 1, 2018 at 8:56 AM, Dr. David Alan Gilbert >> wrote: >> So if I have matching host kernels it should always work? >> What happens if I upgrade the source kernel to increase it's maximum >> nested size, can I force it to keep

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-07 Thread Liran Alon
Ping on my last reply. I would like to reach to an agreement on how v3 should look like before just implementing what I think is right. Thanks, -Liran > On 3 Nov 2018, at 4:02, Liran Alon wrote: > > > >> On 2 Nov 2018, at 18:39, Jim Mattson wrote: >> >>

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-08 Thread Liran Alon
> On 8 Nov 2018, at 11:50, Paolo Bonzini wrote: > > On 08/11/2018 01:45, Jim Mattson wrote: >> I have no attachments to the current design. I had used a data[] blob, >> because I didn't think userspace would have any need to know what was >> in there. However, I am now seeing the error of my

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-08 Thread Liran Alon
> On 8 Nov 2018, at 19:02, Paolo Bonzini wrote: > > On 08/11/2018 10:57, Liran Alon wrote: >> >> >>> On 8 Nov 2018, at 11:50, Paolo Bonzini wrote: >>> >>> On 08/11/2018 01:45, Jim Mattson wrote: >>>> I have no attachments to

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-12 Thread Liran Alon
> On 12 Nov 2018, at 18:50, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: >> On Sun, Nov 04, 2018 at 11:19:57PM +0100, Paolo Bonzini wrote: >>> On 02/11/2018 17:54, Daniel P. Berrangé wrote: We have usually followed a rule that new machine types must

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-12 Thread Liran Alon
> On 12 Nov 2018, at 18:54, Daniel P. Berrangé wrote: > > On Mon, Nov 12, 2018 at 04:50:54PM +, Dr. David Alan Gilbert wrote: >> * Daniel P. Berrangé (berra...@redhat.com) wrote: >>> On Sun, Nov 04, 2018 at 11:19:57PM +0100, Paolo Bonzini wrote: On 02/11/2018 17:54, Daniel P.

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-12 Thread Liran Alon
> On 13 Nov 2018, at 2:07, Jim Mattson wrote: > > On Mon, Nov 12, 2018 at 4:00 PM, Liran Alon wrote: >> >> >>> On 12 Nov 2018, at 18:54, Daniel P. Berrangé wrote: >>> >>> On Mon, Nov 12, 2018 at 04:50:54PM +, Dr. David Alan

Re: [Qemu-devel] [PATCH 2/2] KVM: i386: Add support for save and restore nested state

2018-09-14 Thread Liran Alon
> On 14 Sep 2018, at 13:59, Paolo Bonzini wrote: > > On 14/09/2018 11:54, Liran Alon wrote: >>> On 14/09/2018 09:16, Paolo Bonzini wrote: >>> Heh, I was going to send a similar patch. However, things are a bit >>> more complex for two reason. >>&g

Re: [Qemu-devel] [PATCH 2/2] KVM: i386: Add support for save and restore nested state

2018-09-15 Thread Liran Alon
> On 14 Sep 2018, at 18:08, Paolo Bonzini wrote: > > On 14/09/2018 16:31, Liran Alon wrote: >>> There is still a problem, however, in that the same input stream would >>> be parsed differently depending on the kernel version. In particular, >>> if in the

Re: [Qemu-devel] [PATCH 2/2] KVM: i386: Add support for save and restore nested state

2018-09-15 Thread Liran Alon
> On 15 Sep 2018, at 23:48, Liran Alon wrote: > > > >> On 14 Sep 2018, at 18:08, Paolo Bonzini wrote: >> >> On 14/09/2018 16:31, Liran Alon wrote: >>>> There is still a problem, however, in that the same input stream would >>>>

[Qemu-devel] [QEMU PATCH v2 1/2] i386: Compile CPUX86State xsave_buf only when support KVM or HVF

2018-09-16 Thread Liran Alon
While at it, also rename var to indicate it is not used only in KVM. Reviewed-by: Nikita Leshchenko Reviewed-by: Patrick Colp Reviewed-by: Mihai Carabas Signed-off-by: Liran Alon --- target/i386/cpu.h | 4 +++- target/i386/hvf/README.md | 2 +- target/i386/hvf/hvf.c | 2

[Qemu-devel] [QEMU PATCH v2 2/2] KVM: i386: Add support for save and restore nested state

2018-09-16 Thread Liran Alon
by: Nikita Leshchenko Reviewed-by: Patrick Colp Reviewed-by: Mihai Carabas Signed-off-by: Liran Alon --- accel/kvm/kvm-all.c | 15 +++ include/sysemu/kvm.h | 1 + target/i386/cpu.h | 2 ++ target/i386/kvm.c | 58 target/i386/mach

[Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-09-16 Thread Liran Alon
Hi, This series aims to add support for QEMU to be able to migrate VMs that are running nested hypervisors. In order to do so, it utilizes the new IOCTLs introduced in KVM commit 8fcc4b5923af ("kvm: nVMX: Introduce KVM_CAP_NESTED_STATE") which were created for this purpose. 1st patch is not

[Qemu-devel] [PATCH 2/2] KVM: i386: Add support for save and restore nested state

2018-09-13 Thread Liran Alon
by: Nikita Leshchenko Reviewed-by: Patrick Colp Signed-off-by: Liran Alon --- accel/kvm/kvm-all.c | 14 + include/sysemu/kvm.h | 1 + target/i386/cpu.h | 2 ++ target/i386/kvm.c | 58 +++ target/i386/mach

[Qemu-devel] [PATCH 1/2] i386: Compile CPUX86State xsave_buf only when support KVM or HVF

2018-09-13 Thread Liran Alon
While at it, also rename var to indicate it is not used only in KVM. Reviewed-by: Nikita Leshchenko Reviewed-by: Patrick Colp Signed-off-by: Liran Alon --- target/i386/cpu.h | 4 +++- target/i386/hvf/README.md | 2 +- target/i386/hvf/hvf.c | 2 +- target/i386/hvf/x86hvf.c | 4

[Qemu-devel] [PATCH 0/2]: KVM: i386: Add support for save and restore nested state

2018-09-13 Thread Liran Alon
Hi, This series aims to add support for QEMU to be able to migrate VMs that are running nested hypervisors. In order to do so, it utilizes the new IOCTLs introduced in KVM commit 8fcc4b5923af ("kvm: nVMX: Introduce KVM_CAP_NESTED_STATE") which were created for this purpose. 1st patch is not

Re: [Qemu-devel] [PATCH 2/2] KVM: i386: Add support for save and restore nested state

2018-09-14 Thread Liran Alon
>On 14/09/2018 09:16, Paolo Bonzini wrote: >Heh, I was going to send a similar patch. However, things are a bit >more complex for two reason. > >First, I'd prefer to reuse the hflags and hflags2 fields that we already >have, and only store the VMCS blob in the subsection. For example,

Re: [Qemu-devel] [PATCH v2] ioapic: allow buggy guests mishandling level-triggered interrupts to make progress

2019-04-02 Thread Liran Alon
Signed-off-by: Vitaly Kuznetsov I have only small minor refactoring comments inline. Reviewed-by: Liran Alon -Liran > --- > Changes since v1: > - timer_mod() -> timer_mod_anticipate() [Paolo Bonzini] > - Massaged changelog [Liran Alon] > - Make implementa

Re: [Qemu-devel] [PATCH v2] ioapic: allow buggy guests mishandling level-triggered interrupts to make progress

2019-04-02 Thread Liran Alon
> On 2 Apr 2019, at 12:06, Paolo Bonzini wrote: > > On 02/04/19 10:23, Liran Alon wrote: >>> +#define SUCCESSIVE_IRQ_MAX_COUNT 1 >>> + >>> +static void ioapic_timer(void *opaque) >> I suggest rename method to something such as >> “del

Re: [Qemu-devel] [PATCH v2] ioapic: allow buggy guests mishandling level-triggered interrupts to make progress

2019-04-02 Thread Liran Alon
> On 2 Apr 2019, at 13:20, Paolo Bonzini wrote: > > On 02/04/19 11:08, Liran Alon wrote: >>> - >>> -if (((entry >> IOAPIC_LVT_TRIGGER_MODE_SHIFT) & 1) != >>> -IOAPIC_TRIGGER_LEVEL) { >&g

Re: [Qemu-devel] [PATCH] ioapic: allow buggy guests mishandling level-triggered interrupts to make progress

2019-04-01 Thread Liran Alon
> On 1 Apr 2019, at 18:58, Vitaly Kuznetsov wrote: > > Liran Alon writes: > >>> On 1 Apr 2019, at 16:36, Vitaly Kuznetsov wrote: >>> >>> It was found that Hyper-V 2016 on KVM in some configurations (q35 machine + >>> piix4-usb-uhci) hangs

Re: [Qemu-devel] [PATCH] ioapic: allow buggy guests mishandling level-triggered interrupts to make progress

2019-04-01 Thread Liran Alon
> On 1 Apr 2019, at 20:28, Vitaly Kuznetsov wrote: > > Liran Alon writes: > >>> On 1 Apr 2019, at 18:58, Vitaly Kuznetsov wrote: >>> >>> Liran Alon writes: >>> >>>>> On 1 Apr 2019, at 16:36, Vitaly Kuznetsov wr

Re: [Qemu-devel] [PATCH] ioapic: allow buggy guests mishandling level-triggered interrupts to make progress

2019-04-01 Thread Liran Alon
> On 1 Apr 2019, at 16:36, Vitaly Kuznetsov wrote: > > It was found that Hyper-V 2016 on KVM in some configurations (q35 machine + > piix4-usb-uhci) hangs on boot. Trace analysis led us to the conclusion that > it is mishandling level-triggered interrupt performing EOI without fixing > the

Re: [Qemu-devel] [PATCH 0/3] vhost-scsi: Support live migration

2019-04-08 Thread Liran Alon
ared-storage (i.e. iSCSI), there is no reason to limit the >> orchestrator from being able to explictly specify it wish to enable >> migration even when VM have a vhost-scsi device. >> >> Liran Alon (1): >> vhost-scsi: Allow user to enable migration >> >> Nir W

Re: [Qemu-devel] [PATCH 0/3] vhost-scsi: Support live migration

2019-04-10 Thread Liran Alon
ictly specify it wish to enable >> migration even when VM have a vhost-scsi device. >> >> Liran Alon (1): >> vhost-scsi: Allow user to enable migration >> >> Nir Weiner (2): >> vhost-scsi: The vhost device should be stopped when the VM is not >

Re: [Qemu-devel] [PATCH 0/3] vhost-scsi: Support live migration

2019-04-15 Thread Liran Alon
> On 15 Apr 2019, at 12:37, Stefan Hajnoczi wrote: > > On Thu, Apr 11, 2019 at 01:45:06AM +0300, Liran Alon wrote: >> >> >>> On 9 Apr 2019, at 17:29, Stefan Hajnoczi wrote: >>> >>> On Thu, Mar 21, 2019 at 09:55:42AM +0200, Nir Weiner w

[Qemu-devel] [PATCH v2 1/3] vhost-scsi: The vhost backend should be stopped when the VM is not running

2019-04-16 Thread Liran Alon
rnel module”) Reviewed-by: Bijan Mottahedeh Reviewed-by: Liran Alon Signed-off-by: Nir Weiner --- hw/scsi/vhost-scsi.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index 61e2e57da9d5..ca42cff1b907 100644 --- a/hw/scsi/vhost-scsi.c +++ b/hw/scsi/v

[Qemu-devel] [PATCH v2 3/3] vhost-scsi: Allow user to enable migration

2019-04-16 Thread Liran Alon
his commit allows orchestrator to explictly specify that it is responsbile for taking care of requirement (4) and therefore vhost-scsi should not add a migration blocker. Reviewed-by: Nir Weiner Reviewed-by: Bijan Mottahedeh Signed-off-by: Liran Alon --- hw/scsi/vhost-scsi.c |

[Qemu-devel] [PATCH v2 0/3] vhost-scsi: Support migration

2019-04-16 Thread Liran Alon
Hi, This patch series aims to add supprot to migrate a VM with a vhost-scsi device. The 1st patch fixes a bug of mistakenly not stopping vhost-scsi backend when a VM is stopped (As happens on migratino pre-copy completion). The 2nd patch adds ability to save/load vhost-scsi device state in

[Qemu-devel] [PATCH v2 2/3] vhost-scsi: Add VMState descriptor

2019-04-16 Thread Liran Alon
. Reviewed-by: Bijan Mottahedeh Reviewed-by: Liran Alon Signed-off-by: Nir Weiner --- hw/scsi/vhost-scsi.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index ca42cff1b907..eb0cf9e1312f 100644 --- a/hw/scsi/vhost-scsi.c +++ b/hw

Re: [Qemu-devel] [PATCH v2 0/3] vhost-scsi: Support migration

2019-06-02 Thread Liran Alon
7:38:57PM +0300, Liran Alon wrote: >>> >>> >>>> On 18 Apr 2019, at 12:41, Stefan Hajnoczi wrote: >>>> >>>> On Tue, Apr 16, 2019 at 03:59:09PM +0300, Liran Alon wrote: >>>>> Hi, >>>>> >>>>> This patch

Re: [Qemu-devel] QEMU/KVM migration backwards compatibility broken?

2019-06-06 Thread Liran Alon
> On 6 Jun 2019, at 11:42, Dr. David Alan Gilbert wrote: > > * Liran Alon (liran.a...@oracle.com) wrote: >> Hi, >> >> Looking at QEMU source code, I am puzzled regarding how migration backwards >> compatibility is preserved regarding X86CPU. >> >&

Re: [Qemu-devel] QEMU/KVM migration backwards compatibility broken?

2019-06-06 Thread Liran Alon
> On 6 Jun 2019, at 12:23, Dr. David Alan Gilbert wrote: > > * Liran Alon (liran.a...@oracle.com) wrote: >> >> >>> On 6 Jun 2019, at 11:42, Dr. David Alan Gilbert wrote: >>> >>> * Liran Alon (liran.a...@oracle.com) wrote: >>>&

[Qemu-devel] QEMU/KVM migration backwards compatibility broken?

2019-06-05 Thread Liran Alon
Hi, Looking at QEMU source code, I am puzzled regarding how migration backwards compatibility is preserved regarding X86CPU. As I understand it, fields that are based on KVM capabilities and guest runtime usage are defined in VMState subsections in order to not send them if not necessary.

Re: [Qemu-devel] QEMU/KVM migration backwards compatibility broken?

2019-06-06 Thread Liran Alon
> On 6 Jun 2019, at 14:07, Dr. David Alan Gilbert wrote: > > * Liran Alon (liran.a...@oracle.com) wrote: >> >> >>> On 6 Jun 2019, at 13:39, Dr. David Alan Gilbert wrote: >>> >>> * Liran Alon (liran.a...@oracle.com) wrote: >>>>

Re: [Qemu-devel] QEMU/KVM migration backwards compatibility broken?

2019-06-06 Thread Liran Alon
> On 6 Jun 2019, at 13:39, Dr. David Alan Gilbert wrote: > > * Liran Alon (liran.a...@oracle.com) wrote: >> >> >>> On 6 Jun 2019, at 12:23, Dr. David Alan Gilbert wrote: >>> >>> * Liran Alon (liran.a...@oracle.com) wrote: >>>>

Re: [Qemu-devel] QEMU/KVM migration backwards compatibility broken?

2019-06-06 Thread Liran Alon
> On 6 Jun 2019, at 16:31, Dr. David Alan Gilbert wrote: > >>> >>> So we still need to tie subsections to machine types; that way >>> you don't send them to old qemu's and there for you don't have the >>> problem of the qemu receiving something it doesn't know. >> >> I agree that if there is

Re: [Qemu-devel] [PATCH 6/7] KVM: i386: Add support for save and restore nested state

2019-06-14 Thread Liran Alon
> On 15 Jun 2019, at 3:42, Paolo Bonzini wrote: > > From: Liran Alon > > Kernel commit 8fcc4b5923af ("kvm: nVMX: Introduce KVM_CAP_NESTED_STATE") > introduced new IOCTLs to extract and restore KVM internal state used to > run a VM that is in VMX operation. &

Re: [Qemu-devel] [PATCH 3/7] KVM: i386: Add support for KVM_CAP_EXCEPTION_PAYLOAD

2019-06-14 Thread Liran Alon
> On 15 Jun 2019, at 3:42, Paolo Bonzini wrote: > > From: Liran Alon > > Kernel commit c4f55198c7c2 ("kvm: x86: Introduce KVM_CAP_EXCEPTION_PAYLOAD") > introduced a new KVM capability which allows userspace to correctly > distinguish between

Re: [Qemu-devel] [PATCH 1/7] KVM: i386: Use symbolic constant for #DB/#BP exception constants

2019-06-14 Thread Liran Alon
> On 15 Jun 2019, at 3:42, Paolo Bonzini wrote: > > From: Liran Alon > > Reviewed-by: Nikita Leshenko > Signed-off-by: Liran Alon > Signed-off-by: Paolo Bonzini > --- > target/i386/kvm.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > &

Re: [Qemu-devel] [QEMU PATCH v3 7/9] KVM: i386: Add support for save and restore nested state

2019-06-18 Thread Liran Alon
> On 18 Jun 2019, at 18:48, Dr. David Alan Gilbert wrote: > > * Liran Alon (liran.a...@oracle.com) wrote: >> >>> On 18 Jun 2019, at 12:03, Dr. David Alan Gilbert >>> wrote: >>> >>> * Liran Alon (liran.a...@oracle.com) wrote: >>>

Re: [Qemu-devel] [QEMU PATCH v3 8/9] KVM: i386: Add support for KVM_CAP_EXCEPTION_PAYLOAD

2019-06-18 Thread Liran Alon
> On 18 Jun 2019, at 12:07, Dr. David Alan Gilbert wrote: > > * Liran Alon (liran.a...@oracle.com) wrote: >> Kernel commit c4f55198c7c2 ("kvm: x86: Introduce KVM_CAP_EXCEPTION_PAYLOAD") >> introduced a new KVM capability which allows userspace to correctly

Re: [Qemu-devel] [QEMU PATCH v3 6/9] vmstate: Add support for kernel integer types

2019-06-18 Thread Liran Alon
> On 18 Jun 2019, at 11:55, Dr. David Alan Gilbert wrote: > > * Liran Alon (liran.a...@oracle.com) wrote: >> Reviewed-by: Nikita Leshenko >> Reviewed-by: Maran Wilson >> Signed-off-by: Liran Alon >> --- >> include/migration/vmstate.h | 18

Re: [Qemu-devel] [QEMU PATCH v3 7/9] KVM: i386: Add support for save and restore nested state

2019-06-18 Thread Liran Alon
> On 18 Jun 2019, at 12:03, Dr. David Alan Gilbert wrote: > > * Liran Alon (liran.a...@oracle.com) wrote: >> >> +static const VMStateDescription vmstate_vmx_vmcs12 = { >> +.name = "cpu/kvm_nested_state/vmx/vmcs12", >> +.version_id = 1, >&

Re: [Qemu-devel] [PATCH 0/2] target/i386: kvm: Fix treatment of AMD SVM in nested migration

2019-06-22 Thread Liran Alon
> On 22 Jun 2019, at 5:39, no-re...@patchew.org wrote: > > Patchew URL: >

[Qemu-devel] [PATCH] target/i386: kvm: Fix when nested state is needed for migration

2019-06-24 Thread Liran Alon
ode to require saving nested-state as part of migration stream in case it is set. Reviewed-by: Karl Heubaum Signed-off-by: Liran Alon --- target/i386/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/machine.c b/target/i386/machine.c index 851b249d1

Re: [Qemu-devel] [PATCH 3/7] KVM: i386: Add support for KVM_CAP_EXCEPTION_PAYLOAD

2019-06-17 Thread Liran Alon
> On 16 Jun 2019, at 15:38, Liran Alon wrote: > > > >> On 15 Jun 2019, at 3:57, Liran Alon wrote: >> >>> On 15 Jun 2019, at 3:42, Paolo Bonzini wrote: >>> >>> From: Liran Alon >>> >>> +static bool is_vmx_enabled(CPUX

[Qemu-devel] [QEMU PATCH v3 6/9] vmstate: Add support for kernel integer types

2019-06-17 Thread Liran Alon
Reviewed-by: Nikita Leshenko Reviewed-by: Maran Wilson Signed-off-by: Liran Alon --- include/migration/vmstate.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 9224370ed59a..a85424fb0483 100644

Re: [Qemu-devel] [PATCH 4/7] linux-headers: import improved definition of KVM_GET/SET_NESTED_STATE structs

2019-06-17 Thread Liran Alon
> On 17 Jun 2019, at 20:32, Paolo Bonzini wrote: > > On 16/06/19 10:29, Liran Alon wrote: >> >> I think this is cleaner. >> >> -Liran > > Yes, it is. I'll post it to k...@vger.kernel.org. Are you going to send > v2 of this series or shall I? >

[Qemu-devel] [QEMU PATCH v3 4/9] KVM: i386: Block migration for vCPUs exposed with nested virtualization

2019-06-17 Thread Liran Alon
e from KVM that should be migrated as part of vCPU VMState. E.g. Whether vCPU is running in guest-mode or host-mode. Fixes: d98f26073beb ("target/i386: kvm: add VMX migration blocker") Signed-off-by: Liran Alon --- target/i386/cpu.c | 6 -- target/i386/cpu.h | 24 ta

[Qemu-devel] [QEMU PATCH v3 5/9] linux-headers: i386: Modify struct kvm_nested_state to have explicit fields for data

2019-06-17 Thread Liran Alon
odifying these structs, I also modified the following: * Define the "format" field values as macros. * Rename vmcs_pa to vmcs12_pa for better readability. * Add stub structs for AMD SVM. Signed-off-by: Liran Alon --- linux-headers/asm-x86/kvm.h | 41 +++

[Qemu-devel] [QEMU PATCH v3 8/9] KVM: i386: Add support for KVM_CAP_EXCEPTION_PAYLOAD

2019-06-17 Thread Liran Alon
e this new KVM capability (KVM_CAP_EXCEPTION_PAYLOAD). Reviewed-by: Nikita Leshenko Signed-off-by: Liran Alon --- target/i386/cpu.c| 6 ++- target/i386/cpu.h| 6 ++- target/i386/hvf/hvf.c| 10 ++-- target/i386/hvf/x86hvf.c | 4 +- target/i386/kvm.c

[Qemu-devel] [QEMU PATCH v3 2/9] KVM: i386: Use symbolic constant for #DB/#BP exception constants

2019-06-17 Thread Liran Alon
Reviewed-by: Nikita Leshenko Reviewed-by: Krish Sadhukhan Signed-off-by: Liran Alon --- target/i386/kvm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 29889aa6b001..738dd91ff3cc 100644 --- a/target/i386/kvm.c +++ b

  1   2   3   >