All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Suzuki K. Poulose" <Suzuki.Poulose@arm.com>
To: Christoffer Dall <christoffer.dall@linaro.org>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: kvm-devel <kvm@vger.kernel.org>,
	Marc Zyngier <Marc.Zyngier@arm.com>,
	"timur@codeaurora.org" <timur@codeaurora.org>,
	"vgandhi@codeaurora.org" <vgandhi@codeaurora.org>,
	"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
	arm-mail-list <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] arm64/kvm: Add generic v8 KVM target
Date: Tue, 23 Jun 2015 15:03:04 +0100	[thread overview]
Message-ID: <55896718.9080600@arm.com> (raw)
In-Reply-To: <20150623123959.GF4035@cbox>

On 23/06/15 13:39, Christoffer Dall wrote:
> On Mon, Jun 22, 2015 at 09:44:48AM +0100, Peter Maydell wrote:
>> On 17 June 2015 at 10:00, Suzuki K. Poulose <suzuki.poulose@arm.com> wrote:
>>> From: "Suzuki K. Poulose" <suzuki.poulose@arm.com>
>>>
>>> This patch adds a generic ARM v8 KVM target cpu type for use
>>> by the new CPUs which eventualy ends up using the common sys_reg
>>> table. For backward compatibility the existing targets have been
>>> preserved. Any new target CPU that can be covered by generic v8
>>> sys_reg tables should make use of the new generic target.
>>
>> How do you intend this to work for cross-host migration?
>> Is the idea that the kernel guarantees that "generic" looks
>> 100% the same to the guest regardless of host hardware? I'm
>> not sure that can be made to work, given impdef differences
>> in ID register values, bp/wp registers, and so on.
>>
>> Given that, it seems to me that we still need to provide
>> KVM_ARM_TARGET_$THISCPU defines so userspace can request
>> a specific guest CPU flavour; so what does this patch
>> provide that isn't already provided by just having userspace
>> query for the "preferred" CPU type as it does already?
>>
> I'm guessing the intention is to avoid having to add code in the kernel
> to support KVM on a new CPU where nothing else needs to be done to
> support KVM on that system.
Yes, thats the *only* motivation behind the patch and doesn't address
the migration issue. May be we can create a dummy set of values for
the ID registers, which doesn't provide any 'special functionality'
so that it is safe to be migrated across any host ?

>
> Wrt. migration, I was also wondering about this.  Would the differences
> in the CPU architecture be detected when feeding back the invariant
> sysregs from userspace on VM restore?
>
> -Christoffer
>

Suzuki

WARNING: multiple messages have this Message-ID (diff)
From: Suzuki.Poulose@arm.com (Suzuki K. Poulose)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64/kvm: Add generic v8 KVM target
Date: Tue, 23 Jun 2015 15:03:04 +0100	[thread overview]
Message-ID: <55896718.9080600@arm.com> (raw)
In-Reply-To: <20150623123959.GF4035@cbox>

On 23/06/15 13:39, Christoffer Dall wrote:
> On Mon, Jun 22, 2015 at 09:44:48AM +0100, Peter Maydell wrote:
>> On 17 June 2015 at 10:00, Suzuki K. Poulose <suzuki.poulose@arm.com> wrote:
>>> From: "Suzuki K. Poulose" <suzuki.poulose@arm.com>
>>>
>>> This patch adds a generic ARM v8 KVM target cpu type for use
>>> by the new CPUs which eventualy ends up using the common sys_reg
>>> table. For backward compatibility the existing targets have been
>>> preserved. Any new target CPU that can be covered by generic v8
>>> sys_reg tables should make use of the new generic target.
>>
>> How do you intend this to work for cross-host migration?
>> Is the idea that the kernel guarantees that "generic" looks
>> 100% the same to the guest regardless of host hardware? I'm
>> not sure that can be made to work, given impdef differences
>> in ID register values, bp/wp registers, and so on.
>>
>> Given that, it seems to me that we still need to provide
>> KVM_ARM_TARGET_$THISCPU defines so userspace can request
>> a specific guest CPU flavour; so what does this patch
>> provide that isn't already provided by just having userspace
>> query for the "preferred" CPU type as it does already?
>>
> I'm guessing the intention is to avoid having to add code in the kernel
> to support KVM on a new CPU where nothing else needs to be done to
> support KVM on that system.
Yes, thats the *only* motivation behind the patch and doesn't address
the migration issue. May be we can create a dummy set of values for
the ID registers, which doesn't provide any 'special functionality'
so that it is safe to be migrated across any host ?

