From nobody Sun Nov 03 15:39:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XhJgv2cjtz5cKns; Sun, 03 Nov 2024 15:39:55 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XhJgt4zwhz4JLY; Sun, 3 Nov 2024 15:39:54 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-6cbd005d0f9so25542766d6.3; Sun, 03 Nov 2024 07:39:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730648393; x=1731253193; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=mMxFRKFnl7O+DayhaDOp04PX2kTZlL0pEAM5JH+3+mo=; b=DYnz56Dc043w+EdMgzyxSf17UkusHYhnjseKON0KfTNZuP9LHKxhlx5dTTNRYf++BN PPSU2rN/cLXIY0Avw6dp/D0d8gj9AoAMYC08kYx1cmj5XHObHEYLc4845NgpXeQeglw4 ICEPk9iFDBN4QnhXJjwmtEY5tnvQ6XK9nurvdexDZ3MP565Ue4gHRa5qVxd+IdsF29Fl o7oMCE6ZVRCkF8g1TDHCS6dnIDMa7lZGIkXNwa1l85L17Nbknd2xRAZwjmMSKg4mVkjk j857BhBdUrtIJ+gMVTClh7TCtwkPvL9N88ZXDS+x35U6g+18/3kmPwctQymEg+7dEoT5 evHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730648393; x=1731253193; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mMxFRKFnl7O+DayhaDOp04PX2kTZlL0pEAM5JH+3+mo=; b=qlBJ7M0e2bJQST/crtIBWaVjmJ3P5h3azk2663Kjsu1+Nbcwbeb3iEcqq86JdIgQVw hyffaeeO9D3RDKJLoksdahmtHHxF4tN8uBJRzRuTPM3/zBJgEvMCf3FcvRzMBSgooh2V L2twm4cfpN7qaOR2lE9SyVYmMtQuNYma2m1NWvvDuEMhiz8x2GM8NSZ/RjJDFcP+H6J5 adk8PbD/e79slUhHWBqU9yOeBd2d6TVTKqqHdCeYT5r0IU+XAOoR+ZcjaTlasOPNwjTO PrHcOXNAsrWVBu+ds8+9PKyPWqUvM8FyBixSwTsdKzXYSRvx8tRT59izTUdZZI9f3oQ5 iPqA== X-Forwarded-Encrypted: i=1; AJvYcCX6ZD8fJ7axrMVOCYXI8m3FxH0C739gJ8+Kd7BnADmOK6W+hII9F7SPveGkSfiu6sQd/TeyWsM/zky4HVKX7BPJeKQN@freebsd.org, AJvYcCXsoXIcHT+OiMPCvdUCyYxwRKHeDo9FUOEJP5KONyGOd82eSQTY7v+mpdBIJznOzEBWmQuwa/ZQlmUjRqzMACukwDHxdyQ=@freebsd.org X-Gm-Message-State: AOJu0YxrABOr5iHeCwdBomqDIMour2Uvf7PbLcWMstMVxSEDlJ1AVh7G I8H1BbrGYaKtwfDiHPt7KP6dfpCG7eL+IXjwwxagOB1OxEoFeOdZJNl8Sg== X-Google-Smtp-Source: AGHT+IGm7lpEkS7TvANNbgshNlznPcHVysIpV3ubgeePxZT2BviKKYuaPqukjYwGJVZNlGvmMPnIaQ== X-Received: by 2002:a05:6214:5b02:b0:6cb:5605:ffb2 with SMTP id 6a1803df08f44-6d35c14e001mr153985256d6.24.1730648392877; Sun, 03 Nov 2024 07:39:52 -0800 (PST) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d3541782desm39387096d6.112.2024.11.03.07.39.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 07:39:52 -0800 (PST) Date: Sun, 3 Nov 2024 10:39:50 -0500 From: Mark Johnston To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0f5116d7efe3 - main - AMD IOMMU driver Message-ID: References: <202411022346.4A2NkeBT097606@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202411022346.4A2NkeBT097606@gitrepo.freebsd.org> X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XhJgt4zwhz4JLY X-Spamd-Bar: ---- On Sat, Nov 02, 2024 at 11:46:40PM +0000, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=0f5116d7efe33c81f0b24b56eec78af37898f500 > > commit 0f5116d7efe33c81f0b24b56eec78af37898f500 > Author: Konstantin Belousov > AuthorDate: 2024-05-12 10:20:11 +0000 > Commit: Konstantin Belousov > CommitDate: 2024-11-02 23:45:40 +0000 > > AMD IOMMU driver > > This driver is functionally equivalent to the in-tree Intel DMAR code. > It handles busdma and interrupt remapping from the host OS. There is no > integration with bhyve, and the stub iommu drivers in bhyve code cannot > coexist with this driver (planned). > > The biggest architectural problem with the code is that the AMD IOMMU > units are enumerated as PCIe-attached security devices, which is much > later after HPET and IOAPIC drivers attached and actived interrupts. > Because of this, HPET FSB interrupts and IOAPIC interrupts are always > identity-mapped. > > The code is of late alpha quality. By default the driver is disabled. > To enable for testing, set in loader.conf: > hw.amdiommu.enable=1 > hw.iommu.dma=1 <- to enable iommu busdma > hw.iommu.ir=1 <- to enable interrupt remapping > > Discussed with: emaste > Sponsored by: Advanced Micro Devices (AMD) > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D47256 This appears to break loading of vmm.ko, as sys/amd64/vmm/amd/amdiommu.c already defines a driver called "amdiommu". Perhaps the module in vmm should be renamed to amdviiommu or so?