From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:adf:db01:0:0:0:0:0 with SMTP id s1csp665322wri; Thu, 7 Nov 2019 01:00:14 -0800 (PST) X-Google-Smtp-Source: APXvYqzorgi6jzQ09nIkBNP3ID/z93Fp5oF+pzxgloCf3YAEy6aeThpeeRoc1XIrGv6myKcBV7CI X-Received: by 2002:a37:4f10:: with SMTP id d16mr1750140qkb.80.1573117214626; Thu, 07 Nov 2019 01:00:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573117214; cv=none; d=google.com; s=arc-20160816; b=IGLK6GLp4yXXuo5iqwhlepcWZbKMRzU/C1mwPzGowzebMduGWPkGcmKtSLy6UQkbjf FCCNJAiGT+3wyw8tl1b8Fwd4DXiDtW78R69ZjV2SEKsVyP4ZnjVJJdK18MjmJagVDA8V kp7KG5WwUNcN1bOkOHEsQBTzNpTAm5NeeVXqNwgrFqW5iYc6qW6+W1kqDQbohwZ58egm g5rIEJPsIDhct0Nj1Tr4Es5yJDRDcod0kTLQP0hhz4odY9a5wervo+U0s3G9xPvZ2VKx E1O+sqhJwaHdqPDCF0ySCjxQU8axe53B5NyF9EltlBlcGnCo2OnyRrVLDsO2iMvQFqVl uAEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:in-reply-to:content-disposition :mime-version:references:message-id:subject:to:from:date; bh=QncuxsSnXpZblvSAjpStc0tmPfEmXDJTLIpR6QnQ6b8=; b=sE+nMnP14LiVhTKiaWMHv/ptpUBTBZImUrGP76gLW0L1wVQT0KAAmGIUFcf2cju+ty SFSxP1AggsdnLFC1bwMYEMuZzx9M2Ay0PiXmnwJiItJpyp7ptkqkEeOff6desqSReouE VU/qTiDrjhDbfqBK1WQmXWs5mkSezKiSzUprfhBXaq+uGfqEJbNqFKGR5U9cSj0v8SFd bQP8/Iskjk5rwgF+yMaxcypP8xfw7l77vX6Yp1KQ+ZvOsNgqlIUGD1kWwOd3HG3L0ECT WGT7OBvPYYn1xXnKTn/J8BrC/IiAs1IWH5MYBHFc/hywXfxSBDNr/z1QoXbJ2RoTurLP isTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p22si894087qtk.174.2019.11.07.01.00.14 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Nov 2019 01:00:14 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:39910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSdeG-0005hb-NJ for alex.bennee@linaro.org; Thu, 07 Nov 2019 04:00:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53670) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSdbu-0004Yf-3B for qemu-devel@nongnu.org; Thu, 07 Nov 2019 03:57:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSdbr-0007pO-Qu for qemu-devel@nongnu.org; Thu, 07 Nov 2019 03:57:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48272) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iSdbr-0007jp-Hz for qemu-devel@nongnu.org; Thu, 07 Nov 2019 03:57:43 -0500 Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B016B4E832 for ; Thu, 7 Nov 2019 08:57:42 +0000 (UTC) Received: by mail-qk1-f200.google.com with SMTP id q125so1489216qka.1 for ; Thu, 07 Nov 2019 00:57:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=QncuxsSnXpZblvSAjpStc0tmPfEmXDJTLIpR6QnQ6b8=; b=ZdMmu0LpPhBI6cuS428n0iD/FfcXi5Nkvem0/X8HylCG5h39l3EF20wZYKaxa/H0SH +4KH6JGsuF0nQCjRtIcSeaKtS180ekEgXBJh7Q64bK4ELqSLVgz0eg3rw+INMRxHqjsB D7PzFky98/OoWdhvzofWbergZKfC+yArUEwtqzjrYVMq5sq28ss1EmxNHEQWke7nfDtC qNc62+JQB6m5kDK5zEq7AsxaSy8Zs4JRFFvQC42GtaMg5gt/rq6mOnAEcOGqrb7APsfK Tx2uT/+kRx0JPYsLrFvp5DR91bZvzhzlxr4AySJfRpkYsycu4BD4nulSTMp7+R/eJ6W5 dS9A== X-Gm-Message-State: APjAAAV38aazseHtVusFszH+eBf/mU4CoNoBcjA/PHnFNoCrGaZ77+7u SQY/T1WXH/m17Hn2mSMakapTagfLG0Khih21vqjD92AeKKrzemWoAOxm5s8WIrrVJTBsjdJc1Wn dGxzRptZKkkkhECw= X-Received: by 2002:a0c:ee26:: with SMTP id l6mr2333907qvs.71.1573117061959; Thu, 07 Nov 2019 00:57:41 -0800 (PST) X-Received: by 2002:a0c:ee26:: with SMTP id l6mr2333884qvs.71.1573117061677; Thu, 07 Nov 2019 00:57:41 -0800 (PST) Received: from redhat.com (bzq-79-178-12-128.red.bezeqint.net. [79.178.12.128]) by smtp.gmail.com with ESMTPSA id u4sm820380qkd.105.2019.11.07.00.57.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2019 00:57:40 -0800 (PST) Date: Thu, 7 Nov 2019 03:57:35 -0500 From: "Michael S. Tsirkin" To: Guoheyi Subject: Re: [RFC v2 11/14] linux-headers/kvm.h: add capability to forward hypercall Message-ID: <20191107035624-mutt-send-email-mst@kernel.org> References: <20191105091056.9541-1-guoheyi@huawei.com> <20191105091056.9541-12-guoheyi@huawei.com> <20191106185524.0fe51c50.cohuck@redhat.com> <4dbcbd18-0e6c-f985-c36d-96df65331d11@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4dbcbd18-0e6c-f985-c36d-96df65331d11@huawei.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Peter Maydell , Marc Zyngier , Cornelia Huck , qemu-devel@nongnu.org, qemu-arm@nongnu.org, James Morse , Paolo Bonzini , wanghaibin.wang@huawei.com, Dave Martin Errors-To: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-devel" X-TUID: XwjbNhi/FbyF On Thu, Nov 07, 2019 at 09:44:36AM +0800, Guoheyi wrote: > > > On 2019/11/7 1:55, Cornelia Huck wrote: > > On Tue, 5 Nov 2019 17:10:53 +0800 > > Heyi Guo wrote: > > > > > To keep backward compatibility, we add new KVM capability > > > "KVM_CAP_FORWARD_HYPERCALL" to probe whether KVM supports forwarding > > > hypercall to userspace. > > > > > > The capability should be enabled explicitly, for we don't want user > > > space application to deal with unexpected hypercall exits. After > > > enabling this cap, all HVC calls unhandled by kvm will be forwarded to > > > user space. > > > > > > Signed-off-by: Heyi Guo > > > Cc: Peter Maydell > > > Cc: "Michael S. Tsirkin" > > > Cc: Cornelia Huck > > > Cc: Paolo Bonzini > > > Cc: Dave Martin > > > Cc: Marc Zyngier > > > Cc: Mark Rutland > > > Cc: James Morse > > > --- > > > linux-headers/linux/kvm.h | 1 + > > > target/arm/sdei.c | 16 ++++++++++++++++ > > > target/arm/sdei.h | 2 ++ > > > 3 files changed, 19 insertions(+) > > > > > > diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h > > > index 3d9b18f7f8..36c9b3859f 100644 > > > --- a/linux-headers/linux/kvm.h > > > +++ b/linux-headers/linux/kvm.h > > > @@ -1000,6 +1000,7 @@ struct kvm_ppc_resize_hpt { > > > #define KVM_CAP_PMU_EVENT_FILTER 173 > > > #define KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 174 > > > #define KVM_CAP_HYPERV_DIRECT_TLBFLUSH 175 > > > +#define KVM_CAP_FORWARD_HYPERCALL 176 > > > #ifdef KVM_CAP_IRQ_ROUTING > > Is this cap upstream already? I would have thought your header sync > > would have brought it in, then. (Saying this, that header sync looks > > awfully small.) > > > > If it is not upstream yet, please split off this hunk into a separate > > patch -- it's a bit annoying, but makes life easier for merging. > No, it is not upstream yet. The whole framework and interfaces between KVM > and qemu are still under discussion. I'll keep in mind of this when moving > forward to next steps... > > Thanks, > HG It's best to add it in some other place meanwhile. Then we can drop it when it's in an upstream header. > > > > > > . > > >