>
> Wrt. migration, I was also wondering about this.  Would the differences
> in the CPU architecture be detected when feeding back the invariant
> sysregs from userspace on VM restore?
>
> -Christoffer
>

Suzuki

  reply	other threads:[~2015-06-23 13:52 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17  9:00 [PATCH] arm64/kvm: Add generic v8 KVM target Suzuki K. Poulose
2015-06-17  9:00 ` Suzuki K. Poulose
2015-06-19 20:31 ` Timur Tabi
2015-06-19 20:31   ` Timur Tabi
2015-06-22  6:47   ` Marc Zyngier
2015-06-22  6:47     ` Marc Zyngier
2015-06-22  8:44 ` Peter Maydell
2015-06-22  8:44   ` Peter Maydell
2015-06-23 12:39   ` Christoffer Dall
2015-06-23 12:39     ` Christoffer Dall
2015-06-23 14:03     ` Suzuki K. Poulose [this message]
2015-06-23 14:03       ` Suzuki K. Poulose
2015-06-23 14:16       ` Peter Maydell
2015-06-23 14:16         ` Peter Maydell
2015-06-24  8:29   ` Marc Zyngier
2015-06-24  8:29     ` Marc Zyngier
2015-06-24  8:51     ` Christoffer Dall
2015-06-24  8:51       ` Christoffer Dall
2015-06-24  9:32       ` Marc Zyngier
2015-06-24  9:32         ` Marc Zyngier
2015-06-25 12:30         ` Christoffer Dall
2015-06-25 12:30           ` Christoffer Dall
2015-06-25 12:40           ` Marc Zyngier
2015-06-25 12:40             ` Marc Zyngier
2015-06-25 13:44             ` Marc Zyngier
2015-06-25 13:44               ` Marc Zyngier
2015-06-25 13:49               ` Peter Maydell
2015-06-25 13:49                 ` Peter Maydell
2015-06-26  9:53                 ` Christoffer Dall
2015-06-26  9:53                   ` Christoffer Dall
2015-06-29 17:13                   ` Chalamarla, Tirumalesh
2015-06-29 17:13                     ` Chalamarla, Tirumalesh
2015-06-29 17:30                     ` Marc Zyngier
2015-06-29 17:30                       ` Marc Zyngier
2015-06-29 17:38                       ` Peter Maydell
2015-06-29 17:38                         ` Peter Maydell
2015-06-29 17:52                         ` Marc Zyngier
2015-06-29 17:52                           ` Marc Zyngier
2015-06-29 18:39                           ` Chalamarla, Tirumalesh
2015-06-29 18:39                             ` Chalamarla, Tirumalesh
2015-07-02 20:29                             ` Chalamarla, Tirumalesh
2015-07-03  8:08                               ` Marc Zyngier
2015-07-03  8:08                                 ` Marc Zyngier
2015-07-03  8:12                                 ` Peter Maydell
2015-07-03  8:12                                   ` Peter Maydell
2015-07-03  8:28                                   ` Marc Zyngier
2015-07-03  8:28                                     ` Marc Zyngier
2015-07-03  9:34                                     ` Peter Maydell
2015-07-03  9:34                                       ` Peter Maydell
2015-07-03 10:10                                       ` Marc Zyngier
2015-07-03 10:10                                         ` Marc Zyngier
2015-07-17  9:33                                         ` Christoffer Dall
2015-07-17  9:33                                           ` Christoffer Dall
2015-07-17  9:56                                           ` Marc Zyngier
2015-07-17  9:56                                             ` Marc Zyngier
2015-07-17 10:15                                             ` Christoffer Dall
2015-07-17 10:15                                               ` Christoffer Dall
2015-07-17 10:19                                               ` Marc Zyngier
2015-07-17 10:19                                                 ` Marc Zyngier
2015-07-17 17:56                                                 ` Chalamarla, Tirumalesh
2015-07-17 17:56                                                   ` Chalamarla, Tirumalesh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55896718.9080600@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=Marc.Zyngier@arm.com \
    --cc=christoffer.dall@linaro.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=peter.maydell@linaro.org \
    --cc=timur@codeaurora.org \
    --cc=vgandhi@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.