virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Laurent Vivier <lvivier@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	kvm@vger.kernel.org, Gleb Natapov <gleb@kernel.org>,
	linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	Marc Zyngier <marc.zyngier@arm.com>,
	Paul Mackerras <paulus@samba.org>,
	Christoffer Dall <christoffer.dall@linaro.org>,
	netdev@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] KVM: Add Kconfig option to signal cross-endian guests
Date: Thu, 9 Jul 2015 16:07:47 +0300	[thread overview]
Message-ID: <20150709160626-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <559E6FBD.5050502@redhat.com>

On Thu, Jul 09, 2015 at 02:57:33PM +0200, Paolo Bonzini wrote:
> 
> 
> On 09/07/2015 11:48, Laurent Vivier wrote:
> > 
> > 
> > On 09/07/2015 09:49, Thomas Huth wrote:
> >> The option for supporting cross-endianness legacy guests in
> >> the vhost and tun code should only be available on systems
> >> that support cross-endian guests.
> > 
> > I'm sure I misunderstand something, but what happens if we use QEMU with
> > TCG instead of KVM, i.e. a big endian powerpc kernel guest on x86_64
> > little endian host ?
> 
> TCG does not yet support irqfd/ioeventfd, so it cannot be used with vhost.
> 
> Paolo

vhost does not require irqfd anymore.  I think ioeventfd actually works
fine though I didn't try, it would be easy to support.


> > Do you forbid the use of vhost in this case ?
> > 
> >> Signed-off-by: Thomas Huth <thuth@redhat.com>
> >> ---
> >>  arch/arm/kvm/Kconfig     | 1 +
> >>  arch/arm64/kvm/Kconfig   | 1 +
> >>  arch/powerpc/kvm/Kconfig | 1 +
> >>  drivers/net/Kconfig      | 1 +
> >>  drivers/vhost/Kconfig    | 1 +
> >>  virt/kvm/Kconfig         | 3 +++
> >>  6 files changed, 8 insertions(+)
> >>
> >> diff --git a/arch/arm/kvm/Kconfig b/arch/arm/kvm/Kconfig
> >> index bfb915d..9d8f363 100644
> >> --- a/arch/arm/kvm/Kconfig
> >> +++ b/arch/arm/kvm/Kconfig
> >> @@ -31,6 +31,7 @@ config KVM
> >>  	select KVM_VFIO
> >>  	select HAVE_KVM_EVENTFD
> >>  	select HAVE_KVM_IRQFD
> >> +	select KVM_CROSS_ENDIAN_GUESTS
> >>  	depends on ARM_VIRT_EXT && ARM_LPAE && ARM_ARCH_TIMER
> >>  	---help---
> >>  	  Support hosting virtualized guest machines.
> >> diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
> >> index bfffe8f..9af39fe 100644
> >> --- a/arch/arm64/kvm/Kconfig
> >> +++ b/arch/arm64/kvm/Kconfig
> >> @@ -31,6 +31,7 @@ config KVM
> >>  	select KVM_VFIO
> >>  	select HAVE_KVM_EVENTFD
> >>  	select HAVE_KVM_IRQFD
> >> +	select KVM_CROSS_ENDIAN_GUESTS
> >>  	---help---
> >>  	  Support hosting virtualized guest machines.
> >>  
> >> diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
> >> index 3caec2c..e028710 100644
> >> --- a/arch/powerpc/kvm/Kconfig
> >> +++ b/arch/powerpc/kvm/Kconfig
> >> @@ -79,6 +79,7 @@ config KVM_BOOK3S_64_HV
> >>  	select KVM_BOOK3S_HV_POSSIBLE
> >>  	select MMU_NOTIFIER
> >>  	select CMA
> >> +	select KVM_CROSS_ENDIAN_GUESTS
> >>  	---help---
> >>  	  Support running unmodified book3s_64 guest kernels in
> >>  	  virtual machines on POWER7 and PPC970 processors that have
> >> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
> >> index c18f9e6..0c4ce47 100644
> >> --- a/drivers/net/Kconfig
> >> +++ b/drivers/net/Kconfig
> >> @@ -261,6 +261,7 @@ config TUN
> >>  config TUN_VNET_CROSS_LE
> >>  	bool "Support for cross-endian vnet headers on little-endian kernels"
> >>  	default n
> >> +	depends on KVM_CROSS_ENDIAN_GUESTS
> >>  	---help---
> >>  	  This option allows TUN/TAP and MACVTAP device drivers in a
> >>  	  little-endian kernel to parse vnet headers that come from a
> >> diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
> >> index 533eaf0..4d8ae6b 100644
> >> --- a/drivers/vhost/Kconfig
> >> +++ b/drivers/vhost/Kconfig
> >> @@ -35,6 +35,7 @@ config VHOST
> >>  
> >>  config VHOST_CROSS_ENDIAN_LEGACY
> >>  	bool "Cross-endian support for vhost"
> >> +	depends on KVM_CROSS_ENDIAN_GUESTS
> >>  	default n
> >>  	---help---
> >>  	  This option allows vhost to support guests with a different byte
> >> diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig
> >> index e2c876d..cc7b28a 100644
> >> --- a/virt/kvm/Kconfig
> >> +++ b/virt/kvm/Kconfig
> >> @@ -47,3 +47,6 @@ config KVM_GENERIC_DIRTYLOG_READ_PROTECT
> >>  config KVM_COMPAT
> >>         def_bool y
> >>         depends on COMPAT && !S390
> >> +
> >> +config KVM_CROSS_ENDIAN_GUESTS
> >> +       bool
> >>

  reply	other threads:[~2015-07-09 13:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150701113150-mutt-send-email-mst@redhat.com>
2015-07-01 19:02 ` [PULL] virtio/vhost: cross endian support Linus Torvalds
2015-07-01 19:03   ` Linus Torvalds
2015-07-02  6:12     ` Michael S. Tsirkin
2015-07-02  6:01   ` Michael S. Tsirkin
2015-07-02  9:12     ` Greg Kurz
2015-07-02  9:32       ` Michael S. Tsirkin
2015-07-07 16:36         ` Thomas Huth
     [not found]         ` <20150707183653.462b5df0@thh440s>
2015-07-07 16:51           ` Michael S. Tsirkin
2015-07-09  7:49             ` [PATCH] KVM: Add Kconfig option to signal cross-endian guests Thomas Huth
     [not found]             ` <1436428145-29823-1-git-send-email-thuth@redhat.com>
2015-07-09  9:48               ` Laurent Vivier
2015-07-09 10:02               ` Christoffer Dall
2015-07-09 12:21               ` Cornelia Huck
     [not found]               ` <559E435E.9050608@redhat.com>
2015-07-09 12:57                 ` Paolo Bonzini
2015-07-09 13:07                   ` Michael S. Tsirkin [this message]
2015-07-09 18:59                     ` Thomas Huth
2015-07-13  9:24               ` Greg Kurz
2015-07-03  7:59     ` [PULL] virtio/vhost: cross endian support Michael S. Tsirkin
     [not found]     ` <20150703095637-mutt-send-email-mst@redhat.com>
2015-07-03 22:26       ` Linus Torvalds

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=20150709160626-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=christoffer.dall@linaro.org \
    --cc=gleb@kernel.org \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvivier@redhat.com \
    --cc=marc.zyngier@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=pbonzini@redhat.com \
    --cc=thuth@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=virtualization@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).